/* INCLUDES ***************************************************************/
-#include <ddk/ntddk.h>
-#include <internal/ps.h>
#include <hal.h>
-
#define NDEBUG
-#include <internal/debug.h>
+#include <debug.h>
/* GLOBALS ******************************************************************/
* For supported compilers we use inline assembler. For the others,
* portable plain C.
*/
-VOID STDCALL
+VOID STDCALL __attribute__((noinline))
__KeStallExecutionProcessor(ULONG Loops)
{
if (!Loops)
VOID STDCALL KeStallExecutionProcessor(ULONG Microseconds)
{
- PKPCR Pcr = KeGetCurrentKPCR();
+ PKIPCR Pcr = (PKIPCR)KeGetCurrentKPCR();
if (Pcr->PrcbData.FeatureBits & X86_FEATURE_TSC)
{
}
-static VOID WaitFor8254Wraparound(VOID)
+VOID WaitFor8254Wraparound(VOID)
{
ULONG CurCount, PrevCount = ~0;
LONG Delta;
ULONG i;
ULONG calib_bit;
ULONG CurCount;
- PKPCR Pcr;
+ PKIPCR Pcr;
LARGE_INTEGER StartCount, EndCount;
if (UdelayCalibrated)
}
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 */
Ki386RdTSC(EndCount);
Pcr->PrcbData.MHz = (ULONG)(EndCount.QuadPart - StartCount.QuadPart) / 10000;
- DPRINT("%dMHz\n", Pcr->PrcbData.MHz);
+ DPRINT("%luMHz\n", Pcr->PrcbData.MHz);
return;
}
* 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)
{