git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7268
6f19259b-4bc3-4df7-8a09-
765794883524
)\r
{\r
INT32 Ticks;\r
+ UINT32 PowerOfTwoCounter;\r
\r
//\r
// The target timer count is calculated here\r
// Delay > 2^31 could not be handled by this function\r
// Timer wrap-arounds are handled correctly by this function\r
//\r
- while (((UINT32)(InternalX86GetTimerTick (ApicBase) - Ticks) & GetPowerOfTwo32 ((MmioRead32 (ApicBase + APIC_TMICT)))) == 0) {\r
+ PowerOfTwoCounter = GetPowerOfTwo32 (MmioRead32 (ApicBase + APIC_TMICT));\r
+ while (((UINT32)(InternalX86GetTimerTick (ApicBase) - Ticks) & PowerOfTwoCounter) == 0) {\r
CpuPause ();\r
}\r
}\r