mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-15 00:54:22 +00:00
fix(xilinx): runtime console to handle dt failure
If the Device Tree is missing or parsing fails in the runtime console, the console still gets registered with zeroed DT values, leading to a panic due to the absence of a console type. Added fallback option and check for zero base address. Change-Id: I5f5e0222685ba015ab7db2ecbd46d906f5ab9116 Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
This commit is contained in:
parent
4c5cf47f98
commit
0791be8813
1 changed files with 7 additions and 5 deletions
|
@ -274,14 +274,16 @@ void setup_console(void)
|
|||
INFO("BL31: Early console setup\n");
|
||||
|
||||
#ifdef CONSOLE_RUNTIME
|
||||
#if (RT_CONSOLE_IS(dtb) && (XLNX_DT_CFG == 1))
|
||||
rt_hd_console.base = dt_uart_info.base;
|
||||
rt_hd_console.baud_rate = dt_uart_info.baud_rate;
|
||||
rt_hd_console.console_type = dt_uart_info.console_type;
|
||||
#else
|
||||
rt_hd_console.base = (uintptr_t)RT_UART_BASE;
|
||||
rt_hd_console.baud_rate = (uint32_t)UART_BAUDRATE;
|
||||
rt_hd_console.console_type = RT_UART_TYPE;
|
||||
|
||||
#if (RT_CONSOLE_IS(dtb) && (XLNX_DT_CFG == 1))
|
||||
if (dt_uart_info.base != 0U) {
|
||||
rt_hd_console.base = dt_uart_info.base;
|
||||
rt_hd_console.baud_rate = dt_uart_info.baud_rate;
|
||||
rt_hd_console.console_type = dt_uart_info.console_type;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((rt_hd_console.console_type == boot_hd_console.console_type) &&
|
||||
|
|
Loading…
Add table
Reference in a new issue