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 <subratabanik@google.com>
Change-Id: I8a18101f5c3004252205387bde28590c72e05b9d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64460
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Subrata Banik 2022-05-18 15:11:38 +05:30
parent 9686ac2261
commit d8f6d2a92d
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}