Author: tkreuzer
Date: Sat Apr 10 17:00:03 2010
New Revision: 46815
URL:
http://svn.reactos.org/svn/reactos?rev=46815&view=rev
Log:
[HAL]
Make it compile again
Modified:
branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/halinit.c
branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/misc.c
branches/ros-amd64-bringup/reactos/hal/halx86/generic/halinit.c
branches/ros-amd64-bringup/reactos/hal/halx86/generic/misc.c
branches/ros-amd64-bringup/reactos/hal/halx86/generic/usage.c
branches/ros-amd64-bringup/reactos/hal/halx86/hal_generic.rbuild
branches/ros-amd64-bringup/reactos/hal/halx86/halamd64.rbuild
Modified: branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/halinit.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
==============================================================================
--- branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/halinit.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/halinit.c [iso-8859-1] Sat
Apr 10 17:00:03 2010
@@ -22,6 +22,8 @@
#endif
/* PRIVATE FUNCTIONS *********************************************************/
+
+#if 0
VOID
NTAPI
@@ -144,5 +146,21 @@
/* FIXME: Report HAL Usage to kernel */
}
+#endif
+
+VOID
+HalpInitPhase0(PLOADER_PARAMETER_BLOCK LoaderBlock)
+
+{
+
+ DPRINT("HalpInitPhase0()\n");
+
+
+}
+
+VOID
+HalpInitPhase1(VOID)
+{
+}
/* EOF */
Modified: branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/misc.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
==============================================================================
--- branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/misc.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/misc.c [iso-8859-1] Sat
Apr 10 17:00:03 2010
@@ -15,36 +15,9 @@
#include <debug.h>
LARGE_INTEGER HalpPerformanceFrequency;
+KAFFINITY HalpActiveProcessors;
/* PRIVATE FUNCTIONS *********************************************************/
-
-VOID
-NTAPI
-HalpCheckPowerButton(VOID)
-{
- /* Nothing to do on non-ACPI */
- return;
-}
-
-PVOID
-NTAPI
-HalpMapPhysicalMemory64(IN PHYSICAL_ADDRESS PhysicalAddress,
- IN ULONG NumberPage)
-{
- /* Use kernel memory manager I/O map facilities */
- return MmMapIoSpace(PhysicalAddress,
- NumberPage << PAGE_SHIFT,
- MmNonCached);
-}
-
-VOID
-NTAPI
-HalpUnmapVirtualAddress(IN PVOID VirtualAddress,
- IN ULONG NumberPages)
-{
- /* Use kernel memory manager I/O map facilities */
- MmUnmapIoSpace(VirtualAddress, NumberPages << PAGE_SHIFT);
-}
VOID
NTAPI
@@ -82,71 +55,12 @@
/* FUNCTIONS *****************************************************************/
-/*
- * @implemented
- */
VOID
NTAPI
-HalHandleNMI(IN PVOID NmiInfo)
+HalBugCheckSystem(
+ IN PWHEA_ERROR_RECORD ErrorRecord)
{
- UCHAR ucStatus;
-
- /* Get the NMI Flag */
- ucStatus = READ_PORT_UCHAR((PUCHAR)0x61);
-
- /* Display NMI failure string */
- HalDisplayString ("\n*** Hardware Malfunction\n\n");
- HalDisplayString ("Call your hardware vendor for support\n\n");
-
- /* Check for parity error */
- if (ucStatus & 0x80)
- {
- /* Display message */
- HalDisplayString ("NMI: Parity Check / Memory Parity Error\n");
- }
-
- /* Check for I/O failure */
- if (ucStatus & 0x40)
- {
- /* Display message */
- HalDisplayString ("NMI: Channel Check / IOCHK\n");
- }
-
- /* Halt the system */
- HalDisplayString("\n*** The system has halted ***\n");
- //KeEnterKernelDebugger();
-}
-
-/*
- * @implemented
- */
-UCHAR
-FASTCALL
-HalSystemVectorDispatchEntry(IN ULONG Vector,
- OUT PKINTERRUPT_ROUTINE **FlatDispatch,
- OUT PKINTERRUPT_ROUTINE *NoConnection)
-{
- /* Not implemented on x86 */
- return FALSE;
-}
-
-VOID
-NTAPI
-HalBugCheckSystem (PVOID ErrorRecord)
-{
- UNIMPLEMENTED;
-}
-
-
-/*
- * @implemented
- */
-VOID
-NTAPI
-KeFlushWriteBuffer(VOID)
-{
- /* Not implemented on x86 */
- return;
+ UNIMPLEMENTED;
}
LARGE_INTEGER
@@ -189,3 +103,10 @@
return FALSE;
}
+VOID
+NTAPI
+HalpCalibrateStallExecution(VOID)
+{
+ UNIMPLEMENTED;
+}
+
Modified: branches/ros-amd64-bringup/reactos/hal/halx86/generic/halinit.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
==============================================================================
--- branches/ros-amd64-bringup/reactos/hal/halx86/generic/halinit.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/hal/halx86/generic/halinit.c [iso-8859-1] Sat Apr
10 17:00:03 2010
@@ -134,6 +134,7 @@
return PhysicalAddress;
}
+// FIXME: bugs!
PVOID
NTAPI
HalpMapPhysicalMemory64(IN PHYSICAL_ADDRESS PhysicalAddress,
@@ -161,7 +162,7 @@
{
/* Get the PTE for this address and check if it's available */
PointerPte = HalAddressToPte(VirtualAddress);
- if (*(PULONG)PointerPte)
+ if (*(PULONG_PTR)PointerPte)
{
/* PTE has data, skip it and start with a new base address */
BaseAddress = (PVOID)((ULONG_PTR)VirtualAddress + PAGE_SIZE);
@@ -373,6 +374,7 @@
HalpInitBusHandler();
#ifndef _MINIHAL_
+#ifdef _M_IX86
/* Enable IRQ 0 */
HalpEnableInterruptHandler(IDT_DEVICE,
0,
@@ -380,7 +382,7 @@
CLOCK2_LEVEL,
HalpClockInterrupt,
Latched);
-
+#endif
/* Enable IRQ 8 */
HalpEnableInterruptHandler(IDT_DEVICE,
0,
Modified: branches/ros-amd64-bringup/reactos/hal/halx86/generic/misc.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
==============================================================================
--- branches/ros-amd64-bringup/reactos/hal/halx86/generic/misc.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/hal/halx86/generic/misc.c [iso-8859-1] Sat Apr 10
17:00:03 2010
@@ -211,6 +211,7 @@
__writeeflags(Flags);
}
+#ifdef _M_IX86
VOID
NTAPI
HalpSetInterruptGate(ULONG index, PVOID address)
@@ -231,6 +232,7 @@
idt->Access = Access.Value;
idt->ExtendedOffset = (USHORT)((ULONG_PTR)address >> 16);
}
+#endif
/* FUNCTIONS *****************************************************************/
Modified: branches/ros-amd64-bringup/reactos/hal/halx86/generic/usage.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
==============================================================================
--- branches/ros-amd64-bringup/reactos/hal/halx86/generic/usage.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/hal/halx86/generic/usage.c [iso-8859-1] Sat Apr 10
17:00:03 2010
@@ -517,9 +517,14 @@
/* Register the vector */
HalpRegisterVector(Flags, BusVector, SystemVector, Irql);
+// FIXME use an architecture specific inline function
+#ifdef _M_IX86
/* Connect the interrupt */
((PKIPCR)KeGetPcr())->IDT[Entry].ExtendedOffset = (USHORT)(((ULONG_PTR)Handler
>> 16) & 0xFFFF);
((PKIPCR)KeGetPcr())->IDT[Entry].Offset = (USHORT)((ULONG_PTR)Handler);
+#else
+ // TODO
+#endif
/* Enable the interrupt */
HalEnableSystemInterrupt(SystemVector, Irql, Mode);
Modified: branches/ros-amd64-bringup/reactos/hal/halx86/hal_generic.rbuild
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
==============================================================================
--- branches/ros-amd64-bringup/reactos/hal/halx86/hal_generic.rbuild [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/hal/halx86/hal_generic.rbuild [iso-8859-1] Sat Apr
10 17:00:03 2010
@@ -36,7 +36,8 @@
</directory>
</if>
<if property="ARCH" value="amd64">
- <include base="x86emu">.</include>
+ <define name="_X86BIOS_" />
+ <include base="x86emu">.</include>
<directory name="amd64">
<file>x86bios.c</file>
<file>halinit.c</file>
@@ -48,11 +49,6 @@
</directory>
</if>
</directory>
- <if property="ARCH" value="amd64">
- <directory name="mp">
- <file>apic.c</file>
- </directory>
- </if>
<directory name="include">
<pch>hal.h</pch>
</directory>
@@ -75,7 +71,6 @@
<file>sysbus.c</file>
</directory>
<file>beep.c</file>
- <file>bios.c</file>
<file>cmos.c</file>
<file>dma.c</file>
<file>display.c</file>
@@ -88,6 +83,7 @@
<file>timer.c</file>
<file>usage.c</file>
<if property="ARCH" value="i386">
+ <file>bios.c</file>
<directory name="i386">
<file>portio.c</file>
<file>systimer.S</file>
Modified: branches/ros-amd64-bringup/reactos/hal/halx86/halamd64.rbuild
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
==============================================================================
--- branches/ros-amd64-bringup/reactos/hal/halx86/halamd64.rbuild [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/hal/halx86/halamd64.rbuild [iso-8859-1] Sat Apr 10
17:00:03 2010
@@ -12,17 +12,25 @@
<define name="_X86BIOS_" />
<library>hal_generic</library>
<library>hal_generic_acpi</library>
- <library>hal_generic_mp</library>
<library>ntoskrnl</library>
<library>x86emu</library>
- <directory name="mp">
+ <directory name="generic">
+ <file>spinlock.c</file>
+ </directory>
+
+ <directory name="up">
+ <file>processor.c</file>
+ </directory>
+
+ <!-- directory name="mp">
<file>halinit_mp.c</file>
+ <file>processor_mp.c</file>
<file>halmp.rc</file>
<directory name="amd64">
- <file>mps.S</file>
+ <!-- file>mps.S</file -->
</directory>
- </directory>
+ </directory -->
</module>
</group>