Part 9: Virtual memory II: maintaining translations
Prerequisites: 5.1–5.3, 5.6, 6.5, 7.6, 7.8, 8.4
If you already know: If you can justify every barrier in Linux’s __flush_tlb_page() and in TF-A’s enable_mmu_direct_el3, skim 9.1 for FEAT_ETS2 and FEAT_XS, and 9.2 for the BBM levels.
Why this matters for bring-up/validation: Most “dead after SCTLR.M=1”, stale-mapping and sporadic translation-fault bugs are a missing DSB, ISB, TLBI or break step, and a TLB shootdown is one of the first multi-PE coherency paths silicon validation must prove.
Part 5 described translation tables as static structures. This part covers what happens when they change while the hardware is using them. TLBs and walk caches may hold any valid translation they have walked, for as long as they like. Software keeps them correct with tags (ASID, VMID, nG), TLBI operations of the right scope and shareability domain, and a fixed sequence of barriers whose individual steps exist for specific reasons. The sequence has stage 2, FEAT_ETS2 and FEAT_XS variants. Some changes cannot be made in place at all: changing the output address, the memory type or the block size of a live mapping requires break-before-make. FEAT_BBM relaxes this only for block-size changes, and it still leaves TLB conflict aborts to handle.
The part ends with the first transition every boot stage makes: turning the MMU and caches on. That transition combines everything before it. It needs reset-state assumptions about caches and TLBs, the context-synchronization rules for MAIR, TCR, TTBR and SCTLR, an identity-mapped trampoline, cache maintenance for tables written with the MMU off, and a memory map that gives speculation nothing dangerous to touch.