- Remove KeRescheduleThread (it's not present neither on WinNT4 nor on WinXP SP2).
- Fix IoOpenDeviceRegistryKey for PLUGPLAY_REGKEY_DRIVER case. (Oops)
- Move IoConnectInterrupt and IoDisconnectInterrupt outside from Ke.
svn path=/trunk/; revision=11588
io/iomgr.o \
io/iowork.o \
io/irp.o \
+ io/irq.o \
io/lock.o \
io/mailslot.o \
io/mdl.o \
VOID STDCALL
DbgBreakPointNoBugCheck(VOID);
-VOID STDCALL KeRescheduleThread();
-
-
VOID
STDCALL
KeProfileInterrupt(
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: ntoskrnl/io/irq.c
+ * PURPOSE: IRQ handling
+ * PROGRAMMER: David Welch (welch@mcmail.com)
+ */
+
+/* INCLUDES *****************************************************************/
+
+#include <ntoskrnl.h>
+#define NDEBUG
+#include <internal/debug.h>
+
+/* GLOBALS *****************************************************************/
+
+#define TAG_KINTERRUPT TAG('K', 'I', 'S', 'R')
+
+/* FUNCTIONS *****************************************************************/
+
+/*
+ * @implemented
+ */
+NTSTATUS STDCALL
+IoConnectInterrupt(PKINTERRUPT* InterruptObject,
+ PKSERVICE_ROUTINE ServiceRoutine,
+ PVOID ServiceContext,
+ PKSPIN_LOCK SpinLock,
+ ULONG Vector,
+ KIRQL Irql,
+ KIRQL SynchronizeIrql,
+ KINTERRUPT_MODE InterruptMode,
+ BOOLEAN ShareVector,
+ KAFFINITY ProcessorEnableMask,
+ BOOLEAN FloatingSave)
+/*
+ * FUNCTION: Registers a driver's isr to be called when its device interrupts
+ * ARGUMENTS:
+ * InterruptObject (OUT) = Points to the interrupt object created on
+ * return
+ * ServiceRoutine = Routine to be called when the device interrupts
+ * ServiceContext = Parameter to be passed to ServiceRoutine
+ * SpinLock = Initalized spinlock that will be used to synchronize
+ * access between the isr and other driver routines. This is
+ * required if the isr handles more than one vector or the
+ * driver has more than one isr
+ * Vector = Interrupt vector to allocate
+ * (returned from HalGetInterruptVector)
+ * Irql = DIRQL returned from HalGetInterruptVector
+ * SynchronizeIrql = DIRQL at which the isr will execute. This must
+ * be the highest of all the DIRQLs returned from
+ * HalGetInterruptVector if the driver has multiple
+ * isrs
+ * InterruptMode = Specifies if the interrupt is LevelSensitive or
+ * Latched
+ * ShareVector = Specifies if the vector can be shared
+ * ProcessorEnableMask = Processors on the isr can run
+ * FloatingSave = TRUE if the floating point stack should be saved when
+ * the isr runs. Must be false for x86 drivers
+ * RETURNS: Status
+ * IRQL: PASSIVE_LEVEL
+ */
+{
+ PKINTERRUPT Interrupt;
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ ASSERT_IRQL(PASSIVE_LEVEL);
+
+ DPRINT("IoConnectInterrupt(Vector %x)\n",Vector);
+
+ /*
+ * Initialize interrupt object
+ */
+ Interrupt=ExAllocatePoolWithTag(NonPagedPool,sizeof(KINTERRUPT),
+ TAG_KINTERRUPT);
+ if (Interrupt==NULL)
+ {
+ return(STATUS_INSUFFICIENT_RESOURCES);
+ }
+
+ Status = KeInitializeInterrupt(Interrupt,
+ ServiceRoutine,
+ ServiceContext,
+ SpinLock,
+ Vector,
+ Irql,
+ SynchronizeIrql,
+ InterruptMode,
+ ShareVector,
+ ProcessorEnableMask,
+ FloatingSave);
+ if (!NT_SUCCESS(Status))
+ {
+ ExFreePool(Interrupt);
+ return Status;
+ }
+
+ if (!KeConnectInterrupt(Interrupt))
+ {
+ ExFreePool(Interrupt);
+ return STATUS_INVALID_PARAMETER;
+ }
+
+ *InterruptObject = Interrupt;
+
+ return(STATUS_SUCCESS);
+}
+
+
+/*
+ * @implemented
+ */
+VOID STDCALL
+IoDisconnectInterrupt(PKINTERRUPT InterruptObject)
+/*
+ * FUNCTION: Releases a drivers isr
+ * ARGUMENTS:
+ * InterruptObject = isr to release
+ */
+{
+ KeDisconnectInterrupt(InterruptObject);
+ ExFreePool(InterruptObject);
+}
+
+/* EOF */
-/* $Id: pnpmgr.c,v 1.48 2004/11/07 21:18:33 navaraf Exp $
+/* $Id: pnpmgr.c,v 1.49 2004/11/07 22:55:38 navaraf Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
ExFreePool(KeyNameBuffer);
return Status;
}
+ KeyName.Length += DriverKeyLength - sizeof(UNICODE_NULL);
}
else
{
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: irq.c,v 1.53 2004/11/01 19:01:25 hbirr Exp $
+/* $Id: irq.c,v 1.54 2004/11/07 22:55:38 navaraf Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/i386/irq.c
static KSPIN_LOCK isr_table_lock = {0,};
#define TAG_ISR_LOCK TAG('I', 'S', 'R', 'L')
-#define TAG_KINTERRUPT TAG('K', 'I', 'S', 'R')
/* FUNCTIONS ****************************************************************/
/*
* @implemented
*/
-NTSTATUS STDCALL
+BOOLEAN STDCALL
KeConnectInterrupt(PKINTERRUPT InterruptObject)
{
KIRQL oldlvl;
Vector = InterruptObject->Vector;
if (Vector < IRQ_BASE && Vector >= IRQ_BASE + NR_IRQS)
- {
- return STATUS_INVALID_PARAMETER;
- }
+ return FALSE;
+
Vector -= IRQ_BASE;
/*
(InterruptObject->Shareable == FALSE || ListHead->Shareable==FALSE))
{
KeReleaseSpinLock(&isr_table_lock,oldlvl);
- return(STATUS_INVALID_PARAMETER);
+ return FALSE;
}
else
{
KeDumpIrqList();
- return STATUS_SUCCESS;
+ return TRUE;
}
InterruptObject->ProcessorEnableMask = ProcessorEnableMask;
InterruptObject->SynchLevel = SynchronizeIrql;
InterruptObject->Shareable = ShareVector;
- InterruptObject->FloatingSave = FALSE;
+ InterruptObject->FloatingSave = FloatingSave;
return STATUS_SUCCESS;
}
-
-/*
- * @implemented
- */
-NTSTATUS STDCALL
-IoConnectInterrupt(PKINTERRUPT* InterruptObject,
- PKSERVICE_ROUTINE ServiceRoutine,
- PVOID ServiceContext,
- PKSPIN_LOCK SpinLock,
- ULONG Vector,
- KIRQL Irql,
- KIRQL SynchronizeIrql,
- KINTERRUPT_MODE InterruptMode,
- BOOLEAN ShareVector,
- KAFFINITY ProcessorEnableMask,
- BOOLEAN FloatingSave)
-/*
- * FUNCTION: Registers a driver's isr to be called when its device interrupts
- * ARGUMENTS:
- * InterruptObject (OUT) = Points to the interrupt object created on
- * return
- * ServiceRoutine = Routine to be called when the device interrupts
- * ServiceContext = Parameter to be passed to ServiceRoutine
- * SpinLock = Initalized spinlock that will be used to synchronize
- * access between the isr and other driver routines. This is
- * required if the isr handles more than one vector or the
- * driver has more than one isr
- * Vector = Interrupt vector to allocate
- * (returned from HalGetInterruptVector)
- * Irql = DIRQL returned from HalGetInterruptVector
- * SynchronizeIrql = DIRQL at which the isr will execute. This must
- * be the highest of all the DIRQLs returned from
- * HalGetInterruptVector if the driver has multiple
- * isrs
- * InterruptMode = Specifies if the interrupt is LevelSensitive or
- * Latched
- * ShareVector = Specifies if the vector can be shared
- * ProcessorEnableMask = Processors on the isr can run
- * FloatingSave = TRUE if the floating point stack should be saved when
- * the isr runs. Must be false for x86 drivers
- * RETURNS: Status
- * IRQL: PASSIVE_LEVEL
- */
-{
- PKINTERRUPT Interrupt;
- NTSTATUS Status = STATUS_SUCCESS;
-
- ASSERT_IRQL(PASSIVE_LEVEL);
-
- DPRINT("IoConnectInterrupt(Vector %x)\n",Vector);
-
- /*
- * Check the parameters
- */
- if (Vector < IRQ_BASE || Vector >= NR_IRQS + IRQ_BASE)
- {
- return(STATUS_INVALID_PARAMETER);
- }
- if (FloatingSave == TRUE)
- {
- return(STATUS_INVALID_PARAMETER);
- }
-
- /*
- * Initialize interrupt object
- */
- Interrupt=ExAllocatePoolWithTag(NonPagedPool,sizeof(KINTERRUPT),
- TAG_KINTERRUPT);
- if (Interrupt==NULL)
- {
- return(STATUS_INSUFFICIENT_RESOURCES);
- }
-
- Status = KeInitializeInterrupt(Interrupt,
- ServiceRoutine,
- ServiceContext,
- SpinLock,
- Vector,
- Irql,
- SynchronizeIrql,
- InterruptMode,
- ShareVector,
- ProcessorEnableMask,
- FloatingSave);
- if (!NT_SUCCESS(Status))
- {
- ExFreePool(Interrupt);
- return Status;
- }
-
- Status = KeConnectInterrupt(Interrupt);
- if (!NT_SUCCESS(Status))
- {
- ExFreePool(Interrupt);
- return Status;
- }
-
- *InterruptObject = Interrupt;
-
- return(STATUS_SUCCESS);
-}
-
-
-/*
- * @implemented
- */
-VOID STDCALL
-IoDisconnectInterrupt(PKINTERRUPT InterruptObject)
-/*
- * FUNCTION: Releases a drivers isr
- * ARGUMENTS:
- * InterruptObject = isr to release
- */
-{
- KeDisconnectInterrupt(InterruptObject);
- ExFreePool(InterruptObject);
-}
-
/* EOF */
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: kthread.c,v 1.56 2004/10/30 23:48:56 navaraf Exp $
+/* $Id: kthread.c,v 1.57 2004/11/07 22:55:38 navaraf Exp $
*
* FILE: ntoskrnl/ke/kthread.c
* PURPOSE: Microkernel thread support
*/
}
-VOID STDCALL
-KeRescheduleThread(VOID)
-{
- PsDispatchThread(THREAD_STATE_READY);
-}
-
/*
* @implemented
*/
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: main.c,v 1.203 2004/11/05 17:41:34 ekohl Exp $
+/* $Id: main.c,v 1.204 2004/11/07 22:55:38 navaraf Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/main.c
ULONG EXPORTED KeDcacheFlushCount = 0;
ULONG EXPORTED KeIcacheFlushCount = 0;
ULONG EXPORTED KiDmaIoCoherency = 0; /* RISC Architectures only */
+ULONG EXPORTED InitSafeBootMode = 0; /* KB83764 */
#else
/* Microsoft-style declarations */
EXPORTED ULONG NtBuildNumber = KERNEL_VERSION_BUILD;
EXPORTED ULONG KeDcacheFlushCount = 0;
EXPORTED ULONG KeIcacheFlushCount = 0;
EXPORTED ULONG KiDmaIoCoherency = 0; /* RISC Architectures only */
+EXPORTED ULONG InitSafeBootMode = 0; /* KB83764 */
#endif /* __GNUC__ */
static LOADER_MODULE KeLoaderModules[64];
*/
LdrSafePEProcessModule((PVOID)KERNEL_BASE, (PVOID)KERNEL_BASE, (PVOID)DriverBase, &DriverSize);
- /* Now our imports from HAL is fixed. This is the first */
- /* time in the boot process that we can use HAL */
+ /* Now our imports from HAL are fixed. This is the first */
+ /* time in the boot process that we can use HAL */
FirstKrnlPhysAddr = KeLoaderModules[0].ModStart - KERNEL_BASE + 0x200000;
LastKrnlPhysAddr = LastKernelAddress - KERNEL_BASE + 0x200000;
-; $Id: ntoskrnl.def,v 1.198 2004/11/07 18:45:52 hyperion Exp $
+; $Id: ntoskrnl.def,v 1.199 2004/11/07 22:55:37 navaraf Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
InbvSetScrollRegion@16
InbvSetTextColor@4
InbvSolidColorFill@20
+InitSafeBootMode DATA
@InterlockedCompareExchange@12
@InterlockedDecrement@4
@InterlockedExchange@8
KeQueryTickCount@4
KeQueryTimeIncrement@0
KeRaiseUserException@4
-KeRescheduleThread@0
KeReadStateEvent@4
KeReadStateMutant@4
KeReadStateMutex@4