[CMAKE]
authorAmine Khaldi <amine.khaldi@reactos.org>
Sun, 29 Aug 2010 17:30:24 +0000 (17:30 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sun, 29 Aug 2010 17:30:24 +0000 (17:30 +0000)
- Add hal (yes, hal) to build.

svn path=/branches/cmake-bringup/; revision=48645

CMakeLists.txt
hal/CMakeLists.txt [new file with mode: 0644]
hal/halx86/hal_i386.def [new file with mode: 0644]
ntoskrnl/libntoskrnl.a [new file with mode: 0644]

index db1b71e..afbbf15 100644 (file)
@@ -89,6 +89,7 @@ add_subdirectory(include/reactos/mc)
 
 add_subdirectory(base)
 add_subdirectory(dll)
 
 add_subdirectory(base)
 add_subdirectory(dll)
+add_subdirectory(hal)
 add_subdirectory(lib)
 
 # nci generated intermediate files
 add_subdirectory(lib)
 
 # nci generated intermediate files
diff --git a/hal/CMakeLists.txt b/hal/CMakeLists.txt
new file mode 100644 (file)
index 0000000..80110b9
--- /dev/null
@@ -0,0 +1,72 @@
+
+if(ARCH MATCHES i386)
+
+add_definitions(-D_NTHALDLL_)
+add_definitions(-D_NTHAL_)
+
+include_directories(halx86/include)
+include_directories(${REACTOS_SOURCE_DIR}/ntoskrnl/include)
+
+list(APPEND HAL_GENERIC_SOURCE
+    halx86/generic/beep.c
+    halx86/generic/cmos.c
+    halx86/generic/display.c
+    halx86/generic/dma.c
+    halx86/generic/drive.c
+    halx86/generic/memory.c
+    halx86/generic/misc.c
+    halx86/generic/profil.c
+    halx86/generic/reboot.c
+    halx86/generic/sysinfo.c
+    halx86/generic/timer.c
+    halx86/generic/usage.c)
+
+list(APPEND HAL_GENERIC_SOURCE
+    halx86/generic/bios.c
+    halx86/generic/halinit.c
+    halx86/generic/i386/portio.c
+    halx86/generic/i386/systimer.S
+    halx86/generic/i386/trap.S)
+
+add_library(hal_generic ${HAL_GENERIC_SOURCE} ${CMAKE_CURRENT_BINARY_DIR}/hal_generic_hal.h.gch)
+add_pch(hal_generic ${CMAKE_CURRENT_SOURCE_DIR}/halx86/include/hal.h ${HAL_GENERIC_SOURCE})
+add_dependencies(hal_generic psdk bugcodes)
+
+list(APPEND HAL_GENERIC_PCAT_SOURCE
+    halx86/generic/legacy/bus/bushndlr.c
+    halx86/generic/legacy/bus/cmosbus.c
+    halx86/generic/legacy/bus/isabus.c
+    halx86/generic/legacy/bus/pcibus.c
+    halx86/generic/legacy/bus/pcidata.c
+    halx86/generic/legacy/bus/sysbus.c
+    halx86/generic/legacy/bussupp.c
+    halx86/generic/legacy/halpcat.c)
+
+add_library(hal_generic_pcat ${HAL_GENERIC_PCAT_SOURCE})
+add_dependencies(hal_generic_pcat psdk)
+
+list(APPEND HAL_GENERIC_UP_SOURCE
+    halx86/generic/spinlock.c
+    halx86/up/pic.c
+    halx86/up/processor.c)
+
+add_library(hal_generic_up ${HAL_GENERIC_UP_SOURCE})
+add_dependencies(hal_generic_up psdk)
+
+set(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
+
+add_library(hal SHARED halx86/up/halinit_up.c halx86/up/halup.rc)
+
+set_target_properties(hal PROPERTIES LINK_FLAGS "-Wl,-entry,_HalInitSystem@8")
+
+target_link_libraries(hal
+    ${CMAKE_CURRENT_SOURCE_DIR}/halx86/hal_i386.def
+    -Wl,--whole-archive hal_generic -Wl,--no-whole-archive
+    hal_generic_pcat
+    hal_generic_up
+    ${REACTOS_SOURCE_DIR}/ntoskrnl/libntoskrnl.a
+    libcntpr)
+
+else()
+#TBD
+endif(ARCH MATCHES i386)
\ No newline at end of file
diff --git a/hal/halx86/hal_i386.def b/hal/halx86/hal_i386.def
new file mode 100644 (file)
index 0000000..557eb42
--- /dev/null
@@ -0,0 +1,97 @@
+
+LIBRARY hal.dll
+
+EXPORTS
+  @ExAcquireFastMutex@4=ntoskrnl.ExiAcquireFastMutex @1
+  @ExReleaseFastMutex@4=ntoskrnl.ExiReleaseFastMutex @2
+  @ExTryToAcquireFastMutex@4=ntoskrnl.ExiTryToAcquireFastMutex @3
+  @HalClearSoftwareInterrupt@4 @4
+  @HalRequestSoftwareInterrupt@4 @5
+  @HalSystemVectorDispatchEntry@12 @6
+  @KeAcquireInStackQueuedSpinLock@8 @7
+  @KeAcquireInStackQueuedSpinLockRaiseToSynch@8 @8
+  @KeAcquireSpinLockRaiseToSynch@4 @9
+  @KeAcquireQueuedSpinLock@4 @10
+  @KeAcquireQueuedSpinLockRaiseToSynch@4 @11
+  @KeReleaseInStackQueuedSpinLock@4 @12
+  @KeReleaseQueuedSpinLock@8 @13
+  @KeTryToAcquireQueuedSpinLock@8 @14
+  @KeTryToAcquireQueuedSpinLockRaiseToSynch@8 @15
+  @KfAcquireSpinLock@4 @16
+  @KfLowerIrql@4 @17
+  @KfRaiseIrql@4 @18
+  @KfReleaseSpinLock@8 @19
+  HalAcquireDisplayOwnership@4 @20
+  HalAdjustResourceList@4 @21
+  HalAllProcessorsStarted@0 @22
+  HalAllocateAdapterChannel@16 @23
+  HalAllocateCommonBuffer@16 @24
+  HalAllocateCrashDumpRegisters@8 @25
+  HalAssignSlotResources@32 @26
+  HalBeginSystemInterrupt@12 @27
+  HalCalibratePerformanceCounter@12 @28
+  HalDisableSystemInterrupt@8 @29
+  HalDisplayString@4 @30
+  HalEnableSystemInterrupt@12 @31
+  HalEndSystemInterrupt@8 @32
+  HalFlushCommonBuffer@20 @33
+  HalFreeCommonBuffer@24 @34
+  HalGetAdapter@8 @35
+  HalGetBusData@20 @36
+  HalGetBusDataByOffset@24 @37
+  HalGetEnvironmentVariable@12 @38
+  HalGetInterruptVector@24 @39
+  HalHandleNMI@4 @40
+  HalInitSystem@8 @41
+  HalInitializeProcessor@8 @42
+  HalMakeBeep@4 @43
+  HalProcessorIdle@0 @44
+  HalPutDmaAdapter@4 @45
+  HalQueryDisplayParameters@16 @46
+  HalQueryRealTimeClock@4 @47
+  HalReadDmaCounter@4 @48
+  HalReportResourceUsage@0 @49
+  HalRequestIpi@4 @50
+  HalReturnToFirmware@4 @51
+  HalSetBusData@20 @52
+  HalSetBusDataByOffset@24 @53
+  HalSetDisplayParameters@8 @54
+  HalSetEnvironmentVariable@8 @55
+  HalSetProfileInterval@4 @56
+  HalSetRealTimeClock@4 @57
+  HalSetTimeIncrement@4 @58
+  HalStartNextProcessor@8 @59
+  HalStartProfileInterrupt@4 @60
+  HalStopProfileInterrupt@4 @61
+  HalTranslateBusAddress@24 @62
+  IoFlushAdapterBuffers@24 @63
+  IoFreeAdapterChannel@4 @64
+  IoFreeMapRegisters@12 @65
+  IoMapTransfer@24 @66
+  IoAssignDriveLetters@16=HalpAssignDriveLetters@16 @67
+  IoReadPartitionTable@16=HalpReadPartitionTable@16 @68
+  IoSetPartitionInformation@16=HalpSetPartitionInformation@16 @69
+  IoWritePartitionTable@20=HalpWritePartitionTable@20 @70
+  KeAcquireSpinLock@8 @71
+  KdComPortInUse @72 DATA
+  KeFlushWriteBuffer@0 @73
+  KeGetCurrentIrql@0 @74
+  KeLowerIrql@4 @75
+  KeQueryPerformanceCounter@4 @76
+  KeRaiseIrql@8 @77
+  KeRaiseIrqlToDpcLevel@0 @78
+  KeRaiseIrqlToSynchLevel@0 @79
+  KeReleaseSpinLock@8 @80
+  KeStallExecutionProcessor@4 @81
+  READ_PORT_BUFFER_UCHAR@12 @82
+  READ_PORT_BUFFER_ULONG@12 @83
+  READ_PORT_BUFFER_USHORT@12 @84
+  READ_PORT_UCHAR@4 @85
+  READ_PORT_ULONG@4 @86
+  READ_PORT_USHORT@4 @87
+  WRITE_PORT_BUFFER_UCHAR@12 @88
+  WRITE_PORT_BUFFER_ULONG@12 @89
+  WRITE_PORT_BUFFER_USHORT@12 @90
+  WRITE_PORT_UCHAR@8 @91
+  WRITE_PORT_ULONG@8 @92
+  WRITE_PORT_USHORT@8 @93
diff --git a/ntoskrnl/libntoskrnl.a b/ntoskrnl/libntoskrnl.a
new file mode 100644 (file)
index 0000000..c91c390
Binary files /dev/null and b/ntoskrnl/libntoskrnl.a differ