Browse Source

feat(xilinx): used console also as crash console

CONSOLE_FLAG_CRASH should be also setup to get crash logs on
the same console. Both platforms are using crash console
implementation from plat/common/aarch64/crash_console_helpers.S
that's why there is necessary to setup CONSOLE_FLAG_CRASH.
plat_crash_console_putc() implementation is saying:
"int plat_crash_console_putc(char c)
Prints the character on all consoles registered with the console
framework that have CONSOLE_FLAG_CRASH set. Note that this is only
helpful for crashes that occur after the platform intialization code
has registered a console. Platforms using this implementation need to
ensure that all console drivers they use that have the CRASH flag set
support this (i.e. are written in assembly and comply to the register
clobber requirements of plat_crash_console_putc()."

Change-Id: I314cacbcb0bfcc85fe734882e38718f2763cdbf4
Signed-off-by: Michal Simek <michal.simek@amd.com>
pull/2003/head
Michal Simek 1 year ago
parent
commit
3e6b96e869
  1. 2
      plat/xilinx/versal/bl31_versal_setup.c
  2. 3
      plat/xilinx/zynqmp/bl31_zynqmp_setup.c

2
plat/xilinx/versal/bl31_versal_setup.c

@ -86,7 +86,7 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
}
console_set_scope(&versal_runtime_console, (uint32_t)(CONSOLE_FLAG_BOOT |
CONSOLE_FLAG_RUNTIME));
CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_CRASH));
} else if (VERSAL_CONSOLE_IS(dcc)) {
/* Initialize the dcc console for debug */
int32_t rc = console_dcc_register();

3
plat/xilinx/zynqmp/bl31_zynqmp_setup.c

@ -81,7 +81,8 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
ZYNQMP_UART_BAUDRATE,
&bl31_boot_console);
console_set_scope(&bl31_boot_console,
CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_BOOT);
CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_BOOT |
CONSOLE_FLAG_CRASH);
} else if (ZYNQMP_CONSOLE_IS(dcc)) {
/* Initialize the dcc console for debug */
int32_t rc = console_dcc_register();

Loading…
Cancel
Save