]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/SecPeiDxeTimerLibCpu/IpfTimerLib.c
Add missing definition for Time service which defined in UEFI specification 7.3 Time...
[mirror_edk2.git] / MdePkg / Library / SecPeiDxeTimerLibCpu / IpfTimerLib.c
index f4e9838745b6f63096fa572978ca6dbfac5ccf96..2acdab3d2a17867bd4a0917f3e523116cec7a8e3 100644 (file)
 \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 = AsmReadItc () + 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 - AsmReadItc () >= 0);\r
+  while (Ticks - (INT64)AsmReadItc() >= 0);\r
 }\r
 \r
 /**\r