From ad951a37141f8c4348b0d877d624a69f1a27a58f Mon Sep 17 00:00:00 2001 From: vanjeff Date: Wed, 14 Jan 2009 07:45:27 +0000 Subject: To pass ICC build. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7268 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Library/SecPeiDxeTimerLibCpu/X86TimerLib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'MdePkg/Library/SecPeiDxeTimerLibCpu') diff --git a/MdePkg/Library/SecPeiDxeTimerLibCpu/X86TimerLib.c b/MdePkg/Library/SecPeiDxeTimerLibCpu/X86TimerLib.c index aff51932f6..65957e2a61 100644 --- a/MdePkg/Library/SecPeiDxeTimerLibCpu/X86TimerLib.c +++ b/MdePkg/Library/SecPeiDxeTimerLibCpu/X86TimerLib.c @@ -105,6 +105,7 @@ InternalX86Delay ( ) { INT32 Ticks; + UINT32 PowerOfTwoCounter; // // The target timer count is calculated here @@ -116,7 +117,8 @@ InternalX86Delay ( // Delay > 2^31 could not be handled by this function // Timer wrap-arounds are handled correctly by this function // - while (((UINT32)(InternalX86GetTimerTick (ApicBase) - Ticks) & GetPowerOfTwo32 ((MmioRead32 (ApicBase + APIC_TMICT)))) == 0) { + PowerOfTwoCounter = GetPowerOfTwo32 (MmioRead32 (ApicBase + APIC_TMICT)); + while (((UINT32)(InternalX86GetTimerTick (ApicBase) - Ticks) & PowerOfTwoCounter) == 0) { CpuPause (); } } -- cgit v1.2.3