Build Generic HAL with w32api

svn path=/trunk/; revision=16039
This commit is contained in:
Alex Ionescu 2005-06-18 14:29:31 +00:00
parent 06e00cb9c9
commit f8d053290e
26 changed files with 54 additions and 120 deletions

View file

@ -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 *****************************************************************/

View file

@ -10,11 +10,8 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <hal.h>
#define NDEBUG
#include <internal/debug.h>
#include <hal.h>
/* CONSTANTS *****************************************************************/

View file

@ -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 *******************************************************************/

View file

@ -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

View file

@ -11,9 +11,7 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#define NDEBUG
#include <internal/debug.h>
#include <hal.h>
/* Adapters for each channel */

View file

@ -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);

View file

@ -11,10 +11,8 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#define NDEBUG
#include <internal/debug.h>
#include <hal.h>
VOID
HalpStartEnumerator (VOID)

View file

@ -12,9 +12,8 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <internal/debug.h>
#define NDEBUG
#include <hal.h>
/* FUNCTIONS *****************************************************************/

View file

@ -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>

View file

@ -11,11 +11,8 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <hal.h>
#define NDEBUG
#include <internal/debug.h>
#include <hal.h>
/* GLOBALS *****************************************************************/

View file

@ -9,11 +9,8 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <hal.h>
#define NDEBUG
#include <internal/debug.h>
#include <hal.h>
/* FUNCTIONS ****************************************************************/

View file

@ -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:

View file

@ -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 *****************************************************************/

View file

@ -12,10 +12,8 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#define NDEBUG
#include <internal/debug.h>
#include <hal.h>
#define DEFAULT_BAUD_RATE 19200

View file

@ -32,12 +32,8 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <bus.h>
#define NDEBUG
#include <internal/debug.h>
#include <hal.h>
/* FUNCTIONS ****************************************************************/

View file

@ -9,11 +9,9 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#define NDEBUG
#include <hal.h>
#define NDEBUG
#include <internal/debug.h>
/* FUNCTIONS ****************************************************************/

View file

@ -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))
{

View file

@ -9,8 +9,8 @@
* Created 18/10/99
*/
#include <ddk/ntddk.h>
#define NDEBUG
#include <hal.h>
/* FUNCTIONS ****************************************************************/

View file

@ -14,12 +14,8 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <hal.h>
#define NDEBUG
#include <internal/debug.h>
#include <hal.h>
/* FUNCTIONS *****************************************************************/

View file

@ -9,8 +9,7 @@
* Created 11/10/99
*/
#include <ddk/ntddk.h>
#define NDEBUG
#include <hal.h>

View file

@ -9,11 +9,9 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#define NDEBUG
#include <hal.h>
#define NDEBUG
#include <internal/debug.h>
/* FUNCTIONS ****************************************************************/

View file

@ -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,

View file

@ -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 ****************************************************************/

View file

@ -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 ****************************************************************/

View file

@ -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 ******************************************************/

View file

@ -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)
{