Tags
Tag structures store details describing the hardware in the system.
Every tag structure stores information about a specific aspect of a hardware component. Tags are grouped together into items, which provide complete descriptions of hardware components.
hwi_prefix
Every structure (or tag) in the hwinfo area starts the same way:
struct hwi_prefix {
uint16_t size;
uint16_t name;
};
- size
- The size, in multiples of four bytes, of the structure. This size includes hwi_prefix. For example, a value of 12 in size means that the structure being examined is 48 bytes long.
- name
- An offset into the strings section of the system page, where a zero-terminated ASCII string containing the structure name is stored.
location tag
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, with 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;
};
- len
- The length, in bytes, of the registers.
- base
- The physical address of the start of the registers.
- regshift
- Indicates the shift for each register access.
- addrspace
- An offset, in bytes, from the start of the asinfo section.
irq tag
The irq tag (simple tag, not an 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;
};
- vector
- The logical interrupt vector number for the device being described.
diskgeometry tag
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;
};
- disknumber
- The number of the disk in the system.
- sectorsize
- The size of the sectors on the disk, expressed as a power of two.
- heads
- The number of heads.
- cyls
- The number of disk cylinders.
- sectors
- The number of sectors on the disk.
- nblocks
- The number of blocks, if specified. Otherwise, nblocks equals the number of heads multiplied by the number of cylinders multiplied by the number of sectors (heads * cyls * sectors).
pad tag
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;
};