Fix amd64 build

svn path=/trunk/; revision=53458
This commit is contained in:
Timo Kreuzer 2011-08-26 19:45:21 +00:00
parent 823c30ef1f
commit caabd6c3e9
3 changed files with 36 additions and 9 deletions

View file

@ -1,5 +1,5 @@
if(ARCH MATCHES i386 OR ARCH MATCHES amd64)
if((ARCH MATCHES i386) OR (ARCH MATCHES amd64))
add_subdirectory(halx86)
elseif(ARCH MATCHES arm)
# add_subdirectory(halarm)

View file

@ -129,7 +129,36 @@ if(ARCH MATCHES i386)
add_dependencies(mini_hal psdk bugcodes asm)
elseif(ARCH MATCHES amd64)
#TBD
spec2def(hal.dll ../hal.spec)
list(APPEND HAL_SOURCE
${HAL_GENERIC_SOURCE}
${HAL_GENERIC_PCAT_SOURCE}
${HAL_GENERIC_UP_SOURCE}
up/halinit_up.c
up/halup.rc
generic/spinlock.c
amd64/x86bios.c
amd64/halinit.c
amd64/stubs.c
amd64/systimer.S
amd64/processor.c
${CMAKE_CURRENT_BINARY_DIR}/hal.def)
# hal
add_library(hal SHARED ${HAL_SOURCE})
add_pch(hal include/hal.h)
add_dependencies(hal psdk bugcodes)
set_entrypoint(hal HalInitSystem)
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)
endif()
add_importlib_target(../hal.spec)

View file

@ -8,21 +8,19 @@
/* INCLUDES ******************************************************************/
#include <asm.inc>
#include <ksamd64.inc>
/* GLOBALS *******************************************************************/
.data
.global MsgUnimplemented
PUBLIC MsgUnimplemented
MsgUnimplemented:
.asciz "WARNING: %s at %s:%d is UNIMPLEMENTED!\n"
/* FUNCTIONS *****************************************************************/
.text
.code64
PUBLIC HalpCalibrateStallExecution@0
@ -40,7 +38,7 @@ KeStallExecutionProcessor:
jecxz Done
/* Multiply by the stall factor */
mov eax, gs:[KPCR_STALL_SCALE_FACTOR]
mov eax, gs:[PcStallScaleFactor]
mul ecx
/* Align to 16 bytes */
@ -71,14 +69,14 @@ HalpQuery8254Counter:
/* Set timer data */
mov al, 0
out 0x43, al
out HEX(43), al
jmp $+2
/* Read current timer */
in al, 0x40
in al, HEX(40)
jmp $+2
movzx ecx, al
in al, 0x40
in al, HEX(40)
mov ch, al
/* Return it and restore interrupt state */