chipsec.cfg.parsers.hob_parser module¶
HOB definition parser - describes the payload of GUID extension HOBs in XML
A platform configuration file pulls in HOB definitions the same way it pulls in other definitions, naming the IP node that will hold them:
- <hob>
<definition name=”HOB” config=”HOB.hob0.xml” />
</hob>
The included file declares one <structure> element per known GUID extension HOB, with a <field> element per member of the corresponding C structure, in declaration order:
- <hob>
- <structure name=”PEI_PCD_DATABASE” guid=”EA296D92-0B69-423C-8C28-33B4E0A91268”>
<field name=”Signature” type=”guid” desc=”PcdDataBaseGuid” /> <field name=”BuildVersion” type=”uint32” /> <field name=”Pad” type=”bytes” size=”6” />
</structure>
</hob>
Layouts are packed (no implicit alignment padding), so any padding present in the C structure must be declared explicitly as a field.
Definitions are stored by GUID in Cfg.HOB_DEFINITIONS and each one is exposed as a register whose fields are the structure members (byte offsets converted to bit positions), published into the platform hierarchy as VID.<definition name>.<structure name>.