Kane Chen has uploaded a new patch set (#2). ( https://review.coreboot.org/c/coreboot/+/63486 )
Change subject: soc/intel/common: Enable rom cache on all CPU threads ......................................................................
soc/intel/common: Enable rom cache on all CPU threads
In the previous implementation, it asks all CPUs/threads to run _x86_setup_mtrrs and BSP to run post_cpus_add_romcache. However the BSP doesn't wait all threads to finish _x86_setup_mtrrs and run post_cpus_add_romcache immediately. It causes a race condition that other thread in same core could finish _x86_setup_mtrrs later than post_cpus_add_romcache run by BSP.
MTRR is a core level MSR, so settings in post_cpus_add_romcache could be overriden unexpectedly by other thread in the same core. Ex: Core0, thread 1 finishes _x86_setup_mtrrs later than post_cpus_add_romcache run by bsp Core0 thread 0.
Instead of using different MTRRs settings on BSP/APs and cause race conditionm, this patch asks all cpu/threads to run post_cpus_add_romcache, so that MTRRs on all cores are aligned.
This patch also calls need_restore_mtrr to set put_back_original_solution in order to restor mtrr later in remove_temp_solution.
BUG=b:225766934 TEST=Tested on gimble and found rom cache is set properly right before payload lzma decompress and restored to original mtrr in the end of coreboot
Change-Id: I1d7ffc6e5f5ec49abf848d3cd9f0435c93f834dc Signed-off-by: Kane Chen kane.chen@intel.corp-partner.google.com --- M src/soc/intel/common/block/cpu/mp_init.c 1 file changed, 6 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/86/63486/2