/* Worker function to switch the requested AP to be the BSP from that point onward. */
VOID SwitchNewBsp(IN UINTN ProcessorNumber)
/* Worker function to switch the requested AP to be the BSP from that point onward. */
VOID SwitchNewBsp(IN UINTN ProcessorNumber)
{
  EFI_STATUS                  Status;
  EDKII_PEI_MP_SERVICES2_PPI  *CpuMp2Ppi;
  CPU_FEATURES_DATA           *CpuFeaturesData;
  CpuFeaturesData = GetCpuFeaturesData ();
  CpuMp2Ppi       = CpuFeaturesData->MpService.Ppi;
  Status = CpuMp2Ppi->SwitchBSP (
                        CpuMp2Ppi,
                        ProcessorNumber,
                        TRUE
                        );
  ASSERT_EFI_ERROR (Status);
}