mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +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 *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ddk/iotypes.h>
|
||||
#include <internal/ob.h>
|
||||
#include <internal/ps.h>
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <hal.h>
|
||||
|
||||
/* Hmm, needed for KDBG := 1. Why? */
|
||||
extern POBJECT_TYPE IMPORTED IoAdapterObjectType;
|
||||
#undef KeGetCurrentIrql
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
|
|
@ -10,11 +10,8 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <hal.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <hal.h>
|
||||
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
|
|
|
@ -15,12 +15,8 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <hal.h>
|
||||
#include <bus.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <hal.h>
|
||||
|
||||
/* GLOBALS *******************************************************************/
|
||||
|
||||
|
|
|
@ -121,9 +121,10 @@
|
|||
* since there is already support for them via the VideoPortInt10 routine.
|
||||
*/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#define NDEBUG
|
||||
#include <hal.h>
|
||||
|
||||
|
||||
#define SCREEN_SYNCHRONIZATION
|
||||
|
||||
#define VGA_GRAPH_MEM 0xa0000
|
||||
|
|
|
@ -11,9 +11,7 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <hal.h>
|
||||
|
||||
/* Adapters for each channel */
|
||||
|
|
|
@ -11,18 +11,19 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/debug.h>
|
||||
#define NDEBUG
|
||||
#include <hal.h>
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
VOID STDCALL
|
||||
IoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
|
||||
IoAssignDriveLetters(IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock,
|
||||
IN PSTRING NtDeviceName,
|
||||
OUT PUCHAR NtSystemPath,
|
||||
OUT PSTRING NtSystemPathString)
|
||||
{
|
||||
HalIoAssignDriveLetters(LoaderBlock,
|
||||
/* FIXME FIXME FIXME FUCK SOMEONE FIXME*/
|
||||
HalIoAssignDriveLetters(NULL,
|
||||
NtDeviceName,
|
||||
NtSystemPath,
|
||||
NtSystemPathString);
|
||||
|
|
|
@ -11,10 +11,8 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <hal.h>
|
||||
|
||||
VOID
|
||||
HalpStartEnumerator (VOID)
|
||||
|
|
|
@ -12,9 +12,8 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
|
||||
#include <internal/debug.h>
|
||||
#define NDEBUG
|
||||
#include <hal.h>
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
<include base="hal_generic">../include</include>
|
||||
<include base="ntoskrnl">include</include>
|
||||
<define name="_DISABLE_TIDENTS" />
|
||||
<define name="__NTHAL__" />
|
||||
<define name="__USE_W32API" />
|
||||
<define name="_NTHAL_" />
|
||||
<file>adapter.c</file>
|
||||
<file>beep.c</file>
|
||||
<file>bus.c</file>
|
||||
|
@ -28,7 +29,8 @@
|
|||
<include base="hal_generic_up">../include</include>
|
||||
<include base="ntoskrnl">include</include>
|
||||
<define name="_DISABLE_TIDENTS" />
|
||||
<define name="__NTHAL__" />
|
||||
<define name="_NTHAL_" />
|
||||
<define name="__USE_W32API" />
|
||||
<file>ipi.c</file>
|
||||
<file>irql.c</file>
|
||||
<file>processor.c</file>
|
||||
|
@ -38,6 +40,7 @@
|
|||
<include base="hal_generic_pc">../include</include>
|
||||
<include base="ntoskrnl">include</include>
|
||||
<define name="_DISABLE_TIDENTS" />
|
||||
<define name="__NTHAL__" />
|
||||
<define name="_NTHAL_" />
|
||||
<define name="__USE_W32API" />
|
||||
<file>display.c</file>
|
||||
</module>
|
||||
|
|
|
@ -11,11 +11,8 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <hal.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <hal.h>
|
||||
|
||||
/* GLOBALS *****************************************************************/
|
||||
|
||||
|
|
|
@ -9,11 +9,8 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <hal.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <hal.h>
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
|
|
|
@ -9,15 +9,8 @@
|
|||
|
||||
/* 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
|
||||
#include <internal/debug.h>
|
||||
#include <hal.h>
|
||||
|
||||
/* GLOBALS ******************************************************************/
|
||||
|
||||
|
@ -174,9 +167,9 @@ HalpLowerIrql(KIRQL NewIrql)
|
|||
return;
|
||||
}
|
||||
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();
|
||||
}
|
||||
KeGetCurrentKPCR()->Irql = APC_LEVEL;
|
||||
|
@ -240,7 +233,7 @@ KfLowerIrql (KIRQL NewIrql)
|
|||
*
|
||||
* NOTES
|
||||
*/
|
||||
|
||||
#undef KeLowerIrql
|
||||
VOID STDCALL
|
||||
KeLowerIrql (KIRQL NewIrql)
|
||||
{
|
||||
|
@ -303,6 +296,7 @@ KfRaiseIrql (KIRQL NewIrql)
|
|||
* NOTES
|
||||
* Calls KfRaiseIrql
|
||||
*/
|
||||
#undef KeRaiseIrql
|
||||
VOID STDCALL
|
||||
KeRaiseIrql (KIRQL NewIrql,
|
||||
PKIRQL OldIrql)
|
||||
|
@ -466,11 +460,11 @@ HalRequestSoftwareInterrupt(
|
|||
switch (Request)
|
||||
{
|
||||
case APC_LEVEL:
|
||||
KeGetCurrentKPCR()->HalReserved[HAL_APC_REQUEST] = TRUE;
|
||||
((PKIPCR)KeGetCurrentKPCR())->HalReserved[HAL_APC_REQUEST] = TRUE;
|
||||
break;
|
||||
|
||||
case DISPATCH_LEVEL:
|
||||
KeGetCurrentKPCR()->HalReserved[HAL_DPC_REQUEST] = TRUE;
|
||||
((PKIPCR)KeGetCurrentKPCR())->HalReserved[HAL_DPC_REQUEST] = TRUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -11,12 +11,8 @@
|
|||
|
||||
/* INCLUDES ***************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <bus.h>
|
||||
#include <halirq.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <hal.h>
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
|
|
|
@ -12,10 +12,8 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <hal.h>
|
||||
|
||||
|
||||
#define DEFAULT_BAUD_RATE 19200
|
||||
|
|
|
@ -32,12 +32,8 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <bus.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
#include <hal.h>
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
|
|
|
@ -9,11 +9,9 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#define NDEBUG
|
||||
#include <hal.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
|
|
|
@ -18,15 +18,8 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <bus.h>
|
||||
#include <halirq.h>
|
||||
#include <hal.h>
|
||||
#include <internal/ob.h>
|
||||
#include <internal/ps.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <hal.h>
|
||||
|
||||
|
||||
/* MACROS ******************************************************************/
|
||||
|
@ -639,7 +632,7 @@ HalpAssignPciSlotResources(IN PBUS_HANDLER BusHandler,
|
|||
if (0 != PciConfig.u.type0.BaseAddresses[Address])
|
||||
{
|
||||
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);
|
||||
if (! NT_SUCCESS(Status))
|
||||
{
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
* Created 18/10/99
|
||||
*/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <hal.h>
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
|
|
|
@ -14,12 +14,8 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <hal.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
#include <hal.h>
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
|
|
|
@ -9,8 +9,7 @@
|
|||
* Created 11/10/99
|
||||
*/
|
||||
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#define NDEBUG
|
||||
#include <hal.h>
|
||||
|
||||
|
||||
|
|
|
@ -9,11 +9,9 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#define NDEBUG
|
||||
#include <hal.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
|
|
|
@ -17,17 +17,15 @@
|
|||
|
||||
/* INCLUDES ****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ob.h>
|
||||
#include <internal/ps.h>
|
||||
|
||||
#include <internal/debug.h>
|
||||
#define NDEBUG
|
||||
#include <hal.h>
|
||||
|
||||
/* Hmm, needed for KDBG := 1. Why? */
|
||||
#undef KeGetCurrentIrql
|
||||
|
||||
/* FUNCTIONS ***************************************************************/
|
||||
|
||||
#undef KeAcquireSpinLock
|
||||
VOID STDCALL
|
||||
KeAcquireSpinLock (
|
||||
PKSPIN_LOCK SpinLock,
|
||||
|
@ -56,6 +54,7 @@ KeAcquireSpinLockRaiseToSynch (
|
|||
return OldIrql;
|
||||
}
|
||||
|
||||
#undef KeReleaseSpinLock
|
||||
VOID STDCALL
|
||||
KeReleaseSpinLock (
|
||||
PKSPIN_LOCK SpinLock,
|
||||
|
|
|
@ -11,12 +11,8 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <bus.h>
|
||||
#include <halirq.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <hal.h>
|
||||
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
|
|
@ -10,12 +10,9 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <hal.h>
|
||||
#include <bus.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <hal.h>
|
||||
|
||||
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
|
|
@ -8,13 +8,9 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <string.h>
|
||||
#include <hal.h>
|
||||
#include <bus.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <hal.h>
|
||||
|
||||
|
||||
/* MACROS and CONSTANTS ******************************************************/
|
||||
|
||||
|
|
|
@ -32,13 +32,8 @@
|
|||
|
||||
/* INCLUDES ***************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ob.h>
|
||||
#include <internal/ps.h>
|
||||
#include <hal.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <hal.h>
|
||||
|
||||
/* GLOBALS ******************************************************************/
|
||||
|
||||
|
@ -127,7 +122,7 @@ ROSL1:
|
|||
|
||||
VOID STDCALL KeStallExecutionProcessor(ULONG Microseconds)
|
||||
{
|
||||
PKPCR Pcr = KeGetCurrentKPCR();
|
||||
PKIPCR Pcr = (PKIPCR)KeGetCurrentKPCR();
|
||||
|
||||
if (Pcr->PrcbData.FeatureBits & X86_FEATURE_TSC)
|
||||
{
|
||||
|
@ -194,7 +189,7 @@ VOID HalpCalibrateStallExecution(VOID)
|
|||
ULONG i;
|
||||
ULONG calib_bit;
|
||||
ULONG CurCount;
|
||||
PKPCR Pcr;
|
||||
PKIPCR Pcr;
|
||||
LARGE_INTEGER StartCount, EndCount;
|
||||
|
||||
if (UdelayCalibrated)
|
||||
|
@ -203,7 +198,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 */
|
||||
|
@ -319,14 +314,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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue