summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
authorRaul E Rangel <rrangel@chromium.org>2018-06-12 10:43:09 -0600
committerPatrick Georgi <pgeorgi@google.com>2018-06-14 09:28:45 +0000
commitd3b839331058bfecab84abdb5836d2d3ef9654fc (patch)
tree9209eba154b1511a8204e129abf7df3f478cf99a /src/cpu
parentf0afb3e335cef9c58e4460b58e72f246753f2c2c (diff)
downloadcoreboot-d3b839331058bfecab84abdb5836d2d3ef9654fc.tar.xz
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@chromium.org> Reviewed-on: https://review.coreboot.org/27034 Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/x86/Kconfig8
-rw-r--r--src/cpu/x86/mp_init.c2
2 files changed, 9 insertions, 1 deletions
diff --git a/src/cpu/x86/Kconfig b/src/cpu/x86/Kconfig
index c67e6e5345..5e2d79657e 100644
--- a/src/cpu/x86/Kconfig
+++ b/src/cpu/x86/Kconfig
@@ -110,6 +110,14 @@ config SMM_MODULE_HEAP_SIZE
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 54b6d1571a..515bc676c4 100644
--- a/src/cpu/x86/mp_init.c
+++ b/src/cpu/x86/mp_init.c
@@ -795,7 +795,7 @@ static int install_permanent_handler(int num_cpus, uintptr_t smbase,
/* 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,