Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/59692 )
Change subject: cpu/x86/mp_init.c: Make it work for !CONFIG_SMP ......................................................................
cpu/x86/mp_init.c: Make it work for !CONFIG_SMP
With very little changes this code can be used to initialize systems without SMP. The linker will remove most of the code.
Change-Id: Ia0e8fdf8ed7bc2e0e4ff01be8d3e3c3cb837e6c7 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/cpu/x86/Kconfig M src/cpu/x86/mp_init.c 2 files changed, 8 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/92/59692/1
diff --git a/src/cpu/x86/Kconfig b/src/cpu/x86/Kconfig index 44c9cb6..2e7be02 100644 --- a/src/cpu/x86/Kconfig +++ b/src/cpu/x86/Kconfig @@ -1,12 +1,13 @@ config PARALLEL_MP def_bool y depends on !LEGACY_SMP_INIT - depends on SMP select CPU_INFO_V2 help This option uses common MP infrastructure for bringing up APs in parallel. It additionally provides a more flexible mechanism for sequencing the steps of bringing up the APs. + The code also works for just initialising the BSP in case there + are no APs.
config PARALLEL_MP_AP_WORK def_bool n diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c index c99732f..07bb787 100644 --- a/src/cpu/x86/mp_init.c +++ b/src/cpu/x86/mp_init.c @@ -593,6 +593,10 @@ return CB_ERR; }
+ /* We just need to run things on the BSP */ + if (!CONFIG(SMP)) + return bsp_do_flight_plan(p); + /* Default to currently running CPU. */ num_cpus = allocate_cpu_devices(cpu_bus, p);
@@ -1076,7 +1080,8 @@ ops->get_smm_info(&state->perm_smbase, &state->perm_smsize, &state->smm_real_save_state_size);
- state->smm_save_state_size = MAX(state->smm_real_save_state_size, smm_stub_size()); + if (CONFIG(HAVE_SMI_HANDLER)) + state->smm_save_state_size = MAX(state->smm_real_save_state_size, smm_stub_size());
/* * Make sure there is enough room for the SMM descriptor