- Flatten the directory structure
- use static libraries in cmake builds as well to save build time

svn path=/trunk/; revision=53529
This commit is contained in:
Timo Kreuzer 2011-09-02 14:45:19 +00:00
parent fec2ae66a2
commit d9dd611750
29 changed files with 141 additions and 130 deletions

View file

@ -23,48 +23,54 @@ list(APPEND HAL_GENERIC_SOURCE
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 @@ if(ARCH MATCHES i386)
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 @@ elseif(ARCH MATCHES amd64)
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

View file

@ -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 @@ BOOLEAN HalpPciLockSettings;
/* FUNCTIONS *****************************************************************/
/*
* @implemented
*/
BOOLEAN
NTAPI
HalInitSystem(IN ULONG BootPhase,
IN PLOADER_PARAMETER_BLOCK LoaderBlock)
VOID
HalpInitPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
}
VOID
HalpInitPhase1(VOID)
{
}
VOID
INIT_FUNCTION
HalpInitializeClock(VOID)
{
}
VOID
HalpCalibrateStallExecution()
{
}
VOID
HalpInitializePICs(IN BOOLEAN EnableInterrupts)
{
UNIMPLEMENTED;
return FALSE;
}

View file

@ -53,7 +53,7 @@ HalInitSystem(IN ULONG BootPhase,
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 @@ HalInitSystem(IN ULONG BootPhase,
/* 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();
}

View file

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

View file

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

View file

@ -6,20 +6,20 @@
<include base="ntoskrnl">include</include>
<define name="_NTHALDLL_" />
<define name="_NTHAL_" />
<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 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">
<if property="ARCH" value="i386">
<file>halinit.c</file>
</if>

View file

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

View file

@ -750,7 +750,7 @@ HalpDispatchPnp(IN PDEVICE_OBJECT DeviceObject,
break;
case IRP_MN_QUERY_CAPABILITIES:
/* Call the worker */
DPRINT("Querying the capabilities for the PDO\n");
Status = HalpQueryCapabilities(DeviceObject,
@ -773,7 +773,7 @@ HalpDispatchPnp(IN PDEVICE_OBJECT DeviceObject,
break;
case IRP_MN_QUERY_ID:
/* Call the worker */
DPRINT("Query the ID for the PDO\n");
Status = HalpQueryIdPdo(DeviceObject,
@ -782,7 +782,7 @@ HalpDispatchPnp(IN PDEVICE_OBJECT DeviceObject,
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 @@ HalpDispatchWmi(IN PDEVICE_OBJECT DeviceObject,
{
DPRINT1("HAL: PnP Driver WMI!\n");
while (TRUE);
return STATUS_SUCCESS;
return STATUS_SUCCESS;
}
NTSTATUS
@ -816,7 +816,7 @@ HalpDispatchPower(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
DPRINT1("HAL: PnP Driver Power!\n");
return STATUS_SUCCESS;
return STATUS_SUCCESS;
}
NTSTATUS

View file

@ -26,7 +26,26 @@ HalpInitPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
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 */