diff options
author | Aaron Durbin <adurbin@chromium.org> | 2017-12-19 15:26:46 -0700 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-12-20 16:14:13 +0000 |
commit | ec2e61ab2fb0a3093571ec034b182e073a2ba6c3 (patch) | |
tree | 8e2b88c0d73cd8b4b0d2883127e5fe5278835559 | |
parent | 6b6c94bacc13a374abc8069aec7da074121015b9 (diff) |
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 <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/22950
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
-rw-r--r-- | src/cpu/x86/mp_init.c | 4 |
1 files changed, 2 insertions, 2 deletions
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, |