/* This function will ASSERT if: The local APIC is not globally enabled. The local APIC is not working under XAPIC mode. The local APIC is not software enabled. */
UINTN EFIAPI InternalX86GetApicBase(VOID)
/* This function will ASSERT if: The local APIC is not globally enabled. The local APIC is not working under XAPIC mode. The local APIC is not software enabled. */
UINTN EFIAPI InternalX86GetApicBase(VOID)
{
  UINTN  MsrValue;
  UINTN  ApicBase;
  MsrValue = (UINTN)AsmReadMsr64 (27);
  ApicBase = MsrValue & 0xffffff000ULL;
  ASSERT ((MsrValue & BIT11) != 0);
  ASSERT ((MsrValue & BIT10) == 0);
  ASSERT ((MmioRead32 (ApicBase + APIC_SVR) & BIT8) != 0);
  return ApicBase;
}