coreboot/src/cpu/x86
Raul E Rangel e6cd6caf31 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>
2022-03-10 17:06:51 +00:00
..
64bit x86_64 assembly: Don't touch %gs 2021-12-06 12:37:48 +00:00
lapic cpu/x86/lapic: Fix SMP=n case with LEGACY_SMP_INIT 2022-02-11 13:53:56 +00:00
mtrr treewide: Remove "ERROR: "/"WARN: " prefixes from log messages 2022-02-07 23:29:09 +00:00
name
pae src/acpi to src/lib: Fix spelling errors 2021-10-05 18:06:39 +00:00
smm cpu/x86/smm: Add weak SoC init and exit methods 2022-03-10 17:06:51 +00:00
tsc cpu/x86/tsc: Deduplicate Makefile logic 2021-09-08 14:35:16 +00:00
backup_default_smm.c
cpu_info.S.inc arch/x86,cpu/x86: Fix 64-bit CPU_INFO_V2 build errors 2021-10-21 17:36:09 +00:00
early_reset.S
entry16.S Asm code: Use NO_EARLY_BOOTBLOCK_POSTCODES to remove Asm port80s 2021-06-25 15:51:20 +00:00
entry32.S arch/x86,cpu/x86: Disable the %gs and %fs segments 2021-09-29 14:12:58 +00:00
fpu_enable.inc
Kconfig cpu/x86/smm: Support PARALLEL_MP with SMM_ASEG 2022-02-28 13:33:59 +00:00
Kconfig.debug_cpu cpu/x86/Kconfig.debug_cpu: drop HAVE_DISPLAY_MTRRS option 2021-10-26 20:02:14 +00:00
Makefile.inc cpu/x86/Makefile.inc: Build smi_trigger on !HAVE_SMI_HANDLER 2022-02-07 13:47:04 +00:00
mp_init.c cpu/x86/mp_init.c: Rename num_concurrent_stacks 2022-02-07 13:46:42 +00:00
reset16.S
sipi_vector.S cpu/x86: Remove cpu parameter to ap_init 2021-10-21 17:37:10 +00:00
smi_trigger.c cpu/x86/Makefile.inc: Build smi_trigger on !HAVE_SMI_HANDLER 2022-02-07 13:47:04 +00:00
sse_enable.inc