riscv-isa-manual
riscv-isa-manual copied to clipboard
Clarify interaction of CBOs and PBMTs
This is the suggestion from https://github.com/riscv/riscv-CMOs/issues/57#issue-1573765692 which was never applied.
The behaviour can be technically inferred from this paragraph - as noted in one of the comments on that issue:
Accessing the same location using different cacheability attributes may cause loss of coherence. Executing the following sequence between such accesses prevents both loss of coherence and loss of memory ordering:
fence iorw, iorw, followed bycbo.flushto an address of that location, followed by afence iorw, iorw.
However this is subtle, which means implementation bugs are likely. Making it explicit removes the risk of confusion and the resulting bugs.