1.3 Implementations and errata
The Arm core families
The Arm ARM defines what a PE must do. A core is one implementation of it, documented in its own Technical Reference Manual (TRM). Arm’s own A-profile cores fall into a few lines:
| Line | Purpose | Examples (MIDR PartNum) |
|---|---|---|
| Cortex-A, “big” | Performance per watt in mobile and client | Cortex-A72 (0xD08), A76 (0xD0B), A78 (0xD41), A710, A715, A720 |
| Cortex-A, “LITTLE” | Efficiency | Cortex-A53 (0xD03), A55 (0xD05), A510, A520 |
| Cortex-X | Peak single-thread performance | X1, X2, X3, X4, X925 |
| Neoverse N | Infrastructure, balanced | N1 (0xD0C), N2, N3 |
| Neoverse V | Infrastructure, maximum performance (wide SVE on V1) | V1, V2, V3 |
| Neoverse E | Throughput and data plane, SMT | E1 |
Since Cortex-A55/A75 (2017), Arm cores are built into DynamIQ clusters around a DynamIQ Shared Unit (DSU): DSU, DSU-AE, DSU-110, DSU-120. The DSU is not a PE. It holds the shared L3, the snoop control and snoop filter, the cluster’s bus interface (ACE or CHI) and ACP, and the cluster power-management logic. It has its own IMPLEMENTATION DEFINED registers, accessed from the cores: CLUSTERCFR_EL1, CLUSTERIDR_EL1 (DSU variant and revision), CLUSTERACTLR_EL1, CLUSTERPWRCTLR_EL1 and others. It also has its own TRM and its own errata notice. A DSU erratum is therefore matched against CLUSTERIDR_EL1, not against the core’s MIDR_EL1.
Neoverse cores also appear in Arm’s Compute Subsystem (CSS) and reference designs with a CMN mesh interconnect. Their errata can involve interactions with the interconnect, which is a separate product with its own errata notice.
What a core TRM adds to the Arm ARM
The TRM is where IMPLEMENTATION DEFINED becomes defined. Firmware engineers rely on these parts of it:
- The feature list and configuration options, such as crypto present or absent, cache sizes, and number of cores. These fix the expected values of the ID registers (1.1).
- IMPLEMENTATION DEFINED system registers. These are in the encoding space the architecture reserves for them (
op0=3,CRn=11orCRn=15), and are writtenS3_<op1>_C15_<CRm>_<op2>in assembly:CPUACTLR_EL1(andCPUACTLR2/3/..._EL1): auxiliary control, the “chicken bits” that disable a predictor, a prefetcher or a fast path. Most errata workarounds set a bit here. Arm documents many of these bits only through errata notices.CPUECTLR_EL1: extended control. On pre-DynamIQ cores (A53/A57/A72) it holdsSMPEN(bit 6), which must be set before caches and MMU are enabled for the core to take part in coherency. DynamIQ cores have no such bit (17.4).CPUPWRCTLR_EL1(DynamIQ):CORE_PWRDN_ENand retention controls, set before the finalWFIof a power-down.- Encodings move between generations. Cortex-A53 has
CPUACTLR_EL1atS3_1_C15_C2_0, while Neoverse N1 has it atS3_0_C15_C1_0. Always take the encoding from the specific TRM.
- Access control for those registers. On many Arm cores, IMPLEMENTATION DEFINED bits in
ACTLR_EL3andACTLR_EL2decide whether lower ELs may access them. Firmware normally leaves lower-EL write access disabled. - The
REVIDR_EL1bit map: which ECO fixes a given part reports. - Reset values, power domains, and the PMU event list, including IMPLEMENTATION DEFINED events (16.3).
Security note: Chicken bits change microarchitectural behaviour that the architecture does not describe, including speculation. Several Spectre-class mitigations (Part 14) are IMP DEF control bits that EL3 sets at reset. Lower-EL write access to
CPUACTLR_EL1lets a compromised kernel undo them. ReviewACTLR_EL3as carefully asSCR_EL3.
Reading an SDEN
Arm publishes a Software Developer Errata Notice (SDEN) for each core and for the DSU. Licensees integrating the core receive further detail under NDA. Each SDEN contains a summary table and one entry per erratum with:
- ID: a number such as 1688305, used in TF-A build flags and Linux Kconfig names.
- Category: A (critical, no acceptable workaround), B (significant, or critical with an acceptable workaround), C (minor). “A (rare)” and “B (rare)” mark conditions that are unlikely to occur in practice.
- Status: “Present in: r0p0, r1p0. Fixed in: r1p1.” Sometimes also “Fixed in r1p0 parts with
REVIDR_EL1[n]set”. - Description, configurations affected, conditions and implications. The conditions are the precise microarchitectural trigger sequence. Read them, because they often show that your software can never trigger the erratum.
- Workaround: what software must do, and at which EL.
Match an erratum to a part with MIDR_EL1: Variant [23:20] is the r and Revision [3:0] is the p. Compare (Variant << 4) | Revision as one number, which is what TF-A’s cpu_get_rev_var returns and what CPU_REV(r, p) builds. Then apply the REVIDR_EL1 exception if the SDEN gives one.
MIDR_EL1 = 0x411FD410 Implementer 0x41 (Arm), Variant 1, Arch 0xF, PartNum 0xD41, Revision 0
-> Cortex-A78 r1p0, rev_var = 0x10
"Present in r0p0, r1p0; fixed in r1p1" -> affected if rev_var <= 0x10 (check_erratum_ls ..., CPU_REV(1,0))
Validation note: On multi-die or multi-cluster parts, read
MIDR_EL1,REVIDR_EL1andCLUSTERIDR_EL1on every core during first silicon bring-up and log them. Mixed revisions within one product do happen, especially across chiplets taped out at different times. A workaround applied only where the boot core’s revision says so leaves the other dies exposed. The TF-A errata report at boot (below) is a cheap per-core cross-check.
Workaround types
| Type | Example | Who applies it |
|---|---|---|
| IMP DEF control bit | Set a CPUACTLR2_EL1 bit to disable a fast path | EL3 at reset, usually because lower-EL access is disabled |
| Instruction sequence | Add a DSB or ISB, repeat a TLBI, add a branch-predictor flush loop on exception entry | Whatever EL executes the affected code: EL3 vectors, the kernel, KVM |
| Software avoidance | Never generate the triggering pattern. Cortex-A53 843419 (ADRP at specific page offsets) and 835769 (multiply-accumulate after a memory op) are handled by the linker (--fix-cortex-a53-843419) and compiler (-mfix-cortex-a53-835769) | The toolchain, for every image that runs on the core |
| Split | EL3 sets a control bit and the OS must also add a sequence | Both, and the OS needs to be told |
Some workarounds cost performance or power. The SDEN says so, and that is why TF-A makes each one a build option instead of enabling all of them.
Apply at reset and on every warm boot
IMP DEF control registers are in the core’s power domain. When a core is powered off (CPU_OFF, or CPU_SUSPEND to a power-down state), they lose their values, and on power-up they come back at their reset values. A chicken bit set only on the cold-boot path therefore disappears after the first deep idle. The rules:
- Apply reset-type workarounds in the per-core reset handler, which runs on cold boot and on every warm entry. Apply them before the core enables its caches and MMU, joins coherency or enables branch prediction, unless the SDEN says otherwise. Some bits are only safe to change before these are enabled.
- Apply runtime workarounds at the point the SDEN names: power-down sequence, context switch, or exception entry.
- Check every core, with each core reading its own
MIDR_EL1. Never cache the boot core’s result.
TF-A’s errata framework: the worked example
TF-A keeps per-core code in lib/cpus/aarch64/<core>.S. Each erratum is a pair of macros: one applies the workaround, the other checks the revision.
cpu_reset_prologue cortex_a78
workaround_reset_start cortex_a78, ERRATUM(1688305), ERRATA_A78_1688305
sysreg_bit_set CORTEX_A78_ACTLR2_EL1, CORTEX_A78_ACTLR2_EL1_BIT_1
workaround_reset_end cortex_a78, ERRATUM(1688305)
check_erratum_ls cortex_a78, ERRATUM(1688305), CPU_REV(1, 0)
workaround_reset_start/endadds the code tocortex_a78_reset_func, guarded by the check function, when the build flagERRATA_A78_1688305=1. It also records an entry in the core’s errata list.check_erratum_ls(revision ≤),check_erratum_hs(≥) andcheck_erratum_rangegenerate the revision test againstcpu_get_rev_var.workaround_runtime_startplusapply_erratumplace a workaround elsewhere, for example incortex_a78_core_pwr_dwn, next to theCPUPWRCTLR_EL1.CORE_PWRDN_ENwrite.- CVE mitigations use the same machinery with
CVE(2022, 23960)andWORKAROUND_CVE_2022_23960. declare_cpu_ops cortex_a78, CORTEX_A78_MIDR, cortex_a78_reset_func, cortex_a78_core_pwr_dwnregisters the core. At reset,el3_entrypoint_commonrunscall_reset_handler, which callsplat_reset_handler, finds thecpu_opsentry matchingMIDR_EL1withget_cpu_ops_ptr, and calls its reset function.bl31_warm_entrypointuses the same macro, so every warm boot re-applies the workarounds.- DSU errata are
ERRATA_DSU_<id>flags, checked againstCLUSTERIDR_EL1. - With
REPORT_ERRATA=1, each core logs one line per erratum that applies to its revision. An enabled workaround printsBL31: cortex_a78: CPU workaround for erratum 1688305 was appliedat INFO level, so it appears only withLOG_LEVEL40 or higher. If the erratum applies but its flag is off, the line ends inmissing!and is printed as a WARN. Review this output on first silicon, on every core type.
The authoritative flag list is docs/design/cpu-specific-build-macros.rst.
Telling lower ELs: SMCCC_ARCH_WORKAROUND_* and the Errata ABI
Some mitigations need cooperation between EL3 and the OS. SMCCC (12.3) defines Arm-architecture calls that the OS discovers with SMCCC_ARCH_FEATURES (0x80000001). A return of 0 means the call is implemented and needed. Where the spec defines it, 1 means this PE is not affected. A negative value means not supported.
| Call | ID | Issue | Detail |
|---|---|---|---|
SMCCC_ARCH_WORKAROUND_1 | 0x80008000 | CVE-2017-5715 (Spectre v2, branch target injection) | 14.4 |
SMCCC_ARCH_WORKAROUND_2 | 0x80007FFF | CVE-2018-3639 (Spectre v4, SSB) | 14.5 |
SMCCC_ARCH_WORKAROUND_3 | 0x80003FFF | CVE-2022-23960 (Spectre-BHB), also covers WA_1 | 14.4 |
SMCCC_ARCH_WORKAROUND_4 | 0x80000004 | CVE-2024-7881 (data memory-dependent prefetcher). Discovery only: firmware applies the fix at boot. Linux enables KPTI on affected cores if the call is absent | 14.6 |
For errata in general, Arm defines the Errata Management Firmware Interface (DEN0100), the “Errata ABI”. EM_VERSION (0x840000F0), EM_FEATURES (0x840000F1) and EM_CPU_ERRATUM_FEATURES (0x840000F2, arguments: erratum ID and a forward flag that a hypervisor sets when forwarding a guest query). The answer is per PE:
| Return | Meaning for the caller |
|---|---|
HIGHER_EL_MITIGATION (3) | Affected, and fully mitigated above you. Do nothing |
NOT_AFFECTED (2) | This PE, revision and system are not affected |
AFFECTED (1) | Affected and not fully mitigated above you. Apply your part of the workaround |
UNKNOWN_ERRATUM (−3) | Firmware has no information. Fall back to MIDR/REVIDR matching |
The ABI exists because MIDR/REVIDR matching cannot tell the OS two things: whether firmware already set the chicken bit, and whether a non-Arm interconnect makes a core erratum reachable. TF-A implements it with ERRATA_ABI_SUPPORT=1. It answers from the same errata list (a split workaround reports AFFECTED even when the EL3 half is applied), and ERRATA_NON_ARM_INTERCONNECT adds platform-specific entries. OS support varies, so do not assume the ABI is queried.
Checkpoint
Q1.3.1 A workaround that sets a CPUACTLR_EL1 bit is applied by EL3 firmware in its cold-boot platform setup. Tests pass after boot, but the erratum’s failure signature appears hours later under a workload with deep idle. What is the most likely cause?
- A. The OS kernel cleared the bit, since
CPUACTLR_EL1is writable from EL1 by default on all Arm cores - B. The write needed a
DSBafter it, and without one the bit only took effect on some cores - C. The core lost the bit when it powered down for idle, and warm-boot entry did not re-run the workaround because it was not in the per-core reset handler
- D. Deep idle changes
MIDR_EL1.Revision, so the revision check then fails
Answer
C. IMP DEF control registers are in the core power domain and return to their reset values on every power-up. Workarounds belong in the per-core reset function, which TF-A runs on both cold and warm entry. A is possible only if ACTLR_EL3/ACTLR_EL2 grant lower-EL write access, which is IMP DEF and normally disabled, and it would not explain the link to idle. B: synchronisation of a system register write needs an ISB at most and has nothing to do with idle. MIDR_EL1 is fixed.
Read more: core TRM, CPUACTLR_EL1 and power domains; TF-A lib/cpus reset handler and bl31_warm_entrypoint
Q1.3.2 A core reports MIDR_EL1 = 0x412FD0C0. An erratum is listed as “Present in r0p0–r2p0, fixed in r3p0; also fixed in r2p0 parts with REVIDR_EL1[4] set”. REVIDR_EL1 reads 0x10. What is the right decision?
- A. Not affected. The part is r2p0 (Variant 2, Revision 0), which is in the affected range, but
REVIDR_EL1bit 4 is set, so the ECO fix is present - B. Affected, because
REVIDR_EL1is IMPLEMENTATION DEFINED and can never override MIDR - C. Not affected, because the Revision field is 0 and the fix is listed under r3p0, whose Revision is also 0
- D. Affected, because Variant 2 is r0p2, inside r0p0–r2p0
Answer
A. Variant [23:20] = 2 and Revision [3:0] = 0 give r2p0, which falls in the affected range. 0x10 sets bit 4, which the SDEN names as the ECO marker. REVIDR_EL1 is IMP DEF in the Arm ARM, but the core’s TRM and SDEN define it, and that is exactly how fixes within a revision are reported. C compares only Revision and ignores Variant. D swaps r and p.
Read more: Arm ARM (DDI0487), MIDR_EL1, REVIDR_EL1; the core’s SDEN errata status fields
Q1.3.3 TF-A is built with the workaround for erratum N enabled, and with ERRATA_ABI_SUPPORT=1. On an affected core, the kernel’s EM_CPU_ERRATUM_FEATURES(N) call returns AFFECTED (1). What does this imply?
- A. A firmware bug, because an enabled workaround must always report
NOT_AFFECTED - B. The erratum has a split workaround. EL3 applied its part, but the caller must still apply its own part (for example an instruction sequence)
- C. The forward flag was set from EL1, so the result is invalid
- D. The core has an ECO fix in
REVIDR_EL1, so the workaround was skipped
Answer
B. If the PE is affected and firmware mitigates it completely, the answer is HIGHER_EL_MITIGATION (3). AFFECTED with the workaround enabled is how TF-A reports a split workaround, where only part of the mitigation can be done above the caller. A misreads the meaning of NOT_AFFECTED, which describes the PE, not the mitigation. A forward flag set from EL1 returns INVALID_PARAMETERS (−2), not 1. D cannot produce this result either: TF-A’s check functions mostly test MIDR_EL1 only, and where a check does account for an ECO fix, the answer is NOT_AFFECTED, not AFFECTED.
Read more: Arm Errata Management Firmware Interface (DEN0100); TF-A services/std_svc/errata_abi