From 957609d00c50492226e3f0c9cb6327ae6d25baf6 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Thu, 16 Jun 2022 20:25:08 +0530 Subject: soc/intel/mp_init: Skip before_post_cpus_init if !USE_COREBOOT_MP_INIT This patch ensures all APs finish the task and continue before_post_cpus_init() if coreboot decides to perform multiprocessor initialization using native coreboot drivers instead of using FSP MP PPI implementation. BUG=b:233199592 TEST=Build and boot google/kano to ChromeOS. Signed-off-by: Subrata Banik Change-Id: I3b76974ab19323201bf1dca9af423481a40f65c9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65173 Reviewed-by: Angel Pons Reviewed-by: Tim Wawrzynczak Tested-by: build bot (Jenkins) --- src/soc/intel/common/block/cpu/mp_init.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/soc/intel/common/block/cpu/mp_init.c b/src/soc/intel/common/block/cpu/mp_init.c index 7788a7973d..9aa30dddbc 100644 --- a/src/soc/intel/common/block/cpu/mp_init.c +++ b/src/soc/intel/common/block/cpu/mp_init.c @@ -183,6 +183,16 @@ static void wrapper_init_core_prmrr(void *unused) void before_post_cpus_init(void) { + /* + * Ensure all APs finish the task and continue if coreboot decides to + * perform multiprocessor initialization using native coreboot drivers + * instead using FSP MP PPI implementation. + * + * Ignore if USE_COREBOOT_MP_INIT is not enabled. + */ + if (!CONFIG(USE_COREBOOT_MP_INIT)) + return; + if (mp_run_on_all_cpus(&wrapper_init_core_prmrr, NULL) != CB_SUCCESS) printk(BIOS_ERR, "core PRMRR sync failure\n"); -- cgit v1.2.3