Attention is currently required from: Ronak Kanabar, Andrey Petrov, Patrick Rudolph. Hello Ronak Kanabar,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/57343
to review the following change.
Change subject: drivers/intel/fsp2_0: Allow `mp_startup_all_cpus()` to run serially ......................................................................
drivers/intel/fsp2_0: Allow `mp_startup_all_cpus()` to run serially
As per MP service specification, EDK2 is allowed to specify the mode in which a 'func' routine would execute on APs as `SingleThread` sets to 'true' meaning execute the function one by one (serially) or sets to 'false' meaning execute the function simultaneously.
MP service API `StartupAllAPs` has designed to pass such options as part of function argument.
But another MP service API `StartupAllCPUs` doesn't specifies any such requirement. Running the `func` simultaneously on APs results into coherency issue due to lack of acquire spin lock while accessing common data structure in multiprocessor environment.
Change-Id: Ia95d11408f663212fd40daa9fd9b0881a07f1ce7 Signed-off-by: Subrata Banik subrata.banik@intel.com Signed-off-by: Ronak Kanabar ronak.kanabar@intel.com --- M src/drivers/intel/fsp2_0/ppi/mp_service_ppi.c 1 file changed, 2 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/43/57343/1
diff --git a/src/drivers/intel/fsp2_0/ppi/mp_service_ppi.c b/src/drivers/intel/fsp2_0/ppi/mp_service_ppi.c index a795c72..ce66d33 100644 --- a/src/drivers/intel/fsp2_0/ppi/mp_service_ppi.c +++ b/src/drivers/intel/fsp2_0/ppi/mp_service_ppi.c @@ -92,9 +92,8 @@ /* Run on BSP */ procedure(argument);
- /* Run on APs */ - if (mp_run_on_aps((void *)procedure, argument, - MP_RUN_ON_ALL_CPUS, timeout_usec)) { + /* Run on APs Serially */ + if (mp_run_on_all_aps((void *)procedure, argument, timeout_usec, false)) { printk(BIOS_DEBUG, "%s: Exit with Failure\n", __func__); return FSP_NOT_STARTED; }