summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/x86/mp_init.c5
-rw-r--r--src/cpu/x86/smm/smm_module_loaderv2.c2
-rw-r--r--src/cpu/x86/smm/smm_stub.S6
3 files changed, 8 insertions, 5 deletions
diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c
index e70c142cc5..26b1ccabe2 100644
--- a/src/cpu/x86/mp_init.c
+++ b/src/cpu/x86/mp_init.c
@@ -686,6 +686,7 @@ struct mp_state {
uintptr_t perm_smbase;
size_t perm_smsize;
size_t smm_save_state_size;
+ uintptr_t reloc_start32_offset;
int do_smm;
} mp_state;
@@ -755,7 +756,7 @@ static void asmlinkage smm_do_relocation(void *arg)
stm_setup(mseg, p->cpu,
perm_smbase,
mp_state.perm_smbase,
- runtime->start32_offset);
+ mp_state.reloc_start32_offset);
}
}
@@ -796,6 +797,8 @@ static int install_relocation_handler(int num_cpus, size_t save_state_size)
}
adjust_smm_apic_id_map(&smm_params);
+ mp_state.reloc_start32_offset = smm_params.stub_params->start32_offset;
+
return 0;
}
diff --git a/src/cpu/x86/smm/smm_module_loaderv2.c b/src/cpu/x86/smm/smm_module_loaderv2.c
index 810df83d57..2f4e88e6f6 100644
--- a/src/cpu/x86/smm/smm_module_loaderv2.c
+++ b/src/cpu/x86/smm/smm_module_loaderv2.c
@@ -446,7 +446,7 @@ static int smm_module_setup_stub(void *smbase, size_t smm_size,
printk(BIOS_DEBUG, "%s: runtime.smbase = 0x%x\n",
__func__, stub_params->runtime.smbase);
printk(BIOS_DEBUG, "%s: runtime.start32_offset = 0x%x\n", __func__,
- stub_params->runtime.start32_offset);
+ stub_params->start32_offset);
printk(BIOS_DEBUG, "%s: runtime.smm_size = 0x%zx\n",
__func__, smm_size);
printk(BIOS_DEBUG, "%s: per_cpu_save_state_size = 0x%x\n",
diff --git a/src/cpu/x86/smm/smm_stub.S b/src/cpu/x86/smm/smm_stub.S
index 24cb684e10..10560b1593 100644
--- a/src/cpu/x86/smm/smm_stub.S
+++ b/src/cpu/x86/smm/smm_stub.S
@@ -30,6 +30,9 @@ fxsave_area_size:
* into the table. */
apic_to_cpu_num:
.fill CONFIG_MAX_CPUS,1,0xff
+/* allows the STM to bring up SMM in 32-bit mode */
+start32_offset:
+.long smm_trampoline32 - _start
/* struct smm_runtime begins here. */
smm_runtime:
@@ -43,9 +46,6 @@ num_cpus:
.long 0
gnvs_ptr:
.long 0
-/* allows the STM to bring up SMM in 32-bit mode */
-start32_offset:
-.long smm_trampoline32 - _start
/* end struct smm_runtime */
.data