Part 10: Atomics and synchronization
Prerequisites: 6.2 Normal and Device memory, 6.5 MAIR_ELx and AttrIndx, 7.2 Single-copy and multi-copy atomicity, 7.7 Acquire/release as one-way barriers, 8.3 Coherency at system scale.
If you already know: how LDAXR/STLXR loops and CASAL are built and ordered, skim 10.1 and 10.2 for the monitor-clearing and near/far rules, and read 10.3 and 10.4 in full.
Why this matters for bring-up/validation: the first lock in firmware runs before the MMU and caches are on, across chiplets and next to non-coherent controllers, so it is the first place where the architecture’s “IMPLEMENTATION DEFINED” fine print about atomics turns into a hang.
Part 7 says what ordering an access gets. This part is about indivisibility: which read-modify-write operations the architecture makes atomic, where that guarantee comes from in hardware, and what it depends on. Exclusives (10.1) get their atomicity from a monitor that watches a reservation granule. That is why the memory type and the master matter, and why an exclusive on Device or Non-cacheable memory is a system question rather than a CPU question. LSE atomics (10.2) move the operation into the memory system: it is performed in the local cache (“near”) or at the interconnect’s home node (“far”), with the same architectural ordering either way.
10.3 covers the 128-bit and 64-byte forms (LDXP/STXP, CASP, LSE2, LSE128, LRCPC3, LS64) and the alignment-fault rules that decide whether an access is atomic or faults. 10.4 puts it all together: the event register and WFE, how locks are built from these primitives, why TF-A falls back to a bakery lock when caches are off, and how to synchronise with SCP/MCP/RSE controllers that have no coherent atomics at all.