[coreboot-gerrit] Change in coreboot[master]: cpu/x86: Make SMM stack size configurable

Raul Rangel (Code Review) gerrit at coreboot.org
Tue Jun 12 18:43:14 CEST 2018


Raul Rangel has uploaded this change for review. ( https://review.coreboot.org/27034


Change subject: cpu/x86: Make SMM stack size configurable
......................................................................

cpu/x86: Make SMM stack size configurable

Stoneyridge is running into a stack overflow in the SMM handler.

BUG=b:80539294
TEST=built on grunt

Change-Id: I94e385497bd93c3638c69fb08d9b843c3bbb55ce
Signed-off-by: Raul E Rangel <rrangel at 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/34/27034/1

diff --git a/src/cpu/x86/Kconfig b/src/cpu/x86/Kconfig
index a20febb..952b308 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 0x400
+	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,

-- 
To view, visit https://review.coreboot.org/27034
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I94e385497bd93c3638c69fb08d9b843c3bbb55ce
Gerrit-Change-Number: 27034
Gerrit-PatchSet: 1
Gerrit-Owner: Raul Rangel <rrangel at chromium.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180612/790ff1b3/attachment.html>


More information about the coreboot-gerrit mailing list