Author: tkreuzer
Date: Wed Sep 7 12:00:29 2011
New Revision: 53616
URL:
http://svn.reactos.org/svn/reactos?rev=53616&view=rev
Log:
[HAL]
- move v86 code out of trap.S into v86.S (APIC uses a different trap entry file), compile
it directly in the dll instead of a lib to be able to silence linker warnings
- Group files in HAL_PIC_SOURCE and HAL_APIC_SOURCE, you just need to replace PIC with
APIC to build the hal with APIC support (we can later use it to build the other hals:
halapic, halaacpi, halmacpi, halmps)
- use apic on amd64 builds
- give halacpi its own resource file
- silence MSVC linker warnings
Added:
trunk/reactos/hal/halx86/acpi/halacpi.rc (with props)
trunk/reactos/hal/halx86/generic/v86.S (with props)
Modified:
trunk/reactos/hal/halx86/CMakeLists.txt
trunk/reactos/hal/halx86/generic/trap.S
trunk/reactos/hal/halx86/hal_generic.rbuild
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] Wed Sep 7 12:00:29 2011
@@ -15,7 +15,6 @@
generic/drive.c
generic/memory.c
generic/misc.c
- generic/profil.c
generic/reboot.c
generic/sysinfo.c
generic/usage.c)
@@ -23,10 +22,7 @@
if(ARCH MATCHES i386)
list(APPEND HAL_GENERIC_SOURCE
generic/bios.c
- generic/timer.c
- generic/portio.c
- generic/systimer.S
- generic/trap.S)
+ generic/portio.c)
endif()
add_library(lib_hal_generic ${HAL_GENERIC_SOURCE})
@@ -58,11 +54,28 @@
#add_pch(lib_hal_acpi include/hal.h)
target_link_libraries(lib_hal_acpi lib_hal_generic)
+list(APPEND HAL_UP_SOURCE
+ generic/spinlock.c
+ generic/halinit.c
+ up/halinit_up.c
+ up/processor.c)
+
+list(APPEND HAL_PIC_SOURCE
+ generic/profil.c
+ generic/timer.c
+ generic/systimer.S
+ generic/trap.S
+ up/pic.c)
+
+list(APPEND HAL_APIC_SOURCE
+ apic/apic.c
+ apic/apictimer.c
+ apic/apictrap.S
+ apic/rtctimer.c
+ apic/tsc.c
+ apic/tsccal.S)
+
if(ARCH MATCHES i386)
- list(APPEND HAL_UP_SOURCE
- up/pic.c
- up/processor.c)
-
list(APPEND MINI_HAL_SOURCE
generic/portio.c
generic/systimer.S
@@ -94,10 +107,9 @@
# hal
add_library(hal SHARED
${HAL_UP_SOURCE}
- up/halinit_up.c
+ ${HAL_PIC_SOURCE}
+ generic/v86.S
up/halup.rc
- generic/spinlock.c
- generic/halinit.c
${CMAKE_CURRENT_BINARY_DIR}/hal.def)
target_link_libraries(hal lib_hal_generic lib_hal_legacy libcntpr)
add_importlibs(hal ntoskrnl)
@@ -107,15 +119,17 @@
set_subsystem(hal native)
set_image_base(hal 0x00010000)
add_cd_file(TARGET hal DESTINATION reactos/system32 NO_CAB FOR all)
+ if(MSVC)
+ add_target_link_flags(hal "/ignore:4216 /ignore:4078")
+ endif()
# hal acpi
spec2def(halacpi.dll ../hal.spec halacpi)
add_library(halacpi SHARED
${HAL_UP_SOURCE}
- up/halinit_up.c
- up/halup.rc
- generic/spinlock.c
- generic/halinit.c
+ ${HAL_PIC_SOURCE}
+ generic/v86.S
+ acpi/halacpi.rc
${CMAKE_CURRENT_BINARY_DIR}/halacpi.def)
target_link_libraries(halacpi lib_hal_generic lib_hal_acpi libcntpr)
add_importlibs(halacpi ntoskrnl)
@@ -125,6 +139,9 @@
set_image_base(halacpi 0x00010000)
set_property(TARGET halacpi PROPERTY COMPILE_DEFINITIONS CONFIG_ACPI)
add_cd_file(TARGET halacpi DESTINATION reactos/system32 NO_CAB FOR all)
+ if(MSVC)
+ add_target_link_flags(halacpi "/ignore:4216 /ignore:4078")
+ endif()
# mini_hal
add_library(mini_hal ${MINI_HAL_SOURCE})
@@ -138,13 +155,11 @@
list(APPEND HAL_SOURCE
${HAL_GENERIC_SOURCE}
${HAL_ACPI_SOURCE}
- ${HAL_UP_SOURCE}
+ ${HAL_APIC_SOURCE}
generic/spinlock.c
generic/halinit.c
amd64/x86bios.c
amd64/halinit.c
- amd64/stubs.c
- amd64/systimer.S
amd64/processor.c
${CMAKE_CURRENT_BINARY_DIR}/hal.def)
@@ -158,6 +173,9 @@
set_image_base(hal 0x00010000)
add_importlibs(hal ntoskrnl)
target_link_libraries(hal libcntpr)
+ if(MSVC)
+ add_target_link_flags(hal "/ignore:4216")
+ endif()
add_cd_file(TARGET hal DESTINATION reactos/system32 NO_CAB FOR all)
Added: trunk/reactos/hal/halx86/acpi/halacpi.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/acpi/halacpi.rc…
==============================================================================
--- trunk/reactos/hal/halx86/acpi/halacpi.rc (added)
+++ trunk/reactos/hal/halx86/acpi/halacpi.rc [iso-8859-1] Wed Sep 7 12:00:29 2011
@@ -1,0 +1,5 @@
+#define REACTOS_VERSION_DLL
+#define REACTOS_STR_FILE_DESCRIPTION "X86 Uniprocessor Hardware Abstraction
Layer\0"
+#define REACTOS_STR_INTERNAL_NAME "halacpi\0"
+#define REACTOS_STR_ORIGINAL_FILENAME "halacpi.dll\0"
+#include <reactos/version.rc>
Propchange: trunk/reactos/hal/halx86/acpi/halacpi.rc
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/hal/halx86/generic/trap.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/trap.S?…
==============================================================================
--- trunk/reactos/hal/halx86/generic/trap.S [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/generic/trap.S [iso-8859-1] Wed Sep 7 12:00:29 2011
@@ -20,28 +20,4 @@
TRAP_ENTRY HalpClockInterrupt, KI_PUSH_FAKE_ERROR_CODE
TRAP_ENTRY HalpProfileInterrupt, KI_PUSH_FAKE_ERROR_CODE
-PUBLIC @HalpExitToV86@4
-@HalpExitToV86@4:
- /* Point esp to the iret frame and return */
- lea esp, [ecx + KTRAP_FRAME_EIP]
- iretd
-
-/* Here starts the real mode code */
-.code16
-PUBLIC _HalpRealModeStart
-_HalpRealModeStart:
- /* INT 0x10: AH = 0 (Set video Mode), AL = 0x12 (Mode 12) */
- mov eax, HEX(12)
- int HEX(10)
-
- /* BOP */
- .byte HEX(C4), HEX(C4)
-
-/* The real mode stack */
-.align 4
-.space 2048
-_HalpRealModeEnd:
-PUBLIC _HalpRealModeEnd
-.endcode16
-
END
Added: trunk/reactos/hal/halx86/generic/v86.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/v86.S?r…
==============================================================================
--- trunk/reactos/hal/halx86/generic/v86.S (added)
+++ trunk/reactos/hal/halx86/generic/v86.S [iso-8859-1] Wed Sep 7 12:00:29 2011
@@ -1,0 +1,41 @@
+/*
+ * FILE: hal/halx86/generic/v86.S
+ * COPYRIGHT: See COPYING in the top level directory
+ * PURPOSE: System Traps, Entrypoints and Exitpoints
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org)
+ * NOTE: See asmmacro.S for the shared entry/exit code.
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <asm.inc>
+
+#include <ks386.inc>
+
+.code
+
+PUBLIC @HalpExitToV86@4
+@HalpExitToV86@4:
+ /* Point esp to the iret frame and return */
+ lea esp, [ecx + KTRAP_FRAME_EIP]
+ iretd
+
+/* Here starts the real mode code */
+.code16
+PUBLIC _HalpRealModeStart
+_HalpRealModeStart:
+ /* INT 0x10: AH = 0 (Set video Mode), AL = 0x12 (Mode 12) */
+ mov eax, HEX(12)
+ int HEX(10)
+
+ /* BOP */
+ .byte HEX(C4), HEX(C4)
+
+/* The real mode stack */
+.align 4
+.space 2048
+_HalpRealModeEnd:
+PUBLIC _HalpRealModeEnd
+.endcode16
+
+END
Propchange: trunk/reactos/hal/halx86/generic/v86.S
------------------------------------------------------------------------------
svn:eol-style = native
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] Wed Sep 7 12:00:29 2011
@@ -24,6 +24,7 @@
<file>portio.c</file>
<file>systimer.S</file>
<file>trap.S</file>
+ <file>v86.S</file>
</if>
</directory>
<directory name="include">