1.1 Versions, FEAT_ names and discovery
Versions are sets of features
The A-profile architecture is versioned Armv8.0 to Armv8.9 and Armv9.0 onward. Since Armv8.5 (2018) Arm has published one set of extensions a year. Each set added one v8.x and, from 2021, a matching v9.x, until the v8 line stopped:
| Armv9 version | Equivalent Armv8 base | Extensions year |
|---|---|---|
| v9.0 | v8.5 | v8.5 in 2018; v9.0 announced 2021 |
| v9.1 | v8.6 | 2019 |
| v9.2 | v8.7 | 2020 |
| v9.3 | v8.8 | 2021 |
| v9.4 | v8.9 | 2022 |
| v9.5 | none | 2023 |
| v9.6 | none | 2024 |
| v9.7, v9.8, … | none | 2025 onward |
The pairing rule is v9.n = v8.(n+5) plus the v9 baseline, up to v9.4/v8.9. An Armv9.n implementation must also be a compliant Armv8.(n+5) implementation. The v8 line ends at v8.9: there is no v8.10, so v9.5 and later have no v8 counterpart. 1.2 covers what the v9 baseline adds.
A version number is shorthand for a set of features, each named FEAT_xxx (for example FEAT_LSE, FEAT_PAuth, FEAT_MTE2, FEAT_RME). Each feature has two version attributes in DDI0487 section A2, “Armv8-A and Armv9-A architecture extensions”:
- Permitted from vX (the Arm ARM says “OPTIONAL from”): an implementation claiming vX or later may include it.
- Mandatory from vY: an implementation claiming vY or later must include it. Many features never become mandatory.
Examples:
| Feature | Permitted from | Mandatory from |
|---|---|---|
FEAT_RAS | v8.0 | v8.2 |
FEAT_SB | v8.0 | v8.5 |
FEAT_CLRBHB | v8.0 | v8.9 |
FEAT_MTE / FEAT_MTE2 | v8.5 | never |
FEAT_SVE | v8.2 | see 1.2 |
Two more rules from A2 govern the edges. First, an Armv8.x implementation is permitted to include any subset of the features of Armv8.(x+1), so a “v8.2” core with a few v8.3 features is architecturally legal. Second, claiming vY means implementing every feature mandatory at vY and below. Some features also have dependencies: one feature may be permitted only if another is implemented, or two may be required together. A2 lists these per feature.
Bring-up note: Never derive a feature from a version string, compiler
-marchflag, or marketing name. Compiler tables enable what the PCS/ABI wants at that-march, not what A2 makes mandatory (they disagree on SVE2 for v9.0, for example). The core TRM lists the implemented features, and the ID registers report them at run time. Treat both as the ground truth, and check the TRM against the ID registers on first silicon.
No register tells you the version
MIDR_EL1.Architecture (bits [19:16]) reads 0b1111, meaning “defined by the ID registers”. No architected register encodes “v8.7” or “v9.2”. Software discovers each feature separately, through 4-bit fields in the ID registers.
The AArch64 ID register families
These are all in the “feature ID space” (op0=3, op1=0, CRn=0, CRm=0..7) and are readable at EL1 and above:
| Register(s) | What it describes |
|---|---|
ID_AA64PFR0_EL1 | EL0–EL3 AArch64/AArch32 support, FP, AdvSIMD, GIC system-register interface, RAS, SVE, SEL2, MPAM, AMU, DIT, RME, CSV2, CSV3 |
ID_AA64PFR1_EL1, ID_AA64PFR2_EL1 | BTI, SSBS, MTE, SME, NMI, GCS, the _frac refinements; PFR2 holds newer MTE refinements and FPMR |
ID_AA64ISAR0_EL1 – ID_AA64ISAR3_EL1 | Instruction-set features: crypto, atomics, CRC, RNDR, TLBI range/outer-shareable, PAuth algorithms, LRCPC, BF16/I8MM, SB, SPECRES, MOPS, CLRBHB, WFxT, SYSREG_128, and more |
ID_AA64MMFR0_EL1 – ID_AA64MMFR4_EL1 | Memory system: PARange, ASID bits, granule support, ECV, FGT, VHE, PAN, HAFDBS, BBM, E0PD, TCR2/SCTLR2, S1PIE/S1POE, MEC, E2H0 |
ID_AA64DFR0_EL1, ID_AA64DFR1_EL1 | Debug and monitoring: Debug version, breakpoint/watchpoint counts, PMUVer, SPE, TraceVer/TraceBuffer, BRBE, DoubleLock, MTPMU |
ID_AA64ZFR0_EL1 | SVE sub-features (SVEver, AES, BitPerm, …), only meaningful if SVE or SME is present |
ID_AA64SMFR0_EL1 | SME sub-features and SME version |
ID_AA64FPFR0_EL1 | FP8 formats and operations (FEAT_FP8 and related) |
Three identification registers sit beside them:
MIDR_EL1: Implementer [31:24] (0x41is Arm Ltd), Variant [23:20], Architecture [19:16], PartNum [15:4], Revision [3:0]. Variant and Revision are therVpRthat errata notices use (1.3).REVIDR_EL1: IMPLEMENTATION DEFINED. Cores typically use bits here to report ECO fixes within a revision, so that software can tell that a specific erratum is fixed even thoughMIDR_EL1is unchanged. The core TRM defines the bits.MPIDR_EL1: affinity Aff3 [39:32], Aff2 [23:16], Aff1 [15:8], Aff0 [7:0], plus U [30] (uniprocessor) and MT [24] (the lowest affinity level is numbered as if it held multithreaded logical PEs). DynamIQ cores set MT=1 even when they have no SMT, with Aff0=0 and the core number in Aff1. MPIDR is a logical ID: it says nothing about core type, and its mapping onto physical topology is a platform decision (see 17.5).
When EL2 is implemented and enabled, EL1 reads of MIDR_EL1 and MPIDR_EL1 return VPIDR_EL2 and VMPIDR_EL2. A hypervisor uses these to present virtual identities.
The field-level tables for these registers are in Appendix B. The rules below matter more than memorising them.
The field rules
DDI0487 “Principles of the ID scheme for fields in ID registers” sets the conventions:
- Fields are 4 bits, and a larger value means more functionality. A value of N implies everything that values below N indicated. Correct tests are therefore
field >= X, neverfield == X. A test with==breaks on the next core, when0b0010arrives with a superset feature. - Most fields are unsigned. A few are signed, and in those
0b1111(−1) means “not implemented” while0b0000means “implemented”. Examples areID_AA64PFR0_EL1.FPand.AdvSIMD(0b0000= present,0b0001= present with half-precision,0b1111= absent),ID_AA64MMFR0_EL1.TGran4and.TGran64, andID_AA64DFR0_EL1.DoubleLock. Reading a signed field as unsigned turns “absent” into “the best possible value”. - Exceptions are documented per field.
ID_AA64DFR0_EL1.PMUVer == 0b1111means an IMPLEMENTATION DEFINED PMU, not PMUv3 at its highest version.ID_AA64MMFR0_EL1.TGran16is unsigned with0b0000= not supported, the opposite polarity toTGran4. Always read the field description, not just the encoding pattern. - Reserved and unallocated encodings in the feature ID space read as zero. A feature that a core predates therefore reads as “not implemented”. Software can read
ID_AA64ISAR3_EL1(encodedS3_0_C0_C6_3) on an old core and get 0. Use the genericS3_...name if the assembler does not know the register.
/* Signed vs unsigned extraction: the one helper you need. */
static inline unsigned idfield_u(uint64_t reg, unsigned shift)
{ return (reg >> shift) & 0xf; }
static inline int idfield_s(uint64_t reg, unsigned shift)
{ return ((int64_t)(reg << (60 - shift))) >> 60; } /* sign-extend 4 bits */
/* FP present? ID_AA64PFR0_EL1.FP is signed, bits [19:16] */
bool has_fp = idfield_s(read_id_aa64pfr0_el1(), 16) >= 0;
Trapping ID registers: HCR_EL2.TID3 and FEAT_IDST
The ID registers cannot be written, but a hypervisor can choose what a guest sees. HCR_EL2.TID3 traps EL1 (and EL0 where applicable) reads of the “ID group 3” registers to EL2: the ID_AA64*, the AArch32 ID_* and MVFRn registers, and the unallocated encodings of the feature ID space. These traps report with EC = 0x18 (trapped MSR/MRS/system instruction), with the full op0/op1/CRn/CRm/op2 and Rt in the ISS, so KVM or another hypervisor can return sanitised values. TID1 covers REVIDR_EL1 and AIDR_EL1, and TID2 covers CTR_EL0, CCSIDR_EL1, CLIDR_EL1 and CSSELR_EL1. Fine-grained traps (HFGRTR_EL2, FEAT_FGT) allow per-register control; see 11.1.
FEAT_IDST (Armv8.4, reported in ID_AA64MMFR2_EL1.IDS) changes the syndrome for exceptions caused by reads in the feature ID space (op0=3, op1={0,1,3}, CRn=0, CRm=0..7). Without it, an access that is UNDEFINED, such as an EL0 MRS of an ID_AA64* register or a read of GMID_EL1 on a core without FEAT_MTE2, reports EC = 0x00 (unknown reason). The handler then has to fetch and decode the instruction to emulate it. With FEAT_IDST, the same exception reports EC = 0x18 with a decoded ISS. Linux uses either path to emulate EL0 reads of the ID registers with sanitised values, which HWCAP_CPUID advertises.
Security note: ID registers are an information channel and a policy input. A guest or lower EL that sees a feature bit will use the feature. If the higher EL has not enabled it, the result is an UNDEF or an unexpected trap. If the higher EL has enabled it but does not context-switch its state, the result is a cross-world leak. Hiding a feature from a guest with
TID3only works if EL2 also traps or disables the feature itself (2.6).
Heterogeneous cores: whose ID registers?
Each PE has its own ID registers. On a system with different core types (big.LITTLE/DynamIQ with mixed cores, or a multi-chiplet SoC that mixes core revisions), the values can differ between cores. The architecture says nothing about system-wide consistency, so each firmware layer handles it differently.
TF-A enables features per core. Each ENABLE_FEAT_xxx build flag takes 0 (compiled out), 1 (assumed present and enabled unconditionally) or 2 (compiled in, checked at run time by is_feat_xxx_supported(), which reads the local ID register). With FEATURE_DETECTION=1, a debug build checks that the flags match the running core and reports mismatches. This is the tool to use at bring-up when the RTL configuration or FVP parameters may not match the build. TF-A does not compute a system-wide intersection. With flag value 2 on a mixed system, each core enables what it has, and a core-type asymmetry is passed straight up to the OS. 17.3 covers the enable side.
Linux cpufeature (arch/arm64/kernel/cpufeature.c) builds a sanitised system-wide view. Each ID register field is described by ARM64_FTR_BITS(visible, strict, type, shift, width, safe_val), where type gives the safe direction: FTR_LOWER_SAFE for most features (take the minimum across CPUs), FTR_HIGHER_SAFE for some cache-geometry-style fields, and FTR_EXACT (fall back to safe_val if CPUs disagree). Signed fields use the S_ARM64_FTR_BITS variant, which applies rule 2 above. Per-CPU values are folded into the system value as CPUs come up. A “strict” mismatch prints SANITY CHECK: Unexpected variation in SYS_... and taints the kernel. Once system capabilities are finalised, a late CPU that lacks a capability already in use is refused: verify_local_cpu_capabilities() fails and the CPU is not brought online (cpu_die_early()). The sanitised values are what EL0 sees through MRS emulation, and what KVM bases guest ID registers on.
Validation note: On a new SoC, dump every ID register on every core and every cluster type, and diff the results against the TRM and against each other. Expected differences between core types should match the TRM. Any difference between cores of the same type indicates a configuration-pin, RTL-configuration or fuse problem. Under Linux,
dmesg | grep -i "SANITY CHECK\|CPU features"and/sys/devices/system/cpu/cpu*/regs/identification/midr_el1give a first view, and a bare-metal loop over all PEs that printsMIDR/REVIDR/ID_AA64*is the authoritative one.
Checkpoint
Q1.1.1 Firmware tests for half-precision FP support with if (((pfr0 >> 16) & 0xf) >= 1), where bits [19:16] are ID_AA64PFR0_EL1.FP. On a core with no floating-point unit at all, what happens?
- A. The test is correct: FP absent reads as 0, which fails
>= 1 - B. The test is correct, because the reserved value
0b1111is never used for FP - C. The test wrongly passes, because FP is a signed field and
0b1111(−1, not implemented) read as unsigned is 15 - D. The read itself UNDEFs on a core without FP, so the test never runs
Answer
C. ID_AA64PFR0_EL1.FP is one of the signed fields. 0b0000 means FP is implemented, 0b0001 adds half-precision, and 0b1111 means not implemented. Sign-extend the field and test >= 1 (or >= 0 for “any FP”). Option A describes the polarity of an unsigned field, which is how most fields behave, and that is why the bug is easy to write. The ID register read itself is always permitted at EL1.
Read more: Arm ARM (DDI0487), “Principles of the ID scheme for fields in ID registers”; ID_AA64PFR0_EL1
Q1.1.2 A core’s TRM says “Armv8.2-A, with FEAT_LRCPC (Armv8.3) and FEAT_DotProd”. Boot firmware wants to use pointer authentication, which is mandatory from Armv8.3. What may it assume?
- A. PAuth is present: implementing one v8.3 feature makes the core a v8.3 implementation, so every v8.3 mandatory feature follows
- B. Only the v8.2 mandatory set and the listed extras are guaranteed. PAuth must be checked in
ID_AA64ISAR1_EL1(APA/API/GPA/GPI, andID_AA64ISAR2_EL1for APA3/GPA3) - C. The TRM describes an illegal configuration, because a v8.2 core may not contain v8.3 features
- D.
MIDR_EL1.Architecturereports the effective version, so firmware should read it to decide
Answer
B. A2 lets an Armv8.x implementation include any subset of the features of Armv8.(x+1), and some features are permitted well below the version where they become mandatory. The claimed version guarantees only that version’s mandatory set. A is the common mistake: a v8.3 feature in a v8.2 core does not make the other v8.3 mandatory features present. C is wrong for the same reason. MIDR_EL1.Architecture reads 0b1111, meaning “see the ID registers”, and carries no version.
Read more: Arm ARM (DDI0487), A2 “Armv8-A and Armv9-A architecture extensions”; ID_AA64ISAR1_EL1; MIDR_EL1
Q1.1.3 A Linux EL0 process executes MRS x0, ID_AA64ISAR0_EL1 on a core with FEAT_IDST. Which describes the exception the kernel receives?
- A. None. EL0 can read the ID registers directly and gets the raw hardware value
- B.
EC = 0x00, and the kernel must decode the faulting instruction to find the register - C. It is trapped to EL2 with
EC = 0x18becauseHCR_EL2.TID3is always set under Linux - D.
EC = 0x18taken to EL1, with the register encoding andRtin the ISS, so the kernel can emulate a sanitised value
Answer
D. EL0 accesses to the ID_AA64* registers are UNDEFINED. FEAT_IDST makes exceptions from reads in the feature ID space report EC = 0x18 with a decoded ISS, instead of EC = 0x00. B describes a core without FEAT_IDST: the kernel still emulates, but has to decode the instruction itself. C confuses the hypervisor trap with the EL0 case: TID3 traps EL1 reads to EL2, and an EL0 UNDEF goes to EL1 regardless.
Read more: Arm ARM (DDI0487), FEAT_IDST in A2; ESR_ELx EC 0x18; HCR_EL2.TID3