Johnny Lin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47006 )
Change subject: mb/ocp/deltalake: Add SMM console log level override ......................................................................
mb/ocp/deltalake: Add SMM console log level override
The log level is set to a configuration value, since SMI should not take too much time searching flash VPD.
Change-Id: I73afc944fbd6c21e884397f3049bd363e2c1ce2c Signed-off-by: Johnny Lin johnny_lin@wiwynn.com --- M src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/Makefile.inc M src/mainboard/ocp/deltalake/loglevel_vpd.c 3 files changed, 11 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/47006/1
diff --git a/src/mainboard/ocp/deltalake/Kconfig b/src/mainboard/ocp/deltalake/Kconfig index bb907f1..1d00c29 100644 --- a/src/mainboard/ocp/deltalake/Kconfig +++ b/src/mainboard/ocp/deltalake/Kconfig @@ -57,4 +57,9 @@ bool default y
+config SMM_CONSOLE_LOGLEVEL + int + depends on DEBUG_SMI + default 7 + endif # BOARD_OCP_DELTALAKE diff --git a/src/mainboard/ocp/deltalake/Makefile.inc b/src/mainboard/ocp/deltalake/Makefile.inc index e961a34..9718f4c 100644 --- a/src/mainboard/ocp/deltalake/Makefile.inc +++ b/src/mainboard/ocp/deltalake/Makefile.inc @@ -8,5 +8,9 @@ ramstage-y += ramstage.c ipmi.c ramstage-$(CONFIG_HAVE_ACPI_TABLES) += fadt.c all-$(CONFIG_CONSOLE_OVERRIDE_LOGLEVEL) += loglevel_vpd.c +ifeq ($(CONFIG_DEBUG_SMI),y) +smm-$(CONFIG_CONSOLE_OVERRIDE_LOGLEVEL) += loglevel_vpd.c +endif + CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/include CPPFLAGS_common += -I$(CONFIG_FSP_HEADER_PATH) diff --git a/src/mainboard/ocp/deltalake/loglevel_vpd.c b/src/mainboard/ocp/deltalake/loglevel_vpd.c index 3faf37a..21f3652 100644 --- a/src/mainboard/ocp/deltalake/loglevel_vpd.c +++ b/src/mainboard/ocp/deltalake/loglevel_vpd.c @@ -11,6 +11,8 @@ int log_level = COREBOOT_LOG_LEVEL_DEFAULT; char val_str[VPD_LEN];
+ if (ENV_SMM) + return CONFIG_SMM_CONSOLE_LOGLEVEL; if (vpd_gets(COREBOOT_LOG_LEVEL, val_str, VPD_LEN, VPD_RW_THEN_RO)) { log_level = (int)atol(val_str); if (log_level < 0 || log_level >= BIOS_NEVER)