/* INCLUDES ******************************************************************/
-/* SDK/DDK/NDK Headers. */
-#include <ddk/ntddk.h>
+/* C Headers */
#include <stdio.h>
-/* FIXME: NDK Headers */
-#include <ntos/types.h>
-#include <ntos/haltypes.h>
-#include <ntos/halfuncs.h>
-
-/* Internal Kernel Headers */
-//#include <internal/mm.h>
-#include <internal/ke.h>
-#include <internal/i386/ps.h>
-
-//Temporary hack below.
-PVOID STDCALL
-MmAllocateContiguousAlignedMemory(IN ULONG NumberOfBytes,
- IN PHYSICAL_ADDRESS LowestAcceptableAddress,
- IN PHYSICAL_ADDRESS HighestAcceptableAddress,
- IN PHYSICAL_ADDRESS BoundaryAddressMultiple OPTIONAL,
- IN MEMORY_CACHING_TYPE CacheType OPTIONAL,
- IN ULONG Alignment);
-
-/* FIXME: NDK */
-VOID STDCALL KeEnterKernelDebugger (VOID);
-VOID FASTCALL KiAcquireSpinLock(PKSPIN_LOCK SpinLock);
-VOID FASTCALL KiReleaseSpinLock(PKSPIN_LOCK SpinLock);
-VOID STDCALL KiDispatchInterrupt(VOID);
-NTSTATUS
-STDCALL
-ObCreateObject (
- IN KPROCESSOR_MODE ObjectAttributesAccessMode OPTIONAL,
- IN POBJECT_TYPE ObjectType,
- IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
- IN KPROCESSOR_MODE AccessMode,
- IN OUT PVOID ParseContext OPTIONAL,
- IN ULONG ObjectSize,
- IN ULONG PagedPoolCharge OPTIONAL,
- IN ULONG NonPagedPoolCharge OPTIONAL,
- OUT PVOID *Object
-);
+/* WDK HAL Compilation hack */
+#include <excpt.h>
+#include <ntdef.h>
+#ifndef _MINIHAL_
+#undef NTSYSAPI
+#define NTSYSAPI __declspec(dllimport)
+#else
+#undef NTSYSAPI
+#define NTSYSAPI
+#endif
-/* Debug Header */
-#include <debug.h>
+/* IFS/DDK/NDK Headers */
+#include <ntifs.h>
+#include <bugcodes.h>
+#include <ntdddisk.h>
+#include <arc/arc.h>
+#include <ntndk.h>
+
+/* Internal kernel headers */
+#include "internal/pci.h"
+#define KeGetCurrentThread _KeGetCurrentThread
+#include <internal/i386/ke.h>
+#include <internal/i386/mm.h>
+#ifdef _M_AMD64
+#include "internal/amd64/intrin_i.h"
+#else
+#include "internal/i386/intrin_i.h"
+#endif
/* Internal HAL Headers */
#include "apic.h"
#include "bus.h"
#include "halirq.h"
+#include "haldma.h"
#include "halp.h"
#include "mps.h"
#include "ioapic.h"
-/* Helper Macros FIXME: NDK */
-#define ROUNDUP(a,b) ((((a)+(b)-1)/(b))*(b))
-#define ROUND_DOWN(N, S) ((N) - ((N) % (S)))
-#ifndef HIWORD
-#define HIWORD(l) ((WORD)(((DWORD)(l) >> 16) & 0xFFFF))
-#endif
-#ifndef LOWORD
-#define LOWORD(l) ((WORD)(l))
-#endif
-
/* EOF */