Build MP HAL with w32api
Modified: trunk/reactos/hal/halx86/mp/apic.c
Modified: trunk/reactos/hal/halx86/mp/halinit_mp.c
Modified: trunk/reactos/hal/halx86/mp/halmp.xml
Modified: trunk/reactos/hal/halx86/mp/ioapic.c
Modified: trunk/reactos/hal/halx86/mp/ipi_mp.c
Modified: trunk/reactos/hal/halx86/mp/mpconfig.c
Modified: trunk/reactos/hal/halx86/mp/mpsirql.c
Modified: trunk/reactos/hal/halx86/mp/processor_mp.c
Modified: trunk/reactos/hal/halx86/mp/resource_mp.c
_____
Modified: trunk/reactos/hal/halx86/mp/apic.c
--- trunk/reactos/hal/halx86/mp/apic.c 2005-06-18 14:27:44 UTC (rev
16035)
+++ trunk/reactos/hal/halx86/mp/apic.c 2005-06-18 14:28:28 UTC (rev
16036)
@@ -27,17 +27,10 @@
/* INCLUDE
***********************************************************************/
-#include <ddk/ntddk.h>
-#include <internal/i386/ps.h>
-
+#define NDEBUG
#include <hal.h>
-#include <halirq.h>
-#include <mps.h>
-#include <apic.h>
+#include <internal/ntoskrnl.h>
-#define NDEBUG
-#include <internal/debug.h>
-
/* GLOBALS
***********************************************************************/
ULONG CPUCount; /* Total number
of CPUs */
@@ -89,8 +82,6 @@
WRITE_PORT_UCHAR((PUCHAR)0x71, value); \
})
-extern PVOID IMPORTED MmSystemRangeStart;
-
/* FUNCTIONS
*********************************************************************/
extern ULONG Read8254Timer(VOID);
@@ -866,7 +857,7 @@
APICSetupLVTT(1000000000);
- TSCPresent = KeGetCurrentKPCR()->PrcbData.FeatureBits &
X86_FEATURE_TSC ? TRUE : FALSE;
+ TSCPresent = ((PKIPCR)KeGetCurrentKPCR())->PrcbData.FeatureBits &
X86_FEATURE_TSC ? TRUE : FALSE;
/*
* The timer chip counts down to zero. Let's wait
@@ -895,7 +886,7 @@
DPRINT("CPU clock speed is %ld.%04ld MHz.\n",
CPUMap[CPU].CoreSpeed/1000000,
CPUMap[CPU].CoreSpeed%1000000);
- KeGetCurrentKPCR()->PrcbData.MHz = CPUMap[CPU].CoreSpeed/1000000;
+ ((PKIPCR)KeGetCurrentKPCR())->PrcbData.MHz =
CPUMap[CPU].CoreSpeed/1000000;
}
CPUMap[CPU].BusSpeed = (HZ * (long)(tt1 - tt2) * APIC_DIVISOR);
_____
Modified: trunk/reactos/hal/halx86/mp/halinit_mp.c
--- trunk/reactos/hal/halx86/mp/halinit_mp.c 2005-06-18 14:27:44 UTC
(rev 16035)
+++ trunk/reactos/hal/halx86/mp/halinit_mp.c 2005-06-18 14:28:28 UTC
(rev 16036)
@@ -11,13 +11,9 @@
/* INCLUDES
*****************************************************************/
-#include <ddk/ntddk.h>
+#define NDEBUG
#include <hal.h>
-#include <mps.h>
-#define NDEBUG
-#include <internal/debug.h>
-
/* FUNCTIONS
***************************************************************/
extern BOOLEAN HaliFindSmpConfig(VOID);
_____
Modified: trunk/reactos/hal/halx86/mp/halmp.xml
--- trunk/reactos/hal/halx86/mp/halmp.xml 2005-06-18 14:27:44 UTC
(rev 16035)
+++ trunk/reactos/hal/halx86/mp/halmp.xml 2005-06-18 14:28:28 UTC
(rev 16036)
@@ -4,7 +4,8 @@
<include base="ntoskrnl">include</include>
<define name="_DISABLE_TIDENTS" />
<define name="CONFIG_SMP" />
- <define name="__NTHAL__" />
+ <define name="_NTHAL_" />
+ <define name="__USE_W32API" />
<library>hal_generic</library>
<library>hal_generic_pc</library>
<library>ntoskrnl</library>
_____
Modified: trunk/reactos/hal/halx86/mp/ioapic.c
--- trunk/reactos/hal/halx86/mp/ioapic.c 2005-06-18 14:27:44 UTC
(rev 16035)
+++ trunk/reactos/hal/halx86/mp/ioapic.c 2005-06-18 14:28:28 UTC
(rev 16036)
@@ -9,22 +9,9 @@
/* INCLUDES
*****************************************************************/
-#include <ddk/ntddk.h>
+#define NDEBUG
#include <hal.h>
-#include <mps.h>
-#include <halirq.h>
-#include <apic.h>
-#include <ioapic.h>
-
-#include <internal/ntoskrnl.h>
-#include <internal/i386/segment.h>
-#include <internal/ke.h>
-#include <internal/ps.h>
-
-#define NDEBUG
-#include <internal/debug.h>
-
/* GLOBALS
*****************************************************************/
MP_CONFIGURATION_INTSRC IRQMap[MAX_IRQ_SOURCE]; /* Map of all IRQs */
_____
Modified: trunk/reactos/hal/halx86/mp/ipi_mp.c
--- trunk/reactos/hal/halx86/mp/ipi_mp.c 2005-06-18 14:27:44 UTC
(rev 16035)
+++ trunk/reactos/hal/halx86/mp/ipi_mp.c 2005-06-18 14:28:28 UTC
(rev 16036)
@@ -9,13 +9,9 @@
/* INCLUDES
*****************************************************************/
-#include <ddk/ntddk.h>
+#define NDEBUG
#include <hal.h>
-#include <apic.h>
-#define NDEBUG
-#include <internal/debug.h>
-
/* FUNCTIONS
****************************************************************/
VOID STDCALL
_____
Modified: trunk/reactos/hal/halx86/mp/mpconfig.c
--- trunk/reactos/hal/halx86/mp/mpconfig.c 2005-06-18 14:27:44 UTC
(rev 16035)
+++ trunk/reactos/hal/halx86/mp/mpconfig.c 2005-06-18 14:28:28 UTC
(rev 16036)
@@ -9,16 +9,9 @@
/* INCLUDES
*****************************************************************/
-#include <ddk/ntddk.h>
-#include <ntos/types.h>
+#define NDEBUG
#include <hal.h>
-#include <mps.h>
-#include <apic.h>
-#include <ioapic.h>
-#define NDEBUG
-#include <internal/debug.h>
-
/* GLOBALS
******************************************************************/
MP_FLOATING_POINTER* Mpf = NULL;
_____
Modified: trunk/reactos/hal/halx86/mp/mpsirql.c
--- trunk/reactos/hal/halx86/mp/mpsirql.c 2005-06-18 14:27:44 UTC
(rev 16035)
+++ trunk/reactos/hal/halx86/mp/mpsirql.c 2005-06-18 14:28:28 UTC
(rev 16036)
@@ -11,19 +11,9 @@
/* INCLUDES
*****************************************************************/
-#include <ddk/ntddk.h>
-#include <internal/ke.h>
-#include <internal/ps.h>
-#include <ntos/minmax.h>
-#include <halirq.h>
+#define NDEBUG
#include <hal.h>
-#include <mps.h>
-#include <apic.h>
-#include <ioapic.h>
-#define NDEBUG
-#include <internal/debug.h>
-
/* GLOBALS
******************************************************************/;
@@ -42,7 +32,7 @@
Ki386SaveFlags(Flags);
Ki386DisableInterrupts();
- irql = Ki386ReadFsByte(offsetof(KPCR, Irql));
+ irql = Ki386ReadFsByte(FIELD_OFFSET(KPCR, Irql));
if (irql > HIGH_LEVEL)
{
DPRINT1 ("CurrentIrql %x\n", irql);
@@ -70,7 +60,7 @@
}
Ki386SaveFlags(Flags);
Ki386DisableInterrupts();
- Ki386WriteFsByte(offsetof(KPCR, Irql), NewIrql);
+ Ki386WriteFsByte(FIELD_OFFSET(KPCR, Irql), NewIrql);
if (Flags & X86_EFLAGS_IF)
{
Ki386EnableInterrupts();
@@ -92,9 +82,9 @@
{
KeSetCurrentIrql (DISPATCH_LEVEL);
APICWrite(APIC_TPR, IRQL2TPR (DISPATCH_LEVEL) & APIC_TPR_PRI);
- if (FromHalEndSystemInterrupt || Ki386ReadFsByte(offsetof(KPCR,
HalReserved[HAL_DPC_REQUEST])))
+ if (FromHalEndSystemInterrupt ||
Ki386ReadFsByte(FIELD_OFFSET(KIPCR, HalReserved[HAL_DPC_REQUEST])))
{
- Ki386WriteFsByte(offsetof(KPCR,
HalReserved[HAL_DPC_REQUEST]), 0);
+ Ki386WriteFsByte(FIELD_OFFSET(KIPCR,
HalReserved[HAL_DPC_REQUEST]), 0);
Ki386EnableInterrupts();
KiDispatchInterrupt();
if (!(Flags & X86_EFLAGS_IF))
@@ -166,7 +156,7 @@
*
* NOTES
*/
-
+#undef KeLowerIrql
VOID STDCALL
KeLowerIrql (KIRQL NewIrql)
{
@@ -240,6 +230,7 @@
* NOTES
* Calls KfRaiseIrql
*/
+#undef KeRaiseIrql
VOID STDCALL
KeRaiseIrql (KIRQL NewIrql,
PKIRQL OldIrql)
@@ -392,11 +383,11 @@
switch (Request)
{
case APC_LEVEL:
- Ki386WriteFsByte(offsetof(KPCR, HalReserved[HAL_APC_REQUEST]),
1);
+ Ki386WriteFsByte(FIELD_OFFSET(KIPCR,
HalReserved[HAL_APC_REQUEST]), 1);
break;
case DISPATCH_LEVEL:
- Ki386WriteFsByte(offsetof(KPCR, HalReserved[HAL_DPC_REQUEST]),
1);
+ Ki386WriteFsByte(FIELD_OFFSET(KIPCR,
HalReserved[HAL_DPC_REQUEST]), 1);
break;
default:
_____
Modified: trunk/reactos/hal/halx86/mp/processor_mp.c
--- trunk/reactos/hal/halx86/mp/processor_mp.c 2005-06-18 14:27:44 UTC
(rev 16035)
+++ trunk/reactos/hal/halx86/mp/processor_mp.c 2005-06-18 14:28:28 UTC
(rev 16036)
@@ -14,24 +14,9 @@
/* INCLUDES
*****************************************************************/
-#include <ddk/ntddk.h>
+#define NDEBUG
#include <hal.h>
-#include <halirq.h>
-#include <mps.h>
-#include <ioapic.h>
-#include <apic.h>
-
-#include <internal/ntoskrnl.h>
-#include <internal/i386/segment.h>
-#include <internal/ke.h>
-#include <internal/ps.h>
-
-#define NDEBUG
-#include <internal/debug.h>
-
-
-
/* FUNCTIONS
*****************************************************************/
VOID STDCALL
_____
Modified: trunk/reactos/hal/halx86/mp/resource_mp.c
--- trunk/reactos/hal/halx86/mp/resource_mp.c 2005-06-18 14:27:44 UTC
(rev 16035)
+++ trunk/reactos/hal/halx86/mp/resource_mp.c 2005-06-18 14:28:28 UTC
(rev 16036)
@@ -9,12 +9,9 @@
/* INCLUDES
*****************************************************************/
-#include <ddk/ntddk.h>
+#define NDEBUG
#include <hal.h>
-#define NDEBUG
-#include <internal/debug.h>
-
/* FUNCTIONS
****************************************************************/
VOID