From ec2e61ab2fb0a3093571ec034b182e073a2ba6c3 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Tue, 19 Dec 2017 15:26:46 -0700 Subject: cpu/x86: set permanent SMM handler stack to 1KiB Not all SMM save state sizes equate to having enough stack in the permanent SMM handler. Therefore, ensure 1KiB of stack is available for each cpu's stack. Intel's save state size is 1KiB, but AMD's save state size is only 512. Therefore, decouple save state size from the per cpu stack size. BUG=b:70027919 Change-Id: I54b9e6f3cc0ad6ca3d7b60b2b422b5dc5a78a552 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/22950 Tested-by: build bot (Jenkins) Reviewed-by: Marshall Dawson Reviewed-by: Justin TerAvest Reviewed-by: Paul Menzel --- src/cpu/x86/mp_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cpu') diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c index 046aa60ec7..baa6aec998 100644 --- a/src/cpu/x86/mp_init.c +++ b/src/cpu/x86/mp_init.c @@ -794,9 +794,9 @@ static int install_permanent_handler(int num_cpus, uintptr_t smbase, size_t smsize, size_t save_state_size) { /* There are num_cpus concurrent stacks and num_cpus concurrent save - * state areas. Lastly, set the stack size to the save state size. */ + * state areas. Lastly, set the stack size to 1KiB. */ struct smm_loader_params smm_params = { - .per_cpu_stack_size = save_state_size, + .per_cpu_stack_size = 1 * KiB, .num_concurrent_stacks = num_cpus, .per_cpu_save_state_size = save_state_size, .num_concurrent_save_states = num_cpus, -- cgit v1.2.3