diff --git a/src/drivers/ocp/vpd/loglevel_vpd.c b/src/drivers/ocp/vpd/loglevel_vpd.c index 7a6db5750f..65bb4d168e 100644 --- a/src/drivers/ocp/vpd/loglevel_vpd.c +++ b/src/drivers/ocp/vpd/loglevel_vpd.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#include #include #include #include @@ -19,3 +20,11 @@ int get_console_loglevel(void) { return get_loglevel_from_vpd(COREBOOT_LOG_LEVEL, COREBOOT_LOG_LEVEL_DEFAULT); } + +#if ENV_RAMSTAGE && CONFIG(RUNTIME_CONFIGURABLE_SMM_LOGLEVEL) +/* Read VPD for SMM settings in ramstage because we don't want to do this in SMM */ +int mainboard_set_smm_log_level(void) +{ + return get_loglevel_from_vpd(SMM_LOG_LEVEL, SMM_LOG_LEVEL_DEFAULT); +} +#endif