Part 5: Virtual memory I: translation structure
Prerequisites: 2.1 Exception levels, Security states and execution states and 2.5 System registers; 3.2 Entry and return for ESR/FAR before reading 5.8.
If you already know: how to walk a 4K table by hand and decode a Data Abort ESR, skim 5.1–5.4, and read 5.5 onward for PIE/POE, hardware AF/dirty management, LPA2/D128 and the AT-based debugging lab.
Why this matters for bring-up/validation: the first instruction after SCTLR_ELx.M = 1 is where a firmware image most often dies silently, and every one of those failures is a mismatch between the registers in this part and the tables in memory.
This part covers the static side of address translation: what a translation regime is, how TCR_ELx and TCR2_ELx shape it, what the descriptors contain, how the walker steps through them, and what the permission and access-flag bits mean. It starts with regimes and stages (5.1), because “which tables did this access actually use?” is the first question in any translation bug. Then come the controls (5.2), the descriptor formats, starting levels, contiguous runs and stage-2 concatenation (5.3), and a full walk worked by hand, including a fault (5.4).
The second half adds the layers on top of the basic format. 5.5 covers direct and hierarchical permissions, PAN/EPAN, permission indirection and overlays. 5.6 covers hardware Access flag and dirty-state management and how those updates interact with the memory model. 5.7 covers 52- and 56-bit addressing, including the 128-bit descriptors. The part closes with fault decoding (5.8) and a lab that uses AT and PAR_EL1 to debug translation on QEMU and the FVP (5.9). Changing live translations (TLB maintenance, break-before-make, turning the MMU on) is Part 9, and memory attributes are Part 6.
- 5.1 Translation regimes and stages
- 5.2 TCR_ELx and TCR2_ELx
- 5.3 Descriptors and walk mechanics
- 5.4 Worked example: a 4K-granule walk by hand
- 5.5 Access permissions
- 5.6 Access flag and dirty state
- 5.7 Large addresses
- 5.8 MMU faults and how to decode them
- 5.9 Lab: debugging translation with AT and PAR_EL1