From 63dde4fa130c46539766a8712faeaaef1b69c76b Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sun, 21 Nov 2010 10:10:38 +0000 Subject: [PATCH] [HAL] Convert asm to new syntax, use spec file svn path=/branches/cmake-bringup/; revision=49681 --- hal/CMakeLists.txt | 11 ++++++----- hal/halx86/amd64/mps.S | 7 ++++--- hal/halx86/amd64/systimer.S | 6 ++++-- hal/halx86/generic/bios.c | 2 +- hal/halx86/generic/i386/systimer.S | 7 ++++--- hal/halx86/generic/i386/trap.S | 10 ++++++---- hal/halx86/mp/i386/mps.S | 4 +++- 7 files changed, 28 insertions(+), 19 deletions(-) diff --git a/hal/CMakeLists.txt b/hal/CMakeLists.txt index 74a0e1586c5..871194f56a6 100644 --- a/hal/CMakeLists.txt +++ b/hal/CMakeLists.txt @@ -1,4 +1,6 @@ +spec2def(hal.dll hal.spec) + if(ARCH MATCHES i386) add_definitions( @@ -51,7 +53,8 @@ list(APPEND HAL_SOURCE ${HAL_GENERIC_PCAT_SOURCE} ${HAL_GENERIC_UP_SOURCE} halx86/up/halinit_up.c - halx86/up/halup.rc) + halx86/up/halup.rc + ${CMAKE_CURRENT_BINARY_DIR}/hal.def) add_library(hal SHARED ${HAL_SOURCE}) add_pch(hal ${CMAKE_CURRENT_SOURCE_DIR}/halx86/include/hal.h ${HAL_SOURCE}) @@ -63,9 +66,7 @@ set_image_base(hal 0x00010000) add_importlibs(hal ntoskrnl) -target_link_libraries(hal - ${CMAKE_CURRENT_SOURCE_DIR}/halx86/hal_i386.def - libcntpr) +target_link_libraries(hal libcntpr) list(APPEND MINI_HAL_SOURCE halx86/generic/legacy/bus/bushndlr.c @@ -106,4 +107,4 @@ else() #TBD endif(ARCH MATCHES i386) -add_importlib_target(hal.spec) \ No newline at end of file +add_importlib_target(hal.spec) diff --git a/hal/halx86/amd64/mps.S b/hal/halx86/amd64/mps.S index 35436520ae6..7a3b8c55aa6 100644 --- a/hal/halx86/amd64/mps.S +++ b/hal/halx86/amd64/mps.S @@ -8,8 +8,9 @@ /* INCLUDES ******************************************************************/ -#include -#include +#include + +#include /* FUNCTIONS *****************************************************************/ @@ -92,5 +93,5 @@ MpsTimerInterrupt: AFTER iret - +END /* EOF */ diff --git a/hal/halx86/amd64/systimer.S b/hal/halx86/amd64/systimer.S index 1cb3b6e02a3..47d2a844b23 100644 --- a/hal/halx86/amd64/systimer.S +++ b/hal/halx86/amd64/systimer.S @@ -7,8 +7,9 @@ /* INCLUDES ******************************************************************/ -#include -#include +#include + +#include /* GLOBALS *******************************************************************/ @@ -90,3 +91,4 @@ HalpClockInterrupt: UNIMPLEMENTED _HalpClockInterrupt iret +END diff --git a/hal/halx86/generic/bios.c b/hal/halx86/generic/bios.c index 5bffb2d9389..9103effe84a 100644 --- a/hal/halx86/generic/bios.c +++ b/hal/halx86/generic/bios.c @@ -197,9 +197,9 @@ HalpDispatchV86Opcode(IN PKTRAP_FRAME TrapFrame) /* V86 TRAP HANDLERS **********************************************************/ #ifndef _MINIHAL_ +DECLSPEC_NORETURN VOID FASTCALL -DECLSPEC_NORETURN HalpTrap0DHandler(IN PKTRAP_FRAME TrapFrame) { /* Enter the trap */ diff --git a/hal/halx86/generic/i386/systimer.S b/hal/halx86/generic/i386/systimer.S index 5dc85345e7c..8534f88a204 100644 --- a/hal/halx86/generic/i386/systimer.S +++ b/hal/halx86/generic/i386/systimer.S @@ -7,8 +7,9 @@ /* INCLUDES ******************************************************************/ -#include -#include +#include + +#include EXTERN _HalpAcquireSystemHardwareSpinLock@0:PROC EXTERN _HalpReleaseCmosSpinLock@0:PROC @@ -39,7 +40,7 @@ EXTERN _HalpPerfCounterCutoff:DWORD /* GLOBALS *******************************************************************/ .data -//ASSUME CS:NOTHING, DS:NOTHING, ES:NOTHING, FS:NOTHING, GS:NOTHING +ASSUME CS:NOTHING, DS:NOTHING, ES:NOTHING, FS:NOTHING, GS:NOTHING PUBLIC _HalpPerfCounter _HalpLastPerfCounterLow: .long 0 diff --git a/hal/halx86/generic/i386/trap.S b/hal/halx86/generic/i386/trap.S index 2ad319bfb6e..8a4f4538144 100644 --- a/hal/halx86/generic/i386/trap.S +++ b/hal/halx86/generic/i386/trap.S @@ -8,12 +8,12 @@ /* INCLUDES ******************************************************************/ -#include -#include +#include + +#include #include -.code32 -.text +.code TRAP_ENTRY HalpTrap0D, 0 TRAP_ENTRY HalpApcInterrupt, KI_SOFTWARE_TRAP @@ -42,4 +42,6 @@ _HalpRealModeStart: .space 2048 _HalpRealModeEnd: PUBLIC _HalpRealModeEnd +.endcode16 +END diff --git a/hal/halx86/mp/i386/mps.S b/hal/halx86/mp/i386/mps.S index 094780f4826..250ab9c7d97 100644 --- a/hal/halx86/mp/i386/mps.S +++ b/hal/halx86/mp/i386/mps.S @@ -11,7 +11,9 @@ /* INCLUDES ******************************************************************/ -#include +#include + +#include /* FUNCTIONS *****************************************************************/