Author: ion
Date: Fri Aug 25 04:30:26 2006
New Revision: 23695
URL:
http://svn.reactos.org/svn/reactos?rev=23695&view=rev
Log:
- The last piece of the puzzle: we had to initialize the IDR in HalInitProcessor to set it
to the default of 0xFFFFFFB so that we don't get IRQ 0 and IRQ 1 until we're ready
to handle them, which was causing the clock interrupt to be called too early.
- Remove irqhand.S and all other remaining pieces of deprecated code.
Removed:
trunk/reactos/ntoskrnl/ke/i386/irqhand.s
Modified:
trunk/reactos/hal/halx86/generic/processor.c
trunk/reactos/include/ndk/i386/ketypes.h
trunk/reactos/ntoskrnl/ke/clock.c
trunk/reactos/ntoskrnl/ke/i386/irq.c
trunk/reactos/ntoskrnl/ke/i386/kernel.c
trunk/reactos/ntoskrnl/ntoskrnl.rbuild
Modified: trunk/reactos/hal/halx86/generic/processor.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/process…
==============================================================================
--- trunk/reactos/hal/halx86/generic/processor.c (original)
+++ trunk/reactos/hal/halx86/generic/processor.c Fri Aug 25 04:30:26 2006
@@ -25,6 +25,9 @@
PLOADER_PARAMETER_BLOCK LoaderBlock)
{
DPRINT("HalInitializeProcessor(%lu %p)\n", ProcessorNumber, LoaderBlock);
+ /* Set default IDR */
+ KeGetPcr()->IDR = 0xFFFFFFFB;
+ KeGetPcr()->StallScaleFactor = INITIAL_STALL_COUNT;
}
BOOLEAN STDCALL
Modified: trunk/reactos/include/ndk/i386/ketypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/i386/ketypes.h…
==============================================================================
--- trunk/reactos/include/ndk/i386/ketypes.h (original)
+++ trunk/reactos/include/ndk/i386/ketypes.h Fri Aug 25 04:30:26 2006
@@ -94,6 +94,11 @@
#define IPI_FREEZE 4
#define IPI_PACKET_READY 8
#define IPI_SYNCH_REQUEST 16
+
+//
+// HAL Variables
+//
+#define INITIAL_STALL_COUNT 0x64
//
// Static Kernel-Mode Address start (use MM_KSEG0_BASE for actual)
Modified: trunk/reactos/ntoskrnl/ke/clock.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/clock.c?rev=23…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/clock.c (original)
+++ trunk/reactos/ntoskrnl/ke/clock.c Fri Aug 25 04:30:26 2006
@@ -78,7 +78,6 @@
{
TIME_FIELDS TimeFields;
- DPRINT1("KiInitializeSystemClock()\n");
InitializeListHead(&KiTimerListHead);
KeInitializeDpc(&KiExpireTimerDpc, (PKDEFERRED_ROUTINE)KiExpireTimers, 0);
@@ -95,9 +94,6 @@
SharedUserData->SystemTime.High2Time = SystemBootTime.u.HighPart;
SharedUserData->SystemTime.LowPart = SystemBootTime.u.LowPart;
SharedUserData->SystemTime.High1Time = SystemBootTime.u.HighPart;
-
- KiClockSetupComplete = TRUE;
- DPRINT1("Finished KiInitializeSystemClock()\n");
}
VOID
Modified: trunk/reactos/ntoskrnl/ke/i386/irq.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/irq.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/irq.c (original)
+++ trunk/reactos/ntoskrnl/ke/i386/irq.c Fri Aug 25 04:30:26 2006
@@ -14,21 +14,6 @@
#include <ntoskrnl.h>
#define NDEBUG
#include <debug.h>
-
-/* DEPRECATED FUNCTIONS ******************************************************/
-
-void irq_handler_0(void);
-extern IDT_DESCRIPTOR KiIdt[256];
-
-VOID
-INIT_FUNCTION
-NTAPI
-KeInitInterrupts (VOID)
-{
- KiIdt[0x30].a=((ULONG)irq_handler_0&0xffff)+(KGDT_R0_CODE<<16);
- KiIdt[0x30].b=((ULONG)irq_handler_0&0xffff0000)+0x8000+
- 0xe00;
-}
/* PRIVATE FUNCTIONS *********************************************************/
Removed: trunk/reactos/ntoskrnl/ke/i386/irqhand.s
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/irqhand.s…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/irqhand.s (original)
+++ trunk/reactos/ntoskrnl/ke/i386/irqhand.s (removed)
@@ -1,55 +1,0 @@
-/*
- * FILE: ntoskrnl/ke/i386/clock.S
- * COPYRIGHT: See COPYING in the top level directory
- * PURPOSE: System Clock Management
- * PROGRAMMER: Alex Ionescu (alex(a)relsoft.net)
- */
-
-/* INCLUDES ******************************************************************/
-
-#include <asm.h>
-#include <internal/i386/asmmacro.S>
-.intel_syntax noprefix
-
-/* GLOBALS *******************************************************************/
-
-#include <ndk/asm.h>
-#include <../hal/halx86/include/halirq.h>
-
-.global _irq_handler_0
-_irq_handler_0:
- pusha
- cld
- push ds
- push es
- push fs
- push gs
- push 0xCEAFBEEF
- mov eax, KGDT_R0_DATA
- mov ds, eax
- mov es, eax
- mov gs, eax
- mov eax, KGDT_R0_PCR
- mov fs, eax
-
- /* Increase interrupt count */
- inc dword ptr [fs:KPCR_PRCB_INTERRUPT_COUNT]
-
- /* Put vector in EBX and make space for KIRQL */
- sub esp, 4
-
- /* Begin interrupt */
- push esp
- push 0x30
- push HIGH_LEVEL
- call _HalBeginSystemInterrupt@12
-
- cli
- call _HalEndSystemInterrupt@8
-
- pop gs
- pop fs
- pop es
- pop ds
- popa
- iret
Modified: trunk/reactos/ntoskrnl/ke/i386/kernel.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/kernel.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/kernel.c (original)
+++ trunk/reactos/ntoskrnl/ke/i386/kernel.c Fri Aug 25 04:30:26 2006
@@ -380,7 +380,6 @@
InitializeListHead(&KPCR->PrcbData.WaitListHead);
KeInitExceptions ();
- KeInitInterrupts ();
KeActiveProcessors |= 1 << 0;
Modified: trunk/reactos/ntoskrnl/ntoskrnl.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl.rbuild?r…
==============================================================================
--- trunk/reactos/ntoskrnl/ntoskrnl.rbuild (original)
+++ trunk/reactos/ntoskrnl/ntoskrnl.rbuild Fri Aug 25 04:30:26 2006
@@ -34,7 +34,6 @@
<file>fpu.c</file>
<file>gdt.c</file>
<file>irq.c</file>
- <file>irqhand.s</file>
<file>kernel.c</file>
<file>ldt.c</file>
<file>thread.c</file>