ShellPkg:Improved Smbios Type9 data under smbiosview

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4135

Added spec version check while publishing new Type9 fields,
added Slot Pitch field which was missing and
corrected the publishing order as per Smbios spec.

Cc: Vasudevan S <vasudevans@ami.com>
Cc: Sundaresan S <sundaresans@ami.com>

Signed-off-by: Sainadh Nagolu <sainadhn@ami.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
Sainadh Nagolu
2022-11-04 16:23:08 +05:30
committed by mergify[bot]
parent 342813a3f7
commit c17c3c24d8
2 changed files with 13 additions and 6 deletions

View File

@ -638,12 +638,17 @@ SmbiosPrintStructure (
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DATA_BUS_WIDTH), gShellDebug1HiiHandle, PeerGroupPtr[Index].DataBusWidth);
}
// Since PeerGroups has a variable number of entries, new fields added after PeerGroups are defined in
// a extended structure. Those fields can be referenced using SMBIOS_TABLE_TYPE9_EXTENDED structure.
Type9ExtendedStruct = (SMBIOS_TABLE_TYPE9_EXTENDED *)((UINT8 *)PeerGroupPtr + (PeerGroupCount * sizeof (MISC_SLOT_PEER_GROUP)));
DisplaySystemSlotHeight (Type9ExtendedStruct->SlotHeight, Option);
DisplaySystemSlotPhysicalWidth (Type9ExtendedStruct->SlotPhysicalWidth, Option);
DisplaySystemSlotInformation (Type9ExtendedStruct->SlotInformation, Option);
if (AE_SMBIOS_VERSION (0x3, 0x4)) {
// Since PeerGroups has a variable number of entries, new fields added after PeerGroups are defined in
// a extended structure. Those fields can be referenced using SMBIOS_TABLE_TYPE9_EXTENDED structure.
Type9ExtendedStruct = (SMBIOS_TABLE_TYPE9_EXTENDED *)((UINT8 *)PeerGroupPtr + (PeerGroupCount * sizeof (MISC_SLOT_PEER_GROUP)));
DisplaySystemSlotInformation (Type9ExtendedStruct->SlotInformation, Option);
DisplaySystemSlotPhysicalWidth (Type9ExtendedStruct->SlotPhysicalWidth, Option);
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_PITCH), gShellDebug1HiiHandle, Type9ExtendedStruct->SlotPitch);
if (AE_SMBIOS_VERSION (0x3, 0x5)) {
DisplaySystemSlotHeight (Type9ExtendedStruct->SlotHeight, Option);
}
}
}
}