Hardware Tree, Device Nodes, and Device Identifiers

The hardware tree is a structure, in memory that is built and maintained by the Configuration Manager. The hardware tree contains configuration information for all devices in the computer and Configuration Manager uses it to keep track of the resources associated with each device, such as IRQs, IO ports and even non-sharable resources like SCSI identifiers. The hardware tree describes existing devices and resources, resource requirements, resource interdependencies, and current resource allocations.

A device node is a specific entry in the hardware tree. Each device node contains a unique device identifier and a list of resource requirements. The device identifier is a string which uniquely describes the device. The string typically identifies the component that found the device, but because it is also used as a key in the registry, it must be unique within the system so that information about the device can be retrieved reliably.

The requirements list identifies the type resources the device needs to successfully operate and any constraints associated with those resources. IRQs, IO ports, DMA channels and memory ranges are examples of types of resources. Constraints are often resource interdependencies; such a device requiring that it must use IRQ3 and IO port 02F8 in combination in order to operate successfully.

Although a device driver or other component cannot access the hardware tree or the device nodes directly, it can retrieve a handle to any device node and carry out tasks that retrieve and set information in the device node. The Configuration Manager provides these services to carry out tasks on a device node.

Service Description
CONFIGMG_Create_DevNode Adds a device node to the hardware tree.
CONFIGMG_Disable_DevNode Disables a device node in the hardware tree.
CONFIGMG_Enable_DevNode Enables a device node in the hardware tree.
CONFIGMG_Get_Child Retrieves the first child of a given device node.
CONFIGMG_Get_Depth Retrieves the depth of a device node in the hardware tree.
CONFIGMG_Get_Device_ID Retrieves the device identifier for a device node.
CONFIGMG_Get_Device_ID_Size Retrieves the size of a device identifier from a device node.
CONFIGMG_Get_DevNode_Status Retrieves the status of a device node.
CONFIGMG_Get_Parent Retrieves the handle of a parent of a device node.
CONFIGMG_Get_Sibling Retrieves the sibling of a device node.
CONFIGMG_Locate_DevNode Retrieves a pointer to the device node corresponding to a specified device driver.
CONFIGMG_Move_DevNode Replaces a root enumerated devnode by the valid non-root enumerated devnode.
CONFIGMG_Query_Remove_SubTree Checks whether a device node and its progeny can be removed.
CONFIGMG_Reenumerate_DevNode Causes the enumerator of the specified device node to receive the CONFIG_ENUMERATE enumerator function.
CONFIGMG_Remove_SubTree Removes a device node and its children.
CONFIGMG_Remove_Unmarked_Children Removes any children of a device node that have the DN_HAS_MARK flag cleared.
CONFIGMG_Reset_Children_Marks Resets the DN_HAS_MARK flag in the children of a specified device node.
CONFIGMG_Setup_DevNode Reenables and configures a specified device node, or requests the enumerator to download information.

The device nodes in the hardware tree are arranged hierarchically. This means a device node is either at the root of the hardware tree or is the child of a parent device node. A device node can have child device nodes. The other children of a device node's parent are call siblings.

The hardware tree is built each time the computer is started. Furthermore, it is completely dynamic, changing even while the computer is running if a device is removed or added to the system.