Module for clarifying the content of the smbios structure element information.\r
\r
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 1985 - 2022, American Megatrends International LLC.<BR>\r
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>\r
(C) Copyright 2015-2019 Hewlett Packard Enterprise Development LP<BR>\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
//\r
case 9:\r
{\r
- MISC_SLOT_PEER_GROUP *PeerGroupPtr;\r
- UINT8 PeerGroupCount;\r
+ MISC_SLOT_PEER_GROUP *PeerGroupPtr;\r
+ SMBIOS_TABLE_TYPE9_EXTENDED *Type9ExtendedStruct;\r
+ UINT8 PeerGroupCount;\r
\r
PRINT_PENDING_STRING (Struct, Type9, SlotDesignation);\r
DisplaySystemSlotType (Struct->Type9->SlotType, Option);\r
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DATA_BUS_WIDTH), gShellDebug1HiiHandle, PeerGroupPtr[Index].DataBusWidth);\r
}\r
\r
- DisplaySystemSlotHeight (Struct->Type9->SlotHeight, Option);\r
- DisplaySystemSlotPhysicalWidth (Struct->Type9->SlotPhysicalWidth, Option);\r
- DisplaySystemSlotInformation (Struct->Type9->SlotInformation, Option);\r
+ // Since PeerGroups has a variable number of entries, new fields added after PeerGroups are defined in\r
+ // a extended structure. Those fields can be referenced using SMBIOS_TABLE_TYPE9_EXTENDED structure.\r
+ Type9ExtendedStruct = (SMBIOS_TABLE_TYPE9_EXTENDED *)((UINT8 *)PeerGroupPtr + (PeerGroupCount * sizeof (MISC_SLOT_PEER_GROUP)));\r
+ DisplaySystemSlotHeight (Type9ExtendedStruct->SlotHeight, Option);\r
+ DisplaySystemSlotPhysicalWidth (Type9ExtendedStruct->SlotPhysicalWidth, Option);\r
+ DisplaySystemSlotInformation (Type9ExtendedStruct->SlotInformation, Option);\r
}\r
}\r
\r