Tag structures store the details describing the hardware in the system.
Every tag structure stores information about a specific aspect of a hardware component on the system. Tags are grouped together into items, which provide complete descriptions of hardware components.
Every structure (or tag) in the hwinfo area starts the same way:
struct hwi_prefix { uint16_t size; uint16_t name; };
The location tag (a simple tag, not an item) gives the location of the hardware device's registers. This register location can be memory-mapped, or in a separate I/O space (see addrspace below).
If the system being described has multiple register groupings, there may be multiple location tags in an item description: one tag for each register grouping.
#define HWI_TAG_NAME_location "location" #define HWI_TAG_ALIGN_location (sizeof(uint64)) struct hwi_location { struct hwi_prefix prefix; uint32_t len; uint64_t base; uint16_t regshift; uint16_t addrspace; };
The irq tag (simple tag, not item) holds the logical interrupt vector number for a device.
#define HWI_TAG_NAME_irq "irq" #define HWI_TAG_ALIGN_irq (sizeof(uint32)) struct hwi_irq { struct hwi_prefix prefix; uint32_t vector; };
The diskgeometry tag (simple tag, not item) is used to transfer information about rotating disk geometry from the BIOS or UEFI. It is used for x86 platforms only.
#define HWI_TAG_NAME_diskgeometry "diskgeometry" #define HWI_TAG_ALIGN_diskgeometry (sizeof(uint32)) struct hwi_diskgeometry { struct hwi_prefix prefix; uint8_t disknumber; uint8_t sectorsize; /* as a power of two */ uint16_t heads; uint16_t cyls; uint16_t sectors; uint32_t nblocks; };
The pad tag (simple tag, not item) is used when padding must be inserted to meet the alignment constraints for the subsequent tag.
#define HWI_TAG_NAME_pad "pad" #define HWI_TAG_ALIGN_pad (sizeof(uint32)) struct hwi_pad { struct hwi_prefix prefix; };