Part 8: Caches and coherency
Prerequisites: 6.1 A hardware mental model, 6.3 Cacheability, 6.4 Shareability, 7.1 Observers, “observed by” and “completes”, 7.6 DSB
If you already know: how to read CTR_EL0/CLIDR_EL1/CCSIDR_EL1 and the difference between PoU and PoC, skim 8.1 and the first half of 8.4. If you have written CHI or ACE RTL or verification, skim 8.2 and use 8.3 as a lookup table.
Why this matters for bring-up/validation: most “it works with caches off” and “DMA data is occasionally stale” bugs, and most power-down hangs, come down to a missing or wrong-scope cache maintenance operation, or to an agent that was never made part of the coherency domain.
The architecture says very little about how caches are built. It tells software what it can discover (line sizes, levels, the Level of Coherency and Level of Unification), which observers the hardware keeps coherent, and a set of points in the memory system (PoU, PoC, PoP and the newer ones) that cache maintenance operations (CMOs) are defined against. This part starts from those architectural facts (8.1) and then looks under them. 8.2 covers the hardware coherency machinery (line states, snoop filters, inclusivity, system-level caches) so it is clear why most CMOs are only needed for non-coherent observers. 8.3 follows individual A64 instructions onto the interconnect as ACE/CHI transactions, across DSU, CMN and chip-to-chip links.
With that model in place, 8.4 defines every architectural point and contrasts “where data must reach” with the “who must see it” of shareability. 8.5–8.7 cover the data and instruction CMOs and the DMA sequences built from them. 8.8 is the single home for cache handling at power transitions. 8.9 covers MPAM, which partitions the same caches and bandwidth. 8.10 turns the part into tests you can run.
- 8.1 Cache organisation
- 8.2 Hardware coherency concepts
- 8.3 Coherency at system scale: instructions to transactions
- 8.4 Points of coherency and beyond
- 8.5 Data cache maintenance
- 8.6 Instruction cache maintenance and cross-modifying code
- 8.7 DMA and non-coherent masters
- 8.8 Caches at power transitions
- 8.9 MPAM: resource partitioning and monitoring
- 8.10 Lab and exercises: validating coherency and cache maintenance