Use correct format for arguments in debug messages
[reactos.git] / reactos / hal / halx86 / generic / timer.c
index 78a2a3d..4126642 100644 (file)
 
 /* INCLUDES ***************************************************************/
 
-#include <ddk/ntddk.h>
-#include <internal/ps.h>
 #include <hal.h>
-
 #define NDEBUG
-#include <internal/debug.h>
+#include <debug.h>
 
 /* GLOBALS ******************************************************************/
 
@@ -126,7 +123,7 @@ ROSL1:
 
 VOID STDCALL KeStallExecutionProcessor(ULONG Microseconds)
 {
-   PKPCR Pcr = KeGetCurrentKPCR();
+   PKIPCR Pcr = (PKIPCR)KeGetCurrentKPCR();
 
    if (Pcr->PrcbData.FeatureBits & X86_FEATURE_TSC)
    {
@@ -165,7 +162,7 @@ static ULONG Read8254Timer(VOID)
 }
 
 
-static VOID WaitFor8254Wraparound(VOID)
+VOID WaitFor8254Wraparound(VOID)
 {
   ULONG CurCount, PrevCount = ~0;
   LONG Delta;
@@ -193,7 +190,7 @@ VOID HalpCalibrateStallExecution(VOID)
   ULONG i;
   ULONG calib_bit;
   ULONG CurCount;
-  PKPCR Pcr;
+  PKIPCR Pcr;
   LARGE_INTEGER StartCount, EndCount;
 
   if (UdelayCalibrated)
@@ -202,7 +199,7 @@ VOID HalpCalibrateStallExecution(VOID)
     }
 
   UdelayCalibrated = TRUE;
-  Pcr = KeGetCurrentKPCR();
+  Pcr = (PKIPCR)KeGetCurrentKPCR();
 
   /* Initialise timer interrupt with MILLISEC ms interval        */
   WRITE_PORT_UCHAR((PUCHAR) TMR_CTRL, TMR_SC0 | TMR_BOTH | TMR_MD2);  /* binary, mode 2, LSB/MSB, ch 0 */
@@ -219,7 +216,7 @@ VOID HalpCalibrateStallExecution(VOID)
      Ki386RdTSC(EndCount);
 
      Pcr->PrcbData.MHz = (ULONG)(EndCount.QuadPart - StartCount.QuadPart) / 10000;
-     DPRINT("%dMHz\n", Pcr->PrcbData.MHz);
+     DPRINT("%luMHz\n", Pcr->PrcbData.MHz);
      return;
 
   }
@@ -318,14 +315,14 @@ KeQueryPerformanceCounter(PLARGE_INTEGER PerformanceFreq)
  * RETURNS: The number of performance counter ticks since boot
  */
 {
-  PKPCR Pcr;
+  PKIPCR Pcr;
   LARGE_INTEGER Value;
   ULONG Flags;
 
   Ki386SaveFlags(Flags);
   Ki386DisableInterrupts();
 
-  Pcr = KeGetCurrentKPCR();
+  Pcr = (PKIPCR)KeGetCurrentKPCR();
 
   if (Pcr->PrcbData.FeatureBits & X86_FEATURE_TSC)
   {