From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: mx.groups.io; dkim=pass header.i=@ami.com header.s=selector1 header.b=gnfdKPlR; spf=pass (domain: ami.com, ip: 40.107.237.74, mailfrom: kalaivanip@ami.com) 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 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=eBSPUYx2bwsCM2tDRuxOFC8t3r9EBWgDeEhxhcqc29I=; b=gnfdKPlRVREeMQpmujRepzJoXjyIJE4WG9f/WglsdTPr1sHRj4ufwuQnJF/zJm8A+2pVKWrDcuzQb0mVPSM9u0SrXG9x4qbfB675hA79E7xNPJcmTgPZECmfRQZ9bujlYWje+I7mPFkr1Xa9WglpWtKPBVvRNVroe/8oCwzCcRg= 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 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 To: "devel@edk2.groups.io" , Kalaivani Palanikumar CC: Sundaresan S , Vasudevan S , Liming Gao Subject: [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: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=ami.com; 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: BCL: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-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR10MB5831.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(396003)(39840400004)(346002)(136003)(376002)(366004)(451199015)(122000001)(110136005)(1076003)(36756003)(2616005)(40140700001)(5660300002)(7049001)(2906002)(66556008)(186003)(8936002)(4743002)(30864003)(41300700001)(8676002)(6512007)(76116006)(64756008)(26005)(66946007)(86362001)(66476007)(66446008)(38070700005)(83380400001)(6506007)(316002)(91956017)(478600001)(4326008)(6486002)(54906003)(55236004)(71200400001)(38100700002);DIR:OUT;SFP:1101; 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 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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= .