/* Stalls the CPU for at least the given number of ticks. It's invoked by  */
VOID InternalAcpiDelay(IN UINT32 Delay)
/* Stalls the CPU for at least the given number of ticks. It's invoked by  */
VOID InternalAcpiDelay(IN UINT32 Delay)
{
  UINT16  Port;
  UINT32  Ticks;
  UINT32  Times;
  Port   = InternalAcpiGetAcpiTimerIoPort ();
  Times  = Delay >> 22;
  Delay &= BIT22 - 1;
  do {
    Ticks = IoBitFieldRead32 (Port, 0, 23) + Delay;
    Delay = BIT22;
    while (((Ticks - IoBitFieldRead32 (Port, 0, 23)) & BIT23) == 0) {
      CpuPause ();
    }
  } while (Times-- > 0);
}