summaryrefslogtreecommitdiff
path: root/src/cpu/x86/mp_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/x86/mp_init.c')
-rw-r--r--src/cpu/x86/mp_init.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c
index 76f2650330..bac74f9243 100644
--- a/src/cpu/x86/mp_init.c
+++ b/src/cpu/x86/mp_init.c
@@ -796,19 +796,11 @@ static void adjust_smm_apic_id_map(struct smm_loader_params *smm_params)
}
static int install_relocation_handler(int num_cpus, size_t real_save_state_size,
- size_t save_state_size)
+ size_t save_state_size, uintptr_t perm_smbase)
{
- int cpus = num_cpus;
-#if CONFIG(X86_SMM_LOADER_VERSION2)
- /* Default SMRAM size is not big enough to concurrently
- * handle relocation for more than ~32 CPU threads
- * therefore, relocate 1 by 1. */
- cpus = 1;
-#endif
-
struct smm_loader_params smm_params = {
.per_cpu_stack_size = CONFIG_SMM_STUB_STACK_SIZE,
- .num_concurrent_stacks = cpus,
+ .num_concurrent_stacks = num_cpus,
.real_cpu_save_state_size = real_save_state_size,
.per_cpu_save_state_size = save_state_size,
.num_concurrent_save_states = 1,
@@ -819,7 +811,7 @@ static int install_relocation_handler(int num_cpus, size_t real_save_state_size,
if (mp_state.ops.adjust_smm_params != NULL)
mp_state.ops.adjust_smm_params(&smm_params, 0);
- if (smm_setup_relocation_handler(&smm_params)) {
+ if (smm_setup_relocation_handler((void *)perm_smbase, &smm_params)) {
printk(BIOS_ERR, "%s: smm setup failed\n", __func__);
return -1;
}
@@ -874,9 +866,8 @@ static void load_smm_handlers(void)
return;
/* Install handlers. */
- if (install_relocation_handler(mp_state.cpu_count,
- real_save_state_size,
- smm_save_state_size) < 0) {
+ if (install_relocation_handler(mp_state.cpu_count, real_save_state_size,
+ smm_save_state_size, mp_state.perm_smbase) < 0) {
printk(BIOS_ERR, "Unable to install SMM relocation handler.\n");
smm_disable();
}