An item is a collection of tags that together describe a hardware component; each item describes a single hardware component.
The first tag in each item always begins with the hw_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; };
The Group item is used to groups several items together. It serves the same purpose as a directory in a filesystem. For example, the devclass level of the /hw tree would use a Group item.
#define HWI_TAG_NAME_group "Group" #define HWI_TAG_ALIGN_group (sizeof(uint32_t)) struct hwi_group { struct hwi_item item; };
The Bus item 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 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"
#define HWI_TAG_NAME_device "Device" #define HWI_TAG_ALIGN_device (sizeof(uint32)) struct hwi_device { struct hwi_item item; uint32_t pnpid; };
The Device item tells the system about an individual device (the device level from the hwinfo trees section); Group tags are used for the devclass level (see Device trees).
Device items include hypervisor devices:
#define HWI_ITEM_DEVCLASS_QVM "qvm"