From d8f6d2a92def145c456b385dbc8002f822008735 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Wed, 18 May 2022 15:11:38 +0530 Subject: drivers/intel/fsp2_0: Avoid hardcoding `log_level` for FSP debug handler This patch fixes a potential corner case scenario where the value of CONFIG_DEFAULT_CONSOLE_LOGLEVEL is less than `BIOS_SPEW` hence, coreboot is unable to redirect FSP serial messages over UART. Rather than passing hard coded `BIOS_SPEW` for the FSP debug handler, this patch now calls get_log_level() function to pass the supported log level while printing FSP serial msg. BUG=b:225544587 TEST=Able to build and boot taeko. Also, able to see FSP debug log with CONFIG_DEFAULT_CONSOLE_LOGLEVEL=7. Signed-off-by: Subrata Banik Change-Id: I8a18101f5c3004252205387bde28590c72e05b9d Reviewed-on: https://review.coreboot.org/c/coreboot/+/64460 Reviewed-by: Lean Sheng Tan Tested-by: build bot (Jenkins) --- src/drivers/intel/fsp2_0/fsp_debug_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/intel/fsp2_0/fsp_debug_event.c b/src/drivers/intel/fsp2_0/fsp_debug_event.c index f58424b0c5..2ebecc0e51 100644 --- a/src/drivers/intel/fsp2_0/fsp_debug_event.c +++ b/src/drivers/intel/fsp2_0/fsp_debug_event.c @@ -12,7 +12,7 @@ static const uint8_t fsp_string_type_guid[16] = { static efi_return_status_t print_fsp_string_data(const efi_status_code_data_t *data) { - printk(BIOS_SPEW, "%s", ((efi_status_code_string_data *) data)->String.Ascii); + printk(get_log_level(), "%s", ((efi_status_code_string_data *) data)->String.Ascii); return FSP_SUCCESS; } -- cgit v1.2.3