cbo.clean
Cache Block Clean
- Extension
- Zicbom/Zicbop/Zicboz
- XLEN
- RV32 and RV64
- Assembly (riscv-unified-db)
cbo.clean (xs1)- Length
- 32-bit
Encoding
| 3120 | 1915 | 1412 | 117 | 62 | 10 | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 000000000001 | rs1 | 010 | 00000 | 00011 | 11 | ||||||||||||||||||||||||||
Match 0x0010200f, mask 0xfff07fff. Source: cbo.clean rs1 31..20=1 14..12=2 11..7=0 6..2=0x03 1..0=3 in riscv-opcodes/extensions/rv_zicbo.
| Field | Bits | riscv-opcodes name |
|---|---|---|
| rs1 | 19:15 | rs1 |
Description
Cleans an entire cache block globally throughout the system.
Exactly what happens is coherence protocol-dependent, but in general it is expected that after this operation():
- The cache block will be in the clean (not dirty) state in any coherent cache holding a valid copy of the line.
- The data will be cleaned to a point such that an incoherent load can observe the cleaned data.
cbo.clean is ordered by FENCE instructions but not FENCE.I or SFENCE.VMA.
When (CACHE_BLOCK_SIZE.bit_length - 1) > [PMP_GRANULARITY, PMA_GRANULARITY].min:
Both PMP and PMA access control must be the same for all bytes in the block; otherwise, cbo.clean has UNSPECIFIED behavior.
Clean operations are treated as stores for page and access permissions. If permission checks fail, one of the following exceptions will occur:
When H is implemented:
Store/AMO Guest-Page Faultif virtual memory translation fails during G-stage translation.
Store/AMO Page Faultif virtual memory translation fails (when H is implemented: when V=0 or during VS-stage translation)Store/AMO Access Faultif a PMP or PMA access check fails
When (CACHE_BLOCK_SIZE.bit_length - 1) <= [PMP_GRANULARITY, PMA_GRANULARITY].min:
Because cache blocks are naturally aligned and always fit in a single PMP or PMA regions, the PMP and PMA access checks only need to check a single address in the line.
CBO operations never raise a misaligned address fault.
Description from riscv-unified-db, reformatted.