Attention is currently required from: Kane Chen. Hello Kane Chen,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/63567
to review the following change.
Change subject: soc/intel/common: Use wait_finished_mp_run_on_all_cpus for APs MTRR init ......................................................................
soc/intel/common: Use wait_finished_mp_run_on_all_cpus for APs MTRR init
By using wait_finished_mp_run_on_all_cpus to run APs MTRR init, it gurantees the BSP will run post_cpus_add_romcache until all APs finishes _x86_setup_mtrrs task.
BUG=b:225766934 TEST=Test on gimble and found the MTRR race condition on AP/BSP is gone.
Change-Id: I1fd889f880a0c605e6c739423a434d2adbc12d26 Signed-off-by: Kane Chen kane.chen@intel.com --- M src/soc/intel/common/block/cpu/mp_init.c 1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/63567/1
diff --git a/src/soc/intel/common/block/cpu/mp_init.c b/src/soc/intel/common/block/cpu/mp_init.c index 823f23e..5e1932e 100644 --- a/src/soc/intel/common/block/cpu/mp_init.c +++ b/src/soc/intel/common/block/cpu/mp_init.c @@ -169,7 +169,8 @@ /* Ensure to re-program all MTRRs based on DRAM resource settings */ static void post_cpus_init(void *unused) { - if (mp_run_on_all_cpus(&wrapper_x86_setup_mtrrs, NULL) != CB_SUCCESS) + /* Ensure all APs finish the task and continue */ + if (wait_finished_mp_run_on_all_cpus(&wrapper_x86_setup_mtrrs, NULL) != CB_SUCCESS) printk(BIOS_ERR, "MTRR programming failure\n");
post_cpus_add_romcache();