From 633560568d5cc24da52f1089f0ae4ca362f7de2f Mon Sep 17 00:00:00 2001 From: Aseda Aboagye Date: Thu, 17 Jun 2021 12:10:33 -0700 Subject: soc/intel/common/block/smm: Add `mainboard_smi_finalize` This commit adds a method called `mainboard_smi_finalize` which provides a mechanism for a mainboard to execute some code as part of the finalize method in the SMM stage before SoC does its finalization. BUG=b:191189275 BRANCH=None TEST=Implement `mainboard_smi_finalize` on lalala and verify that the code executes in SMM. Signed-off-by: Aseda Aboagye Change-Id: If1ee63431e3c2a5831a4656c3a361229acff3f42 Reviewed-on: https://review.coreboot.org/c/coreboot/+/55649 Tested-by: build bot (Jenkins) Reviewed-by: Karthik Ramasubramanian --- src/cpu/x86/smm/smihandler.c | 1 + src/cpu/x86/smm/smm_module_handler.c | 1 + 2 files changed, 2 insertions(+) (limited to 'src/cpu/x86') diff --git a/src/cpu/x86/smm/smihandler.c b/src/cpu/x86/smm/smihandler.c index 0d9131e429..0b262afaa9 100644 --- a/src/cpu/x86/smm/smihandler.c +++ b/src/cpu/x86/smm/smihandler.c @@ -208,3 +208,4 @@ void __weak southbridge_smi_handler(void) {} void __weak mainboard_smi_gpi(u32 gpi_sts) {} int __weak mainboard_smi_apmc(u8 data) { return 0; } void __weak mainboard_smi_sleep(u8 slp_typ) {} +void __weak mainboard_smi_finalize(void) {} diff --git a/src/cpu/x86/smm/smm_module_handler.c b/src/cpu/x86/smm/smm_module_handler.c index 0c0de78b21..f9ebba4e32 100644 --- a/src/cpu/x86/smm/smm_module_handler.c +++ b/src/cpu/x86/smm/smm_module_handler.c @@ -198,3 +198,4 @@ void __weak southbridge_smi_handler() {} void __weak mainboard_smi_gpi(u32 gpi_sts) {} int __weak mainboard_smi_apmc(u8 data) { return 0; } void __weak mainboard_smi_sleep(u8 slp_typ) {} +void __weak mainboard_smi_finalize(void) {} -- cgit v1.2.3