mirror of
https://github.com/ipxe/ipxe
synced 2025-12-09 20:09:53 +03:00
[riscv] Write SBI console output to early UART, if enabled
The early UART is an optional feature used to obtain debug output from the prefix before iPXE is able to parse the device tree. Extend this feature to also cover any console output that iPXE attempts to send to the SBI console, on the basis that the purpose of the early UART is to provide an output-only device for situations in which there is no functional SBI console. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -243,6 +243,32 @@ early_uart_sifive_wait_\@:
|
||||
bltz a1, early_uart_sifive_wait_\@
|
||||
.endm
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Print single character to early UART (from C code)
|
||||
*
|
||||
*****************************************************************************
|
||||
*
|
||||
* This function is called by the SBI console driver to output a
|
||||
* character to the early UART (if enabled).
|
||||
*
|
||||
* The standard C ABI applies to this function.
|
||||
*
|
||||
* Parameters:
|
||||
*
|
||||
* a0 - Character to print
|
||||
*
|
||||
* Returns: none
|
||||
*
|
||||
*/
|
||||
|
||||
.section ".prefix.early_uart_putchar", "ax", @progbits
|
||||
.globl early_uart_putchar
|
||||
early_uart_putchar:
|
||||
print_char_uart
|
||||
ret
|
||||
.size early_uart_putchar, . - early_uart_putchar
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Print message to debug console
|
||||
|
||||
Reference in New Issue
Block a user