mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:03:00 +00:00
[HAL]
Fix amd64 build svn path=/trunk/; revision=53458
This commit is contained in:
parent
823c30ef1f
commit
caabd6c3e9
3 changed files with 36 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
if(ARCH MATCHES i386 OR ARCH MATCHES amd64)
|
if((ARCH MATCHES i386) OR (ARCH MATCHES amd64))
|
||||||
add_subdirectory(halx86)
|
add_subdirectory(halx86)
|
||||||
elseif(ARCH MATCHES arm)
|
elseif(ARCH MATCHES arm)
|
||||||
# add_subdirectory(halarm)
|
# add_subdirectory(halarm)
|
||||||
|
|
|
@ -129,7 +129,36 @@ if(ARCH MATCHES i386)
|
||||||
add_dependencies(mini_hal psdk bugcodes asm)
|
add_dependencies(mini_hal psdk bugcodes asm)
|
||||||
|
|
||||||
elseif(ARCH MATCHES amd64)
|
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()
|
endif()
|
||||||
|
|
||||||
add_importlib_target(../hal.spec)
|
add_importlib_target(../hal.spec)
|
||||||
|
|
|
@ -8,21 +8,19 @@
|
||||||
/* INCLUDES ******************************************************************/
|
/* INCLUDES ******************************************************************/
|
||||||
|
|
||||||
#include <asm.inc>
|
#include <asm.inc>
|
||||||
|
|
||||||
#include <ksamd64.inc>
|
#include <ksamd64.inc>
|
||||||
|
|
||||||
/* GLOBALS *******************************************************************/
|
/* GLOBALS *******************************************************************/
|
||||||
|
|
||||||
.data
|
.data
|
||||||
|
|
||||||
.global MsgUnimplemented
|
PUBLIC MsgUnimplemented
|
||||||
MsgUnimplemented:
|
MsgUnimplemented:
|
||||||
.asciz "WARNING: %s at %s:%d is UNIMPLEMENTED!\n"
|
.asciz "WARNING: %s at %s:%d is UNIMPLEMENTED!\n"
|
||||||
|
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
.text
|
|
||||||
.code64
|
.code64
|
||||||
|
|
||||||
PUBLIC HalpCalibrateStallExecution@0
|
PUBLIC HalpCalibrateStallExecution@0
|
||||||
|
@ -40,7 +38,7 @@ KeStallExecutionProcessor:
|
||||||
jecxz Done
|
jecxz Done
|
||||||
|
|
||||||
/* Multiply by the stall factor */
|
/* Multiply by the stall factor */
|
||||||
mov eax, gs:[KPCR_STALL_SCALE_FACTOR]
|
mov eax, gs:[PcStallScaleFactor]
|
||||||
mul ecx
|
mul ecx
|
||||||
|
|
||||||
/* Align to 16 bytes */
|
/* Align to 16 bytes */
|
||||||
|
@ -71,14 +69,14 @@ HalpQuery8254Counter:
|
||||||
|
|
||||||
/* Set timer data */
|
/* Set timer data */
|
||||||
mov al, 0
|
mov al, 0
|
||||||
out 0x43, al
|
out HEX(43), al
|
||||||
jmp $+2
|
jmp $+2
|
||||||
|
|
||||||
/* Read current timer */
|
/* Read current timer */
|
||||||
in al, 0x40
|
in al, HEX(40)
|
||||||
jmp $+2
|
jmp $+2
|
||||||
movzx ecx, al
|
movzx ecx, al
|
||||||
in al, 0x40
|
in al, HEX(40)
|
||||||
mov ch, al
|
mov ch, al
|
||||||
|
|
||||||
/* Return it and restore interrupt state */
|
/* Return it and restore interrupt state */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue