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>
This commit is contained in:
parent
7e0019ef20
commit
813a3bafa8
4 changed files with 7 additions and 8 deletions
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue