/* 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;
  UINT32  InitApicId;
  ApicId = ReadLocalApicReg (XAPIC_ID_OFFSET);
  if (GetApicMode () == LOCAL_APIC_MODE_XAPIC) {
    ApicId = ((InitApicId = GetInitialApicId ()) < 0x100) ? (ApicId >> 24) : InitApicId;
  }
  return ApicId;
}