diff options
author | Raul E Rangel <rrangel@chromium.org> | 2022-02-25 12:40:32 -0700 |
---|---|---|
committer | Karthik Ramasubramanian <kramasub@google.com> | 2022-03-10 17:06:51 +0000 |
commit | e6cd6caf31d1e22b56a94c941f50b47e77bb41cd (patch) | |
tree | aa096036aa8978a806f18b02a1b78db73a018f28 /src/include/cpu/x86 | |
parent | 496734379dc0e6873a2d81edf0872987be5be4c0 (diff) |
cpu/x86/smm: Add weak SoC init and exit methods
This change provides hooks for the SoC so it can perform any
initialization and cleanup in the SMM handler.
For example, if we have a UART enabled firmware with DEBUG_SMI, the UART
controller could have been powered off by the OS. In this case we need
to power on the UART when entering SMM, and then power it off before we
exit. If the OS had the UART enabled when entering SMM, we should
snapshot the UART register state, and restore it on exit. Otherwise we
risk clearing some interrupt enable bits.
BUG=b:221231786, b:217968734
TEST=Build test guybrush
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I946619cd62a974a98c575a92943b43ea639fc329
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62500
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Diffstat (limited to 'src/include/cpu/x86')
-rw-r--r-- | src/include/cpu/x86/smm.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h index 28d95e11a5..03b9c39903 100644 --- a/src/include/cpu/x86/smm.h +++ b/src/include/cpu/x86/smm.h @@ -51,6 +51,9 @@ int mainboard_smi_apmc(u8 data); void mainboard_smi_sleep(u8 slp_typ); void mainboard_smi_finalize(void); +void smm_soc_early_init(void); +void smm_soc_exit(void); + /* This is the SMM handler. */ extern unsigned char _binary_smm_start[]; extern unsigned char _binary_smm_end[]; |