From ed8d777cecf7162a688b4683a4d39333999dcfc7 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Sat, 12 Jun 2021 06:21:27 +0200 Subject: [PATCH] cpu/x86/Kconfig: Increase SMM stack size to 0x800 on x86_64 In x86_64 code every function call consumes 32byte of stack with no stack local variables being used. That limits the function call depth in SMM to 32 or less. Double the stack size to prevent overwriting the stack canary as seen on HP8200 and x86_64 enabled. Change-Id: Iee202ba2ae609a474d0eb3b06f49690f33f4eda8 Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/c/coreboot/+/55449 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons Reviewed-by: Arthur Heymans --- src/cpu/x86/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cpu/x86/Kconfig b/src/cpu/x86/Kconfig index 84b1fc1297..6a3bbd8c0b 100644 --- a/src/cpu/x86/Kconfig +++ b/src/cpu/x86/Kconfig @@ -127,6 +127,7 @@ config SMM_MODULE_HEAP_SIZE config SMM_MODULE_STACK_SIZE hex + default 0x800 if ARCH_RAMSTAGE_X86_64 default 0x400 help This option determines the size of the stack within the SMM handler