lazybios 3.0.0
Lightweight SMBIOS/DMI parsing library
Loading...
Searching...
No Matches
Type 2: Baseboard Information Guide

Baseboard identity, feature flags, chassis association, and contained handles.

Result set and ownership

lazybiosGetType2 returns a lazybiosType2Array_t holding every matching structure. Iterate entries using count. A non-NULL result whose count is zero means the table contains no structure of this type; NULL means the arguments were unusable or an allocation failed. Release the set with lazybiosFreeType2, or assign it to ctx->Type2 and let lazybiosCleanup own it.

Every record carries its own SMBIOS handle and the structure length the firmware reported.

Encoded fields are decoded during parsing into decoded, which mirrors the raw member names (board_type). The raw value stays alongside it, so both the encoding and its meaning are available.

Identity and association

Each entry can identify its manufacturer, product, version, serial number, asset tag, and physical location. chassis_handle is a reference to an SMBIOS Type 3 structure, not an array index in the parsed Type 3 result. A chassis_handle value of 0xFFFF is preserved but marked absent.

Feature flags

feature_flags reports hosting, daughter-board, removability, replaceability, and hot-swap properties. Decode the combined bit field with decoded.feature_flags.

const char* decode_type2_flags(const lazybiosType2_t* board) {
if (LAZYBIOS_FIELD_STATUS(board, feature_flags) != LAZYBIOS_FIELD_PRESENT) return "Not Present";
return board->decoded.feature_flags;
}

Contained object handles

number_of_contained_object_handles gives the number of 16-bit entries in contained_object_handles. The parser allocates the handle array only when the formatted structure contains the complete declared sequence. Treat the handles as SMBIOS structure handles and resolve them against raw structure headers when cross-structure association is required. A declared count of zero means the contained-object information is absent.

See also
Type 2: Baseboard Information