/* Wait for AP wakeup and write AP start-up signal till AP is waken up. */
VOID WaitApWakeup(IN volatile UINT32 *ApStartupSignalBuffer)
/* Wait for AP wakeup and write AP start-up signal till AP is waken up. */
VOID WaitApWakeup(IN volatile UINT32 *ApStartupSignalBuffer)
{
  while (InterlockedCompareExchange32 (
           (UINT32 *)ApStartupSignalBuffer,
           WAKEUP_AP_SIGNAL,
           WAKEUP_AP_SIGNAL
           ) != 0)
  {
    CpuPause ();
  }
}