2 * FILE: hal/halx86/generic/timer.S
3 * COPYRIGHT: See COPYING in the top level directory
4 * PURPOSE: System Timer Interrupt and Management
5 * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
8 /* INCLUDES ******************************************************************/
11 #include <ndk/amd64/asmmacro.S>
13 /* GLOBALS *******************************************************************/
17 .global _MsgUnimplemented
19 .asciz "WARNING: %s at %s:%d is UNIMPLEMENTED!\n"
22 /* FUNCTIONS *****************************************************************/
27 .global _HalpCalibrateStallExecution@0
28 .func HalpCalibrateStallExecution@0
29 _HalpCalibrateStallExecution@0:
33 .globl _HalpProfileInterrupt
34 .func HalpProfileInterrupt
35 _HalpProfileInterrupt:
40 .globl _KeStallExecutionProcessor
41 .func KeStallExecutionProcessor
42 _KeStallExecutionProcessor:
44 /* Get the number of microseconds required */
47 /* Multiply by the stall factor */
48 mov eax, gs:[KPCR_STALL_SCALE_FACTOR]
51 /* Align to 16 bytes */
54 /* Jump to subtraction loop */
57 /* Align to 16 bytes */
60 /* Subtract one count */
71 .globl _HalpQuery8254Counter
72 .func HalpQuery8254Counter
73 _HalpQuery8254Counter:
75 /* Save EFLAGS and disable interrupts */
84 /* Read current timer */
91 /* Return it and restore interrupt state */
97 .globl _HalpClockInterrupt
98 .func HalpClockInterrupt
100 UNIMPLEMENTED _HalpClockInterrupt