summaryrefslogtreecommitdiff
path: root/src/drivers/intel
diff options
context:
space:
mode:
authorAamir Bohra <aamir.bohra@intel.com>2021-02-25 13:25:57 +0530
committerTim Wawrzynczak <twawrzynczak@chromium.org>2021-03-11 15:54:04 +0000
commit813a3bafa84a02cbbc40c97511c07109e855b56c (patch)
treeba98c6b66d273eb4153826525eacff1904dacbea /src/drivers/intel
parent7e0019ef209b6c552f03023255b9c75418fdb88a (diff)
driver/intel/fsp2_0: Allow function to run serially on all APs
EFI_PEI_MP_SERVICES_STARTUP_ALL_APS passes in a boolean flag singlethread which indicates whether the work should be scheduled in a serially on all APs or in parallel. Current implementation of this function mp_startup_all_aps always schedules work in parallel on all APs. This implementation ensures mp_startup_all_aps honors to run serialized request. BUG=b:169114674 Signed-off-by: Aamir Bohra <aamir.bohra@intel.com> Change-Id: I4d85dd2ce9115f0186790c62c8dcc75f12412e92 Reviewed-on: https://review.coreboot.org/c/coreboot/+/51085 Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/intel')
-rw-r--r--src/drivers/intel/fsp2_0/include/fsp/ppi/mp_service_ppi.h2
-rw-r--r--src/drivers/intel/fsp2_0/ppi/mp_service1.c4
-rw-r--r--src/drivers/intel/fsp2_0/ppi/mp_service2.c4
-rw-r--r--src/drivers/intel/fsp2_0/ppi/mp_service_ppi.c5
4 files changed, 7 insertions, 8 deletions
diff --git a/src/drivers/intel/fsp2_0/include/fsp/ppi/mp_service_ppi.h b/src/drivers/intel/fsp2_0/include/fsp/ppi/mp_service_ppi.h
index 3c30063111..7855d2d738 100644
--- a/src/drivers/intel/fsp2_0/include/fsp/ppi/mp_service_ppi.h
+++ b/src/drivers/intel/fsp2_0/include/fsp/ppi/mp_service_ppi.h
@@ -24,7 +24,7 @@ efi_return_status_t mp_get_processor_info(efi_uintn_t processor_number,
/* executes a caller provided function on all enabled APs */
efi_return_status_t mp_startup_all_aps(efi_ap_procedure procedure,
- efi_uintn_t timeout_usec, void *argument);
+ bool run_serial, efi_uintn_t timeout_usec, void *argument);
/* executes a caller provided function on all enabled APs + BSP */
efi_return_status_t mp_startup_all_cpus(efi_ap_procedure procedure,
diff --git a/src/drivers/intel/fsp2_0/ppi/mp_service1.c b/src/drivers/intel/fsp2_0/ppi/mp_service1.c
index 7d351e40f4..bbc78a0c75 100644
--- a/src/drivers/intel/fsp2_0/ppi/mp_service1.c
+++ b/src/drivers/intel/fsp2_0/ppi/mp_service1.c
@@ -23,10 +23,10 @@ static efi_return_status_t mps1_get_processor_info(const
static efi_return_status_t mps1_startup_all_aps(const
efi_pei_services **ignored1, efi_pei_mp_services_ppi *ignored2,
- efi_ap_procedure procedure, efi_boolean_t ignored3,
+ efi_ap_procedure procedure, efi_boolean_t run_serial,
efi_uintn_t timeout_usec, void *argument)
{
- return mp_startup_all_aps(procedure, timeout_usec, argument);
+ return mp_startup_all_aps(procedure, run_serial, timeout_usec, argument);
}
static efi_return_status_t mps1_startup_this_ap(const
diff --git a/src/drivers/intel/fsp2_0/ppi/mp_service2.c b/src/drivers/intel/fsp2_0/ppi/mp_service2.c
index 8d27b16e77..c7d4764e29 100644
--- a/src/drivers/intel/fsp2_0/ppi/mp_service2.c
+++ b/src/drivers/intel/fsp2_0/ppi/mp_service2.c
@@ -24,10 +24,10 @@ static efi_return_status_t mps2_get_processor_info(
static efi_return_status_t mps2_startup_all_aps(
efi_pei_mp_services_ppi *ignored1,
- efi_ap_procedure procedure, efi_boolean_t ignored2,
+ efi_ap_procedure procedure, efi_boolean_t run_serial,
efi_uintn_t timeout_usec, void *argument)
{
- return mp_startup_all_aps(procedure, timeout_usec, argument);
+ return mp_startup_all_aps(procedure, run_serial, timeout_usec, argument);
}
static efi_return_status_t mps2_startup_all_cpus(
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 29a02b108c..a795c722a6 100644
--- a/src/drivers/intel/fsp2_0/ppi/mp_service_ppi.c
+++ b/src/drivers/intel/fsp2_0/ppi/mp_service_ppi.c
@@ -64,7 +64,7 @@ efi_return_status_t mp_get_processor_info(efi_uintn_t processor_number,
}
efi_return_status_t mp_startup_all_aps(efi_ap_procedure procedure,
- efi_uintn_t timeout_usec, void *argument)
+ bool run_serial, efi_uintn_t timeout_usec, void *argument)
{
if (cpu_index() < 0)
return FSP_DEVICE_ERROR;
@@ -72,8 +72,7 @@ efi_return_status_t mp_startup_all_aps(efi_ap_procedure procedure,
if (procedure == NULL)
return FSP_INVALID_PARAMETER;
- if (mp_run_on_aps((void *)procedure, argument,
- MP_RUN_ON_ALL_CPUS, timeout_usec)) {
+ if (mp_run_on_all_aps((void *)procedure, argument, timeout_usec, !run_serial)) {
printk(BIOS_DEBUG, "%s: Exit with Failure\n", __func__);
return FSP_NOT_STARTED;
}