diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2021-02-16 13:19:18 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-04-19 06:36:05 +0000 |
commit | e6c3523b1b4691940312c083446fcaa59c5d55a4 (patch) | |
tree | c658eab9f9a0af5ae3455815802955cce9aa74fd /src/include/cpu/x86/smm.h | |
parent | 110c47699a53a283526dc306279f3e5b9fa87297 (diff) |
cpu/x86/smm_loaderv2: Use the permanent stack top during relocation
Use the same stack location during relocation as for the permanent
handler.
When the number of CPUs is too large the stacks during relocation
don't fit inside the default SMRAM segment at 0x30000. Currently the
code would just let the CPU stack base grow downwards outside of the
default SMM segment which would corrupt lower memory if S3 is
implemented.
Also update the comment on smm_module_setup_stub().
Change-Id: I6a0a890e8b1c2408301564c22772032cfee4d296
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51186
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/include/cpu/x86/smm.h')
-rw-r--r-- | src/include/cpu/x86/smm.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h index c42eb8cf7f..1b4de2571a 100644 --- a/src/include/cpu/x86/smm.h +++ b/src/include/cpu/x86/smm.h @@ -148,7 +148,7 @@ struct smm_loader_params { }; /* Both of these return 0 on success, < 0 on failure. */ -int smm_setup_relocation_handler(struct smm_loader_params *params); +int smm_setup_relocation_handler(void * const perm_smram, struct smm_loader_params *params); int smm_load_module(void *smram, size_t size, struct smm_loader_params *params); u32 smm_get_cpu_smbase(unsigned int cpu_num); |