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 ******************************************************************/
12 #include <ksamd64.inc>
14 /* GLOBALS *******************************************************************/
18 .global MsgUnimplemented
20 .asciz "WARNING: %s at %s:%d is UNIMPLEMENTED!\n"
23 /* FUNCTIONS *****************************************************************/
28 PUBLIC HalpCalibrateStallExecution@0
29 HalpCalibrateStallExecution@0:
32 PUBLIC HalpProfileInterrupt
36 PUBLIC KeStallExecutionProcessor
37 KeStallExecutionProcessor:
39 /* Get the number of microseconds required */
42 /* Multiply by the stall factor */
43 mov eax, gs:[KPCR_STALL_SCALE_FACTOR]
46 /* Align to 16 bytes */
49 /* Jump to subtraction loop */
52 /* Align to 16 bytes */
55 /* Subtract one count */
65 PUBLIC HalpQuery8254Counter
68 /* Save EFLAGS and disable interrupts */
77 /* Read current timer */
84 /* Return it and restore interrupt state */
89 PUBLIC HalpClockInterrupt
91 UNIMPLEMENTED _HalpClockInterrupt