From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.41]) by mx.groups.io with SMTP id smtpd.web12.10204.1660042315784189074 for ; Tue, 09 Aug 2022 03:51:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ami.com header.s=selector1 header.b=PRZyeRqd; spf=pass (domain: ami.com, ip: 40.107.236.41, mailfrom: sainadhn@ami.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iM7iKeMLLdNYK9wJFN41A2B8HbmLJhSlASJX3+q9Mznrah1kQ1b5Jk+2Iw1I4EIzae+f0NJqn02qMXgchPC5Z2X4Z049XsRn8Rid/aDCqnY13r+sf1ndBzOFxJQo1sGRT9uiszAuezO1oB+JE715LvE/c/zjsrrgJNUKZk/yzZo8rNsaU82/85aXlVrTynLgOTibgjO8gdDOkEC2YLiM/S7o7tBL/qQZ/8qURkSKQC75XRCTGtl/rcSUdpxqcgq0BdrZ5VeiBn76p1NFe54LIDmTabHCFVum+O1DYYuqJXptKVXB/mwtSlgCmCU8kCFZnwvq+Q8tQ+aCUdwsQf4coA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=31A5RE0ElsBCeOMylmZEhJ/VBVmpeG8IXrkJ3x52bIM=; b=SHIGkOP2/OgiHdydtJ/chvy7ridt041qjsYy+tbA24EhoJqzNq49aiD4Oq/QCi40E3FIw/d7/M0Jx64xm18C/P6bga2/fwBnoLPPcv+4STi/hadDKf/TQdqnTNQBcofzH1RyUfLTpYSQBekecnPF+LoRhmO4PJ/Fc/jUfCylYfQ95ilNWHe5nEx/2xLlKXxwl1yK8yNVKWL6SUtERwPZ6KKcvgo49H9C9UCahT1LPDmLczYjhmuyNKkhntj7tcQiAEnRvwwPK4UpfBSe9PP5EH8VEfEJFZlYAFmMvS3P+ZSZo+WqxXixSfk6Mq2/NG9qErGE/9RNOEvH0HEHcRd1gQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ami.com; dmarc=pass action=none header.from=ami.com; dkim=pass header.d=ami.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ami.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=31A5RE0ElsBCeOMylmZEhJ/VBVmpeG8IXrkJ3x52bIM=; b=PRZyeRqdRr7LSyheZ6hqlPaba/LjUDcoaF21oEmdtyNUE93SxF3J1uHr5y6k6uvb3aY9vLEQnPJppsAPypXaRDm3LrIZZiSlaO5TQ2aIpK4QU/Kry2UEZQJ3iLhlUzpYsDgaDK19S42kM3pzVN+Zj8xnWwSFpsPjaK8d+7GJFwY= Received: from PH0PR10MB4805.namprd10.prod.outlook.com (2603:10b6:510:3b::11) by SA1PR10MB5781.namprd10.prod.outlook.com (2603:10b6:806:23e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.17; Tue, 9 Aug 2022 10:51:51 +0000 Received: from PH0PR10MB4805.namprd10.prod.outlook.com ([fe80::c943:17da:a7d1:6fe5]) by PH0PR10MB4805.namprd10.prod.outlook.com ([fe80::c943:17da:a7d1:6fe5%9]) with mapi id 15.20.5504.020; Tue, 9 Aug 2022 10:51:51 +0000 From: "Sainadh Nagolu" To: "devel@edk2.groups.io" , Sainadh Nagolu CC: Sundaresan S , Vasudevan Sambandan , "gaoliming@byosoft.com.cn" Subject: [PATCH] ShellPkg:Improved Smbios Type 9 table changes in PrintInfo.c Thread-Topic: [PATCH] ShellPkg:Improved Smbios Type 9 table changes in PrintInfo.c Thread-Index: AQHYq94HKGrmlTSdZUqpD97l1TG2VQ== Date: Tue, 9 Aug 2022 10:51:50 +0000 Message-ID: <20220809105100.2081-1-sainadhn@ami.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=ami.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 76159054-9bec-4f54-d9a7-08da79f52a82 x-ms-traffictypediagnostic: SA1PR10MB5781:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PtbD8RA+ym08DkzRxYTX4qlbUcbLsEsz/LKzOsxvgc0yg0hG1lf9Q07thxE/pt1pwroiayULJ5ouCKGEFS8qR+SOwoFJdtBWjW1M1U8tk8tHPZ/eRj4WDK0B209KqQK7mGbMfxOLYazkgJEsdeDxReee8BjMKNCff6ZLEyq+++yOfxQziM0zaZxidNi+9i8as+0dBPghNit9vJoW5CIHLzI18+GFtEdMaK4fTiDawCyTZ3eepRj+vso7IOgQx9FznYo2ECqir5J5fUzD4+rZ3o/wo0GvBbKEG1Ns1zp0hnQpuUWurdVYB4HtecHjKrOKlJH+bR+ZrcMzHF2lz1KSCJSifpu48ptMJ+NoPdp+HbbntyHQCkg8B004oYB5LMdaqc1xX0wSvunsh5Fh6kwJyM66HX5A3n28l8qkxK6dyTiZC78FJlu2/P0EpnnecxgAZLJLatwKvVcbBKhT5C98Vk+ljMHzNz3bkbt2VzvI+z43REzA48TF8RYnwckftK1fsQxKR3MtzbyqJ2ejEOY0orTq1pjKwBNICMvA+Vsw2Nk1Q58r3+FzjmrC3A/1Rf9TXvqcU6Wt0W1f8mR7DNffv6JbLd0mLC+gvX0hP+EKnEhYxrhBcl28ZwcR9yeSl2YGHf9Ct2uaOw/GaUBvNFOFOzzFf74g6kwg+3bhGF1GjLYNdv6H1wAu1ZuPvwLCGCUkscBK95nBEppyw43CuK/9e6sP/6rAilVZGy9zrScAvoEdq1DvWgvMZqerwU3DCnkHEUAiKmP/JQAFNvxmS1b2X9fWTPO8jYWr5d/GX+UcRbL26J3mD4hKLiwblnkYsFf5 x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR10MB4805.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(136003)(346002)(366004)(376002)(39850400004)(396003)(1076003)(66446008)(8936002)(5660300002)(55236004)(26005)(6486002)(4326008)(38070700005)(66946007)(2616005)(76116006)(91956017)(40140700001)(66556008)(66476007)(64756008)(83380400001)(478600001)(6512007)(8676002)(71200400001)(316002)(41300700001)(186003)(38100700002)(54906003)(36756003)(122000001)(7049001)(2906002)(86362001)(110136005)(6506007)(19627235002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?a4Nl/KyY50dIHnZyDMXnWrxXgbVzeM7haevCmCjei4/O43yNJdRCB/b457?= =?iso-8859-1?Q?E2j3xY4S/srO6AsT/UpeNG9d9kx0X92dvb+4XuM1R3lT20s55wkl3OEKD2?= =?iso-8859-1?Q?cBvHUTRaoWfnw/vnMARtL4tSbLtSno/U2Ay8CmZK8ij3iGZDpKpVZRRv3v?= =?iso-8859-1?Q?ZvHuypUA838GSMQd86MIKANKnbvgt3glvScVBnBc9t0647B2JdSom/WPOZ?= =?iso-8859-1?Q?eA2sAKcN4yvOCr1cO9WQ9Dr2txBChpWR6zKzyJDwD8UXUesPnu8eJ2AywU?= =?iso-8859-1?Q?TEmV3LmmpR3pyXWr9C/BzDqb8860UxGnFtwY4RSPMylTxBHWUFHhwoKmwZ?= =?iso-8859-1?Q?pjVusqqFLgCzq7TdAWLCa8Q8aqk0avqDo6Rbp9YxGUYAzE+Fa3/euOkamJ?= =?iso-8859-1?Q?i9/0YC22B90ZZ6J0tiKFzexyYnkDScHCiCNsUgP8UQ3KYc3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ArKVcTOHNt5bf5638ZKZLQ5nP6FBPBrJApLg?= =?iso-8859-1?Q?umL4YRq8DAbAd7PCY/DxcsZIl/Vo3+yTEwjph+hub+ZSOO5oskf7yh/leC?= =?iso-8859-1?Q?oxVkhpzbXr6H2ThIJ/6kqfoNIO3+B51Tsm6ZfQKTb0XgwLmTmuFnGke0if?= =?iso-8859-1?Q?eTyS1z4GN25y/tTqhc1FMC+EB0JcLxiU16zjfgEYJ8QgL8m9e/xzO+scux?= =?iso-8859-1?Q?3RXL9WHD2BsKnW8Hs+3d/n/8fadz77/jLPhERXHd3ZC8n5eaF9CsMtVz+1?= =?iso-8859-1?Q?BdRZL74VTIpPFDoqBdxWv8Cp6xP9w7J0cO?= MIME-Version: 1.0 X-OriginatorOrg: ami.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR10MB4805.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 76159054-9bec-4f54-d9a7-08da79f52a82 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Aug 2022 10:51:51.3201 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 27e97857-e15f-486c-b58e-86c2b3040f93 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: VovwZ8/VTUX7ABxOA2b/X/7KCLDyCPL2UhyvUxdBE74Cf05aP6rGVcfSN9iKDq+QFKtmet6HnhQ47OWEPVFPLw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR10MB5781 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Since PeerGroups has a variable number of entries, new fields added after P= eerGroups are defined in a extended structure. Done changes in PrintInfo.c = to access those fields using SMBIOS_TABLE_TYPE9_EXTENDED structure from SmB= ios.h. Signed-off-by: Sainadh Nagolu CC: Vasudevan Sambandan CC: Sundaresan S --- .../SmbiosView/PrintInfo.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintIn= fo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c index a0ee286c9a..e1acb1e288 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c @@ -2,6 +2,7 @@ Module for clarifying the content of the smbios structure element inform= ation. Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
+ Copyright (c) 1985 - 2022, American Megatrends International LLC.
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.
(C) Copyright 2015-2019 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -597,8 +598,9 @@ SmbiosPrintStructure ( // case 9: { - MISC_SLOT_PEER_GROUP *PeerGroupPtr; - UINT8 PeerGroupCount; + MISC_SLOT_PEER_GROUP *PeerGroupPtr; + SMBIOS_TABLE_TYPE9_EXTENDED *Type9ExtendedStruct; + UINT8 PeerGroupCount; PRINT_PENDING_STRING (Struct, Type9, SlotDesignation); DisplaySystemSlotType (Struct->Type9->SlotType, Option); @@ -636,9 +638,12 @@ SmbiosPrintStructure ( ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PR= INTINFO_DATA_BUS_WIDTH), gShellDebug1HiiHandle, PeerGroupPtr[Index].DataBus= Width); } - DisplaySystemSlotHeight (Struct->Type9->SlotHeight, Option); - DisplaySystemSlotPhysicalWidth (Struct->Type9->SlotPhysicalWidth= , Option); - DisplaySystemSlotInformation (Struct->Type9->SlotInformation, Op= tion); + //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 SMB= IOS_TABLE_TYPE9_EXTENDED structure. + Type9ExtendedStruct =3D (SMBIOS_TABLE_TYPE9_EXTENDED*)((U= INT8*)PeerGroupPtr + (PeerGroupCount * sizeof(MISC_SLOT_PEER_GROUP))); + DisplaySystemSlotHeight (Type9ExtendedStruct->SlotHeight,= Option); + DisplaySystemSlotPhysicalWidth (Type9ExtendedStruct->SlotPhysica= lWidth, Option); + DisplaySystemSlotInformation (Type9ExtendedStruct->SlotInformati= on, Option); } } -- 2.36.0.windows.1 -The information contained in this message may be confidential and propriet= ary to American Megatrends (AMI). This communication is intended to be read= only by the individual or entity to whom it is addressed or by their desig= nee. If the reader of this message is not the intended recipient, you are o= n notice that any distribution of this message, in any form, is strictly pr= ohibited. Please promptly notify the sender by reply e-mail or by telephone= at 770-246-8600, and then delete or destroy all copies of the transmission= .