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>
This commit is contained in:
parent
6b6c94bacc
commit
ec2e61ab2f
|
@ -794,9 +794,9 @@ static int install_permanent_handler(int num_cpus, uintptr_t smbase,
|
||||||
size_t smsize, size_t save_state_size)
|
size_t smsize, size_t save_state_size)
|
||||||
{
|
{
|
||||||
/* There are num_cpus concurrent stacks and num_cpus concurrent save
|
/* 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 = {
|
struct smm_loader_params smm_params = {
|
||||||
.per_cpu_stack_size = save_state_size,
|
.per_cpu_stack_size = 1 * KiB,
|
||||||
.num_concurrent_stacks = num_cpus,
|
.num_concurrent_stacks = num_cpus,
|
||||||
.per_cpu_save_state_size = save_state_size,
|
.per_cpu_save_state_size = save_state_size,
|
||||||
.num_concurrent_save_states = num_cpus,
|
.num_concurrent_save_states = num_cpus,
|
||||||
|
|
Loading…
Reference in New Issue