]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/SecPeiDxeTimerLibCpu/IpfTimerLib.c
Fix the bug that SetMem.S of BaseMemoryLibOptDxe is incorrect.
[mirror_edk2.git] / MdePkg / Library / SecPeiDxeTimerLibCpu / IpfTimerLib.c
index 73082f866bc12001aac01f6903d8ba22b8bdfdc4..8938ed61d9a06b4ae915fd2bad3c2df306752f45 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Timer Library functions built upon ITC on IPF.\r
 \r
-  Copyright (c) 2006 - 2007, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
   All rights reserved. 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
@@ -15,9 +15,7 @@
 #include <Base.h>\r
 #include <Library/TimerLib.h>\r
 #include <Library/BaseLib.h>\r
-#include <Library/IoLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/PcdLib.h>\r
+#include <Library/PalLib.h>\r
 \r
 \r
 /**\r
@@ -29,8 +27,8 @@
   @param  Delay Number of ticks to delay.\r
 \r
 **/\r
-STATIC\r
 VOID\r
+EFIAPI\r
 InternalIpfDelay (\r
   IN      INT64                     Delay\r
   )\r
@@ -57,7 +55,7 @@ InternalIpfDelay (
 \r
   @param  MicroSeconds  The minimum number of microseconds to delay.\r
 \r
-  @return MicroSeconds\r
+  @return The value of MicroSeconds inputted.\r
 \r
 **/\r
 UINTN\r
@@ -81,7 +79,7 @@ MicroSecondDelay (
 \r
   @param  NanoSeconds The minimum number of nanoseconds to delay.\r
 \r
-  @return NanoSeconds\r
+  @return The value of NanoSeconds inputted.\r
 \r
 **/\r
 UINTN\r
@@ -101,8 +99,7 @@ NanoSecondDelay (
 /**\r
   Retrieves the current value of a 64-bit free running performance counter.\r
 \r
-  Retrieves the current value of a 64-bit free running performance counter. The\r
-  counter can either count up by 1 or count down by 1. If the physical\r
+  The counter can either count up by 1 or count down by 1. If the physical\r
   performance counter counts by a larger increment, then the counter values\r
   must be translated. The properties of the counter can be retrieved from\r
   GetPerformanceCounterProperties().\r
@@ -160,13 +157,13 @@ GetPerformanceCounterProperties (
     *EndValue = (UINT64)(-1);\r
   }\r
 \r
-  PalRet = PalCall (13, 0, 0, 0);\r
+  PalRet = PalCall (PAL_FREQ_BASE, 0, 0, 0);\r
   if (PalRet.Status != 0) {\r
     return 1000000;\r
   }\r
   BaseFrequence = PalRet.r9;\r
 \r
-  PalRet = PalCall (14, 0, 0, 0);\r
+  PalRet = PalCall (PAL_FREQ_RATIOS, 0, 0, 0);\r
   if (PalRet.Status != 0) {\r
     return 1000000;\r
   }\r