]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/SecPeiDxeTimerLibCpu/X86TimerLib.c
Minor grammatical work--mostly adding periods. Items with ONLY period added did...
[mirror_edk2.git] / MdePkg / Library / SecPeiDxeTimerLibCpu / X86TimerLib.c
index aff51932f6d9643347ecfafb900d58f1c207d816..6d4b0938e9de6ee345e891ef820ddca97b8a3a5a 100644 (file)
@@ -1,11 +1,11 @@
 /** @file\r
   Timer Library functions built upon local APIC on IA32/x64.\r
 \r
-  Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
+  http://opensource.org/licenses/bsd-license.php.\r
 \r
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
@@ -105,6 +105,7 @@ InternalX86Delay (
   )\r
 {\r
   INT32                             Ticks;\r
+  UINT32                            PowerOfTwoCounter;\r
 \r
   //\r
   // The target timer count is calculated here\r
@@ -116,7 +117,8 @@ InternalX86Delay (
   // 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