Part 16: Debug, trace, PMU and RAS
Prerequisites: 2.6 The trap-control map, 3.2 Entry and return, 3.4 SError, architecturally, 7.8 Context synchronization and ISB, 8.7 DMA and non-coherent masters.
If you already know: how a JTAG probe halts a core and how perf programs counters, skim 16.1 and the register tables in 16.3. Read the OS Lock and DoubleLock material in 16.1, the CTI, authentication and power-down parts of 16.2, the PMUv3p5–p9 extensions in 16.3, and all of 16.4 to 16.8.
Why this matters for bring-up/validation: these blocks are the instruments you observe the silicon with. When they are misconfigured or misunderstood, you see nothing, or you see the wrong thing and trust it.
This part covers the observation and error-reporting machinery of the PE. 16.1 and 16.2 are the two halves of debug. Self-hosted debug turns breakpoints, watchpoints and single-step into exceptions taken to EL1 or EL2, gated by MDSCR_EL1, PSTATE.D and the OS Lock. External debug halts the PE in Debug state through the CoreSight fabric (DP, APs, ROM tables), with CTIs to cross-halt every core, the authentication signals to decide who may halt what, and power-request handshakes to keep a core reachable across power-down. 16.2 also covers the two ways a debugger can read memory, through the halted PE or through a MEM-AP, and what each one does and does not see.
The remaining sections turn from control to measurement and errors. 16.3 covers the PMUv3 programming model, including EL and Security-state filtering, EL3 prohibition and the p5–p9 extensions (64-bit counters, freeze, thresholds, the fixed instruction counter and snapshots). 16.4 covers the AMU, the always-on accounting counters that firmware owns and must save across power-down. 16.5 uses PMU events as a test oracle for memory attributes, TLB maintenance and speculation, and 16.6 covers SPE, ETE/TRBE and BRBE, and what EL3 has to enable for each. 16.7 and 16.8 cover RAS: error records and nodes, the error classes and poison, then firmware-first handling and fault injection as a test matrix.