summaryrefslogtreecommitdiff
path: root/src/cpu/x86
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/x86')
-rw-r--r--src/cpu/x86/mp_init.c4
-rw-r--r--src/cpu/x86/smm/smm_module_loader.c3
-rw-r--r--src/cpu/x86/smm/smm_module_loaderv2.c3
-rw-r--r--src/cpu/x86/smm/smm_stub.S11
4 files changed, 12 insertions, 9 deletions
diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c
index 3edb5e7693..0693bc712a 100644
--- a/src/cpu/x86/mp_init.c
+++ b/src/cpu/x86/mp_init.c
@@ -762,10 +762,10 @@ static void asmlinkage smm_do_relocation(void *arg)
static void adjust_smm_apic_id_map(struct smm_loader_params *smm_params)
{
int i;
- struct smm_runtime *runtime = smm_params->runtime;
+ struct smm_stub_params *stub_params = smm_params->stub_params;
for (i = 0; i < CONFIG_MAX_CPUS; i++)
- runtime->apic_id_to_cpu[i] = cpu_get_apic_id(i);
+ stub_params->apic_id_to_cpu[i] = cpu_get_apic_id(i);
}
static int install_relocation_handler(int num_cpus, size_t save_state_size)
diff --git a/src/cpu/x86/smm/smm_module_loader.c b/src/cpu/x86/smm/smm_module_loader.c
index d799ae2805..16feeb6c6e 100644
--- a/src/cpu/x86/smm/smm_module_loader.c
+++ b/src/cpu/x86/smm/smm_module_loader.c
@@ -259,9 +259,10 @@ static int smm_module_setup_stub(void *smbase, size_t smm_size,
/* Initialize the APIC id to CPU number table to be 1:1 */
for (i = 0; i < params->num_concurrent_stacks; i++)
- stub_params->runtime.apic_id_to_cpu[i] = i;
+ stub_params->apic_id_to_cpu[i] = i;
/* Allow the initiator to manipulate SMM stub parameters. */
+ params->stub_params = stub_params;
params->runtime = &stub_params->runtime;
printk(BIOS_DEBUG, "SMM Module: stub loaded at %p. Will call %p\n",
diff --git a/src/cpu/x86/smm/smm_module_loaderv2.c b/src/cpu/x86/smm/smm_module_loaderv2.c
index be0e23d50c..81d85c6f92 100644
--- a/src/cpu/x86/smm/smm_module_loaderv2.c
+++ b/src/cpu/x86/smm/smm_module_loaderv2.c
@@ -464,9 +464,10 @@ static int smm_module_setup_stub(void *smbase, size_t smm_size,
/* Initialize the APIC id to CPU number table to be 1:1 */
for (i = 0; i < params->num_concurrent_stacks; i++)
- stub_params->runtime.apic_id_to_cpu[i] = i;
+ stub_params->apic_id_to_cpu[i] = i;
/* Allow the initiator to manipulate SMM stub parameters. */
+ params->stub_params = stub_params;
params->runtime = &stub_params->runtime;
printk(BIOS_DEBUG, "SMM Module: stub loaded at %p. Will call %p\n",
diff --git a/src/cpu/x86/smm/smm_stub.S b/src/cpu/x86/smm/smm_stub.S
index b9b0670ef6..24cb684e10 100644
--- a/src/cpu/x86/smm/smm_stub.S
+++ b/src/cpu/x86/smm/smm_stub.S
@@ -25,6 +25,12 @@ fxsave_area:
.long 0
fxsave_area_size:
.long 0
+/* apic_to_cpu_num is a table mapping the default APIC id to CPU num. If the
+ * APIC id is found at the given index, the contiguous CPU number is index
+ * into the table. */
+apic_to_cpu_num:
+.fill CONFIG_MAX_CPUS,1,0xff
+
/* struct smm_runtime begins here. */
smm_runtime:
smbase:
@@ -40,11 +46,6 @@ gnvs_ptr:
/* allows the STM to bring up SMM in 32-bit mode */
start32_offset:
.long smm_trampoline32 - _start
-/* apic_to_cpu_num is a table mapping the default APIC id to CPU num. If the
- * APIC id is found at the given index, the contiguous CPU number is index
- * into the table. */
-apic_to_cpu_num:
-.fill CONFIG_MAX_CPUS,1,0xff
/* end struct smm_runtime */
.data