mirror of
https://github.com/reactos/reactos.git
synced 2025-03-10 18:24:02 +00:00
[HAL]
- Implement HalpQuery8254Counter - replace Ke386HaltProcessor() with __halt() - remove excess #endif svn path=/branches/ros-amd64-bringup/; revision=43504
This commit is contained in:
parent
d9f7e0d792
commit
c269c1f512
3 changed files with 29 additions and 2 deletions
|
@ -53,6 +53,34 @@ Done:
|
||||||
ret 4
|
ret 4
|
||||||
.endfunc
|
.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
|
.global _KeQueryPerformanceCounter
|
||||||
.func KeQueryPerformanceCounter
|
.func KeQueryPerformanceCounter
|
||||||
_KeQueryPerformanceCounter:
|
_KeQueryPerformanceCounter:
|
||||||
|
|
|
@ -70,7 +70,7 @@ HalProcessorIdle(VOID)
|
||||||
{
|
{
|
||||||
/* Enable interrupts and halt the processor */
|
/* Enable interrupts and halt the processor */
|
||||||
_enable();
|
_enable();
|
||||||
Ke386HaltProcessor();
|
__halt();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -882,7 +882,6 @@ SetInterruptGate(ULONG index, ULONG_PTR address)
|
||||||
idt->Access = Access.Value;
|
idt->Access = Access.Value;
|
||||||
idt->ExtendedOffset = (USHORT)(address >> 16);
|
idt->ExtendedOffset = (USHORT)(address >> 16);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID HaliInitBSP(VOID)
|
VOID HaliInitBSP(VOID)
|
||||||
|
|
Loading…
Reference in a new issue