]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[riscv] Support mapping I/O devices outside of the identity map
authorMichael Brown <mcb30@ipxe.org>
Mon, 26 May 2025 14:45:27 +0000 (15:45 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 26 May 2025 16:56:27 +0000 (17:56 +0100)
commiteae9a27542b020c4192c0435718f7c7d71251a4a
treebafa0c66c474c4b16fcd7024ccb5c60a533667d3
parent6af4a022b267750ec436e1bbe23e0cf91fbbd148
[riscv] Support mapping I/O devices outside of the identity map

With the 64-bit paging schemes (Sv39, Sv48, and Sv57), we identity-map
as much of the physical address space as is possible.  Experimentation
shows that this is not sufficient to provide access to all I/O
devices.  For example: the Sipeed Lichee Pi 4A includes a CPU that
supports only Sv39, but places I/O devices at the top of a 40-bit
address space.

Add support for creating I/O page table entries on demand to map I/O
devices, based on the existing design used for x86_64 BIOS.

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