Author: ion
Date: Fri Aug 25 04:46:41 2006
New Revision: 23697
URL:
http://svn.reactos.org/svn/reactos?rev=23697&view=rev
Log:
- Fix compiling/linking problems.
- Remove KrnlFun entry - IRQs are now done through a typical NT/ROS trap frame and are
synchronized and compatible with trap.S.
- Enable 2nd entry interrupt calls in HalBeginSystemInterrupt, since IRQs now use the
right trap frame.
Modified:
trunk/reactos/hal/halx86/generic/halinit.c
trunk/reactos/hal/halx86/generic/irq.S
trunk/reactos/hal/halx86/generic/systimer.S
trunk/reactos/hal/halx86/include/halp.h
trunk/reactos/hal/halx86/mp/apic.c
trunk/reactos/hal/halx86/mp/halinit_mp.c
trunk/reactos/hal/halx86/up/halinit_up.c
trunk/reactos/hal/halx86/xbox/halinit_xbox.c
trunk/reactos/ntoskrnl/KrnlFun.c
trunk/reactos/ntoskrnl/ke/i386/clock.S
Modified: trunk/reactos/hal/halx86/generic/halinit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/halinit…
==============================================================================
--- trunk/reactos/hal/halx86/generic/halinit.c (original)
+++ trunk/reactos/hal/halx86/generic/halinit.c Fri Aug 25 04:46:41 2006
@@ -19,7 +19,6 @@
PVOID HalpZeroPageMapping = NULL;
HALP_HOOKS HalpHooks;
-VOID NTAPI HalpClockInterrupt(VOID);
/* FUNCTIONS ***************************************************************/
@@ -43,12 +42,8 @@
}
else if (BootPhase == 1)
{
- /* Enable the clock interrupt */
- ((PKIPCR)KeGetPcr())->IDT[IRQ2VECTOR(0)].ExtendedOffset =
- (USHORT)(((ULONG_PTR)HalpClockInterrupt >> 16) & 0xFFFF);
- ((PKIPCR)KeGetPcr())->IDT[IRQ2VECTOR(0)].Offset =
- (USHORT)HalpClockInterrupt;
- HalEnableSystemInterrupt(IRQ2VECTOR(0), CLOCK2_LEVEL, Latched);
+ /* Initialize the clock interrupt */
+ HalpInitPhase1();
/* Initialize display and make the screen black */
HalInitializeDisplay ((PROS_LOADER_PARAMETER_BLOCK)LoaderBlock);
Modified: trunk/reactos/hal/halx86/generic/irq.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/irq.S?r…
==============================================================================
--- trunk/reactos/hal/halx86/generic/irq.S (original)
+++ trunk/reactos/hal/halx86/generic/irq.S Fri Aug 25 04:46:41 2006
@@ -10,9 +10,6 @@
#include <asm.h>
#include <internal/i386/asmmacro.S>
.intel_syntax noprefix
-
-.extern _Kei386EoiHelper@0
-.extern _KiUnexpectedInterrupt
/* GLOBALS *******************************************************************/
@@ -393,10 +390,8 @@
DoCall:
/* There are pending software interrupts, call their handlers */
- /* FIXME: Because ROS IRQs don't setup a nice trap frame yet, we can't
optimize a 2nd entry */
- //add esp, 12
- //jmp SoftIntHandlerTable2[eax*4]
- call SoftIntHandlerTable[eax*4]
+ add esp, 12
+ jmp SoftIntHandlerTable2[eax*4]
ret 8
.endfunc
Modified: trunk/reactos/hal/halx86/generic/systimer.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/systime…
==============================================================================
--- trunk/reactos/hal/halx86/generic/systimer.S (original)
+++ trunk/reactos/hal/halx86/generic/systimer.S Fri Aug 25 04:46:41 2006
@@ -10,9 +10,6 @@
#include <asm.h>
#include <internal/i386/asmmacro.S>
.intel_syntax noprefix
-
-.extern _Kei386EoiHelper@0
-.extern _KeUpdateSystemTime@0
/* FUNCTIONS *****************************************************************/
Modified: trunk/reactos/hal/halx86/include/halp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/include/halp.h?…
==============================================================================
--- trunk/reactos/hal/halx86/include/halp.h (original)
+++ trunk/reactos/hal/halx86/include/halp.h Fri Aug 25 04:46:41 2006
@@ -48,6 +48,8 @@
/* Non-generic initialization */
VOID HalpInitPhase0 (PROS_LOADER_PARAMETER_BLOCK LoaderBlock);
+VOID HalpInitPhase1(VOID);
+VOID NTAPI HalpClockInterrupt(VOID);
/* sysinfo.c */
NTSTATUS STDCALL
Modified: trunk/reactos/hal/halx86/mp/apic.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/mp/apic.c?rev=2…
==============================================================================
--- trunk/reactos/hal/halx86/mp/apic.c (original)
+++ trunk/reactos/hal/halx86/mp/apic.c Fri Aug 25 04:46:41 2006
@@ -815,14 +815,15 @@
Count[CPU]++;
#endif
+ /* FIXME: SMP is totally broken */
MpsIRQTrapFrameToTrapFrame(Trapframe, &KernelTrapFrame);
if (KeGetCurrentProcessorNumber() == 0)
{
- KeUpdateSystemTime(&KernelTrapFrame, oldIrql, 100000); // FIXME:
CLOCK_INCREMENT?
+ //KeUpdateSystemTime(&KernelTrapFrame, oldIrql);
}
else
{
- KeUpdateRunTime(&KernelTrapFrame, oldIrql);
+ //KeUpdateRunTime(&KernelTrapFrame, oldIrql);
}
Ki386DisableInterrupts();
Modified: trunk/reactos/hal/halx86/mp/halinit_mp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/mp/halinit_mp.c…
==============================================================================
--- trunk/reactos/hal/halx86/mp/halinit_mp.c (original)
+++ trunk/reactos/hal/halx86/mp/halinit_mp.c Fri Aug 25 04:46:41 2006
@@ -52,4 +52,9 @@
}
+VOID
+HalpInitPhase1(VOID)
+{
+}
+
/* EOF */
Modified: trunk/reactos/hal/halx86/up/halinit_up.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/up/halinit_up.c…
==============================================================================
--- trunk/reactos/hal/halx86/up/halinit_up.c (original)
+++ trunk/reactos/hal/halx86/up/halinit_up.c Fri Aug 25 04:46:41 2006
@@ -26,4 +26,15 @@
HalpCalibrateStallExecution();
}
+VOID
+HalpInitPhase1(VOID)
+{
+ /* Enable the clock interrupt */
+ ((PKIPCR)KeGetPcr())->IDT[0x30].ExtendedOffset =
+ (USHORT)(((ULONG_PTR)HalpClockInterrupt >> 16) & 0xFFFF);
+ ((PKIPCR)KeGetPcr())->IDT[0x30].Offset =
+ (USHORT)HalpClockInterrupt;
+ HalEnableSystemInterrupt(0x30, CLOCK2_LEVEL, Latched);
+}
+
/* EOF */
Modified: trunk/reactos/hal/halx86/xbox/halinit_xbox.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/xbox/halinit_xb…
==============================================================================
--- trunk/reactos/hal/halx86/xbox/halinit_xbox.c (original)
+++ trunk/reactos/hal/halx86/xbox/halinit_xbox.c Fri Aug 25 04:46:41 2006
@@ -31,4 +31,15 @@
HalpXboxInitPartIo();
}
+VOID
+HalpInitPhase1(VOID)
+{
+ /* Enable the clock interrupt */
+ ((PKIPCR)KeGetPcr())->IDT[0x30].ExtendedOffset =
+ (USHORT)(((ULONG_PTR)HalpClockInterrupt >> 16) & 0xFFFF);
+ ((PKIPCR)KeGetPcr())->IDT[0x30].Offset =
+ (USHORT)HalpClockInterrupt;
+ HalEnableSystemInterrupt(0x30, CLOCK2_LEVEL, Latched);
+}
+
/* EOF */
Modified: trunk/reactos/ntoskrnl/KrnlFun.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/KrnlFun.c?rev=236…
==============================================================================
--- trunk/reactos/ntoskrnl/KrnlFun.c (original)
+++ trunk/reactos/ntoskrnl/KrnlFun.c Fri Aug 25 04:46:41 2006
@@ -25,7 +25,6 @@
// - Use Object Type Mutex/Lock.
//
// Ke:
-// - Make sure IRQ trap code is synchronized with current trap code.
// - Reimplement the V86 support using a mode that will be compatible with
// VDM and the future and use ABIOS gates.
// - Implement Invalid Opcode and GPD handlers for V86-mode.
Modified: trunk/reactos/ntoskrnl/ke/i386/clock.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/clock.S?r…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/clock.S (original)
+++ trunk/reactos/ntoskrnl/ke/i386/clock.S Fri Aug 25 04:46:41 2006
@@ -10,14 +10,6 @@
#include <asm.h>
#include <internal/i386/asmmacro.S>
.intel_syntax noprefix
-
-/* GLOBALS *******************************************************************/
-
-.extern _KeTimeAdjustment
-.extern _KiTickOffset
-.extern _KeTickCount
-.extern _KeMaximumIncrement
-.extern _KiExpireTimerDpc
/* FUNCTIONS ******************************************************************/