/** Worker function to switch the requested AP to be the BSP from that point onward. @param[in] ProcessorNumber The handle number of AP that is to become the new BSP. **/ VOID SwitchNewBsp ( IN UINTN ProcessorNumber ) { EFI_STATUS Status; EFI_PEI_MP_SERVICES_PPI *CpuMpPpi; // // Get MP Services Protocol // Status = PeiServicesLocatePpi ( &gEfiPeiMpServicesPpiGuid, 0, NULL, (VOID **)&CpuMpPpi ); ASSERT_EFI_ERROR (Status); // // Wakeup all APs for data collection. // Status = CpuMpPpi->SwitchBSP ( GetPeiServicesTablePointer (), CpuMpPpi, ProcessorNumber, TRUE ); ASSERT_EFI_ERROR (Status); }
/** Worker function to switch the requested AP to be the BSP from that point onward. @param[in] ProcessorNumber The handle number of AP that is to become the new BSP. **/ VOID SwitchNewBsp ( IN UINTN ProcessorNumber ) { EFI_STATUS Status; EFI_PEI_MP_SERVICES_PPI *CpuMpPpi; CPU_FEATURES_DATA *CpuFeaturesData; CpuFeaturesData = GetCpuFeaturesData (); CpuMpPpi = CpuFeaturesData->MpService.Ppi; // // Wakeup all APs for data collection. // Status = CpuMpPpi->SwitchBSP ( GetPeiServicesTablePointer (), CpuMpPpi, ProcessorNumber, TRUE ); ASSERT_EFI_ERROR (Status); }