mirror of
https://github.com/reactos/reactos.git
synced 2025-06-23 18:10:54 +00:00
[NTOSKRNL]
- Create a volatile device tree during 1st stage so the new HAL that's loaded in 2nd stage can do proper enumeration without phantom devices from the old HAL svn path=/trunk/; revision=53694
This commit is contained in:
parent
2817ba1e7e
commit
ff75ae1b72
1 changed files with 9 additions and 4 deletions
|
@ -22,6 +22,7 @@ KGUARDED_MUTEX PpDeviceReferenceTableLock;
|
||||||
RTL_AVL_TABLE PpDeviceReferenceTable;
|
RTL_AVL_TABLE PpDeviceReferenceTable;
|
||||||
|
|
||||||
extern ULONG ExpInitializationPhase;
|
extern ULONG ExpInitializationPhase;
|
||||||
|
extern BOOLEAN ExpInTextModeSetup;
|
||||||
extern BOOLEAN PnpSystemInit;
|
extern BOOLEAN PnpSystemInit;
|
||||||
|
|
||||||
/* DATA **********************************************************************/
|
/* DATA **********************************************************************/
|
||||||
|
@ -1049,6 +1050,10 @@ IopCreateDeviceKeyPath(IN PCUNICODE_STRING RegistryPath,
|
||||||
/* Assume failure */
|
/* Assume failure */
|
||||||
*Handle = NULL;
|
*Handle = NULL;
|
||||||
|
|
||||||
|
/* Create a volatile device tree in 1st stage so we have a clean slate
|
||||||
|
* for enumeration using the correct HAL (chosen in 1st stage setup) */
|
||||||
|
if (ExpInTextModeSetup) CreateOptions |= REG_OPTION_VOLATILE;
|
||||||
|
|
||||||
/* Open root key for device instances */
|
/* Open root key for device instances */
|
||||||
Status = IopOpenRegistryKeyEx(&hParent, NULL, &EnumU, KEY_CREATE_SUB_KEY);
|
Status = IopOpenRegistryKeyEx(&hParent, NULL, &EnumU, KEY_CREATE_SUB_KEY);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
@ -1143,7 +1148,7 @@ IopSetDeviceInstanceData(HANDLE InstanceKey,
|
||||||
&ObjectAttributes,
|
&ObjectAttributes,
|
||||||
0,
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
0,
|
REG_OPTION_VOLATILE,
|
||||||
NULL);
|
NULL);
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
@ -2638,7 +2643,7 @@ IopEnumerateDetectedDevices(
|
||||||
&ObjectAttributes,
|
&ObjectAttributes,
|
||||||
0,
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
REG_OPTION_NON_VOLATILE,
|
ExpInTextModeSetup ? REG_OPTION_VOLATILE : 0,
|
||||||
NULL);
|
NULL);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
@ -2654,7 +2659,7 @@ IopEnumerateDetectedDevices(
|
||||||
&ObjectAttributes,
|
&ObjectAttributes,
|
||||||
0,
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
REG_OPTION_NON_VOLATILE,
|
ExpInTextModeSetup ? REG_OPTION_VOLATILE : 0,
|
||||||
NULL);
|
NULL);
|
||||||
ZwClose(hLevel1Key);
|
ZwClose(hLevel1Key);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
@ -3898,7 +3903,7 @@ IoOpenDeviceRegistryKey(IN PDEVICE_OBJECT DeviceObject,
|
||||||
InitializeObjectAttributes(&ObjectAttributes, &KeyName,
|
InitializeObjectAttributes(&ObjectAttributes, &KeyName,
|
||||||
OBJ_CASE_INSENSITIVE, *DevInstRegKey, NULL);
|
OBJ_CASE_INSENSITIVE, *DevInstRegKey, NULL);
|
||||||
Status = ZwCreateKey(DevInstRegKey, DesiredAccess, &ObjectAttributes,
|
Status = ZwCreateKey(DevInstRegKey, DesiredAccess, &ObjectAttributes,
|
||||||
0, NULL, REG_OPTION_NON_VOLATILE, NULL);
|
0, NULL, ExpInTextModeSetup ? REG_OPTION_VOLATILE : 0, NULL);
|
||||||
ZwClose(ObjectAttributes.RootDirectory);
|
ZwClose(ObjectAttributes.RootDirectory);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue