Author: tkreuzer
Date: Fri Sep 2 14:45:19 2011
New Revision: 53529
URL:
http://svn.reactos.org/svn/reactos?rev=53529&view=rev
Log:
[HAL]
- Flatten the directory structure
- use static libraries in cmake builds as well to save build time
Added:
trunk/reactos/hal/halx86/acpi/
- copied from r53510, trunk/reactos/hal/halx86/generic/acpi/
trunk/reactos/hal/halx86/generic/portio.c
- copied unchanged from r53510, trunk/reactos/hal/halx86/generic/i386/portio.c
trunk/reactos/hal/halx86/generic/systimer.S
- copied unchanged from r53510, trunk/reactos/hal/halx86/generic/i386/systimer.S
trunk/reactos/hal/halx86/generic/trap.S
- copied unchanged from r53510, trunk/reactos/hal/halx86/generic/i386/trap.S
trunk/reactos/hal/halx86/legacy/
- copied from r53510, trunk/reactos/hal/halx86/generic/legacy/
trunk/reactos/hal/halx86/mp/mps.S
- copied unchanged from r53510, trunk/reactos/hal/halx86/mp/i386/mps.S
trunk/reactos/hal/halx86/mp/mpsboot.asm
- copied unchanged from r53510, trunk/reactos/hal/halx86/mp/i386/mpsboot.asm
trunk/reactos/hal/halx86/mp/mpsirql.c
- copied unchanged from r53510, trunk/reactos/hal/halx86/mp/i386/mpsirql.c
Removed:
trunk/reactos/hal/halx86/generic/acpi/
trunk/reactos/hal/halx86/generic/i386/
trunk/reactos/hal/halx86/generic/legacy/
trunk/reactos/hal/halx86/mp/i386/
Modified:
trunk/reactos/hal/halx86/CMakeLists.txt
trunk/reactos/hal/halx86/amd64/halinit.c
trunk/reactos/hal/halx86/generic/halinit.c
trunk/reactos/hal/halx86/hal_generic.rbuild
trunk/reactos/hal/halx86/hal_generic_acpi.rbuild
trunk/reactos/hal/halx86/hal_generic_pcat.rbuild
trunk/reactos/hal/halx86/hal_mini.rbuild
trunk/reactos/hal/halx86/legacy/halpnpdd.c
trunk/reactos/hal/halx86/up/halinit_up.c
Modified: trunk/reactos/hal/halx86/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/CMakeLists.txt?…
==============================================================================
--- trunk/reactos/hal/halx86/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/CMakeLists.txt [iso-8859-1] Fri Sep 2 14:45:19 2011
@@ -23,48 +23,54 @@
if(ARCH MATCHES i386)
list(APPEND HAL_GENERIC_SOURCE
generic/bios.c
- generic/halinit.c
generic/timer.c
- generic/i386/portio.c
- generic/i386/systimer.S
- generic/i386/trap.S)
+ generic/portio.c
+ generic/systimer.S
+ generic/trap.S)
endif()
-list(APPEND HAL_GENERIC_PCAT_SOURCE
- generic/legacy/bus/bushndlr.c
- generic/legacy/bus/cmosbus.c
- generic/legacy/bus/isabus.c
- generic/legacy/bus/pcibus.c
- generic/legacy/bus/pcidata.c
- generic/legacy/bus/sysbus.c
- generic/legacy/bussupp.c
- generic/legacy/halpnpdd.c
- generic/legacy/halpcat.c)
+add_library(lib_hal_generic ${HAL_GENERIC_SOURCE})
+add_pch(lib_hal_generic include/hal.h)
-list(APPEND HAL_GENERIC_ACPI_SOURCE
- generic/acpi/halacpi.c
- generic/acpi/halpnpdd.c
- generic/acpi/busemul.c
- generic/legacy/bus/pcibus.c)
+list(APPEND HAL_LEGACY_SOURCE
+ legacy/bus/bushndlr.c
+ legacy/bus/cmosbus.c
+ legacy/bus/isabus.c
+ legacy/bus/pcibus.c
+ legacy/bus/pcidata.c
+ legacy/bus/sysbus.c
+ legacy/bussupp.c
+ legacy/halpnpdd.c
+ legacy/halpcat.c)
+
+add_library(lib_hal_legacy ${HAL_LEGACY_SOURCE})
+add_pch(lib_hal_legacy include/hal.h)
+target_link_libraries(lib_hal_legacy lib_hal_generic)
+
+list(APPEND HAL_ACPI_SOURCE
+ acpi/halacpi.c
+ acpi/halpnpdd.c
+ acpi/busemul.c
+ legacy/bus/pcibus.c)
+
+add_library(lib_hal_acpi ${HAL_ACPI_SOURCE})
+add_pch(lib_hal_acpi include/hal.h)
+target_link_libraries(lib_hal_acpi lib_hal_generic)
if(ARCH MATCHES i386)
- list(APPEND HAL_GENERIC_ACPI_SOURCE
- generic/halinit.c)
-
- list(APPEND HAL_GENERIC_UP_SOURCE
- generic/spinlock.c
+ list(APPEND HAL_UP_SOURCE
up/pic.c
up/processor.c)
list(APPEND MINI_HAL_SOURCE
- generic/i386/portio.c
- generic/i386/systimer.S
- generic/legacy/bus/bushndlr.c
- generic/legacy/bus/cmosbus.c
- generic/legacy/bus/isabus.c
- generic/legacy/bus/pcibus.c
- generic/legacy/bus/sysbus.c
- generic/legacy/bussupp.c
+ generic/portio.c
+ generic/systimer.S
+ legacy/bus/bushndlr.c
+ legacy/bus/cmosbus.c
+ legacy/bus/isabus.c
+ legacy/bus/pcibus.c
+ legacy/bus/sysbus.c
+ legacy/bussupp.c
generic/beep.c
generic/bios.c
generic/cmos.c
@@ -84,42 +90,38 @@
spec2def(hal.dll ../hal.spec)
- list(APPEND HAL_SOURCE
- ${HAL_GENERIC_SOURCE}
- ${HAL_GENERIC_PCAT_SOURCE}
- ${HAL_GENERIC_UP_SOURCE}
+ # hal
+ add_library(hal SHARED
+ ${HAL_UP_SOURCE}
up/halinit_up.c
up/halup.rc
+ generic/spinlock.c
+ generic/halinit.c
${CMAKE_CURRENT_BINARY_DIR}/hal.def)
-
- # hal
- add_library(hal SHARED ${HAL_SOURCE})
+ target_link_libraries(hal lib_hal_generic lib_hal_legacy libcntpr)
+ add_importlibs(hal ntoskrnl)
add_pch(hal include/hal.h)
add_dependencies(hal psdk bugcodes)
-
set_entrypoint(hal HalInitSystem 8)
set_subsystem(hal native)
set_image_base(hal 0x00010000)
- add_importlibs(hal ntoskrnl)
- target_link_libraries(hal libcntpr)
-
add_cd_file(TARGET hal DESTINATION reactos/system32 NO_CAB FOR all)
# hal acpi
spec2def(halacpi.dll ../hal.spec halacpi)
add_library(halacpi SHARED
- ${HAL_GENERIC_SOURCE}
- ${HAL_GENERIC_ACPI_SOURCE}
- ${HAL_GENERIC_UP_SOURCE}
+ ${HAL_UP_SOURCE}
up/halinit_up.c
up/halup.rc
+ generic/spinlock.c
+ generic/halinit.c
${CMAKE_CURRENT_BINARY_DIR}/halacpi.def)
+ target_link_libraries(halacpi lib_hal_generic lib_hal_acpi libcntpr)
+ add_importlibs(halacpi ntoskrnl)
add_dependencies(halacpi psdk bugcodes)
set_entrypoint(halacpi HalInitSystem@8)
set_subsystem(halacpi native)
set_image_base(halacpi 0x00010000)
- add_importlibs(halacpi ntoskrnl)
- target_link_libraries(halacpi libcntpr)
set_property(TARGET halacpi PROPERTY COMPILE_DEFINITIONS CONFIG_ACPI)
add_cd_file(TARGET halacpi DESTINATION reactos/system32 NO_CAB FOR all)
@@ -134,11 +136,10 @@
list(APPEND HAL_SOURCE
${HAL_GENERIC_SOURCE}
- ${HAL_GENERIC_PCAT_SOURCE}
- ${HAL_GENERIC_UP_SOURCE}
- up/halinit_up.c
- up/halup.rc
+ ${HAL_ACPI_SOURCE}
+ ${HAL_UP_SOURCE}
generic/spinlock.c
+ generic/halinit.c
amd64/x86bios.c
amd64/halinit.c
amd64/stubs.c
Modified: trunk/reactos/hal/halx86/amd64/halinit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/amd64/halinit.c…
==============================================================================
--- trunk/reactos/hal/halx86/amd64/halinit.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/amd64/halinit.c [iso-8859-1] Fri Sep 2 14:45:19 2011
@@ -3,7 +3,7 @@
* LICENSE: GPL - See COPYING in the top level directory
* FILE: hal/halx86/amd64/halinit.c
* PURPOSE: HAL Entrypoint and Initialization
- * PROGRAMMERS:
+ * PROGRAMMERS:
*/
/* INCLUDES ******************************************************************/
@@ -20,14 +20,30 @@
/* FUNCTIONS *****************************************************************/
-/*
- * @implemented
- */
-BOOLEAN
-NTAPI
-HalInitSystem(IN ULONG BootPhase,
- IN PLOADER_PARAMETER_BLOCK LoaderBlock)
+VOID
+HalpInitPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
- UNIMPLEMENTED;
- return FALSE;
+
}
+
+VOID
+HalpInitPhase1(VOID)
+{
+
+}
+
+VOID
+INIT_FUNCTION
+HalpInitializeClock(VOID)
+{
+}
+
+VOID
+HalpCalibrateStallExecution()
+{
+}
+
+VOID
+HalpInitializePICs(IN BOOLEAN EnableInterrupts)
+{
+}
Modified: trunk/reactos/hal/halx86/generic/halinit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/halinit…
==============================================================================
--- trunk/reactos/hal/halx86/generic/halinit.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/generic/halinit.c [iso-8859-1] Fri Sep 2 14:45:19 2011
@@ -53,7 +53,7 @@
PKPRCB Prcb = KeGetCurrentPrcb();
/* Check the boot phase */
- if (!BootPhase)
+ if (BootPhase == 0)
{
/* Phase 0... save bus type */
HalpBusType = LoaderBlock->u.I386.MachineType & 0xFF;
@@ -159,27 +159,6 @@
/* Initialize bus handlers */
HalpInitBusHandlers();
-#ifndef _MINIHAL_
- /* Enable IRQ 0 */
- HalpEnableInterruptHandler(IDT_DEVICE,
- 0,
- PRIMARY_VECTOR_BASE,
- CLOCK2_LEVEL,
- HalpClockInterrupt,
- Latched);
-
- /* Enable IRQ 8 */
- HalpEnableInterruptHandler(IDT_DEVICE,
- 0,
- PRIMARY_VECTOR_BASE + 8,
- PROFILE_LEVEL,
- HalpProfileInterrupt,
- Latched);
-
- /* Initialize DMA. NT does this in Phase 0 */
- HalpInitDma();
-#endif
-
/* Do some HAL-specific initialization */
HalpInitPhase1();
}
Modified: trunk/reactos/hal/halx86/hal_generic.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/hal_generic.rbu…
==============================================================================
--- trunk/reactos/hal/halx86/hal_generic.rbuild [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/hal_generic.rbuild [iso-8859-1] Fri Sep 2 14:45:19 2011
@@ -21,11 +21,9 @@
<file>usage.c</file>
<if property="ARCH" value="i386">
<file>bios.c</file>
- <directory name="i386">
- <file>portio.c</file>
- <file>systimer.S</file>
- <file>trap.S</file>
- </directory>
+ <file>portio.c</file>
+ <file>systimer.S</file>
+ <file>trap.S</file>
</if>
</directory>
<directory name="include">
Modified: trunk/reactos/hal/halx86/hal_generic_acpi.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/hal_generic_acp…
==============================================================================
--- trunk/reactos/hal/halx86/hal_generic_acpi.rbuild [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/hal_generic_acpi.rbuild [iso-8859-1] Fri Sep 2 14:45:19
2011
@@ -7,17 +7,17 @@
<define name="_NTHALDLL_" />
<define name="_NTHAL_" />
<define name="CONFIG_ACPI" />
+ <directory name="acpi">
+ <file>halacpi.c</file>
+ <file>halpnpdd.c</file>
+ <file>busemul.c</file>
+ </directory>
+ <directory name="legacy">
+ <directory name="bus">
+ <file>pcibus.c</file>
+ </directory>
+ </directory>
<directory name="generic">
- <directory name="acpi">
- <file>halacpi.c</file>
- <file>halpnpdd.c</file>
- <file>busemul.c</file>
- </directory>
- <directory name="legacy">
- <directory name="bus">
- <file>pcibus.c</file>
- </directory>
- </directory>
<if property="ARCH" value="i386">
<file>halinit.c</file>
</if>
Modified: trunk/reactos/hal/halx86/hal_generic_pcat.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/hal_generic_pca…
==============================================================================
--- trunk/reactos/hal/halx86/hal_generic_pcat.rbuild [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/hal_generic_pcat.rbuild [iso-8859-1] Fri Sep 2 14:45:19
2011
@@ -6,20 +6,20 @@
<include base="ntoskrnl">include</include>
<define name="_NTHALDLL_" />
<define name="_NTHAL_" />
+ <directory name="legacy">
+ <directory name="bus">
+ <file>bushndlr.c</file>
+ <file>cmosbus.c</file>
+ <file>isabus.c</file>
+ <file>pcibus.c</file>
+ <file>pcidata.c</file>
+ <file>sysbus.c</file>
+ </directory>
+ <file>bussupp.c</file>
+ <file>halpcat.c</file>
+ <file>halpnpdd.c</file>
+ </directory>
<directory name="generic">
- <directory name="legacy">
- <directory name="bus">
- <file>bushndlr.c</file>
- <file>cmosbus.c</file>
- <file>isabus.c</file>
- <file>pcibus.c</file>
- <file>pcidata.c</file>
- <file>sysbus.c</file>
- </directory>
- <file>bussupp.c</file>
- <file>halpcat.c</file>
- <file>halpnpdd.c</file>
- </directory>
<if property="ARCH" value="i386">
<file>halinit.c</file>
</if>
Modified: trunk/reactos/hal/halx86/hal_mini.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/hal_mini.rbuild…
==============================================================================
--- trunk/reactos/hal/halx86/hal_mini.rbuild [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/hal_mini.rbuild [iso-8859-1] Fri Sep 2 14:45:19 2011
@@ -9,16 +9,6 @@
<define name="_BLDR_" />
<define name="_MINIHAL_" />
<directory name="generic">
- <directory name="legacy">
- <directory name="bus">
- <file>bushndlr.c</file>
- <file>cmosbus.c</file>
- <file>isabus.c</file>
- <file>pcibus.c</file>
- <file>sysbus.c</file>
- </directory>
- <file>bussupp.c</file>
- </directory>
<file>beep.c</file>
<file>bios.c</file>
<file>cmos.c</file>
@@ -32,10 +22,18 @@
<file>sysinfo.c</file>
<file>timer.c</file>
<file>usage.c</file>
- <directory name="i386">
- <file>portio.c</file>
- <file>systimer.S</file>
+ <file>portio.c</file>
+ <file>systimer.S</file>
+ </directory>
+ <directory name="legacy">
+ <directory name="bus">
+ <file>bushndlr.c</file>
+ <file>cmosbus.c</file>
+ <file>isabus.c</file>
+ <file>pcibus.c</file>
+ <file>sysbus.c</file>
</directory>
+ <file>bussupp.c</file>
</directory>
<directory name="up">
<file>halinit_up.c</file>
Modified: trunk/reactos/hal/halx86/legacy/halpnpdd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/legacy/halpnpdd…
==============================================================================
--- trunk/reactos/hal/halx86/legacy/halpnpdd.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/legacy/halpnpdd.c [iso-8859-1] Fri Sep 2 14:45:19 2011
@@ -750,7 +750,7 @@
break;
case IRP_MN_QUERY_CAPABILITIES:
-
+
/* Call the worker */
DPRINT("Querying the capabilities for the PDO\n");
Status = HalpQueryCapabilities(DeviceObject,
@@ -773,7 +773,7 @@
break;
case IRP_MN_QUERY_ID:
-
+
/* Call the worker */
DPRINT("Query the ID for the PDO\n");
Status = HalpQueryIdPdo(DeviceObject,
@@ -782,7 +782,7 @@
break;
default:
-
+
/* We don't handle anything else, so inherit the old state */
DPRINT("Illegal IRP: %lx\n", Minor);
Status = Irp->IoStatus.Status;
@@ -807,7 +807,7 @@
{
DPRINT1("HAL: PnP Driver WMI!\n");
while (TRUE);
- return STATUS_SUCCESS;
+ return STATUS_SUCCESS;
}
NTSTATUS
@@ -816,7 +816,7 @@
IN PIRP Irp)
{
DPRINT1("HAL: PnP Driver Power!\n");
- return STATUS_SUCCESS;
+ return STATUS_SUCCESS;
}
NTSTATUS
Modified: trunk/reactos/hal/halx86/up/halinit_up.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/up/halinit_up.c…
==============================================================================
--- trunk/reactos/hal/halx86/up/halinit_up.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/up/halinit_up.c [iso-8859-1] Fri Sep 2 14:45:19 2011
@@ -26,7 +26,26 @@
VOID
HalpInitPhase1(VOID)
{
+#ifndef _MINIHAL_
+ /* Enable IRQ 0 */
+ HalpEnableInterruptHandler(IDT_DEVICE,
+ 0,
+ PRIMARY_VECTOR_BASE,
+ CLOCK2_LEVEL,
+ HalpClockInterrupt,
+ Latched);
+ /* Enable IRQ 8 */
+ HalpEnableInterruptHandler(IDT_DEVICE,
+ 0,
+ PRIMARY_VECTOR_BASE + 8,
+ PROFILE_LEVEL,
+ HalpProfileInterrupt,
+ Latched);
+
+ /* Initialize DMA. NT does this in Phase 0 */
+ HalpInitDma();
+#endif
}
/* EOF */