summaryrefslogtreecommitdiff
path: root/MdePkg/Library/SecPeiDxeTimerLibCpu
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2009-01-14 07:45:27 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2009-01-14 07:45:27 +0000
commitad951a37141f8c4348b0d877d624a69f1a27a58f (patch)
tree79d59813da5ad6f54e1cb7e4f29b7ee4cebd3f86 /MdePkg/Library/SecPeiDxeTimerLibCpu
parent52dbc2fb172274996d2f8d90987a73bb3c2aaa4e (diff)
downloadedk2-platforms-ad951a37141f8c4348b0d877d624a69f1a27a58f.tar.xz
To pass ICC build.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7268 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/SecPeiDxeTimerLibCpu')
-rw-r--r--MdePkg/Library/SecPeiDxeTimerLibCpu/X86TimerLib.c4
1 files changed, 3 insertions, 1 deletions
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 ();
}
}