Kyösti Mälkki has submitted this change. ( https://review.coreboot.org/c/coreboot/+/58699 )
Change subject: cpu/x86/mp_init.c: Rename num_concurrent_stacks ......................................................................
cpu/x86/mp_init.c: Rename num_concurrent_stacks
This is just the amount of cpus so rename it for simplicity.
Change-Id: Ib2156136894eeda4a29e8e694480abe06da62959 Signed-off-by: Arthur Heymans arthur@aheymans.xyz Reviewed-on: https://review.coreboot.org/c/coreboot/+/58699 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: HAOUAS Elyes ehaouas@noos.fr Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/cpu/x86/mp_init.c M src/cpu/x86/smm/smm_module_loader.c M src/include/cpu/x86/smm.h 3 files changed, 11 insertions(+), 11 deletions(-)
Approvals: build bot (Jenkins): Verified HAOUAS Elyes: Looks good to me, but someone else must approve Angel Pons: Looks good to me, approved
diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c index 7d0a20f..1f1f968 100644 --- a/src/cpu/x86/mp_init.c +++ b/src/cpu/x86/mp_init.c @@ -763,7 +763,7 @@ size_t save_state_size) { struct smm_loader_params smm_params = { - .num_concurrent_stacks = num_cpus, + .num_cpus = num_cpus, .real_cpu_save_state_size = real_save_state_size, .per_cpu_save_state_size = save_state_size, .num_concurrent_save_states = 1, @@ -793,7 +793,7 @@ * size and save state size for each CPU. */ struct smm_loader_params smm_params = { - .num_concurrent_stacks = num_cpus, + .num_cpus = num_cpus, .real_cpu_save_state_size = real_save_state_size, .per_cpu_save_state_size = save_state_size, .num_concurrent_save_states = num_cpus, diff --git a/src/cpu/x86/smm/smm_module_loader.c b/src/cpu/x86/smm/smm_module_loader.c index ce7cf20..beddb3c 100644 --- a/src/cpu/x86/smm/smm_module_loader.c +++ b/src/cpu/x86/smm/smm_module_loader.c @@ -322,7 +322,7 @@ size = smm_size;
/* The number of concurrent stacks cannot exceed CONFIG_MAX_CPUS. */ - if (params->num_concurrent_stacks > CONFIG_MAX_CPUS) { + if (params->num_cpus > CONFIG_MAX_CPUS) { printk(BIOS_ERR, "%s: not enough stacks\n", __func__); return -1; } @@ -397,7 +397,7 @@ __func__, smm_size);
/* Initialize the APIC id to CPU number table to be 1:1 */ - for (i = 0; i < params->num_concurrent_stacks; i++) + for (i = 0; i < params->num_cpus; i++) stub_params->apic_id_to_cpu[i] = i;
/* Allow the initiator to manipulate SMM stub parameters. */ @@ -429,8 +429,8 @@
/* Since the relocation handler always uses stack, adjust the number * of concurrent stack users to be CONFIG_MAX_CPUS. */ - if (params->num_concurrent_stacks == 0) - params->num_concurrent_stacks = CONFIG_MAX_CPUS; + if (params->num_cpus == 0) + params->num_cpus = CONFIG_MAX_CPUS;
printk(BIOS_SPEW, "%s: exit\n", __func__); return smm_module_setup_stub(smram, SMM_DEFAULT_SIZE, @@ -506,7 +506,7 @@
/* FXSAVE goes below MSEG */ if (CONFIG(SSE)) { - fxsave_size = FXSAVE_SIZE * params->num_concurrent_stacks; + fxsave_size = FXSAVE_SIZE * params->num_cpus; fxsave_area = (char *)base - fxsave_size; base -= fxsave_size; total_size += fxsave_size; @@ -548,7 +548,7 @@ handler_mod_params->smbase = smram_base; handler_mod_params->smm_size = smram_size; handler_mod_params->save_state_size = params->real_cpu_save_state_size; - handler_mod_params->num_cpus = params->num_concurrent_stacks; + handler_mod_params->num_cpus = params->num_cpus; handler_mod_params->gnvs_ptr = (uintptr_t)acpi_get_gnvs();
printk(BIOS_DEBUG, "%s: smram_start: 0x%lx\n", __func__, smram_base); @@ -585,7 +585,7 @@ return -1; }
- for (int i = 0; i < params->num_concurrent_stacks; i++) { + for (int i = 0; i < params->num_cpus; i++) { handler_mod_params->save_state_top[i] = cpus[i].ss_start + params->per_cpu_save_state_size; } diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h index 37247ec..8ea8336 100644 --- a/src/include/cpu/x86/smm.h +++ b/src/include/cpu/x86/smm.h @@ -120,7 +120,7 @@ /* SMM Module Loading API */
/* The smm_loader_params structure provides direction to the SMM loader: - * - num_concurrent_stacks - number of concurrent cpus in handler needing stack + * - num_cpus - number of concurrent cpus in handler needing stack * optional for setting up relocation handler. * - per_cpu_save_state_size - the SMM save state size per cpu * - num_concurrent_save_states - number of concurrent cpus needing save state @@ -132,7 +132,7 @@ * handle sparse APIC id space. */ struct smm_loader_params { - size_t num_concurrent_stacks; + size_t num_cpus;
size_t real_cpu_save_state_size; size_t per_cpu_save_state_size;