aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/intel/fsp2_0
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/intel/fsp2_0')
-rw-r--r--src/drivers/intel/fsp2_0/ppi/mp_service_ppi.c21
1 files changed, 17 insertions, 4 deletions
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 50e35b0e8f..9aef1b6dce 100644
--- a/src/drivers/intel/fsp2_0/ppi/mp_service_ppi.c
+++ b/src/drivers/intel/fsp2_0/ppi/mp_service_ppi.c
@@ -94,10 +94,23 @@ efi_return_status_t mp_startup_all_cpus(efi_ap_procedure procedure,
/* Run on BSP */
procedure(argument);
- /* Run on APs */
- if (mp_run_on_aps((void *)procedure, argument,
- MP_RUN_ON_ALL_CPUS, timeout_usec) != CB_SUCCESS) {
- printk(BIOS_ERR, "%s: Exit with Failure\n", __func__);
+ /*
+ * Run on APs Serially
+ *
+ * FIXME: As per MP service specification, EDK2 is allowed to specify the mode
+ * in which a 'func' routine should be executed on APs (i.e. execute serially
+ * or concurrently).
+ *
+ * MP service API `StartupAllCPUs` doesn't specify such requirement.
+ * Hence, running the `CpuCacheInfoCollectCoreAndCacheData`
+ * (UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c#194)
+ * simultaneously on APs results in a coherency issue (hang while executing `func`)
+ * due to lack of acquiring a spin lock while accessing common data structure in
+ * multiprocessor environment.
+ */
+ if (mp_run_on_all_aps((void *)procedure, argument, timeout_usec, false) !=
+ CB_SUCCESS) {
+ printk(BIOS_DEBUG, "%s: Exit with Failure\n", __func__);
return FSP_NOT_STARTED;
}