Attention is currently required from: Tim Wawrzynczak, Subrata Banik, Aamir Bohra, Andrey Petrov, Patrick Rudolph. Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/51085 )
Change subject: driver/intel/fsp2_0: Allow function to run serially on all APs ......................................................................
Patch Set 2:
(1 comment)
File src/drivers/intel/fsp2_0/ppi/mp_service_ppi.c:
https://review.coreboot.org/c/coreboot/+/51085/comment/3bf7848b_c6d2f27b PS2, Line 91: MP_RUN_ON_ALL_CPUS I think this enum is named incorrectly. https://review.coreboot.org/cgit/coreboot.git/tree/src/include/cpu/x86/mp.h?.... It's comment says "Function runs on all cores (both BSP and APs)". But looking at the implementation, it is clear that the comment is wrong. What do you think about dropping the enum completely and instead adding a helper: `mp_run_on_all_aps()` - It will run the given procedure on all APs using the provided timeout value and run_serial argument.
`mp_run_on_all_aps(void (*func)(void *), void *arg, long expire_us, bool run_serial)`
and this function can either call mp_run_on_aps with 0 as logical_cpu_num or run a loop to call mp_run_on_aps with 1..n as logical_cpu_num. Basically what you are doing in this function, except move the implementation to cpu/x86/mp_init.c.