]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[riscv] Add support for writing prefix debug messages direct to a UART
authorMichael Brown <mcb30@ipxe.org>
Tue, 27 May 2025 13:49:06 +0000 (14:49 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 27 May 2025 13:49:18 +0000 (14:49 +0100)
commit98fdfdd25512d8a6fd53d37775e6ea43283ac49f
tree2a4f4ff56e67dae8d179f6a32b8bd8496cee5b5e
parent2e8d45aeef813e7b25b4ac949d1407bc7ecd2ea8
[riscv] Add support for writing prefix debug messages direct to a UART

Some platforms (such as the Sipeed Lichee Pi 4A) do not provide a
functional SBI debug console.  We can obtain early debug messages on
these systems by writing directly to the UART used by the vendor
firmware.

There is no viable way to parse the UART address from the device tree,
since the prefix debug messages occur extremely early, before the C
runtime environment is available and therefore before any information
has been parsed from the device tree.  The early UART model and
register addresses must be configured by editing config/serial.h if
needed.  (This is an acceptable limitation, since prefix debugging is
an extremely specialised use case.)

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