summaryrefslogtreecommitdiffstats
path: root/src/cpu/x86/smm/smm_module_loader.c
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2022-04-07 21:50:16 +0200
committerMartin L Roth <gaumless@tutanota.com>2022-05-28 05:09:56 +0000
commit1684b0aa6752af770328c48b3adafa5e6cb386fe (patch)
tree9f6c797f14c9aade5e075efcb8e8a1979dd3b21c /src/cpu/x86/smm/smm_module_loader.c
parentd7c371619a287a3a74e23fc3fcff4793a12deba6 (diff)
downloadcoreboot-1684b0aa6752af770328c48b3adafa5e6cb386fe.tar.gz
coreboot-1684b0aa6752af770328c48b3adafa5e6cb386fe.tar.bz2
coreboot-1684b0aa6752af770328c48b3adafa5e6cb386fe.zip
cpu/x86/mp_init.c: Drop 'real' vs 'used' save state
Now that the save state size is handled properly inside the smm_loader there is no reason to make that distinction in the mp_init code anymore. Change-Id: Ia0002a33b6d0f792d8d78cf625fd7e830e3e50fc Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/63479 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@tutanota.com>
Diffstat (limited to 'src/cpu/x86/smm/smm_module_loader.c')
-rw-r--r--src/cpu/x86/smm/smm_module_loader.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cpu/x86/smm/smm_module_loader.c b/src/cpu/x86/smm/smm_module_loader.c
index ea006e333588..6502a6d5b1cc 100644
--- a/src/cpu/x86/smm/smm_module_loader.c
+++ b/src/cpu/x86/smm/smm_module_loader.c
@@ -106,7 +106,7 @@ static int smm_create_map(const uintptr_t smbase, const unsigned int num_cpus,
* Make sure that the first stub does not overlap with the last save state of a segment.
*/
const size_t stub_size = rmodule_memory_size(&smm_stub);
- const size_t needed_ss_size = MAX(params->real_cpu_save_state_size, stub_size);
+ const size_t needed_ss_size = MAX(params->cpu_save_state_size, stub_size);
const size_t cpus_per_segment =
(SMM_CODE_SEGMENT_SIZE - SMM_ENTRY_OFFSET - stub_size) / needed_ss_size;
@@ -127,7 +127,7 @@ static int smm_create_map(const uintptr_t smbase, const unsigned int num_cpus,
cpus[i].code_start = cpus[i].smbase + SMM_ENTRY_OFFSET;
cpus[i].code_end = cpus[i].code_start + stub_size;
cpus[i].ss_top = cpus[i].smbase + SMM_CODE_SEGMENT_SIZE;
- cpus[i].ss_start = cpus[i].ss_top - params->real_cpu_save_state_size;
+ cpus[i].ss_start = cpus[i].ss_top - params->cpu_save_state_size;
printk(BIOS_DEBUG, " Stub [0x%lx-0x%lx[\n", cpus[i].code_start,
cpus[i].code_end);
printk(BIOS_DEBUG, " Save state [0x%lx-0x%lx[\n", cpus[i].ss_start,
@@ -372,7 +372,7 @@ static void setup_smihandler_params(struct smm_runtime *mod_params,
{
mod_params->smbase = smram_base;
mod_params->smm_size = smram_size;
- mod_params->save_state_size = loader_params->real_cpu_save_state_size;
+ mod_params->save_state_size = loader_params->cpu_save_state_size;
mod_params->num_cpus = loader_params->num_cpus;
mod_params->gnvs_ptr = (uint32_t)(uintptr_t)acpi_get_gnvs();
const struct cbmem_entry *cbmemc;