From nobody Thu May 16 20:22:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+94535+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94535+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1664495888069771.4620386274299; Thu, 29 Sep 2022 16:58:08 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id O6W4YY1788612xBvqCeDwFof; Thu, 29 Sep 2022 16:58:07 -0700 X-Received: from NAM12-BN8-obe.outbound.protection.outlook.com (NAM12-BN8-obe.outbound.protection.outlook.com [40.107.237.74]) by mx.groups.io with SMTP id smtpd.web10.7703.1664438803870601785 for ; Thu, 29 Sep 2022 01:06:44 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IkAa3H7Sz9KMA/KjwHLZko9Zb25zNzNdv+Ogu6T7/Jc18351ju9nHxYhzu4VtKO8Kz2vWlIhz4S72ybZ/KVfnYtqaScyCh60rdekHRIWCnwjhg/CG03tyoec6axfJb9PpaQi4I78kkX6c8waBzEahoCzis/5VIzu08Es/ULSf8Vql3xxP12lJccINSoghkk98ori58pxPZXfH9rwEvdA8Rsuf4f0x+B+az9rums1T7x+dTpENnJZEVmnyaXuljAy03s0kKFCM/3KbECuudGVYECv237aROXiEW2oGxrwUGbUk4UzMNSQ2D5oV1Y2cuMZJ33y5cK8f1LDrhXcZbTWRA== 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=eBSPUYx2bwsCM2tDRuxOFC8t3r9EBWgDeEhxhcqc29I=; b=XHZUKxdaHJr7zrWbYOhmcHbCIkmIET9qav4WrIyv++LGQd3K1+S5bpqmi1EJIJeXk1zRAOdjDY5wAJ+wOQiS22h9dCcQrVOW1DIRll965cziA7yVSAkI0D5Lf/R4mjpjJEMdV4KOC1LZNZaJPNUUAWP3q5hSsTHbe76Ju4jRkislQkRR39StfE+DP+cHud7ao6Azeqmlvr8vKYiykSDqo1/vVmqkvMiq22cNsQZNCs/P73Jz+MxfMjBPRyYOTnw6GEaSKpavZdxerfGciF0C9ux9tAkWE/8mWd1ni6fRySV4Kq4paSym19whCAkoqgs17Eod+uh/p2lTaNaiUidXgg== 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 X-Received: from PH7PR10MB5831.namprd10.prod.outlook.com (2603:10b6:510:132::19) by BY5PR10MB4338.namprd10.prod.outlook.com (2603:10b6:a03:207::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.26; Thu, 29 Sep 2022 08:06:40 +0000 X-Received: from PH7PR10MB5831.namprd10.prod.outlook.com ([fe80::cb6b:371c:de87:d35b]) by PH7PR10MB5831.namprd10.prod.outlook.com ([fe80::cb6b:371c:de87:d35b%9]) with mapi id 15.20.5676.017; Thu, 29 Sep 2022 08:06:40 +0000 From: "Kalaivani Palanikumar via groups.io" To: "devel@edk2.groups.io" , Kalaivani Palanikumar CC: Sundaresan S , Vasudevan S , Liming Gao Subject: [edk2-devel] [PATCH] ShellPkg: Changes to display Type 45 table in smbiosview and improved Type 3 table. Thread-Topic: [PATCH] ShellPkg: Changes to display Type 45 table in smbiosview and improved Type 3 table. Thread-Index: AQHY09pnaQqEXY+7XkGbyfid6R73JQ== Date: Thu, 29 Sep 2022 08:06:40 +0000 Message-ID: <20220929080627.974-1-kalaivanip@ami.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH7PR10MB5831:EE_|BY5PR10MB4338:EE_ x-ms-office365-filtering-correlation-id: a569cb55-41c2-43dc-ae27-08daa1f18a59 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: orceEz6sfNnoaZRqAe3B+rqhgrQsLxIZfoy0xsBzO7EoXSbqcVzB00rM3b+apuWFgMzU8OLo4Lmxpi88w+2QNjkTrI2BalADouVTcbwjUAPe3/6J8zt9Iov0agLmBZPzl0JSWnZMcVkwQrB7j7xeq+RMeMEI+2ZkunK/0hjvJjfFtpDMrdfCLiwJDGrS+SAqS2F/Xx8S/KyUAyZyKocJloKJIAhwHNAF3vkzPFsKoTg8CvmO/MM9rux32+3XVoJbO4YCI8GLLaHYj7XGrX+DktY/KwQJnx/TMwzBdxEn3QmuVjydPcsa/flGAvstDE9VLGFdLblDOUqsFE+aPWsCs7z7PuwHm3w9ob2tqShmDcuixFfwC8D7B+h6RXajXm0zlLPPnR9F5fRs4UVfPqYUFPQ/S5zUpVo2s2NvpOOCqnD/oVahyIa1OJcKH5kSqNewxhaZHrJUmq5QBA5VZn35Ux51s8OWndWJhzWlvG/9w5c33FAeasBwqD2lSSVsuCBQ4iNQ1mQgd1NR8DulZIop4cWVtZ/jWT/sqtte8wa/LdmDKWW8PJd1K2+qBM2xX61fRj4Efbmdak6zQgDDh5eyORzPykKZHLFKpIQbbbDEYP26ohJpf8SDOJD0E5LFB0N5fNiATGbp5WB+LgQXX4YaWZ0VUc2CpV8ogMSDEQpHhB4Jr4c8c+dgj0+fdTLZYRcIi0BaqyWZNW1MtY0p7rXUTQSLxp2MJFBsnKI6Q8EWtJNOJR0mgJeOba06BznKG2hy5ixb48Wtj0o9VSKz5WRhHA== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?FyaDF3uWLzDRz0084EVctFYBcYuD0/YQ37KvkAIplORY+cP41RTpvQEA1z?= =?iso-8859-1?Q?EiRHpDePWEgzoicvYWFDf+Pnq8jiyNuXTsZ64Gehim/RZsUFiflA+x3fck?= =?iso-8859-1?Q?PEKLjZ31BjFHgfDAotNn76txR0vvssKsSsYnV075xXMYoySxN2OAo7P9Vq?= =?iso-8859-1?Q?X4wZ3rNmg3trL1PaPhhumgE1lk7kr6WfV5QGcqXly//76r1Qk0Uk3I3+iE?= =?iso-8859-1?Q?7r1Zige1FYqD6od8UUMFfTmNUjy4JY5hh5QixiHwbRXVI+xWVQbrtBk6ov?= =?iso-8859-1?Q?bT1C189c3CP5us95n4FOVQBFQ8+7V6eSLUCJ5dbU7anUMBBaa0MH66ulMl?= =?iso-8859-1?Q?1t2yoUts7vELSjH5I4VtNIdNw+UfIpZ0V9hisOBcvz38KWrJ5pfnlrumOr?= =?iso-8859-1?Q?Hzc6Fjfhg4EWEG+Vn7SyVvqNSgGDiAHNDhcGOS1SWzLJcdp8g/1PKZsUpZ?= =?iso-8859-1?Q?uOb4SpTt7XGlnwEIzrGSDL/w/OFxLoshjbiEz95/QIXBF0XSeQT6wLTTX9?= =?iso-8859-1?Q?1r6zE/q1Ckq7WdIqKYHyS9yz52AmtaYGdKlZjzaTV0qaZlaWEFoc2Gh9jb?= =?iso-8859-1?Q?7dqaLmoqLZ+n66TWGsBmuPBvM5UD94HrMFEcv+JrnDZBNt+Y49jSLuoxt0?= =?iso-8859-1?Q?kcmyrq7PHFWu1TfP5ogOKUnnbwJAhqKU0Q3hx0GSx4qSGwb5u76QxgO1or?= =?iso-8859-1?Q?nP0zko+W3kkCFbzMhJUuLuf2FvA/2xnRvhu+Njrz/EEjtvvakq3/B3+1OD?= =?iso-8859-1?Q?HrvH5LTcRxio8TMIoRr1KaO9QeZE59djrndW8u+HXa4WbyEJJk5XGfvhkb?= =?iso-8859-1?Q?/qH6mPUVpfwBtx+Y1/oUvY6b/EkFq4wVapjk4GkQEg5sM5dIzgO3JvYOEw?= =?iso-8859-1?Q?MrVUwRgfQOLHU4yS9uigNcpLJVqqQIvpGfPpZK6snxquK7NOb0OitXlGLs?= =?iso-8859-1?Q?QiW1Vj/6DMegJNUekfLbm64fvj88eC73LR1YKZCOYEbU2yCfLsLDRpbqi2?= =?iso-8859-1?Q?JFxGNbqgsl2lwizGTscWVS8onCapyqOUGIr3bl1U9WasPvIdw+XHhR2n22?= =?iso-8859-1?Q?CLjsY1k0e6/4hU3GBTwiiL8UyUeyDYXaxXXBbRtDtH5/dHxoI4D6qB0bNs?= =?iso-8859-1?Q?gQ4yVBCPdvEJzFAobSCRiKNfwCkY5lBTjBq9lmQUJvuAjqSnVJ2XFaA1mM?= =?iso-8859-1?Q?+z8wuzPjSlRAAYqnukkdnqdjriP5B1vF5cwjIPNll/K6dMmbslhLq4SV+G?= =?iso-8859-1?Q?Ca3r4MdxqHdcnAFpAMiHXcuOCYtN3yoNW0ATADKSVdRpBZql1hbPgSA5HR?= =?iso-8859-1?Q?JSHB/CPu73Xtu+AyOXmzTh+vrb4Df+6TYQD9xgdvees5GdMY/UWzKUTPSy?= =?iso-8859-1?Q?JqMEROHFhzkU3WV7mX03/XoXZebm0wrjVUlvfHbLH9jkEX6YhgGYbUP0NZ?= =?iso-8859-1?Q?aOyW3JlIfBzCkQv9mmXdgB6qR9u0N7GiYXxQcJc/0OYRXzaipZAoRKZXWW?= =?iso-8859-1?Q?+QRzQ1tStPMaLfI3iBTL84jkcI7QyWkvKaHT2J5euPta/5OKyXzGB2WvGw?= =?iso-8859-1?Q?Qms36puAqCtgJE4WH9vros6m0zvzLXbpHAB0QecyC/O2Yftd6mHJXqq43V?= =?iso-8859-1?Q?EUbMj3LV32HFCGbKx6rvU1Lv6COhUgpvbx?= MIME-Version: 1.0 X-OriginatorOrg: ami.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR10MB5831.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a569cb55-41c2-43dc-ae27-08daa1f18a59 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Sep 2022 08:06:40.6357 (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: 34/oAF4wUC/m+SBvtO3KU8RSiG/tkU3wgoxJYWth2zC+dMd/jFIlmNOfMFctLd5XVSqPox7fQ6YtC7kG1oHV2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR10MB4338 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,kalaivanip@ami.com X-Gm-Message-State: Y6olvnw4tHR2N8mKzfdwx4Kdx1787277AA= Content-Language: en-US Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1664495887; bh=7T22ptHhkfA3kxSvbGtt2GfHUIoFVDd1v4ZVz+tya50=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=s7Bo+C15fYarxumKCBND9tP/AcPVqaOzrdjlCeliD+BCEICXmVlt8Xo3UobO7/6nceQ QoTjAcAhsqbtYVEfs1bNzuwUkSFarbgvsRaOVnPcrNql/NCOB06kJMDDcr0rlgnmq0Lz/ Ii5AJpFVilgGq2TX5c9GaGAFJAk8shiqtsw= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1664495889012100007 Content-Type: text/plain; charset="utf-8" Add support in smbiosview command to display Type 45 table. There is a bug = in Type 3 table which displays SystemEnclosureType as Undefined. As per Smb= ios spec, BIT7 in SMBIOS_TABLE_TYPE3.Type denotes whether chassis lock is p= resent or not. But, currently BIT7 considered to display SystemEnclosureTyp= e. Signed-off by: kalaivani P cc: Vasudevan S cc: Sundaresan S cc: Liming Gao --- .../SmbiosView/PrintInfo.c | 28 +++ .../SmbiosView/PrintInfo.h | 48 +++++ .../SmbiosView/QueryTable.c | 165 +++++++++++++++++- .../SmbiosView/SmbiosViewStrings.uni | 7 +- 4 files changed, 246 insertions(+), 2 deletions(-) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintIn= fo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c index bf5306205b..2b2a18bdce 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c @@ -1274,6 +1274,34 @@ SmbiosPrintStructure ( DisplayProcessorArchitectureType (Struct->Type44->ProcessorSpecificB= lock.ProcessorArchType, Option); break; + // + // Firmware Inventory Information (Type 45) + // + case 45: + { + UINT16 *AssociatedComponentHandles; + + PRINT_PENDING_STRING (Struct, Type45, FirmwareComponentName); + PRINT_PENDING_STRING (Struct, Type45, FirmwareVersion); + DisplayFirmwareVersionFormat (Struct->Type45->FirmwareVersionForma= t, Option); + PRINT_PENDING_STRING (Struct, Type45, FirmwareId); + DisplayFirmwareIdFormat (Struct->Type45->FirmwareIdFormat, Option); + PRINT_PENDING_STRING (Struct, Type45, ReleaseDate); + PRINT_PENDING_STRING (Struct, Type45, Manufacturer); + PRINT_PENDING_STRING (Struct, Type45, LowestSupportedVersion); + PRINT_STRUCT_VALUE_LH (Struct, Type45, ImageSize); + DisplayFirmwareCharacteristics (*(UINT16 *)(UINTN)&Struct->Type45-= >Characteristics, Option); + DisplayFirmwareStateInformation (Struct->Type45->State, Option); + PRINT_STRUCT_VALUE_H (Struct, Type45, AssociatedComponentCount); + + AssociatedComponentHandles =3D (UINT16 *)((UINTN)Struct->Type45 + = sizeof(SMBIOS_TABLE_TYPE45)); + for (Index =3D 0; Index < Struct->Type45->AssociatedComponentCount= ; Index++) { + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PR= INTINFO_FW_INVENTORY_HANDLE), gShellDebug1HiiHandle, Index + 1, AssociatedC= omponentHandles[Index]); + } + + break; + } + // // Inactive (Type 126) // diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintIn= fo.h b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.h index 8ecec693ad..43dbfcb94f 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.h +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.h @@ -3,6 +3,7 @@ Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.
(C) Copyright 2017 - 2019 Hewlett Packard Enterprise Development LP
+ Copyright (c) 1985 - 2022, American Megatrends International LLC.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -439,4 +440,51 @@ DisplayProcessorArchitectureType ( IN UINT8 Option ); +/** + Display Firmware Version Format (Type 45). + + @param[in] Key The key of the structure. + @param[in] Option The optional information. +**/ +VOID +DisplayFirmwareVersionFormat ( + IN UINT8 Key, + IN UINT8 Option + ); + +/** + Display Firmware ID Format (Type 45) + + @param[in] Key The key of the structure. + @param[in] Option The optional information. +**/ +VOID +DisplayFirmwareIdFormat ( + IN UINT8 Key, + IN UINT8 Option + ); + +/** + Display Firmware State Information (Type 45) + + @param[in] Key The key of the structure. + @param[in] Option The optional information. +**/ +VOID +DisplayFirmwareStateInformation ( + IN UINT8 Key, + IN UINT8 Option + ); + +/** + Display Firmware Inventory Characteristics (Type 45) + + @param[in] Key The key of the structure. + @param[in] Option The optional information. +**/ +VOID +DisplayFirmwareCharacteristics ( + IN UINT16 Key, + IN UINT8 Option + ); #endif diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTa= ble.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c index 2e62ae3a34..06b24b55cd 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c @@ -4,6 +4,7 @@ Copyright (c) 2005 - 2021, Intel Corporation. All rights reserved.
(C) Copyright 2016-2019 Hewlett Packard Enterprise Development LP
+ Copyright (c) 1985 - 2022, American Megatrends International LLC.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -3586,6 +3587,71 @@ TABLE_ITEM ProcessorArchitectureTypesTable[] =3D { } }; +TABLE_ITEM FirmwareVersionFormatTable[] =3D { + { + VersionFormatTypeFreeForm, + L" Free Form " + }, + { + VersionFormatTypeMajorMinor, + L" MAJOR.MINOR " + }, + { + VersionFormatType32BitHex, + L" 32-bit Numeric in Hex " + }, + { + VersionFormatType64BitHex, + L" 64-bit Numeric in Hex " + } +}; + +TABLE_ITEM FirmwareIdFormatTable[] =3D { + { + FirmwareIdFormatTypeFreeForm, + L" Free Form " + }, + { + FirmwareIdFormatTypeUuid, + L" UUID " + } +}; + +TABLE_ITEM FirmwareStateTable[] =3D { + { + FirmwareInventoryStateOther, + L" Other " + }, + { + FirmwareInventoryStateUnknown, + L" Unknown " + }, + { + FirmwareInventoryStateDisabled, + L" Disabled " + }, + { + FirmwareInventoryStateEnabled, + L" Enabled " + }, + { + FirmwareInventoryStateAbsent, + L" Absent " + }, + { + FirmwareInventoryStateStandbyOffline, + L" Standby Offline " + }, + { + FirmwareInventoryStateStandbySpare, + L" Standby Spare " + }, + { + FirmwareInventoryStateUnavailableOffline, + L" Unavailable Offline " + } +}; + TABLE_ITEM StructureTypeInfoTable[] =3D { { 0, @@ -3767,6 +3833,10 @@ TABLE_ITEM StructureTypeInfoTable[] =3D { 44, L" Processor Additional Information" }, + { + 45, + L" Firmware Inventory Information" + }, { 0x7E, L" Inactive" @@ -4002,7 +4072,7 @@ DisplaySystemEnclosureType ( // // query table and print info // - PRINT_TABLE_ITEM (SystemEnclosureTypeTable, Type); + PRINT_TABLE_ITEM (SystemEnclosureTypeTable, (Type & ~BIT7)); if (BIT (Type, 7) !=3D 0) { ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE= _CHASSIS_LOCK_PRESENT), gShellDebug1HiiHandle); @@ -5090,6 +5160,99 @@ DisplayProcessorArchitectureType ( PRINT_TABLE_ITEM (ProcessorArchitectureTypesTable, Key); } +/** + Display Firmware Version Format (Type 45). + + @param[in] Key The key of the structure. + @param[in] Option The optional information. +**/ +VOID +DisplayFirmwareVersionFormat ( + IN UINT8 Key, + IN UINT8 Option + ) +{ + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE= _FW_VERSION_FORMAT), gShellDebug1HiiHandle); + PRINT_INFO_OPTION (Key, Option); + + if (Key <=3D VersionFormatType64BitHex) { + PRINT_TABLE_ITEM (FirmwareVersionFormatTable, Key); + } else if ((Key >=3D VersionFormatTypeReserved) && (Key < VersionForma= tTypeOem)) { + ShellPrintEx (-1, -1, L" Reserved\n"); + } else { + ShellPrintEx (-1, -1, L" BIOS Vendor / OEM-specific\n"); + } +} + +/** + Display Firmware ID Format (Type 45) + + @param[in] Key The key of the structure. + @param[in] Option The optional information. +**/ +VOID +DisplayFirmwareIdFormat ( + IN UINT8 Key, + IN UINT8 Option + ) +{ + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE= _FW_ID_FORMAT), gShellDebug1HiiHandle); + PRINT_INFO_OPTION (Key, Option); + + if (Key <=3D FirmwareIdFormatTypeUuid) { + PRINT_TABLE_ITEM (FirmwareIdFormatTable, Key); + } else if ((Key >=3D FirmwareIdFormatTypeReserved) && (Key < Inventory= FirmwareIdFormatTypeOem)) { + ShellPrintEx (-1, -1, L" Reserved\n"); + } else { + ShellPrintEx (-1, -1, L" BIOS Vendor / OEM-specific\n"); + } +} + +/** + Display Firmware Inventory Characteristics (Type 45) + + @param[in] Key The key of the structure. + @param[in] Option The optional information. +**/ +VOID +DisplayFirmwareCharacteristics ( + IN UINT16 Key, + IN UINT8 Option + ) +{ + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_= FW_INVENTORY_CHAR), gShellDebug1HiiHandle); + PRINT_INFO_OPTION (Key, Option); + + if (BIT (Key, 0) =3D=3D 1) { + ShellPrintEx (-1, -1, L"Updatable\n"); + } else { + ShellPrintEx (-1, -1, L"Not Updatable\n"); + } + + if (BIT (Key, 1) =3D=3D 1) { + ShellPrintEx (-1, -1, L"Write Protected\n"); + } else { + ShellPrintEx (-1, -1, L"Not Write Protected\n"); + } +} + +/** + Display Firmware State Information (Type 45) + + @param[in] Key The key of the structure. + @param[in] Option The optional information. +**/ +VOID +DisplayFirmwareStateInformation ( + IN UINT8 Key, + IN UINT8 Option + ) +{ + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE= _FW_STATE), gShellDebug1HiiHandle); + PRINT_INFO_OPTION (Key, Option); + PRINT_TABLE_ITEM (FirmwareStateTable, Key); +} + /** Display the structure type information. diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosV= iewStrings.uni b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/Smb= iosViewStrings.uni index 68211ce7ab..fc8ff317e6 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStri= ngs.uni +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStri= ngs.uni @@ -3,6 +3,7 @@ // Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
// (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P.
// (C) Copyright 2015-2019 Hewlett Packard Enterprise Development LP
+// Copyright (c) 1985 - 2022, American Megatrends International LLC.
// SPDX-License-Identifier: BSD-2-Clause-Patent // // Module Name: @@ -504,4 +505,8 @@ #string STR_SMBIOSVIEW_PRINTINFO_TPM_DEVICE_CONFIG_PLAT_SW #language = en-US "Family configurable via platform software support\r\n" #string STR_SMBIOSVIEW_PRINTINFO_TPM_DEVICE_CONFIG_OEM #language = en-US "Family configurable via OEM proprietary mechanism\r\n" #string STR_SMBIOSVIEW_PRINTINFO_BITS_06_63 #language = en-US "Bits 6:63 are reserved\r\n" - +#string STR_SMBIOSVIEW_PRINTINFO_FW_INVENTORY_CHAR #language = en-US "Firmware Characteristics: \r\n" +#string STR_SMBIOSVIEW_PRINTINFO_FW_INVENTORY_HANDLE #language = en-US "Associated Component Handle %d: 0x%x\r\n" +#string STR_SMBIOSVIEW_QUERYTABLE_FW_VERSION_FORMAT #language = en-US "Firmware Version Format:" +#string STR_SMBIOSVIEW_QUERYTABLE_FW_ID_FORMAT #language = en-US "Firmware ID Format:" +#string STR_SMBIOSVIEW_QUERYTABLE_FW_STATE #language = en-US "Firmware State:" -- 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. -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#94535): https://edk2.groups.io/g/devel/message/94535 Mute This Topic: https://groups.io/mt/94007102/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-