]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[riscv] Support explicit cache management operations on I/O buffers
authorMichael Brown <mcb30@ipxe.org>
Mon, 7 Jul 2025 12:11:33 +0000 (13:11 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 7 Jul 2025 15:38:23 +0000 (16:38 +0100)
commite223b325113670a29205c62b0e7cbdd75b36b934
tree34011f212843810c93f5add004ffa09a30fdbce9
parent6a75115a7496ffbeeb6e70019639813edfe3a9c3
[riscv] Support explicit cache management operations on I/O buffers

On platforms where DMA devices are not in the same coherency domain as
the CPU cache, it is necessary to be able to explicitly clean the
cache (i.e. force data to be written back to main memory) and
invalidate the cache (i.e. discard any cached data and force a
subsequent read from main memory).

Add support for cache management via the standard Zicbom extension or
the T-Head cache management operations extension, with the supported
extension detected on first use.

Support cache management operations only on I/O buffers, since these
are guaranteed to not share cachelines with other data.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/riscv/core/zicbom.c [new file with mode: 0644]
src/arch/riscv/include/ipxe/zicbom.h [new file with mode: 0644]