16.7 RAS architecture
3.4 covers the PE side of RAS: SError syndrome, ESB, DISR_EL1 and IESB. This section covers the rest: the error records that say what failed and where, the error types that say how far the damage spread, poison as the containment mechanism, and the signals (in-band aborts and out-of-band interrupts) that connect a node to software. The authority is the RAS System Architecture (DDI0587). The Arm ARM defines the PE’s System-register view of it (FEAT_RAS, mandatory from v8.2) and the exception reporting.
Nodes, records and groups
An error node is a component that detects errors and reports them through one or more error records. Examples are a PE’s L1/L2 RAMs, a DSU’s L3, a CMN HN-F’s SLC slice, a DDR controller, a GIC’s RAMs and an SMMU’s TLBs. Each record is a standard set of 64-bit registers:
| Register | Content |
|---|---|
ERR<n>FR | Feature register, read-only: which controls exist (ED, UI, FI, UE, CFI, DUI), the corrected-error counter type (CEC), the repeat counter (RP), and whether the record is owned by another record in the node |
ERR<n>CTLR | Controls: ED (detection and reporting enable), UE (in-band External-abort response for uncorrected errors), UI (Error Recovery Interrupt), FI (Fault Handling Interrupt on uncorrected or deferred errors), CFI (FHI on corrected errors), and their read/write-split variants. What is implemented is given by ERR<n>FR |
ERR<n>STATUS | Syndrome: V valid, AV/MV address/misc valid, UE, DE deferred, CE corrected (2 bits), UET UE type, PN poison, OF overflow, ER error reported, CI critical, IERR IMPLEMENTATION DEFINED type, SERR architected source class (for example data-cache data RAM, tag RAM, or a bus error) |
ERR<n>ADDR | Error address (PADDR), with NS/NSE giving the physical address space, SI (Secure Incorrect: NS/NSE may be wrong), AI (Address Incorrect: PADDR may not be the address of the original access) and VA (the address is a virtual address) |
ERR<n>MISC0..3 | IMPLEMENTATION DEFINED location (set/way/bank), the standard CE counter and its overflow, and an optional timestamp. MISC2/MISC3 arrived with v1.1 |
ERR<n>STATUS fields are write-one-to-clear. The standard idiom is: read STATUS; if V, read ADDR and MISC*; then write the read value back to STATUS. That clears only the bits you saw, and an error recorded in between sets OF or is preserved. Writing back the value you read is also how you avoid clearing the record while a new error is being recorded into it.
Access paths:
- PE-local records through System registers.
ERRIDR_EL1.NUMgives the count. Select a record withERRSELR_EL1.SEL, then accessERXFR_EL1,ERXCTLR_EL1,ERXSTATUS_EL1,ERXADDR_EL1,ERXMISC0..3_EL1(andERXPFG*_EL1, 16.8). Which records exist is IMPLEMENTATION DEFINED. On many DynamIQ cores record 0 covers the core’s own RAMs and record 1 the shared DSU/L3. A record shared between PEs shows the same contents from each of them. - Memory-mapped groups for everything else. Records sit at 64-byte strides in a 4 KB group (16 KB and 64 KB layouts with RASv2), with
ERR<n>PFG*at+0x800, a group statusERRGSR(one bit per record withVset, at0xE00in a 4 KB group), and identification registers (ERRDEVARCH,ERRDEVID,ERRIIDR). OptionalERRFHICR*/ERRERICR*/ERRCRICR*registers program message-signalled FHI/ERI/CRI.
The OS learns about memory-mapped nodes from the ACPI AEST table (or a platform description). Firmware learns about them from its own platform code (18.6).
Trap controls: SCR_EL3.TERR and HCR_EL2.TERR trap the ERR*/ERX* System registers to EL3 or EL2, and SCR_EL3.FIEN/HCR_EL2.FIEN gate the fault-injection registers. These bits decide whether the error records belong to firmware or to the OS (16.8).
Error types
The type is a statement about containment, meaning how far the corruption may have spread. It is not a statement about severity:
| Type | Meaning | Typical example |
|---|---|---|
| CE, Corrected | detected and corrected. Informational, but counted, because a rising CE rate predicts failure | single-bit ECC on a cache line |
| DE, Deferred | detected, not corrected, but not silently propagated: the data has been marked (poisoned) so that whoever consumes it will be told | double-bit ECC found on an eviction or by a scrubber, with poison written onward |
| UE, Uncorrected | detected, not corrected or deferred. UET subdivides it: | |
| — UC, Uncontainable | may have silently propagated. Nothing can be trusted | an error in a tag RAM, so the location of the data is unknown |
| — UEU, Unrecoverable | contained to the PE or component, but its state is lost. The interrupted context cannot continue | corrupted architectural state |
| — UER, Recoverable (signalled) | contained, and signalled before the corrupt value was used architecturally. Software can recover by isolating the consumer | consumed poison reported precisely |
| — UEO, Restartable (latent) | contained, and the PE state was not affected. Execution can restart | an error in a prefetched line that was never used |
Two properties matter for software: whether the error was silently propagated (only UC permits that), and whether the consumer is known. CE and DE require no action from the consumer of the data. UER requires software to find and kill the consumer. Linux treats an SError with AET = UER as fatal for exactly this reason, because an asynchronous report does not identify the consumer, as noted in 3.4.
Poison and containment
Poison is the mechanism that turns a UE into a DE. When a node detects an uncorrectable error in data it is forwarding (for example on an eviction, a snoop response or a scrub), it does not raise an exception. It marks the data as poisoned (in ECC syndrome bits, the CHI Poison field, or a memory-controller encoding) and records a DE. The poison travels with the data through caches and the interconnect. The architectural rule is that a PE that consumes poisoned data must not let it silently affect architectural state. It must report an error at the point of consumption.
A node on the way that logs the poison it received (whether it does is IMPLEMENTATION DEFINED) sets ERR<n>STATUS.PN = 1, so the record says “I saw poison” rather than “I detected the original error”. Triage follows the PN = 0 record back to the original fault.
Signalling: in-band and out-of-band
| Signal | Generated when | Delivered as | Who uses it |
|---|---|---|---|
| In-band error response | a request receives a response that carries an error (ERR<n>CTLR.UE), for example consumed poison | a synchronous External abort or an SError at the requesting PE | the consuming context |
| FHI, Fault Handling Interrupt | any recorded UE/DE (FI), or CE counter overflow or CE (CFI) | an SPI, a PPI, or a message-signalled interrupt (IMPLEMENTATION DEFINED wiring, described in AEST) | firmware or OS RAS logging |
| ERI, Error Recovery Interrupt | a UE that could not be signalled in-band, for example a write-back of corrupt data (UI) | an interrupt | a recovery agent |
| CRI, Critical Error Interrupt | an IMPLEMENTATION DEFINED critical condition | an interrupt | platform |
FHI is the normal logging path, and ERI tells software that something needs action that no exception will report. These interrupts are ordinary GIC interrupts, so they need the same configuration as any SPI (group, priority, routing, 4.3). Whether they are Group 0 or Secure Group 1 or Non-secure Group 1 is the firmware-first versus kernel-first choice (16.8).
Consumed poison becomes a synchronous External abort
A load that consumes poison should be reported precisely, as a synchronous External abort on the instruction that consumed it:
- EC
0x24/0x25(data abort) or0x20/0x21(instruction abort, for poison in the instruction stream), with FSC0b010000(synchronous External abort, not on a walk) or0b0101xx(on a walk at level xx); ISS.EA= IMPLEMENTATION DEFINED classification, andISS.FnV= 0 ifFAR_ELxis valid;ISS.SET[12:11], the Synchronous Error Type:0b00UER (Recoverable),0b10UC (Uncontainable),0b11UEO (Restartable). There is no synchronous UEU, because a precise report means that the PE state is intact.
With FEAT_RAS, the separate “synchronous parity or ECC error” FSC encodings (0b011000, 0b0111xx) are not used. All of these errors are reported as External aborts, and the error record holds the detail. The handler pairs the exception with the record: ESR_ELx says which instruction, and ERR<n>STATUS/ADDR say which RAM and which location.
Whether a particular consumption is reported synchronously or as an SError is IMPLEMENTATION DEFINED. Loads into registers are usually synchronous. Poison consumed by a store merge, by a cache-line write-back or by an atomic executed in the interconnect (a far atomic) may surface only as an SError or an ERI.
Security note: Normal-world code can never consume poison in Secure or Realm memory, because the access is blocked before it reaches the data. A poisoned line in a shared buffer, however, is a cross-world signal. EL3’s handler must not leak
ERR<n>ADDRfor Secure PAs to the Non-secure world. Under firmware-first handling, the CPER record it builds must contain only what the receiver is allowed to see (16.8).
What changed in v1.1 and v2
| Feature | Version (per the Arm feature list) | Changes |
|---|---|---|
| FEAT_RAS / RAS SA v1 | permitted from v8.0, mandatory from v8.2 | ESB, error synchronization events, the System-register record interface, architected SError and abort syndrome |
| FEAT_RASv1p1 (+ FEAT_RASSAv1p1) | permitted from v8.2. In a v8.4 implementation with FEAT_RAS it is required | ERR<n>MISC2/3 and ERXMISC2/3_EL1, the Common Fault Injection Model (ERR<n>PFGF/PFGCTL/PFGCDN, 16.8), and timestamp and counter refinements. FEAT_DoubleFault, a separate feature (permitted from v8.3, required in v8.4 when EL3 is implemented), adds the NMEA/EASE controls (3.3) |
| FEAT_RASv2 (+ FEAT_RASSAv2) | permitted from v8.8. In a v8.9 implementation with FEAT_RAS it is required | ERXGSR_EL1 (group status for System-register records); a trap to EL3 on writes to RAS System registers; the extra SError and abort syndrome (WU, ELS, VFV, see 3.4); System RAS Agents; a control to disable FHI for deferred errors; 16 KB and 64 KB group layouts; an Error Recovery reset status flag; a control to stop counting CEs; Fault Injection Groups; group interrupt control registers; more record types |
The same v8.9 generation (each permitted from v8.8) brings the companion features FEAT_PFAR (PFAR_ELx, the physical address of a fault), FEAT_ADERR/FEAT_ANERR (SCTLR2_ELx controls for whether an error on a load from Device or Normal memory is reported precisely and synchronously or as an SError; both require FEAT_RASv2) and FEAT_DoubleFault2.
Validation note: for every node listed in the AEST (or in firmware’s table), check the record’s static properties before injecting anything.
ERR<n>FRmust advertise what the platform documentation claims,ERR<n>CTLRmust reset withEDin the documented state, and writing back the value read fromERR<n>STATUSmust leave it at 0. A record whoseSTATUScannot be cleared (a stickyV) or whoseERRGSRbit does not trackVbreaks every polling handler. These failures show up on silicon as an interrupt storm on the FHI line right after the OS enables it.
Checkpoint
Q16.7.1 A DDR controller detects a double-bit error while returning a line for a PE’s prefetch. The line is installed in L2 with poison, and later evicted unused. Which record contents are consistent with correct RAS behaviour?
- A. DDR controller:
UE = 1,UET = UC. The PE takes an SError - B. DDR controller:
CE = 1. No other record changes - C. DDR controller:
DE = 1(poison sent onward). PE’s L2 record, if it logs received poison:PN = 1. No exception is taken, because nothing consumed the data - D. PE: a synchronous External abort with
SET = UEOon the prefetch instruction
Answer
C. The error was detected and contained by poisoning, which is the definition of a deferred error. Nobody consumed the data, so no in-band report is due. An FHI may still be raised for logging if FI is enabled. A treats a contained error as uncontainable. B would mean that the data was corrected. D is wrong because a prefetch is not an architectural consumer, and no instruction has a precise report owed to it.
Read more: RAS System Architecture (DDI0587), Deferred errors and poison; ERR<n>STATUS.DE and PN
Q16.7.2 An EL1 handler receives a data abort with FSC 0b010000, ISS.SET == 0b00 and FnV == 0. What does this justify?
- A. The error was contained and reported before it affected architectural state. Recovery is possible by isolating the context that consumed the data at
FAR_EL1, for example by killing the process and offlining the page - B. The PE state is intact and the instruction can simply be re-executed
- C. The error is uncontainable and the system must be reset
- D. The syndrome is IMPLEMENTATION DEFINED and nothing can be concluded
Answer
A. SET == 0b00 is UER (Recoverable): it was signalled precisely, but re-executing the load would consume the same poison again, so B (which describes the UEO response) does not work. C is SET == 0b10. ISS.EA is the IMPLEMENTATION DEFINED part, while SET is architected (D).
Read more: Arm ARM (DDI0487), ISS encoding for an exception from a Data Abort, SET field; RAS System Architecture (DDI0587), error types
Q16.7.3 A logging handler reads ERXSTATUS_EL1, decodes it, then writes 0xFFFF_FFFF to ERXSTATUS_EL1 to clear it. What is wrong with this?
- A. Nothing. All
STATUSfields are write-one-to-clear, so this clears the record - B. An error recorded between the read and the write is cleared without being logged. Writing back the value read clears only what was seen
- C.
ERXSTATUS_EL1is read-only. Records are cleared throughERXCTLR_EL1 - D. The handler must first write
ERRSELR_EL1to 0 to unlock the record
Answer
B. Write-one-to-clear makes “write back what you read” the race-free idiom. Writing all ones discards a new error, or its OF indication, that arrived after the read. A ignores the race. C and D describe mechanisms that do not exist. ERRSELR_EL1 only selects which record the ERX* registers access.
Read more: RAS System Architecture (DDI0587), ERR<n>STATUS, clearing error records