mirror of
https://github.com/ipxe/ipxe
synced 2026-01-28 03:28:36 +03:00
[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>
This commit is contained in:
@@ -27,6 +27,11 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
||||
#define COMSTOP 1 /* Stop bits */
|
||||
#endif
|
||||
|
||||
/* Early UART configuration (for bare metal prefix debugging only) */
|
||||
//#define EARLY_UART_MODEL 8250
|
||||
//#define EARLY_UART_REG_BASE 0x10000000
|
||||
//#define EARLY_UART_REG_SHIFT 0
|
||||
|
||||
#include <config/named.h>
|
||||
#include NAMED_CONFIG(serial.h)
|
||||
#include <config/local/serial.h>
|
||||
|
||||
Reference in New Issue
Block a user