]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[uaccess] Generalise librm's virt_offset mechanism for RISC-V
authorMichael Brown <mcb30@ipxe.org>
Wed, 7 May 2025 22:02:40 +0000 (23:02 +0100)
committerMichael Brown <mcb30@ipxe.org>
Wed, 7 May 2025 23:12:33 +0000 (00:12 +0100)
commit0279015d09f2653f5c47e8ad2d2dc180180271d1
tree506a4d5ad558ce7a49ba62968e6a0ddee9db4045
parente8a6c2657163af1255d1b1ccff3d19c45b0a6182
[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>
12 files changed:
src/arch/riscv/prefix/libprefix.S
src/arch/x86/image/elfboot.c
src/arch/x86/include/bits/uaccess.h [deleted file]
src/arch/x86/include/librm.h
src/arch/x86/include/realmode.h
src/arch/x86/interface/pcbios/bios_mp.c
src/arch/x86/transitions/librm_mgmt.c
src/config/defaults/pcbios.h
src/config/defaults/sbi.h
src/core/virt_offset.c [new file with mode: 0644]
src/include/ipxe/uaccess.h
src/include/ipxe/virt_offset.h [new file with mode: 0644]