_HalpLastPerfCounterHigh: .long 0
_HalpPerfCounterLow: .long 0
_HalpPerfCounterHigh: .long 0
+_HalpSystemHardwareFlags: .long 0
_UnhandledMsg:
.asciz "\n\x7\x7!!! Unhandled or Unexpected Code at line: %lx!!!\n"
/* FUNCTIONS *****************************************************************/
+.global _HalpReleaseCmosSpinLock
+.func HalpReleaseCmosSpinLock
+_HalpReleaseCmosSpinLock:
+
+.endfunc
+
+.global _HalpAcquireSystemHardwareSpinLock
+.func HalpAcquireSystemHardwareSpinLock
+_HalpAcquireSystemHardwareSpinLock:
+
+.endfunc
+
+.global _HalpCalibrateStallExecution@0
+.func HalpCalibrateStallExecution@0
+_HalpCalibrateStallExecution@0:
+
+.endfunc
+
+.globl _HalpProfileInterrupt
+.func HalpProfileInterrupt
+_HalpProfileInterrupt:
+
+.endfunc
+
+
.globl _KeStallExecutionProcessor
.func KeStallExecutionProcessor
_KeStallExecutionProcessor:
ret 4
.endfunc
+
+.globl _HalpQuery8254Counter
+.func HalpQuery8254Counter
+_HalpQuery8254Counter:
+
+ /* Save EFLAGS and disable interrupts */
+ pushfq
+ cli
+
+ /* Set timer data */
+ mov al, 0
+ out 0x43, al
+ jmp $+2
+
+ /* Read current timer */
+ in al, 0x40
+ jmp $+2
+ movzx ecx, al
+ in al, 0x40
+ mov ch, al
+
+ /* Return it and restore interrupt state */
+ mov eax, ecx
+ popfq
+ ret
+.endfunc
+
+
.global _KeQueryPerformanceCounter
.func KeQueryPerformanceCounter
_KeQueryPerformanceCounter: