mirror of
https://github.com/reactos/reactos.git
synced 2025-06-14 16:08:31 +00:00
Build Generic HAL with w32api
svn path=/trunk/; revision=16039
This commit is contained in:
parent
06e00cb9c9
commit
f8d053290e
26 changed files with 54 additions and 120 deletions
|
@ -13,15 +13,11 @@
|
||||||
|
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
|
||||||
#include <ddk/iotypes.h>
|
|
||||||
#include <internal/ob.h>
|
|
||||||
#include <internal/ps.h>
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
|
||||||
#include <hal.h>
|
#include <hal.h>
|
||||||
|
|
||||||
/* Hmm, needed for KDBG := 1. Why? */
|
/* Hmm, needed for KDBG := 1. Why? */
|
||||||
|
extern POBJECT_TYPE IMPORTED IoAdapterObjectType;
|
||||||
#undef KeGetCurrentIrql
|
#undef KeGetCurrentIrql
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
|
@ -10,11 +10,8 @@
|
||||||
|
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
|
||||||
#include <hal.h>
|
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
#include <hal.h>
|
||||||
|
|
||||||
|
|
||||||
/* CONSTANTS *****************************************************************/
|
/* CONSTANTS *****************************************************************/
|
||||||
|
|
|
@ -15,12 +15,8 @@
|
||||||
|
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
|
||||||
#include <hal.h>
|
|
||||||
#include <bus.h>
|
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
#include <hal.h>
|
||||||
|
|
||||||
/* GLOBALS *******************************************************************/
|
/* GLOBALS *******************************************************************/
|
||||||
|
|
||||||
|
|
|
@ -121,9 +121,10 @@
|
||||||
* since there is already support for them via the VideoPortInt10 routine.
|
* since there is already support for them via the VideoPortInt10 routine.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#define NDEBUG
|
||||||
#include <hal.h>
|
#include <hal.h>
|
||||||
|
|
||||||
|
|
||||||
#define SCREEN_SYNCHRONIZATION
|
#define SCREEN_SYNCHRONIZATION
|
||||||
|
|
||||||
#define VGA_GRAPH_MEM 0xa0000
|
#define VGA_GRAPH_MEM 0xa0000
|
||||||
|
|
|
@ -11,9 +11,7 @@
|
||||||
|
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
|
||||||
#include <hal.h>
|
#include <hal.h>
|
||||||
|
|
||||||
/* Adapters for each channel */
|
/* Adapters for each channel */
|
||||||
|
|
|
@ -11,18 +11,19 @@
|
||||||
|
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
#include <hal.h>
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
VOID STDCALL
|
VOID STDCALL
|
||||||
IoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
|
IoAssignDriveLetters(IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock,
|
||||||
IN PSTRING NtDeviceName,
|
IN PSTRING NtDeviceName,
|
||||||
OUT PUCHAR NtSystemPath,
|
OUT PUCHAR NtSystemPath,
|
||||||
OUT PSTRING NtSystemPathString)
|
OUT PSTRING NtSystemPathString)
|
||||||
{
|
{
|
||||||
HalIoAssignDriveLetters(LoaderBlock,
|
/* FIXME FIXME FIXME FUCK SOMEONE FIXME*/
|
||||||
|
HalIoAssignDriveLetters(NULL,
|
||||||
NtDeviceName,
|
NtDeviceName,
|
||||||
NtSystemPath,
|
NtSystemPath,
|
||||||
NtSystemPathString);
|
NtSystemPathString);
|
||||||
|
|
|
@ -11,10 +11,8 @@
|
||||||
|
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
#include <hal.h>
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
HalpStartEnumerator (VOID)
|
HalpStartEnumerator (VOID)
|
||||||
|
|
|
@ -12,9 +12,8 @@
|
||||||
|
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#define NDEBUG
|
||||||
|
#include <hal.h>
|
||||||
#include <internal/debug.h>
|
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
<include base="hal_generic">../include</include>
|
<include base="hal_generic">../include</include>
|
||||||
<include base="ntoskrnl">include</include>
|
<include base="ntoskrnl">include</include>
|
||||||
<define name="_DISABLE_TIDENTS" />
|
<define name="_DISABLE_TIDENTS" />
|
||||||
<define name="__NTHAL__" />
|
<define name="__USE_W32API" />
|
||||||
|
<define name="_NTHAL_" />
|
||||||
<file>adapter.c</file>
|
<file>adapter.c</file>
|
||||||
<file>beep.c</file>
|
<file>beep.c</file>
|
||||||
<file>bus.c</file>
|
<file>bus.c</file>
|
||||||
|
@ -28,7 +29,8 @@
|
||||||
<include base="hal_generic_up">../include</include>
|
<include base="hal_generic_up">../include</include>
|
||||||
<include base="ntoskrnl">include</include>
|
<include base="ntoskrnl">include</include>
|
||||||
<define name="_DISABLE_TIDENTS" />
|
<define name="_DISABLE_TIDENTS" />
|
||||||
<define name="__NTHAL__" />
|
<define name="_NTHAL_" />
|
||||||
|
<define name="__USE_W32API" />
|
||||||
<file>ipi.c</file>
|
<file>ipi.c</file>
|
||||||
<file>irql.c</file>
|
<file>irql.c</file>
|
||||||
<file>processor.c</file>
|
<file>processor.c</file>
|
||||||
|
@ -38,6 +40,7 @@
|
||||||
<include base="hal_generic_pc">../include</include>
|
<include base="hal_generic_pc">../include</include>
|
||||||
<include base="ntoskrnl">include</include>
|
<include base="ntoskrnl">include</include>
|
||||||
<define name="_DISABLE_TIDENTS" />
|
<define name="_DISABLE_TIDENTS" />
|
||||||
<define name="__NTHAL__" />
|
<define name="_NTHAL_" />
|
||||||
|
<define name="__USE_W32API" />
|
||||||
<file>display.c</file>
|
<file>display.c</file>
|
||||||
</module>
|
</module>
|
||||||
|
|
|
@ -11,11 +11,8 @@
|
||||||
|
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
|
||||||
#include <hal.h>
|
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
#include <hal.h>
|
||||||
|
|
||||||
/* GLOBALS *****************************************************************/
|
/* GLOBALS *****************************************************************/
|
||||||
|
|
||||||
|
|
|
@ -9,11 +9,8 @@
|
||||||
|
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
|
||||||
#include <hal.h>
|
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
#include <hal.h>
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
|
|
|
@ -9,15 +9,8 @@
|
||||||
|
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
|
||||||
#include <internal/ob.h>
|
|
||||||
#include <internal/ps.h>
|
|
||||||
#include <ntos/minmax.h>
|
|
||||||
#include <hal.h>
|
|
||||||
#include <halirq.h>
|
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
#include <hal.h>
|
||||||
|
|
||||||
/* GLOBALS ******************************************************************/
|
/* GLOBALS ******************************************************************/
|
||||||
|
|
||||||
|
@ -174,9 +167,9 @@ HalpLowerIrql(KIRQL NewIrql)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
KeGetCurrentKPCR()->Irql = DISPATCH_LEVEL;
|
KeGetCurrentKPCR()->Irql = DISPATCH_LEVEL;
|
||||||
if (KeGetCurrentKPCR()->HalReserved[HAL_DPC_REQUEST])
|
if (((PKIPCR)KeGetCurrentKPCR())->HalReserved[HAL_DPC_REQUEST])
|
||||||
{
|
{
|
||||||
KeGetCurrentKPCR()->HalReserved[HAL_DPC_REQUEST] = FALSE;
|
((PKIPCR)KeGetCurrentKPCR())->HalReserved[HAL_DPC_REQUEST] = FALSE;
|
||||||
KiDispatchInterrupt();
|
KiDispatchInterrupt();
|
||||||
}
|
}
|
||||||
KeGetCurrentKPCR()->Irql = APC_LEVEL;
|
KeGetCurrentKPCR()->Irql = APC_LEVEL;
|
||||||
|
@ -240,7 +233,7 @@ KfLowerIrql (KIRQL NewIrql)
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
*/
|
*/
|
||||||
|
#undef KeLowerIrql
|
||||||
VOID STDCALL
|
VOID STDCALL
|
||||||
KeLowerIrql (KIRQL NewIrql)
|
KeLowerIrql (KIRQL NewIrql)
|
||||||
{
|
{
|
||||||
|
@ -303,6 +296,7 @@ KfRaiseIrql (KIRQL NewIrql)
|
||||||
* NOTES
|
* NOTES
|
||||||
* Calls KfRaiseIrql
|
* Calls KfRaiseIrql
|
||||||
*/
|
*/
|
||||||
|
#undef KeRaiseIrql
|
||||||
VOID STDCALL
|
VOID STDCALL
|
||||||
KeRaiseIrql (KIRQL NewIrql,
|
KeRaiseIrql (KIRQL NewIrql,
|
||||||
PKIRQL OldIrql)
|
PKIRQL OldIrql)
|
||||||
|
@ -466,11 +460,11 @@ HalRequestSoftwareInterrupt(
|
||||||
switch (Request)
|
switch (Request)
|
||||||
{
|
{
|
||||||
case APC_LEVEL:
|
case APC_LEVEL:
|
||||||
KeGetCurrentKPCR()->HalReserved[HAL_APC_REQUEST] = TRUE;
|
((PKIPCR)KeGetCurrentKPCR())->HalReserved[HAL_APC_REQUEST] = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DISPATCH_LEVEL:
|
case DISPATCH_LEVEL:
|
||||||
KeGetCurrentKPCR()->HalReserved[HAL_DPC_REQUEST] = TRUE;
|
((PKIPCR)KeGetCurrentKPCR())->HalReserved[HAL_DPC_REQUEST] = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -11,12 +11,8 @@
|
||||||
|
|
||||||
/* INCLUDES ***************************************************************/
|
/* INCLUDES ***************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
|
||||||
#include <bus.h>
|
|
||||||
#include <halirq.h>
|
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
#include <hal.h>
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
|
|
|
@ -12,10 +12,8 @@
|
||||||
|
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
#include <hal.h>
|
||||||
|
|
||||||
|
|
||||||
#define DEFAULT_BAUD_RATE 19200
|
#define DEFAULT_BAUD_RATE 19200
|
||||||
|
|
|
@ -32,12 +32,8 @@
|
||||||
|
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
|
||||||
#include <bus.h>
|
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
#include <hal.h>
|
||||||
|
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
|
|
|
@ -9,11 +9,9 @@
|
||||||
|
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#define NDEBUG
|
||||||
#include <hal.h>
|
#include <hal.h>
|
||||||
|
|
||||||
#define NDEBUG
|
|
||||||
#include <internal/debug.h>
|
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
|
|
|
@ -18,15 +18,8 @@
|
||||||
|
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
|
||||||
#include <bus.h>
|
|
||||||
#include <halirq.h>
|
|
||||||
#include <hal.h>
|
|
||||||
#include <internal/ob.h>
|
|
||||||
#include <internal/ps.h>
|
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
#include <hal.h>
|
||||||
|
|
||||||
|
|
||||||
/* MACROS ******************************************************************/
|
/* MACROS ******************************************************************/
|
||||||
|
@ -639,7 +632,7 @@ HalpAssignPciSlotResources(IN PBUS_HANDLER BusHandler,
|
||||||
if (0 != PciConfig.u.type0.BaseAddresses[Address])
|
if (0 != PciConfig.u.type0.BaseAddresses[Address])
|
||||||
{
|
{
|
||||||
ResourceCount++;
|
ResourceCount++;
|
||||||
Offset = offsetof(PCI_COMMON_CONFIG, u.type0.BaseAddresses[Address]);
|
Offset = FIELD_OFFSET(PCI_COMMON_CONFIG, u.type0.BaseAddresses[Address]);
|
||||||
Status = WritePciConfigUlong((UCHAR)BusNumber, (UCHAR)SlotNumber, Offset, 0xffffffff);
|
Status = WritePciConfigUlong((UCHAR)BusNumber, (UCHAR)SlotNumber, Offset, 0xffffffff);
|
||||||
if (! NT_SUCCESS(Status))
|
if (! NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
* Created 18/10/99
|
* Created 18/10/99
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#define NDEBUG
|
||||||
|
#include <hal.h>
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
|
|
|
@ -14,12 +14,8 @@
|
||||||
|
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
|
||||||
#include <hal.h>
|
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
#include <hal.h>
|
||||||
|
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,7 @@
|
||||||
* Created 11/10/99
|
* Created 11/10/99
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define NDEBUG
|
||||||
#include <ddk/ntddk.h>
|
|
||||||
#include <hal.h>
|
#include <hal.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,11 +9,9 @@
|
||||||
|
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#define NDEBUG
|
||||||
#include <hal.h>
|
#include <hal.h>
|
||||||
|
|
||||||
#define NDEBUG
|
|
||||||
#include <internal/debug.h>
|
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
|
|
|
@ -17,17 +17,15 @@
|
||||||
|
|
||||||
/* INCLUDES ****************************************************************/
|
/* INCLUDES ****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#define NDEBUG
|
||||||
#include <internal/ob.h>
|
#include <hal.h>
|
||||||
#include <internal/ps.h>
|
|
||||||
|
|
||||||
#include <internal/debug.h>
|
|
||||||
|
|
||||||
/* Hmm, needed for KDBG := 1. Why? */
|
/* Hmm, needed for KDBG := 1. Why? */
|
||||||
#undef KeGetCurrentIrql
|
#undef KeGetCurrentIrql
|
||||||
|
|
||||||
/* FUNCTIONS ***************************************************************/
|
/* FUNCTIONS ***************************************************************/
|
||||||
|
|
||||||
|
#undef KeAcquireSpinLock
|
||||||
VOID STDCALL
|
VOID STDCALL
|
||||||
KeAcquireSpinLock (
|
KeAcquireSpinLock (
|
||||||
PKSPIN_LOCK SpinLock,
|
PKSPIN_LOCK SpinLock,
|
||||||
|
@ -56,6 +54,7 @@ KeAcquireSpinLockRaiseToSynch (
|
||||||
return OldIrql;
|
return OldIrql;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#undef KeReleaseSpinLock
|
||||||
VOID STDCALL
|
VOID STDCALL
|
||||||
KeReleaseSpinLock (
|
KeReleaseSpinLock (
|
||||||
PKSPIN_LOCK SpinLock,
|
PKSPIN_LOCK SpinLock,
|
||||||
|
|
|
@ -11,12 +11,8 @@
|
||||||
|
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
|
||||||
#include <bus.h>
|
|
||||||
#include <halirq.h>
|
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
#include <hal.h>
|
||||||
|
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
|
@ -10,12 +10,9 @@
|
||||||
|
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
|
||||||
#include <hal.h>
|
|
||||||
#include <bus.h>
|
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
#include <hal.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
|
@ -8,13 +8,9 @@
|
||||||
|
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <hal.h>
|
|
||||||
#include <bus.h>
|
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
#include <hal.h>
|
||||||
|
|
||||||
|
|
||||||
/* MACROS and CONSTANTS ******************************************************/
|
/* MACROS and CONSTANTS ******************************************************/
|
||||||
|
|
||||||
|
|
|
@ -32,13 +32,8 @@
|
||||||
|
|
||||||
/* INCLUDES ***************************************************************/
|
/* INCLUDES ***************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
|
||||||
#include <internal/ob.h>
|
|
||||||
#include <internal/ps.h>
|
|
||||||
#include <hal.h>
|
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
#include <hal.h>
|
||||||
|
|
||||||
/* GLOBALS ******************************************************************/
|
/* GLOBALS ******************************************************************/
|
||||||
|
|
||||||
|
@ -127,7 +122,7 @@ ROSL1:
|
||||||
|
|
||||||
VOID STDCALL KeStallExecutionProcessor(ULONG Microseconds)
|
VOID STDCALL KeStallExecutionProcessor(ULONG Microseconds)
|
||||||
{
|
{
|
||||||
PKPCR Pcr = KeGetCurrentKPCR();
|
PKIPCR Pcr = (PKIPCR)KeGetCurrentKPCR();
|
||||||
|
|
||||||
if (Pcr->PrcbData.FeatureBits & X86_FEATURE_TSC)
|
if (Pcr->PrcbData.FeatureBits & X86_FEATURE_TSC)
|
||||||
{
|
{
|
||||||
|
@ -194,7 +189,7 @@ VOID HalpCalibrateStallExecution(VOID)
|
||||||
ULONG i;
|
ULONG i;
|
||||||
ULONG calib_bit;
|
ULONG calib_bit;
|
||||||
ULONG CurCount;
|
ULONG CurCount;
|
||||||
PKPCR Pcr;
|
PKIPCR Pcr;
|
||||||
LARGE_INTEGER StartCount, EndCount;
|
LARGE_INTEGER StartCount, EndCount;
|
||||||
|
|
||||||
if (UdelayCalibrated)
|
if (UdelayCalibrated)
|
||||||
|
@ -203,7 +198,7 @@ VOID HalpCalibrateStallExecution(VOID)
|
||||||
}
|
}
|
||||||
|
|
||||||
UdelayCalibrated = TRUE;
|
UdelayCalibrated = TRUE;
|
||||||
Pcr = KeGetCurrentKPCR();
|
Pcr = (PKIPCR)KeGetCurrentKPCR();
|
||||||
|
|
||||||
/* Initialise timer interrupt with MILLISEC ms interval */
|
/* 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 */
|
WRITE_PORT_UCHAR((PUCHAR) TMR_CTRL, TMR_SC0 | TMR_BOTH | TMR_MD2); /* binary, mode 2, LSB/MSB, ch 0 */
|
||||||
|
@ -319,14 +314,14 @@ KeQueryPerformanceCounter(PLARGE_INTEGER PerformanceFreq)
|
||||||
* RETURNS: The number of performance counter ticks since boot
|
* RETURNS: The number of performance counter ticks since boot
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
PKPCR Pcr;
|
PKIPCR Pcr;
|
||||||
LARGE_INTEGER Value;
|
LARGE_INTEGER Value;
|
||||||
ULONG Flags;
|
ULONG Flags;
|
||||||
|
|
||||||
Ki386SaveFlags(Flags);
|
Ki386SaveFlags(Flags);
|
||||||
Ki386DisableInterrupts();
|
Ki386DisableInterrupts();
|
||||||
|
|
||||||
Pcr = KeGetCurrentKPCR();
|
Pcr = (PKIPCR)KeGetCurrentKPCR();
|
||||||
|
|
||||||
if (Pcr->PrcbData.FeatureBits & X86_FEATURE_TSC)
|
if (Pcr->PrcbData.FeatureBits & X86_FEATURE_TSC)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue