summaryrefslogtreecommitdiff
path: root/drivers/serial/serial_sbi.c
AgeCommit message (Collapse)Author
2024-03-12serial: move sbi_dbcn_available to .data sectionHeinrich Schuchardt
U-Boot SPL loads the device-tree directly behind main U-Boot overlapping the .bss section. reserve_fdt() is called in board_init_f() to relocate the device-tree to a safe location. Debug UARTs are enabled before board_init_f(). With sbi_dbcn_available in the .bss section the device-tree is corrupted when _debug_uart_init() is called in the SBI serial driver. Move the variable to the .data section. Link: https://bugs.launchpad.net/ubuntu/+source/u-boot/+bug/2054091 Fixes: dfe08374943c ("risc-v: implement DBCN based debug console") Signed-off-by: Heinrich Schuchardt <[email protected]> Tested-by: Aurelien Jarno <[email protected]> Tested-by: Conor Dooley <[email protected]>
2023-09-05risc-v: implement DBCN based debug consoleHeinrich Schuchardt
Use the DBCN SBI extension to implement a debug console. Make it the default for S-mode RISC-V. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2021-10-07serial: Add a debug console using the RISC-V SBI interfaceSamuel Holland
The RISC-V SBI interface v0.1 provides a function for printing a character to the console. Even though SBI v0.1 functions are deprecated, the SBI console is quite useful for early debugging, because it works without any dcache, memory, or MMIO access in S mode. Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Sean Anderson <[email protected]> Reviewed-by: Bin Meng <[email protected]>