Part 12: Secure world, firmware and RME
Review part: concise and register-precise, for readers who already know this material.
Prerequisites: 2.1, 3.3, 4.3, 5.1, 8.4, 9.1
If you already know: OP-TEE, TF-A BL31 and SMCCC from TEE work, skim 12.1–12.3 for the register-level precision and the FF-A material, then read 12.4 and 12.5 in full.
Why this matters for bring-up/validation: every boot stage, every SMC and every granule transition is a contract between privilege levels, and when a contract is broken you get the faults that are hardest to triage: a hang at the first ERET, a GPF at EL3, or silently corrupted Realm memory.
Part 12 starts from the security model you already work in and makes it exact. It first restates TrustZone-A at register level: what SCR_EL3.NS and SCR_EL3.NSE select, what is architectural and what belongs to the system (TZASC), and what Secure EL2 adds. It then sets out the state each boot stage must hand to the next, using TF-A’s BL1/BL2/BL31/BL32/BL33 chain as the worked example. After that it covers the firmware interfaces that carry calls across the boundaries: SMCCC, PSCI and FF-A.
The second half covers what Armv9 adds. RME turns the two-world model into four physical address spaces, enforced by a Granule Protection Table that EL3 owns. Changing which world owns a granule then becomes a cache, TLB and barrier problem, which is where the memory-system material of Parts 7–9 comes back. FEAT_MEC goes further and splits the Realm PAS into many encryption contexts, which adds the Point of Encryption and a new set of cache-maintenance rules.