summaryrefslogtreecommitdiffstats
path: root/src/cpu/x86/mp_init.c
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2021-11-26 14:50:42 +0100
committerFelix Held <felix-coreboot@felixheld.de>2021-12-10 15:57:34 +0000
commit48fbf2f21d261d5f4331e881bf03c52526f766cd (patch)
treea485fefd23f2c1fe8d1379431dc0214221824204 /src/cpu/x86/mp_init.c
parentacb17fec34a609c5b674ad0d2af04d47800530e2 (diff)
downloadcoreboot-48fbf2f21d261d5f4331e881bf03c52526f766cd.tar.gz
coreboot-48fbf2f21d261d5f4331e881bf03c52526f766cd.tar.bz2
coreboot-48fbf2f21d261d5f4331e881bf03c52526f766cd.zip
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> Reviewed-on: https://review.coreboot.org/c/coreboot/+/59692 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/cpu/x86/mp_init.c')
-rw-r--r--src/cpu/x86/mp_init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c
index 507b5fef8a8e..acbe5791776c 100644
--- a/src/cpu/x86/mp_init.c
+++ b/src/cpu/x86/mp_init.c
@@ -593,6 +593,10 @@ static enum cb_err mp_init(struct bus *cpu_bus, struct mp_params *p)
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);