Items

Updated: April 19, 2023

An item is a collection of tags that together describe a hardware component.

hwi_item tag

The first tag in each item always begins with the hwi_item structure (which, like other tags, must start with the hwi_prefix structure):
struct hwi_item {
    struct hwi_prefix   prefix;
    uint16_t            itemsize;
    uint16_t            itemname;
    uint16_t            owner;
    uint16_t            kids;
};
itemsize
The distance, in 4-byte quantities, to the start of the next item tag.
itemname
An offset into the strings section of the system page for the name of the item being described.
This field differs from the prefix.name field, which specifies the type of structure that contains the hwi_item tag.
owner
The offset, in bytes, from the start of the hwinfo section to the item that owns this item.
This field is used to group items into a tree structure, similar to a filesystem directory hierarchy. For a root item in an ownership tree, the field is set to HWI_NULL_OFF.
kids
The number children of the current item.

Group item

The Group item is implemented by the hwi_group structure and is used to group items together. It serves the same purpose as a directory in a filesystem (e.g., for the devclass level of the /hw tree).

#define HWI_TAG_NAME_group  "Group"
#define HWI_TAG_ALIGN_group (sizeof(uint32_t))

struct hwi_group {
    struct hwi_item     item;
};
item
The item.

Bus item

The Bus item is implemented by the hwi_bus structure and tells the system about a hardware bus.

#define HWI_TAG_NAME_bus    "Bus"
#define HWI_TAG_ALIGN_bus   (sizeof(uint32))

struct hwi_bus {
    struct hwi_item     item;
};
item
The item.
Item names can be (but are not limited to):
#define HWI_ITEM_BUS_PCI        "pci"
#define HWI_ITEM_BUS_ISA        "isa"
#define HWI_ITEM_BUS_EISA       "eisa"
#define HWI_ITEM_BUS_MCA        "mca"
#define HWI_ITEM_BUS_PCMCIA     "pcmcia"
#define HWI_ITEM_BUS_CAN        "can"
#define HWI_ITEM_BUS_SDIO       "sdio"
#define HWI_ITEM_BUS_I394       "I394"
#define HWI_ITEM_BUS_MOST       "most"
#define HWI_ITEM_BUS_UNKNOWN    "unknown"

Device item

The Device item is implemented by the hwi_device structure and tells the system about an individual device (which is stored at the device level of the /hw tree).

#define HWI_TAG_NAME_device     "Device"
#define HWI_TAG_ALIGN_device    (sizeof(uint32))

struct hwi_device {
    struct hwi_item     item;
    uint32_t            pnpid;
};
item
The item.
pnpid
(Deprecated) The Plug and Play device identifier assigned by Microsoft. Only relevant for devices that play media.
Note:
Device items include hypervisor devices:
#define HWI_ITEM_DEVCLASS_QVM	"qvm"