Author: tkreuzer
Date: Thu Oct 15 23:40:00 2009
New Revision: 43504
URL:
http://svn.reactos.org/svn/reactos?rev=43504&view=rev
Log:
[HAL]
- Implement HalpQuery8254Counter
- replace Ke386HaltProcessor() with __halt()
- remove excess #endif
Modified:
branches/ros-amd64-bringup/reactos/hal/halamd64/generic/systimer.S
branches/ros-amd64-bringup/reactos/hal/halamd64/up/processor.c
branches/ros-amd64-bringup/reactos/hal/halx86/mp/apic.c
Modified: branches/ros-amd64-bringup/reactos/hal/halamd64/generic/systimer.S
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
==============================================================================
--- branches/ros-amd64-bringup/reactos/hal/halamd64/generic/systimer.S [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/hal/halamd64/generic/systimer.S [iso-8859-1] Thu
Oct 15 23:40:00 2009
@@ -53,6 +53,34 @@
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:
Modified: branches/ros-amd64-bringup/reactos/hal/halamd64/up/processor.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
==============================================================================
--- branches/ros-amd64-bringup/reactos/hal/halamd64/up/processor.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/hal/halamd64/up/processor.c [iso-8859-1] Thu Oct 15
23:40:00 2009
@@ -70,7 +70,7 @@
{
/* Enable interrupts and halt the processor */
_enable();
- Ke386HaltProcessor();
+ __halt();
}
/*
Modified: branches/ros-amd64-bringup/reactos/hal/halx86/mp/apic.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
==============================================================================
--- branches/ros-amd64-bringup/reactos/hal/halx86/mp/apic.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/hal/halx86/mp/apic.c [iso-8859-1] Thu Oct 15
23:40:00 2009
@@ -882,7 +882,6 @@
idt->Access = Access.Value;
idt->ExtendedOffset = (USHORT)(address >> 16);
#endif
-#endif
}
VOID HaliInitBSP(VOID)