/* This function serves as the entry point for APs when they are awakened by the stores in the memory address indicated by the MP_HANDOFF_INFO structure. */
VOID EFIAPI DxeApEntryPoint(CPU_MP_DATA *CpuMpData)
/* This function serves as the entry point for APs when they are awakened by the stores in the memory address indicated by the MP_HANDOFF_INFO structure. */
VOID EFIAPI DxeApEntryPoint(CPU_MP_DATA *CpuMpData)
{
  UINTN                   ProcessorNumber;
  MSR_IA32_EFER_REGISTER  EferMsr;
  GetProcessorNumber (CpuMpData, &ProcessorNumber);
  if (CpuMpData->EnableExecuteDisableForSwitchContext) {
    EferMsr.Uint64   = AsmReadMsr64 (MSR_IA32_EFER);
    EferMsr.Bits.NXE = 1;
    AsmWriteMsr64 (MSR_IA32_EFER, EferMsr.Uint64);
  }
  RestoreVolatileRegisters (&CpuMpData->CpuData[0].VolatileRegisters, FALSE);
  InterlockedIncrement ((UINT32 *)&CpuMpData->FinishedCount);
  PlaceAPInMwaitLoopOrRunLoop (
    CpuMpData->ApLoopMode,
    CpuMpData->CpuData[ProcessorNumber].StartupApSignal,
    CpuMpData->ApTargetCState
    );
  ApWakeupFunction (CpuMpData, ProcessorNumber);
}