[uaccess] Generalise librm's virt_offset mechanism for RISC-V

The virtual offset memory model used for i386-pcbios and x86_64-pcbios
can be generalised to also cover riscv32-sbi and riscv64-sbi.  In both
architectures, the 32-bit builds will use a circular map of the 32-bit
address space, and the 64-bit builds will use an identity map for the
relevant portion of the physical address space, with iPXE itself
placed in the negative (kernel) address space.

Generalise and document the virt_offset mechanism, and set it as the
default for both PCBIOS and SBI platforms.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2025-05-07 23:02:40 +01:00
parent e8a6c26571
commit 0279015d09
12 changed files with 189 additions and 72 deletions

View File

@@ -9,7 +9,7 @@
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define UACCESS_LIBRM
#define UACCESS_OFFSET
#define IOAPI_X86
#define PCIAPI_PCBIOS
#define DMAAPI_FLAT

View File

@@ -12,7 +12,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define IOAPI_RISCV
#define IOMAP_VIRT
#define DMAAPI_FLAT
#define UACCESS_FLAT
#define UACCESS_OFFSET
#define TIMER_ZICNTR
#define ENTROPY_ZKR