aboutsummaryrefslogtreecommitdiff
path: root/src/include/cpu
diff options
context:
space:
mode:
authorJohnny Lin <johnny_lin@wiwynn.com>2021-01-14 17:49:08 +0800
committerDavid Hendricks <david.hendricks@gmail.com>2023-02-15 21:53:07 +0000
commit107e7aa0f58f79ee5719f82c7147e53d7d9fa218 (patch)
tree22ea35a3f0f188e2036ce1c710afdef8409c625f /src/include/cpu
parente822fb358764b78e7d7d02c024ae6a285632ddf9 (diff)
cpu/x86/smm: Enable setting SMM console log level from mainboard
Add a Kconfig RUNTIME_CONFIGURABLE_SMM_LOGLEVEL that enables mainboard to override mainboard_set_smm_log_level for SMM log level. This can let SMM have different log level than other stages for more flexibility. Another reason is that getting certain data that requires searching from flash VPD or CMOS is not very ideal to be done in SMM, so in this change the value can be passed via the member variable in struct smm_runtime and be referenced directly in SMM. One example is that mainboard can get the desired SMM log level from VPD/CMOS, and pass SMM console log level via the variable and in SMM it can be referenced in get_console_loglevel() override function directly. Tested=On OCP Delta Lake, verified SMM log level can be overridden. Change-Id: I81722a4f1bf75ec942cc06e403ad702dfe938e71 Signed-off-by: Johnny Lin <johnny_lin@wiwynn.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/49460 Reviewed-by: David Hendricks <david.hendricks@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
Diffstat (limited to 'src/include/cpu')
-rw-r--r--src/include/cpu/x86/smm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h
index 79149675cc..4ab9f213f4 100644
--- a/src/include/cpu/x86/smm.h
+++ b/src/include/cpu/x86/smm.h
@@ -49,6 +49,7 @@ void mainboard_smi_gpi(u32 gpi_sts);
int mainboard_smi_apmc(u8 data);
void mainboard_smi_sleep(u8 slp_typ);
void mainboard_smi_finalize(void);
+int mainboard_set_smm_log_level(void);
void smm_soc_early_init(void);
void smm_soc_exit(void);
@@ -66,6 +67,7 @@ struct smm_runtime {
u32 cbmemc_size;
void *cbmemc;
uintptr_t save_state_top[CONFIG_MAX_CPUS];
+ int smm_log_level;
} __packed;
struct smm_module_params {