Attention is currently required from: Subrata Banik, Kane Chen, Tim Wawrzynczak, Arthur Heymans. Arthur Heymans 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 4:
(2 comments)
File src/cpu/x86/mp_init.c:
https://review.coreboot.org/c/coreboot/+/63566/comment/29afc42b_029e8272 PS4, Line 882: : : static void store_ap_busy(bool *ap_busy_flag, bool val) : { : asm volatile ("mov %1, %0\n" : : "=m" (*ap_busy_flag) : : "r" (val) : : "memory" : ); : } : : static bool read_ap_busy(bool *ap_busy_flag) : { : bool ret; : asm volatile ("mov %1, %0\n" : : "=r" (ret) : : "m" (*ap_busy_flag) : : "memory" : ); : return ret; : } Since bool == int compiler-wise I think the atomic_t type & ops will work fine.
https://review.coreboot.org/c/coreboot/+/63566/comment/8d2a6577_a1670091 PS4, Line 994: if (lcb.logical_cpu_number && (cur_cpu != : lcb.logical_cpu_number)) : continue; Here you'll skip clearing the busy bit. I think it will be easier if you set & clear the busy bit from the APs instead of from the BSP call.