8.3 Coherency at system scale: instructions to transactions
This section follows A64 instructions out of the PE and onto the interconnect. It covers what goes on the wire, who answers, and what a DSB waits for. Nothing here is architectural. The mapping from instructions to AMBA transactions is chosen by each core and interconnect implementation, and the tables give the typical mapping, not a guarantee. The architecture constrains only the outcomes. The point of having this model is that bring-up hangs, CMO bugs and silicon-validation failures all show up at transaction level.
The topology
core core core core (L1I/L1D, private L2)
\ | | /
DSU: L3 + snoop filter, cluster coherency ---- CHI (or ACE on older DSUs)
|
+-----XP------XP------XP------+ CMN mesh of crosspoints (XP)
| RN-F HN-F HN-F | RN-F = fully coherent requester (a DSU / cluster)
| RN-I HN-F MN | RN-I/RN-D = IO requester (PCIe RC, SMMU TBUs, DMA)
| HN-I SN-F CCG | HN-F = home node: PoS, SLC slice, snoop filter
+-----------------------|------+ HN-I = home for IO/Device address ranges
| SN-F = memory controller port
chip-to-chip MN = misc node: DVM broadcast/sync (DN)
(CML/CCIX/CXL, CCG = CXL/CCIX gateway to another die
CHI C2C)
The important rule is one home per address. Physical addresses are hashed across HN-Fs (an HN-S in CMN S3). The home is the Point of Serialization for its addresses: requests to the same line are ordered there, it consults the snoop filter, sends snoops, returns data and, in the end, sends the Comp (completion) response. The architecture’s “complete” (7.1) corresponds, roughly, to the requester having received the response that guarantees the access is globally observable for the required domain. A DSB waits for exactly those responses.
Loads, stores and evictions
| Instruction / event | Typical ACE | Typical CHI | Who answers |
|---|---|---|---|
| Cacheable load miss | ReadShared / ReadClean | ReadNotSharedDirty, ReadShared, ReadClean | HN-F: from SLC, a snooped owner, or SN-F |
| Cacheable store, line absent | ReadUnique | ReadUnique | HN-F, after invalidating other copies |
| Store to a line held Shared | CleanUnique | CleanUnique (or MakeReadUnique) | HN-F invalidates the other sharers |
Full-line write (streaming, DC ZVA) | MakeUnique | MakeUnique (CHI-E also has write-zero forms) | HN-F, no data read |
| Dirty eviction | WriteBack | WriteBackFull / WriteBackPtl, WriteEvictFull | HN-F (may allocate in SLC) |
| Clean eviction | Evict (optional) | Evict, or silent | snoop filter update only |
| Non-cacheable / Device access | ReadNoSnoop / WriteNoSnoop | ReadNoSnp / WriteNoSnp | HN-I (Device) or HN-F (Normal NC) |
In CHI, Device-nGnRE and nGnRnE map onto the EWA (early write acknowledge) and ordering attributes of WriteNoSnp. An HN-I may return Comp for an EWA = 1 write before the endpoint has it. This is the transaction-level reason why a DSB after a Device-nGnRE store does not prove that the peripheral received the store (7.9).
Exclusives and atomics
LDXR/STXRon cacheable shareable memory are normally resolved in the core’s cache.STXRsucceeds if the line is still held Unique and the local monitor is set. If the line is only Shared, the core sends aCleanUniquewith the CHIExclattribute, and the home tells it whether it kept the line or lost it to another requester. A snoop that invalidates the line clears the local monitor. The coherence protocol acts as the “global monitor” for this memory (10.1).- Exclusives on Non-cacheable or Device memory become
ReadNoSnp/WriteNoSnpwithExcl = 1. They work only if some node (HN-I, HN-F or SN) implements an exclusive monitor for that range. That is why the architecture leaves the behaviour IMPLEMENTATION DEFINED. - LSE atomics (10.2) are executed either near, in the core’s L1 after obtaining the line Unique, or far, sent as CHI
AtomicStore,AtomicLoad,AtomicSwaporAtomicCompareto the home node, which performs the operation in its SLC or at memory. The choice is IMPLEMENTATION DEFINED. Some cores make it depend on contention or expose a control in an IMPLEMENTATION DEFINED register. Far atomics avoid moving a contended line back and forth between cores. They require that every node on the path supports atomics, which is a frequent pre-silicon gap.
Cache maintenance operations
| Instruction | Typical transaction | Effect at the home |
|---|---|---|
DC CVAC | CleanShared | Write any dirty copy back to (at least) the PoC; copies may remain |
DC CIVAC | CleanInvalid | Write back dirty data, invalidate all cached copies |
DC IVAC | MakeInvalid (or CleanInvalid when the core or EL2 upgrades it) | Invalidate everywhere; dirty data may be discarded |
DC CVAP (FEAT_DPB) | CleanSharedPersist | Clean to the Point of Persistence |
DC CVADP (FEAT_DPB2) | a CleanSharedPersist-family request marked for deep persistence (protocol-revision dependent; check IHI0050) | Clean to the Point of Deep Persistence |
DC CVAU | often nothing on the interconnect | The PoU is usually inside the core or cluster |
A by-VA CMO is broadcast across the shareability domain by the home, not by the issuing core. The core does its own local part (writing back a dirty line from its own caches) and sends the CMO request to the line’s home. The home snoops the other holders and forwards the operation downstream if it has to. A CMO is complete when the home returns Comp, and DSB waits for that. Set/way operations generate no interconnect CMO. They are local operations that may cause ordinary writebacks (8.5).
TLBI and IC broadcast: DVM
TLB and instruction-cache invalidations that must reach other PEs travel as Distributed Virtual Memory (DVM) messages:
str x1, [x0] // descriptor update: an ordinary coherent write
dsb ishst // wait for its Comp: the write is visible to walkers
tlbi vae1is, x2 // DVMOp (CHI: request to MN; MN sends SnpDVMOp to every RN-F
// in the DVM domain, including SMMU TCUs on the mesh)
dsb ish // DVM Sync: completes only when every recipient has
// finished all earlier DVMOps from this requester
isb
IC IVAU and IC IALLUIS use the same mechanism. DVM Sync is the transaction form of the rule that a TLBI is not complete until a later DSB completes (7.6, 9.1). Its cost grows with the number of recipients and with the slowest one. A recipient that never responds (a powered-down cluster still listed in the DVM domain, or an SMMU with a stuck TCU) hangs the issuing PE in the DSB. This is one of the commonest multi-cluster bring-up hangs.
DMB and DSB themselves are not transactions on CHI. A barrier is a requester-side rule about when it may issue later requests and when it may retire, based on the responses it holds. ACE defined barrier transactions. Later AMBA revisions deprecated them, and CHI has none.
Across chiplets: CHI C2C, CML and CXL
When a coherent domain spans dies, addresses homed on the other die are reached through a gateway (CMN’s CCG, using CCIX/CXL-based links, or a link defined by the AMBA CHI chip-to-chip specification). The protocol is still CHI-like at both ends. Four things change:
- Latency. A remote-homed miss crosses the link twice, and a snoop of a remote cache adds more round trips. Expect remote accesses to cost several times the on-die latency. The exact figure depends on the implementation.
- Snoop filtering per die. Each die’s home tracks remote caching coarsely. Sharing patterns that are cheap on one die (such as a contended lock) can be pathological when the line’s home is remote. Place hot synchronisation data deliberately (7.10, 17.5).
- DVM and barriers. A
DVM Syncmust be acknowledged by every PE and SMMU on every die. TLBI+DSB andIC IALLUIS+DSBcost much more, and a cross-die TLB shootdown is a different performance class from an on-die one. - Architectural ordering does not weaken. The model of Part 7 still holds: the interconnect must give the same guarantees, at a higher cost. Two things do get looser: what early acknowledgement means for Device writes (a gateway may acknowledge), and where the effective PoC lies when each die has its own SLC.
CXL, for completeness: CXL.mem memory (HDM) is homed by the host and is coherent with CPU caches like local DRAM. CXL.cache lets a device cache host memory as a snooped peer. CXL.io is PCIe, and DMA over it follows the IO-coherent or non-coherent rules of 8.2.
What firmware must configure
None of the following is done by the architecture. It is SoC firmware (often SCP/MCP firmware, sometimes BL1/BL2) and it must complete before the first coherent access (17.5):
- Address map. CMN discovery, then the RN SAM in each requester, which hashes addresses across HN-Fs and routes IO ranges to HN-Is. Then each HN-F’s SAM to SN-Fs, and for chiplets the remote ranges behind each CCG. A wrong SAM sends requests to a non-existent node, and the requester hangs or takes an SError.
- Home-node features. SLC and snoop-filter enable and power state, and exclusive-monitor and atomic support on HN-I/SN where needed.
- Coherency and DVM domain entry. With CCI-400/500 ACE systems, enable snoop and DVM requests per slave interface (TF-A
cci_enable_snoop_dvm_reqs()). On CCN, use TF-Accn_enter_snoop_dvm_domain(). With CHI, the requester and interconnect perform aSYSCOREQ/SYSCOACKhandshake. The core side is covered in 8.8 and 17.4. - IO coherency. RN-I/RN-D settings and SMMU attribute overrides, so that DMA that is meant to be coherent actually emits snoopable transactions.
- Partitioning and QoS. MPAM controls in the MSCs (8.9).
Validation note: to confirm that an instruction produced the transaction you expect, count it on both sides. On the PE,
BUS_ACCESSand the L2/L3 refill and writeback events should move for coherent misses and evictions. On the CMN PMU (Linuxarm-cmndriver, or the CMN debug-trace controller pre-silicon), count HN-F requests and snoops for CMOs, and DVM-node events (arm-cmndn_rxreq_dvmop,dn_rxreq_dvmsync) for TLBI andICbroadcast. Two failures look different. ADC CVACthat produces no HN-F activity on a line that is known to be dirty means the CMO was dropped. ADSBthat never retires after a TLBI, with an MN DVM Sync outstanding, means one recipient is not responding: identify it from the MN’s per-target state or by removing agents from the DVM domain one at a time.
Checkpoint
Q8.3.1 After a cluster is powered off without leaving the DVM domain, another cluster executes TLBI VMALLE1IS; DSB ISH; ISB, and that core hangs. At transaction level, which step is waiting?
- A. The
TLBI, because DVMOp requests are blocking - B. The
ISBthat follows, because it waits for the instruction stream to refill - C. The
DSB’s DVM Sync, which cannot complete until every member of the DVM domain, including the powered-off one, responds - D. A snoop-filter back-invalidation triggered by the
TLBI
Answer
C. DVMOps can be issued and buffered, and completion is collected by the DVM Sync that the DSB generates. A domain member that cannot respond stalls it forever. A is the tempting option, because the TLBI is where the cause lies, but the stall shows up at the DSB. The fix is to leave the DVM domain before power-off (8.8).
Read more: Arm ARM (DDI0487), completion of TLB maintenance instructions; AMBA CHI specification (IHI0050), DVM operations
Q8.3.2 A heavily contended counter is updated with LDADD on a 4-die system. Profiling shows the counter’s line rarely moving between core caches, yet throughput is limited by link bandwidth to one die. What is the most likely explanation?
- A. The implementation executes the atomics far, at the line’s home node on the remote die, so every update is a link round trip, but the line is not moved between cores
- B.
LDADDis implemented asLDXR/STXRloops on this core, which moves the line every time - C. The counter is in Device memory, which forces every access to the HN-I
- D. The snoop filter is full
Answer
A. Far atomics (CHI AtomicLoad and friends) are performed at the home, so cores do not move the line between their caches. When the home is on another die, every update crosses the link. Placing the counter’s home locally, or sharding the counter, helps. B would show the line moving between cores, which contradicts the observation.
Read more: Arm ARM (DDI0487), FEAT_LSE atomic instructions; AMBA CHI specification (IHI0050), atomic transactions
Q8.3.3 Why can firmware not rely on DMB or DSB to appear as a transaction it can trace on a CHI interconnect?
- A. Barriers are transported but filtered out by the CMN debug trace controller
- B. On CHI, barriers are a requester-side rule about issuing and retiring based on the responses it has received, and no barrier transaction exists
- C. Barriers are only sent when the domain is
SY - D. Barriers become DVM Sync messages, which are not traceable
Answer
B. CHI has no barrier transaction. A DSB waits for Comp responses (and for DVM Sync completion if DVMOps are outstanding), and a DMB constrains issue order. D is the tempting option, but only a DSB that follows outstanding DVMOps generates a DVM Sync, and that message is about TLBI/IC completion, not a general barrier.
Read more: AMBA CHI specification (IHI0050), ordering and DVM Sync; Arm ARM (DDI0487), DSB