8.4 Points of coherency and beyond
Every by-VA and by-PA cache maintenance operation names a point: the place in the memory system that the operation must push data to, or invalidate stale copies down to. The architecture defines each point by the set of observers that are guaranteed to agree once data has reached it, not by a physical location. The same SoC can therefore have its PoC in DRAM for one design and at a system cache for another. Software only needs to know which observers it must satisfy.
The points
Point of Unification (PoU)
- PoU for a PE: the point by which that PE’s instruction cache, data cache and translation table walks are guaranteed to see the same copy of a location. Data written by stores and then fetched as instructions must reach this point. (Cacheable translation table walks are coherent with the data caches without maintenance. Walks made with Non-cacheable attributes read from the PoC instead (8.2).)
CLIDR_EL1.LoUUgives the number of levels before it. - PoU for the Inner Shareable domain: the point by which the instruction caches, data caches and translation table walks of all PEs in the Inner Shareable domain see the same copy.
CLIDR_EL1.LoUISgives the levels before it.
DC CVAU and IC IVAU target the PoU. Because data caches in the Inner Shareable domain are coherent, a DC CVAU affects the line in whichever cache of that domain holds it. IC IVAU is broadcast to all instruction caches in the domain. The invalidate-all forms are IC IALLU (local: this PE’s instruction caches, to its PoU) and IC IALLUIS (all PEs in the Inner Shareable domain).
Point of Coherency (PoC)
The point by which all agents that can access memory (all PEs, DMA masters, anything else that reads or writes memory) are guaranteed to see the same copy. In practice this is usually DRAM, or a memory-side system cache that every agent goes through (8.2). CLIDR_EL1.LoC gives the number of levels before it. DC CVAC, DC CIVAC and DC IVAC target the PoC.
The definition has an important corollary: the PoC is only as good as the system designer’s list of “agents that can access memory”. An agent that bypasses the path the designer had in mind is outside the guarantee.
Point of Persistence (PoP) and Point of Deep Persistence (PoDP)
- PoP, introduced with FEAT_DPB (
DC CVAP, OPTIONAL from v8.1, mandatory from v8.2): a point at or beyond the PoC where a write is preserved across loss of system power and reliably recovered when power returns. It exists only if the system has persistent memory (NVDIMM, battery-backed or flush-on-fail DRAM). - PoDP, introduced with FEAT_DPB2 (
DC CVADP, OPTIONAL from v8.1, mandatory from v8.5; FEAT_DPB2 also redefines the PoP, which changes the scope ofDC CVAP): a stronger persistence point, intended for data that must survive failure modes the PoP itself does not cover (for example a failure of the flush-on-fail energy reserve). Its exact guarantee is system-defined. Check the platform documentation before relying on any difference between the PoP and the PoDP.
If the system has no persistence point, DC CVAP behaves as DC CVAC. Software can use it unconditionally where FEAT_DPB is implemented.
Point of Physical Aliasing (PoPA): FEAT_RME
With RME the same physical address exists in up to four PA spaces (Secure, Non-secure, Realm, Root). Before the PoPA, caches treat {PAS, PA} as the address, so a Non-secure line and a Realm line with the same PA are different locations. The PoPA is the point at which accesses to the same PA from different PA spaces refer to the same storage. When firmware moves a granule between PA spaces (12.4), it must make sure no cached copy tagged with the old PAS can later be written back over data written in the new one. DC CIPAPA (clean and invalidate by PA to PoPA, EL3 only) does this. Its operand carries the PA and, in Xt.NS/Xt.NSE, the PA space whose copies are to be pushed past the PoPA. It is not subject to translation or granule protection checks, it affects all caches in the Outer Shareable domain, and it acts on all copies irrespective of MECID. DC CIGDPAPA also covers MTE allocation tags. These operations are by PA because the granule may no longer be mapped by any VA the caller can use, and because the caller must name a PA space other than its own.
Point of Encryption (PoE): FEAT_MEC
With Memory Encryption Contexts (12.5), cache entries before the PoE hold plaintext tagged with a MECID. The memory is encrypted at or beyond the PoE. When a MECID’s key changes or a granule is reassigned to a different encryption context, the old-context copies must be pushed through the PoE or removed. That is what DC CIPAE (and the tag variant DC CIGDPAE) do, by PA, irrespective of MECID.
Point of Physical Storage (PoPS): FEAT_PoPS
FEAT_PoPS is part of the 2024 extensions (OPTIONAL from v9.5, identified by ID_AA64MMFR4_EL1.PoPS). It defines the Point of Physical Storage and adds DC CIVAPS, a clean and invalidate by VA to the PoPS, with a tag-and-data form DC CIGDVAPS when MTE is implemented. HCR_EL2.TPCP traps them along with the PoC and PoP operations. Informally, the PoPS is where the data is held by the physical storage itself, which can be further out than a memory-side cache that the PoC definition still allows. It is for cases where “every agent sees the same copy” (the PoC) is not enough, because what matters is that the storage behind the address holds the data. Like the PoPA/PoE operations, DC CIVAPS acts on all copies irrespective of MECID. This is new and few documents cover it. Take the normative definition from the current DDI0487 (“Terminology for Clean, Invalidate, and Clean and Invalidate instructions”) rather than from this summary. FEAT_OCCMO (OPTIONAL from v9.3, mandatory from v9.6) goes the other way. Its outer-cache CMOs (DC CVAOC, DC CIVAOC and MTE GD forms) can go less far than the PoC. They publish data to an outer cache, such as an SLC that the consuming device reads through, without the cost of pushing it to DRAM.
Summary table
| Point | Observers that agree once data reaches it | Instructions | Feature |
|---|---|---|---|
| PoU (PE) | this PE’s I-cache, D-cache, walks | DC CVAU, IC IVAU, IC IALLU | v8.0 |
| PoU (IS) | I/D/walks of all PEs in the Inner Shareable domain | IC IALLUIS, broadcast IC IVAU | v8.0 |
| PoC | all agents that can access memory | DC CVAC, DC CIVAC, DC IVAC | v8.0 |
| PoP | PoC observers, and survives power loss | DC CVAP | FEAT_DPB (v8.1 optional, v8.2 mandatory) |
| PoDP | as PoP, with the stronger persistence guarantee | DC CVADP | FEAT_DPB2 (v8.1 optional, v8.5 mandatory) |
| PoPA | all PA spaces | DC CIPAPA, DC CIGDPAPA | FEAT_RME |
| PoE | all encryption contexts (MECIDs) | DC CIPAE, DC CIGDPAE | FEAT_MEC |
| PoPS | the physical storage itself | DC CIVAPS, DC CIGDVAPS | FEAT_PoPS (v9.5 optional) |
PoU ≤ PoC ≤ PoP ≤ PoDP is architectural. Where the PoPA and the PoE sit relative to the PoC is constrained by DDI0487 and DEN0129, but in typical systems both are on the memory side, next to the memory controller’s PAS filtering and encryption, at or beyond the PoC. Do not assume that a clean to PoC also reaches the PoPA or the PoE. Use the dedicated operations.
Shareability vs points: “who must see it” vs “where it must reach”
These two concepts are easily confused because both describe a set of observers. They answer different questions.
| Shareability domain (6.4) | Point (this section) | |
|---|---|---|
| Question answered | Who must observe my accesses in order, and which agents does hardware keep coherent? | Where must data be pushed (or stale copies removed) so that a given set of observers agrees? |
| Expressed by | SH bits of the mapping; barrier domain (DMB ISH, DSB OSH); ...IS/...OS TLBI forms | The CMO name (...VAU, ...VAC, ...VAP, ...PAPA) |
| Mechanism | Hardware snooping and ordering | Writeback and invalidation through cache levels |
| Needed for coherent observers? | Yes: barriers are always needed for ordering | No: coherent observers see the data without a CMO |
| Needed for non-coherent observers? | Not sufficient on its own | Yes: the CMO is what makes data reach them |
A DSB OSH waits until earlier accesses are complete for all observers in the Outer Shareable domain. It does not move a dirty line out of a cache. A DC CVAC moves the line to the PoC, but other observers are only guaranteed to see it after a DSB, because the CMO is complete only then (7.6). Correct code for a non-coherent observer always needs both: the CMO picks where, and the barrier waits until it has got there before the observer is told to look.
Worked example 1: DMA from a non-coherent master
The CPU fills a buffer in Normal Write-Back memory. A non-coherent DMA engine will read it from DRAM.
// x0 = buffer start, x1 = end, x2 = line size from CTR_EL0.DminLine
1: dc cvac, x0 // where: PoC, which this master is guaranteed to read from
add x0, x0, x2
cmp x0, x1
b.lo 1b
dsb osh // when: wait for the cleans to complete. Device memory and
// the master are in the Outer Shareable domain (6.4)
str w3, [x4] // doorbell (Device memory): start the DMA
A DMB OSH before the doorbell is not enough here. It would order the doorbell after the CMOs in the ordering model, but the CMOs are only guaranteed complete, and their effects visible to a non-PE observer, after a DSB. Use DSB. The full to-device and from-device sequences, including buffer alignment to CTR_EL0.CWG, are in 8.7.
Worked example 2: code written as data, then executed
A loader copies code into memory. Instruction fetch on this PE, and on other PEs, must see it.
dc cvau, x0 // where: PoU, so the I-side can find the new data
dsb ish // the clean is complete for all Inner Shareable observers
ic ivau, x0 // remove stale instructions (broadcast in the IS domain)
dsb ish // the invalidation is complete
isb // this PE refetches; other PEs need their own ISB (8.6)
PoU, not PoC, is the right target. The observer is instruction fetch, and the PoU is defined as the point where it agrees with the D-side. Cleaning to PoC also works, but it is slower and has no extra benefit. CTR_EL0.IDC/DIC may let you omit steps (8.6).
Bring-up note: pre-silicon models often blur these points. An FVP run without cache modelling has no caches at all, so every point coincides with memory, and a missing
DC CVACbefore DMA can never fail. An emulator with a stubbed interconnect may make every master coherent. A test that passes there proves only that the sequence has no ordering bugs. Rerun cache-sensitive tests with FVP cache modelling enabled, as in 8.10, and on the first silicon, before treating them as proven.
Checkpoint
Q8.4.1 A driver for a non-coherent master cleans its buffer with DC CVAC in a loop, then executes DMB OSH, then writes the doorbell. Occasionally the master reads stale data. Why?
- A.
DC CVAConly reaches the PoU, soDC CIVACis needed - B. The barrier domain is wrong:
DMB ISHis needed because the buffer is Inner Shareable - C. The doorbell should be written with
STLR - D. A
DMBdoes not wait for the cleans to complete. ADSBis needed before the doorbell so that the data has reached the PoC before the master is told to read it
Answer
D. A CMO’s effect is only guaranteed visible to other observers once it has completed, and only DSB waits for completion. B is the tempting option, but the domain must cover the master, which is in the Outer Shareable domain, and ISH is narrower. Even with the right domain, a DMB is the wrong barrier type. A is wrong: DC CVAC targets the PoC.
Read more: Arm ARM (DDI0487), ordering and completion of data and instruction cache instructions; DSB
Q8.4.2 EL3 firmware transitions a granule from the Non-secure PA space to the Realm PA space. Why does it use DC CIPAPA rather than DC CIVAC?
- A.
DC CIVACwould only affect the local PE - B. The cached copies to remove are tagged with the old PA space. An operation by PA to the PoPA can name that PA space explicitly and needs no mapping through which to reach it
- C.
DC CIVACis UNDEFINED at EL3 - D.
DC CIPAPAis faster because it does not write back dirty data
Answer
B. Before the PoPA, {PAS, PA} pairs are distinct locations. A VA-based CMO acts on the location that the VA translates to, in the PA space of that translation. DC CIPAPA takes the PA and names the old PA space explicitly in Xt.NS/Xt.NSE. It is not subject to translation or granule protection checks, and it pushes those copies to the point where the spaces alias. D is wrong: it is a clean and invalidate. A is wrong because DC CIVAC is broadcast, but that does not fix the PAS problem.
Read more: Arm ARM (DDI0487), DC CIPAPA; RME system architecture (DEN0129), cache maintenance
Q8.4.3 Which statement about shareability domains and points of coherency is correct?
- A. Marking a buffer Outer Shareable makes it coherent with a non-coherent DMA master, so no CMO is needed
- B.
DSB SYafter a store is equivalent toDC CVACfollowed byDSB SYfor a non-coherent observer - C. Shareability and barrier domains say which observers must see accesses in order. A point says where data must be pushed for observers that hardware does not keep coherent
- D. The PoC is always the Outer Shareable boundary
Answer
C. They are independent axes. A is the tempting option: shareability defines which agents hardware promises coherence with, and an agent that does not snoop is not covered by it. B is wrong because a barrier never moves data out of a cache. D confuses an ordering domain with a physical point that is defined by observers.
Read more: Arm ARM (DDI0487), shareability domains; Point of Coherency and Point of Unification definitions