Attention is currently required from: Subrata Banik, Tim Wawrzynczak, Arthur Heymans. Kane Chen has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/63566 )
Change subject: cpu/x86/mp_init.c: Add wait_finished_mp_run_on_all_cpus ......................................................................
Patch Set 2:
(1 comment)
File src/cpu/x86/mp_init.c:
https://review.coreboot.org/c/coreboot/+/63566/comment/24d57728_22e937ed PS2, Line 984: mp_run_on_aps_and_wait_for_complete
Even you serialise AP task, it still can't guarantee APs finish tasks. […]
i haven't yet tried `mp_run_on_all_aps` passing `false` it might WA issue as well since it would slow down BSP execution.
but if you check https://review.coreboot.org/c/coreboot/+/63566/2/src/cpu/x86/mp_init.c#b921 and https://review.coreboot.org/c/coreboot/+/63566/2/src/cpu/x86/mp_init.c#b963
You will see BSP simply just checks if APs call store_back to indicate it takes job already, but the store_back is called before lcb.func(lcb.arg)(_x86_setup_mtrr in this case.)
here is the scenario i can think of. BSP asks 8 APs to run task in serial. 1. 8 APs call store_back one by one to notify BSP but it does not mean they finish _x86_setup_mtrr already. 2. At this point, BSP thinks APs already take tasks and continues running.