From 861ec01b44a3ef2cfbc99d574af74c87b2ecb4b7 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Thu, 16 Jun 2022 00:02:39 +0530 Subject: [PATCH] soc/intel/cmn/block/cpu: Perform PRMRR sync on all cores This patch ensures to perform core PRMRR sync if SoC decides to perform MP Init using coreboot native implementation. Also, implement a function to allow calling `init_core_prmrr()` for all CPUs from `before_post_cpus_init()`. BUG=b:233199592 TEST=Build and boot google/kano to ChromeOS. Signed-off-by: Subrata Banik Change-Id: I9b6222c98ff278419fa8411054c0954689e1271e Reviewed-on: https://review.coreboot.org/c/coreboot/+/64978 Reviewed-by: Tim Wawrzynczak Reviewed-by: Lean Sheng Tan Tested-by: build bot (Jenkins) --- src/soc/intel/common/block/cpu/mp_init.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/soc/intel/common/block/cpu/mp_init.c b/src/soc/intel/common/block/cpu/mp_init.c index 119be3deeb..7788a7973d 100644 --- a/src/soc/intel/common/block/cpu/mp_init.c +++ b/src/soc/intel/common/block/cpu/mp_init.c @@ -176,8 +176,16 @@ static void wrapper_set_bios_done(void *unused) cpu_soc_bios_done(); } +static void wrapper_init_core_prmrr(void *unused) +{ + init_core_prmrr(); +} + void before_post_cpus_init(void) { + if (mp_run_on_all_cpus(&wrapper_init_core_prmrr, NULL) != CB_SUCCESS) + printk(BIOS_ERR, "core PRMRR sync failure\n"); + if (mp_run_on_all_cpus(&wrapper_set_bios_done, NULL) != CB_SUCCESS) printk(BIOS_ERR, "Set BIOS Done failure\n");