Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collect ArmCpuInfo data #114

Open
hrw opened this issue Nov 24, 2024 · 1 comment
Open

Collect ArmCpuInfo data #114

hrw opened this issue Nov 24, 2024 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@hrw
Copy link
Owner

hrw commented Nov 24, 2024

I got some idea around AArch64 feature flags. But for this I need some more data than Linux provides in /proc/cpuinfo file.

Need to run ArmCpuInfo in EFI shell.

This gives much more data to process.

@hrw hrw added enhancement New feature or request help wanted Extra attention is needed labels Nov 24, 2024
@hrw
Copy link
Owner Author

hrw commented Nov 24, 2024

Example from Rockchip RK3588:

Shell> ArmCpuInfo.efi
ArmCpuInfo v1.3.0

ID_AA64AFR0_EL1  = 0x0000000000000000
ID_AA64AFR1_EL1  = 0x0000000000000000
ID_AA64DFR0_EL1  = 0x0000000010305408
ID_AA64DFR1_EL1  = 0x0000000000000000
ID_AA64FPFR0_EL1 = 0x0000000000000000
ID_AA64ISAR0_EL1 = 0x0000100010211120
ID_AA64ISAR1_EL1 = 0x0000000000100001
ID_AA64ISAR2_EL1 = 0x0000000000000000
ID_AA64ISAR3_EL1 = 0x0000000000000000
ID_AA64MMFR0_EL1 = 0x0000000000101122
ID_AA64MMFR1_EL1 = 0x0000000010212122
ID_AA64MMFR2_EL1 = 0x0000000000001011
ID_AA64MMFR3_EL1 = 0x0000000000000000
ID_AA64MMFR4_EL1 = 0x0000000000000000
ID_AA64PFR0_EL1  = 0x0000000011112222
ID_AA64PFR1_EL1  = 0x0000000000000010
ID_AA64PFR2_EL1  = 0x0000000000000000
ID_AA64SMFR0_EL1 = 0x0000000000000000
ID_AA64ZFR0_EL1  = 0x0000000000000000

Reg   | Name         |  Bits | Value | Feature
------|--------------|-------|-------|----------------------------------------------
MMFR0 | ECV          | 63:60 |  0000 | FEAT_ECV not implemented.
MMFR0 | FGT          | 59:56 |  0000 | FEAT_FGT not implemented.
MMFR0 | ExS          | 47:44 |  0000 | FEAT_ExS not implemented.
MMFR0 | TGran4       | 31:28 |  0000 |  4KB granule supported.
MMFR0 | TGran4_2     | 43:40 |  0000 |  4KB granule support at stage2 as above.
MMFR0 | TGran16      | 23:20 |  0001 | 16KB granule supported.
MMFR0 | TGran16_2    | 35:32 |  0000 | 16KB granule support at stage2 as above.
MMFR0 | TGran64      | 27:24 |  0000 | 64KB granule supported.
MMFR0 | TGran64_2    | 39:36 |  0000 | 64KB granule support at stage2 as above.
MMFR0 | SNSMem       | 15:12 |  0001 | Supports a distinction between Secure and Non-Secure Memory.
MMFR0 | BigEnd       | 11:8  |  0001 | Mixed-endian support.
MMFR0 | BigEndEL0    | 19:16 |  0000 | No mixed-endian support at EL0.
MMFR0 | ASIDBits     |  7:4  |  0010 | ASID: 16 Bits
MMFR0 | PARange      |  3:0  |  0010 | 40 Bits (1TB) of physical address range supported.
------|--------------|-------|-------|----------------------------------------------
MMFR1 | ECBHB        | 63:60 |  0000 | FEAT_ECBHB not implemented.
MMFR1 | CMOW         | 59:56 |  0000 | FEAT_CMOW not implemented.
MMFR1 | TIDCP1       | 55:52 |  0000 | FEAT_TIDCP1 not implemented
MMFR1 | nTLBPA       | 51:48 |  0000 | FEAT_nTLBPA not implemented.
MMFR1 | AFP          | 47:44 |  0000 | FEAT_AFP not implemented.
MMFR1 | HCX          | 43:40 |  0000 | FEAT_HCX not implemented.
MMFR1 | ETS          | 39:36 |  0000 | FEAT_ETS not implemented.
MMFR1 | TWED         | 35:32 |  0000 | FEAT_TWED not implemented.
MMFR1 | XNX          | 31:28 |  0001 | FEAT_XNX implemented.
MMFR1 | SpecSEI      | 27:24 |  0000 | The PE never generates an SError interrupt due to an 
      |              |       |       | External abort on a speculative read.
MMFR1 | PAN          | 23:20 |  0010 | FEAT_PAN2 implemented.
MMFR1 | LO           | 19:16 |  0001 | FEAT_LOR implemented.
MMFR1 | HPDS         | 15:12 |  0010 | FEAT_HPDS2 implemented.
MMFR1 | VH           | 11:8  |  0001 | FEAT_VHE implemented.
MMFR1 | VMIDBits     |  7:4  |  0010 | FEAT_VMID16 implemented.
MMFR1 | HAFDBS       |  3:0  |  0010 | FEAT_HAFDBS implemented with dirty status support.
------|--------------|-------|-------|----------------------------------------------
MMFR2 | E0PD         | 63:60 |  0000 | FEAT_E0PD not implemented.
MMFR2 | EVT          | 59:56 |  0000 | FEAT_EVT not implemented.
MMFR2 | BBM          | 55:52 |  0000 | FEAT_BBM: Level 0 support for changing block size.
MMFR2 | TTL          | 51:48 |  0000 | FEAT_TTL not implemented.
MMFR2 | FWB          | 43:40 |  0000 | FEAT_S2FWB not implemented.
MMFR2 | IDS          | 39:36 |  0000 | FEAT_IDST not implemented.
MMFR2 | AT           | 35:32 |  0000 | FEAT_LSE2 not implemented.
MMFR2 | ST           | 31:28 |  0000 | FEAT_TTST not implemented.
MMFR2 | NV           | 27:24 |  0000 | FEAT_NV not implemented.
MMFR2 | CCIDX        | 23:20 |  0000 | FEAT_CCIDX not implemented.
MMFR2 | VARange      | 19:16 |  0000 | FEAT_LVA not implemented.
MMFR2 | IESB         | 15:12 |  0001 | FEAT_IESB implemented.
MMFR2 | LSM          | 11:8  |  0000 | FEAT_LSMAOC not implemented.
MMFR2 | UAO          |  7:4  |  0001 | FEAT_UAO implemented.
MMFR2 | CnP          |  3:0  |  0001 | FEAT_TTCNP implemented.
------|--------------|-------|-------|----------------------------------------------
PFR0  | CSV3         | 63:60 |  0000 | FEAT_CSV3 not implemented.
PFR0  | CSV2         | 59:56 |  0000 | Not disclosed whether FEAT_CSV2 is implemented.
PFR0  | RME          | 55:52 |  0000 | FEAT_RME not implemented
PFR0  | DIT          | 51:48 |  0000 | FEAT_DIT not implemented.
PFR0  | AMU          | 47:44 |  0000 | FEAT_AMU not implemented.
PFR0  | MPAM         | 43:40 |  0000 | FEAT_MPAM not implemented.
PFR0  | SEL2         | 39:36 |  0000 | Secure EL2 not implemented.
PFR0  | SVE          | 35:32 |  0000 | FEAT_SVE not implemented.
PFR0  | RAS          | 31:28 |  0001 | FEAT_RAS implemented.
PFR0  | GIC          | 27:24 |  0001 | System registers to versions 3.0/4.0 of GIC CPU implemented.
PFR0  | AdvSIMD      | 23:20 |  0001 | Advanced SIMD with half precision support (FEAT_FP16).
PFR0  | FP           | 19:16 |  0001 | Floating-point with half-precision support (FEAT_FP16).
PFR0  | EL3          | 15:12 |  0010 | EL3 in AArch64 and AArch32
PFR0  | EL2          | 11:8  |  0010 | EL2 in AArch64 and AArch32
PFR0  | EL1          |  7:4  |  0010 | EL1 in AArch64 and AArch32
PFR0  | EL0          |  3:0  |  0010 | EL0 in AArch64 and AArch32
------|--------------|-------|-------|----------------------------------------------
PFR1  | PFAR         | 63:60 |  0000 | FEAT_PFAR not implemented.
PFR1  | DF2          | 59:56 |  0000 | FEAT_DoubleFault2 not implemented.
PFR1  | MTEX         | 55:52 |  0000 | Canonical Tag checking and Memory tagging with Address 
      |              |       |       | tagging disabled are not supported.
PFR1  | THE          | 51:48 |  0000 | FEAT_THE not implemented.
PFR1  | GCS          | 47:44 |  0000 | FEAT_GCS not implemented.
PFR1  | MTE_frac     | 43:40 |  0000 | FEAT_MTE_ASYNC implemented.
PFR1  | NMI          | 39:36 |  0000 | FEAT_NMI not implemented.
PFR1  | RNDR_trap    | 31:28 |  0000 | FEAT_RNG_TRAP not implemented.
PFR1  | SME          | 27:24 |  0000 | FEAT_SME not implemented.
PFR1  | MTE          | 11:8  |  0000 | FEAT_MTE not implemented.
PFR1  | SSBS         |  7:4  |  0001 | FEAT_SSBS implemented.
PFR1  | BT           |  3:0  |  0000 | FEAT_BTI not implemented.
------|--------------|-------|-------|----------------------------------------------
ISAR0 | RNDR         | 63:60 |  0000 | FEAT_RNG not implemented.
ISAR0 | TLB          | 59:56 |  0000 | FEAT_TLBIOS/FEAT_TLBIRANGE not implemented.
ISAR0 | TS           | 55:52 |  0000 | FEAT_FlagM/FEAT_FlagM2 not implemented.
ISAR0 | FHM          | 51:48 |  0000 | FEAT_FHM not implemented.
ISAR0 | DP           | 47:44 |  0001 | FEAT_DotProd implemented.
ISAR0 | SM4          | 43:40 |  0000 | FEAT_SM4 not implemented.
ISAR0 | SM3          | 39:36 |  0000 | FEAT_SM3 not implemented.
ISAR0 | SHA3         | 35:32 |  0000 | FEAT_SHA3 not implemented.
ISAR0 | RDM          | 31:28 |  0001 | FEAT_RDM implemented.
ISAR0 | TME          | 27:24 |  0000 | TME instructions not implemented.
ISAR0 | Atomic       | 23:20 |  0010 | FEAT_LSE implemented.
ISAR0 | CRC32        | 19:16 |  0001 | CRC32 instructions implemented.
ISAR0 | SHA2         | 15:12 |  0001 | FEAT_SHA256 implemented.
ISAR0 | SHA1         | 11:8  |  0001 | FEAT_SHA1 implemented.
ISAR0 | AES          |  7:4  |  0010 | FEAT_AES and FEAT_PMULL implemented.
------|--------------|-------|-------|----------------------------------------------
ISAR1 | LS64         | 63:60 |  0000 | FEAT_LS64 not implemented.
ISAR1 | XS           | 59:56 |  0000 | FEAT_XS not implemented.
ISAR1 | I8MM         | 55:52 |  0000 | FEAT_I8MM not implemented.
ISAR1 | DGH          | 51:48 |  0000 | FEAT_DGH not implemented.
ISAR1 | BF16         | 47:44 |  0000 | FEAT_BF16 not implemented.
ISAR1 | SPECRES      | 43:40 |  0000 | FEAT_SPECRES not implemented.
ISAR1 | SB           | 39:36 |  0000 | FEAT_SB not implemented.
ISAR1 | FRINTTS      | 35:32 |  0000 | FEAT_FRINTTS not implemented.
ISAR1 | GPI          | 31:28 |  0000 | FEAT_PACIMP not implemented.
ISAR1 | GPA          | 27:24 |  0000 | FEAT_PACQARMA5 not implemented.
ISAR1 | LRCPC        | 23:20 |  0001 | FEAT_LRCPC implemented.
ISAR1 | FCMA         | 19:16 |  0000 | FEAT_FCMA not implemented.
ISAR1 | JSCVT        | 15:12 |  0000 | FEAT_JSCVT not implemented.
ISAR1 | API          | 11:8  |  0000 | Address Authentication (API) not implemented.
ISAR1 | APA          |  7:4  |  0000 | Address Authentication (APA) not implemented.
ISAR1 | DPB          |  3:0  |  0001 | FEAT_DPB implemented.
------|--------------|-------|-------|----------------------------------------------
DFR0  | HPMN0        | 63:60 |  0000 | Setting MDCR_EL2.HPMN to zero has CONSTRAINED 
      |              |       |       | UNPREDICTABLE behavior.
DFR0  | ExtTrcBuff   | 59:56 |  0000 | Trace Buffer External Mode not implemented.
DFR0  | BRBE         | 55:52 |  0000 | FEAT_BRBE not implemented.
DFR0  | MTPMU        | 51:48 |  0000 | FEAT_MTPMU not implemented.
DFR0  | TraceBuffer  | 47:44 |  0000 | FEAT_TRBE not implemented.
DFR0  | TraceFilt    | 43:40 |  0000 | FEAT_TRF not implemented.
DFR0  | DoubleLock   | 39:36 |  0000 | FEAT_DoubleLock implemented.
DFR0  | PMSVer       | 35:32 |  0000 | FEAT_SPE not implemented.
DFR0  | CTX_CMPs     | 31:28 |  0001 | Number of breakpoints that are context-aware, minus 1.
DFR0  | SEBEP        | 27:24 |  0000 | FEAT_SEBEP not implemented.
DFR0  | WRPs         | 23:20 |  0011 | Number of watchpoints, minus 1.
DFR0  | PMSS         | 19:16 |  0000 | FEAT_PMUv2_SS not implemented.
DFR0  | BRPs         | 15:12 |  0101 | Number of breakpoints, minus 1.
DFR0  | PMUVer       | 11:8  |  0100 | FEAT_PMUv3p1 implemented.
DFR0  | TraceVer     |  7:4  |  0000 | Trace unit System registers not implemented.
DFR0  | DebugVer     |  3:0  |  1000 | FEAT_Debugv8p2 implemented.
------|--------------|-------|-------|----------------------------------------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant