diff --git a/ntoskrnl/io/iomgr/iomgr.c b/ntoskrnl/io/iomgr/iomgr.c index d7dc1bcb8c4..5d272cb8af7 100644 --- a/ntoskrnl/io/iomgr/iomgr.c +++ b/ntoskrnl/io/iomgr/iomgr.c @@ -77,6 +77,7 @@ extern KSPIN_LOCK IopLogListLock; extern KSPIN_LOCK IopTimerLock; extern PDEVICE_OBJECT IopErrorLogObject; +extern BOOLEAN PnPBootDriversInitialized; GENERAL_LOOKASIDE IoLargeIrpLookaside; GENERAL_LOOKASIDE IoSmallIrpLookaside; @@ -583,6 +584,10 @@ IoInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock) return FALSE; } + // the disk subsystem is initialized here and the SystemRoot is set too + // we can finally load other drivers from the boot volume + PnPBootDriversInitialized = TRUE; + #if !defined(_WINKD_) && defined(KDBG) /* Read KDB Data */ KdbInit(); diff --git a/ntoskrnl/io/pnpmgr/devaction.c b/ntoskrnl/io/pnpmgr/devaction.c index 12f3e443c30..8b4db9d387a 100644 --- a/ntoskrnl/io/pnpmgr/devaction.c +++ b/ntoskrnl/io/pnpmgr/devaction.c @@ -35,6 +35,7 @@ extern ERESOURCE IopDriverLoadResource; extern BOOLEAN PnpSystemInit; extern PDEVICE_NODE IopRootDeviceNode; extern BOOLEAN PnPBootDriversLoaded; +extern BOOLEAN PnPBootDriversInitialized; #define MAX_DEVICE_ID_LEN 200 #define MAX_SEPARATORS_INSTANCEID 0 @@ -1560,7 +1561,7 @@ IopActionInitChildServices(PDEVICE_NODE DeviceNode, IopDeviceNodeHasFlag(DeviceNode, DNF_DISABLED)) return STATUS_SUCCESS; - PiCallDriverAddDevice(DeviceNode, PnPBootDriversLoaded); + PiCallDriverAddDevice(DeviceNode, PnPBootDriversInitialized); return STATUS_SUCCESS; } diff --git a/ntoskrnl/io/pnpmgr/pnpinit.c b/ntoskrnl/io/pnpmgr/pnpinit.c index e32c11e930d..0667fd72785 100644 --- a/ntoskrnl/io/pnpmgr/pnpinit.c +++ b/ntoskrnl/io/pnpmgr/pnpinit.c @@ -24,6 +24,7 @@ PUNICODE_STRING PiInitGroupOrderTable; USHORT PiInitGroupOrderTableCount; INTERFACE_TYPE PnpDefaultInterfaceType; BOOLEAN PnPBootDriversLoaded = FALSE; +BOOLEAN PnPBootDriversInitialized = FALSE; ARBITER_INSTANCE IopRootBusNumberArbiter; ARBITER_INSTANCE IopRootIrqArbiter;