From: Chris Phillips Date: Tue, 10 Jan 2017 06:49:08 +0000 (+0800) Subject: MdePkg: Add comments for SMBIOS Type 3 structure to cover SKU Number X-Git-Tag: edk2-stable201903~4774 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=f15908aa036585a80016fa7c02421b6d293a7550;p=mirror_edk2.git MdePkg: Add comments for SMBIOS Type 3 structure to cover SKU Number Starting with SMBIOS spec version 2.7, Type 3 added SKU Number. SKU Number is at a variable offset (depends on count and length of Contained Elements), so cannot add SKU Number to the SMBIOS_TABLE_TYPE3 structure. Adding comments to explain how to get SKU Number. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chris Phillips Reviewed-by: Star Zeng --- diff --git a/MdePkg/Include/IndustryStandard/SmBios.h b/MdePkg/Include/IndustryStandard/SmBios.h index 2e804ea88e..f72a56d6a0 100644 --- a/MdePkg/Include/IndustryStandard/SmBios.h +++ b/MdePkg/Include/IndustryStandard/SmBios.h @@ -468,7 +468,18 @@ typedef struct { UINT8 NumberofPowerCords; UINT8 ContainedElementCount; UINT8 ContainedElementRecordLength; + // + // Can have 0 to (ContainedElementCount * ContainedElementRecordLength) contained elements + // CONTAINED_ELEMENT ContainedElements[1]; + // + // Add for smbios 2.7 + // + // Since ContainedElements has a variable number of entries, must not define SKUNumber in + // the structure. Need to reference it by starting at offset 0x15 and adding + // (ContainedElementCount * ContainedElementRecordLength) bytes. + // + // SMBIOS_TABLE_STRING SKUNumber; } SMBIOS_TABLE_TYPE3; ///