/* Get the local APIC ID of the executing processor. */
UINT32 EFIAPI GetApicId(VOID)
/* Get the local APIC ID of the executing processor. */
UINT32 EFIAPI GetApicId(VOID)
{
  UINT32  ApicId;
  ASSERT (GetApicMode () == LOCAL_APIC_MODE_XAPIC);
  if ((ApicId = GetInitialApicId ()) < 0x100) {
    ApicId   = ReadLocalApicReg (XAPIC_ID_OFFSET);
    ApicId >>= 24;
  }
  return ApicId;
}