[riscv] Provide a DMA API implementation for RISC-V bare-metal systems

Provide an implementation of dma_map() that performs cache clean or
invalidation as required, and an implementation of dma_alloc() that
returns virtual addresses within the coherent mapping of the 32-bit
physical address space.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2025-07-08 14:56:47 +01:00
parent 22de0c4edf
commit 101ef74a6e
9 changed files with 241 additions and 13 deletions

View File

@@ -10,15 +10,16 @@
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define IOAPI_RISCV
#define DMAAPI_FLAT
#define UACCESS_OFFSET
#define TIMER_ZICNTR
#define ENTROPY_ZKR
#if __riscv_xlen == 64
#define IOMAP_SVPAGE
#define DMAAPI_RISCV
#else
#define IOMAP_VIRT
#define DMAAPI_FLAT
#endif
#define CONSOLE_SBI