Raul Rangel has uploaded this change for review. ( https://review.coreboot.org/27033
Change subject: x86 smm: Increase SMM stack size to 2K ......................................................................
x86 smm: Increase SMM stack size to 2K
GSMI Set Event Log is taking more than 1K in stack. This causes the stack to overflow into the adjacent stack. This has the side effect of causing any CPU waiting for the SMI handler to complete to crash when the lock is unlocked because the return pointer has been smashed.
BUG=b:80539294 TEST=built on grunt and tested by running `halt` from the OS.
Change-Id: Ib170c7d03909ef3d20831726b285178a75007b06 Signed-off-by: Raul E Rangel rrangel@chromium.org --- M src/cpu/x86/Kconfig M src/cpu/x86/mp_init.c 2 files changed, 9 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/33/27033/1
diff --git a/src/cpu/x86/Kconfig b/src/cpu/x86/Kconfig index a20febb..1c5514e 100644 --- a/src/cpu/x86/Kconfig +++ b/src/cpu/x86/Kconfig @@ -112,6 +112,14 @@ This option determines the size of the heap within the SMM handler modules.
+config SMM_MODULE_STACK_SIZE + hex + default 0x800 + depends on SMM_TSEG + help + This option determines the size of the stack within the SMM handler + modules. + config SMM_LAPIC_REMAP_MITIGATION bool default y if NORTHBRIDGE_INTEL_I945 diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c index a696cd0..9fd10f7 100644 --- a/src/cpu/x86/mp_init.c +++ b/src/cpu/x86/mp_init.c @@ -792,7 +792,7 @@ /* There are num_cpus concurrent stacks and num_cpus concurrent save * state areas. Lastly, set the stack size to 1KiB. */ struct smm_loader_params smm_params = { - .per_cpu_stack_size = 1 * KiB, + .per_cpu_stack_size = CONFIG_SMM_MODULE_STACK_SIZE, .num_concurrent_stacks = num_cpus, .per_cpu_save_state_size = save_state_size, .num_concurrent_save_states = num_cpus,