]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/SecPeiDxeTimerLibCpu/IpfTimerLib.c
Add in BasePeCoff library instance.
[mirror_edk2.git] / MdePkg / Library / SecPeiDxeTimerLibCpu / IpfTimerLib.c
index 9049fef997fe3249ccbb98527a28f0fc2f572468..2acdab3d2a17867bd4a0917f3e523116cec7a8e3 100644 (file)
@@ -1,5 +1,5 @@
 /** @file\r
-  Timer Library functions built upon ITC on IA32/x64.\r
+  Timer Library functions built upon ITC on IPF.\r
 \r
   Copyright (c) 2006 - 2007, Intel Corporation<BR>\r
   All rights reserved. This program and the accompanying materials\r
 \r
 \r
 \r
+//\r
+// Include common header file for this module.\r
+//\r
+#include "CommonHeader.h"\r
+\r
 /**\r
   Performs a delay measured as number of ticks.\r
 \r
@@ -37,14 +42,14 @@ InternalIpfDelay (
   //\r
   // The target timer count is calculated here\r
   //\r
-  Ticks = IpfReadItc () + Delay;\r
+  Ticks = (INT64)AsmReadItc () + Delay;\r
 \r
   //\r
   // Wait until time out\r
   // Delay > 2^63 could not be handled by this function\r
   // Timer wrap-arounds are handled correctly by this function\r
   //\r
-  while (Ticks - IpfReadItc () >= 0);\r
+  while (Ticks - (INT64)AsmReadItc() >= 0);\r
 }\r
 \r
 /**\r
@@ -113,7 +118,7 @@ GetPerformanceCounter (
   VOID\r
   )\r
 {\r
-  return IpfReadItc ();\r
+  return AsmReadItc ();\r
 }\r
 \r
 /**\r
@@ -146,7 +151,7 @@ GetPerformanceCounterProperties (
   OUT      UINT64                    *EndValue     OPTIONAL\r
   )\r
 {\r
-  PAL_PROC_RETURN                   PalRet;\r
+  PAL_CALL_RETURN                   PalRet;\r
   UINT64                            BaseFrequence;\r
 \r
   PalRet = PalCallStatic (NULL, 13, 0, 0, 0);\r