ReactOS 0.4.16-dev-329-g9223134
|
#include <ntoskrnl.h>
#include <debug.h>
Go to the source code of this file.
Macros | |
#define | NDEBUG |
#define | CM_BOOT_DEBUG 0x20 |
#define | IS_NULL_TERMINATED(Buffer, Size) (((Size) >= sizeof(WCHAR)) && ((Buffer)[(Size) / sizeof(WCHAR) - 1] == UNICODE_NULL)) |
Functions | |
static BOOLEAN | CmpIsSafe (_In_ PHHIVE Hive, _In_ HCELL_INDEX SafeBootCell, _In_ HCELL_INDEX DriverCell) |
HCELL_INDEX NTAPI | CmpFindControlSet (_In_ PHHIVE SystemHive, _In_ HCELL_INDEX RootCell, _In_ PCUNICODE_STRING SelectKeyName, _Out_ PBOOLEAN AutoSelect) |
Finds the corresponding "HKLM\SYSTEM\ControlSetXXX" system control set registry key, according to the "Current", "Default", or "LastKnownGood" values in the "HKLM\SYSTEM\Select" registry key. | |
static ULONG | CmpFindTagIndex (_In_ PHHIVE Hive, _In_ HCELL_INDEX TagCell, _In_ HCELL_INDEX GroupOrderCell, _In_ PCUNICODE_STRING GroupName) |
Finds the index of the driver's "Tag" value in its corresponding group ordering list. | |
BOOLEAN NTAPI | CmpAddDriverToList (_In_ PHHIVE Hive, _In_ HCELL_INDEX DriverCell, _In_ HCELL_INDEX GroupOrderCell, _In_ PCUNICODE_STRING RegistryPath, _Inout_ PLIST_ENTRY DriverListHead) |
Inserts the specified driver entry into the driver list. | |
static BOOLEAN | CmpIsLoadType (_In_ PHHIVE Hive, _In_ HCELL_INDEX Cell, _In_ SERVICE_LOAD_TYPE LoadType) |
Checks whether the specified driver has the expected load type. | |
BOOLEAN NTAPI | CmpFindDrivers (_In_ PHHIVE Hive, _In_ HCELL_INDEX ControlSet, _In_ SERVICE_LOAD_TYPE LoadType, _In_opt_ PCWSTR BootFileSystem, _Inout_ PLIST_ENTRY DriverListHead) |
Enumerates all drivers within the given control set and load type, present in the "Services" sub-key, and inserts them into the driver list. | |
static BOOLEAN | CmpDoSort (_Inout_ PLIST_ENTRY DriverListHead, _In_ PCUNICODE_STRING OrderList) |
Performs the driver list sorting, according to the ordering list. | |
BOOLEAN NTAPI | CmpSortDriverList (_In_ PHHIVE Hive, _In_ HCELL_INDEX ControlSet, _Inout_ PLIST_ENTRY DriverListHead) |
Sorts the driver list, according to the drivers' group load ordering. | |
static BOOLEAN | CmpOrderGroup (_In_ PBOOT_DRIVER_NODE StartNode, _In_ PBOOT_DRIVER_NODE EndNode) |
BOOLEAN NTAPI | CmpResolveDriverDependencies (_Inout_ PLIST_ENTRY DriverListHead) |
Removes potential circular dependencies (cycles) and sorts the driver list. | |
VOID NTAPI | CmpFreeDriverList (_In_ PHHIVE Hive, _Inout_ PLIST_ENTRY DriverListHead) |
Empties the driver list and frees all allocated driver nodes in it. | |
Variables | |
ULONG | InitSafeBootMode |
BOOLEAN NTAPI CmpAddDriverToList | ( | _In_ PHHIVE | Hive, |
_In_ HCELL_INDEX | DriverCell, | ||
_In_ HCELL_INDEX | GroupOrderCell, | ||
_In_ PCUNICODE_STRING | RegistryPath, | ||
_Inout_ PLIST_ENTRY | DriverListHead | ||
) |
Inserts the specified driver entry into the driver list.
[in] | Hive | The SYSTEM hive. |
[in] | DriverCell | The registry key's hive cell of the driver to be added, inside the "Services" sub-key of the currently selected control set. |
[in] | GroupOrderCell | The hive cell of the "Control\GroupOrderList" registry key inside the currently selected control set. |
[in] | RegistryPath | Constant UNICODE_STRING pointing to "\\Registry\\Machine\\System\\CurrentControlSet\\Services\\". |
[in,out] | DriverListHead | The driver list where to insert the driver entry. |
Definition at line 364 of file cmboot.c.
Referenced by CmpFindDrivers().
|
static |
Performs the driver list sorting, according to the ordering list.
[in] | Hive | The SYSTEM hive. |
[in] | ControlSet | The control set registry key's hive cell. |
[in,out] | DriverListHead | The driver list to sort. |
Definition at line 828 of file cmboot.c.
Referenced by CmpSortDriverList().
HCELL_INDEX NTAPI CmpFindControlSet | ( | _In_ PHHIVE | SystemHive, |
_In_ HCELL_INDEX | RootCell, | ||
_In_ PCUNICODE_STRING | SelectKeyName, | ||
_Out_ PBOOLEAN | AutoSelect | ||
) |
Finds the corresponding "HKLM\SYSTEM\ControlSetXXX" system control set registry key, according to the "Current", "Default", or "LastKnownGood" values in the "HKLM\SYSTEM\Select" registry key.
[in] | SystemHive | The SYSTEM hive. |
[in] | RootCell | The root cell of the SYSTEM hive. |
[in] | SelectKeyName | The control set to check for: either "Current", "Default", or "LastKnownGood", the value of which selects the corresponding "HKLM\SYSTEM\ControlSetXXX" control set registry key. |
[out] | AutoSelect | Value of the "AutoSelect" registry value (unused). |
Definition at line 84 of file cmboot.c.
Referenced by CmGetSystemControlValues(), CmGetSystemDriverList(), and RegInitCurrentControlSet().
BOOLEAN NTAPI CmpFindDrivers | ( | _In_ PHHIVE | Hive, |
_In_ HCELL_INDEX | ControlSet, | ||
_In_ SERVICE_LOAD_TYPE | LoadType, | ||
_In_opt_ PCWSTR | BootFileSystem, | ||
_Inout_ PLIST_ENTRY | DriverListHead | ||
) |
Enumerates all drivers within the given control set and load type, present in the "Services" sub-key, and inserts them into the driver list.
[in] | Hive | The SYSTEM hive. |
[in] | ControlSet | The control set registry key's hive cell. |
[in] | LoadType | The load type the driver should match. |
[in] | BootFileSystem | Optional name of the boot file system, for which to insert its corresponding driver. |
[in,out] | DriverListHead | The driver list where to insert the enumerated drivers. |
Definition at line 679 of file cmboot.c.
Referenced by CmGetSystemDriverList(), and WinLdrScanRegistry().
|
static |
Finds the index of the driver's "Tag" value in its corresponding group ordering list.
[in] | Hive | The SYSTEM hive. |
[in] | TagCell | The driver's "Tag" registry value's hive cell. |
[in] | GroupOrderCell | The hive cell of the "Control\GroupOrderList" registry key inside the currently selected control set. |
[in] | GroupName | The driver's group name. |
Definition at line 215 of file cmboot.c.
Referenced by CmpAddDriverToList().
Empties the driver list and frees all allocated driver nodes in it.
[in] | Hive | The SYSTEM hive (used only for the Hive->Free() memory deallocator). |
[in,out] | DriverListHead | The driver list to free. |
Definition at line 1224 of file cmboot.c.
Referenced by CmGetSystemDriverList(), and WinLdrScanRegistry().
|
static |
Checks whether the specified driver has the expected load type.
[in] | Hive | The SYSTEM hive. |
[in] | DriverCell | The registry key's hive cell of the driver, inside the "Services" sub-key of the currently selected control set. |
[in] | LoadType | The load type the driver should match. |
Definition at line 618 of file cmboot.c.
Referenced by CmpFindDrivers().
|
static |
Definition at line 1081 of file cmboot.c.
Referenced by CmpFindDrivers().
|
static |
Definition at line 956 of file cmboot.c.
Referenced by CmpResolveDriverDependencies().
BOOLEAN NTAPI CmpResolveDriverDependencies | ( | _Inout_ PLIST_ENTRY | DriverListHead | ) |
Removes potential circular dependencies (cycles) and sorts the driver list.
[in,out] | DriverListHead | The driver list to sort. |
Definition at line 1030 of file cmboot.c.
Referenced by CmGetSystemDriverList(), and WinLdrScanRegistry().
BOOLEAN NTAPI CmpSortDriverList | ( | _In_ PHHIVE | Hive, |
_In_ HCELL_INDEX | ControlSet, | ||
_Inout_ PLIST_ENTRY | DriverListHead | ||
) |
Sorts the driver list, according to the drivers' group load ordering.
[in] | Hive | The SYSTEM hive. |
[in] | ControlSet | The control set registry key's hive cell. |
[in,out] | DriverListHead | The driver list to sort. |
Definition at line 902 of file cmboot.c.
Referenced by CmGetSystemDriverList(), and WinLdrScanRegistry().
|
extern |
Definition at line 71 of file init.c.
Referenced by CmpFindDrivers().