]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[riscv] Support mapping early UARTs outside of the identity map
authorMichael Brown <mcb30@ipxe.org>
Tue, 27 May 2025 15:18:17 +0000 (16:18 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 27 May 2025 15:31:51 +0000 (16:31 +0100)
commit2e27d772cab1e2a645dc7a0038dee71523f4e653
tree74d01dab869d27847bcf152a5a5470bf65cdd540
parent98fdfdd25512d8a6fd53d37775e6ea43283ac49f
[riscv] Support mapping early UARTs outside of the identity map

Some platforms (such as the Sipeed Lichee Pi 4A) choose to make early
debugging entertainingly cumbersome for the programmer.  These
platforms not only fail to provide a functional SBI debug console, but
also choose to place the UART at a physical address that cannot be
identity-mapped under the only paging model supported by the CPU.

Support such platforms by creating a virtual address mapping for the
early UART (in the 2MB megapage immediately below iPXE itself), and
using this as the UART base address whenever paging is enabled.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/riscv/prefix/libprefix.S