From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B6EA381C2E for ; Thu, 12 Jan 2017 17:22:20 -0800 (PST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP; 12 Jan 2017 17:22:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,220,1477983600"; d="scan'208";a="52428173" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga005.jf.intel.com with ESMTP; 12 Jan 2017 17:22:20 -0800 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 12 Jan 2017 17:22:19 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 12 Jan 2017 17:22:19 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.132]) with mapi id 14.03.0248.002; Fri, 13 Jan 2017 09:22:16 +0800 From: "Zeng, Star" To: Linson Augustine , "edk2-devel@lists.01.org" CC: "Kinney, Michael D" , "Carsey, Jaben" , "Ni, Ruiyu" , "Gao, Liming" , "Zeng, Star" Thread-Topic: [edk2] [PATCH v3 1/1] ShellPkg/SmbiosView: Add decoding of SMBIOS record type 43 Thread-Index: AQHSbKF7bRfbP/TBY0mkIuKa5HwsIKE0bbZggAEvw6A= Date: Fri, 13 Jan 2017 01:22:16 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B8166BD@shsmsx102.ccr.corp.intel.com> References: <20170112065936.6428-1-linson.augustine@hpe.com> <0C09AFA07DD0434D9E2A0C6AEB0483103B8161B8@shsmsx102.ccr.corp.intel.com> In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103B8161B8@shsmsx102.ccr.corp.intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v3 1/1] ShellPkg/SmbiosView: Add decoding of SMBIOS record type 43 X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 01:22:20 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Linson, The patch has been pushed at e9f0be021b7649c15d823e193110c0088cda9a89, than= ks for the contribution Star -----Original Message----- From: Zeng, Star=20 Sent: Thursday, January 12, 2017 3:17 PM To: Linson Augustine ; edk2-devel@lists.01.org Cc: Kinney, Michael D ; Carsey, Jaben ; Ni, Ruiyu ; Gao, Liming ; Zeng, Star Subject: RE: [edk2] [PATCH v3 1/1] ShellPkg/SmbiosView: Add decoding of SMB= IOS record type 43 Linson, Reviewed-by: Star Zeng I can help push this patch at tomorrow morning (PRC time) if no other comme= nts received. Thanks, Star -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Lins= on Augustine Sent: Thursday, January 12, 2017 3:00 PM To: edk2-devel@lists.01.org Cc: Kinney, Michael D ; Carsey, Jaben ; Ni, Ruiyu ; Zeng, Star ; Gao, Liming Subject: [edk2] [PATCH v3 1/1] ShellPkg/SmbiosView: Add decoding of SMBIOS = record type 43 Added decoding of the new SMBIOS Type 43 record. Addressed review comments. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Augustine Linson P --- ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c = | 72 +++++++++++++++++++- ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.h = | 13 ++++ ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c = | 6 +- ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.u= ni | 8 ++- 4 files changed, 96 insertions(+), 3 deletions(-) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintIn= fo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c index 7e17b69d5a..8948c050cc 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c @@ -3,7 +3,7 @@ =20 Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.
- (C) Copyright 2015 Hewlett Packard Enterprise Development LP
+ (C) Copyright 2015-2017 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License which accompanies this distribution. The full text of the license may b= e found at @@ -1083,6 +1083,20 @@ SmbiosPrintStructure ( break; =20 // + // TPM Device (Type 43) + // + case 43: + PRINT_BIT_FIELD (Struct, Type43, VendorID, 4); + PRINT_STRUCT_VALUE_H (Struct, Type43, MajorSpecVersion); + PRINT_STRUCT_VALUE_H (Struct, Type43, MinorSpecVersion); + PRINT_STRUCT_VALUE_H (Struct, Type43, FirmwareVersion1); + PRINT_STRUCT_VALUE_H (Struct, Type43, FirmwareVersion2); + PRINT_PENDING_STRING (Struct, Type43, Description); + DisplayTpmDeviceCharacteristics (ReadUnaligned64 ((UINT64 *) (UINTN) &= (Struct->Type43->Characteristics)), Option); + PRINT_STRUCT_VALUE_H (Struct, Type43, OemDefined); + break; + + // // Inactive (Type 126) // case 126: @@ -3225,3 +3239,59 @@ DisplaySPSCharacteristics ( ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWE= R_SUPPLY_NOT_REPLACE), gShellDebug1HiiHandle); } } + +/** + Display TPM Device (Type 43) Characteristics. + + @param[in] Chara The information bits. + @param[in] Option The optional information. +**/ +VOID +DisplayTpmDeviceCharacteristics ( + IN UINT64 Chara, + IN UINT8 Option + ) +{ + // + // Print header + // + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN +(STR_SMBIOSVIEW_PRINTINFO_TPM_DEVICE_CHAR), gShellDebug1HiiHandle); + // + // print option + // + PRINT_INFO_OPTION (Chara, Option); + + // + // Check all the bits and print information // This function does=20 + not use Table because table of bits + // are designed not to deal with UINT64 + // + if (BIT (Chara, 0) !=3D 0) { + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN + (STR_SMBIOSVIEW_PRINTINFO_RESERVED_BIT), gShellDebug1HiiHandle); } + + if (BIT (Chara, 1) !=3D 0) { + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN + (STR_SMBIOSVIEW_PRINTINFO_RESERVED_BIT), gShellDebug1HiiHandle); } if=20 + (BIT (Chara, 2) !=3D 0) { + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN + (STR_SMBIOSVIEW_PRINTINFO_TPM_DEVICE_CHAR_NOT_SUPPORTED), + gShellDebug1HiiHandle); } + + if (BIT (Chara, 3) !=3D 0) { + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN + (STR_SMBIOSVIEW_PRINTINFO_TPM_DEVICE_CONFIG_FWU), + gShellDebug1HiiHandle); } + + if (BIT (Chara, 4) !=3D 0) { + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN + (STR_SMBIOSVIEW_PRINTINFO_TPM_DEVICE_CONFIG_PLAT_SW), + gShellDebug1HiiHandle); } + + if (BIT (Chara, 5) !=3D 0) { + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN + (STR_SMBIOSVIEW_PRINTINFO_TPM_DEVICE_CONFIG_OEM), + gShellDebug1HiiHandle); } + + // + // Just print the Reserved + // + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN + (STR_SMBIOSVIEW_PRINTINFO_BITS_06_63), gShellDebug1HiiHandle); + +} diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintIn= fo.h b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.h index 50667b684c..56d6010281 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.h +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.h @@ -2,6 +2,7 @@ Module to clarify the element info of the smbios structure. =20 Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.
+ (C) Copyright 2017 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License which accompanies this distribution. The full text of the license may b= e found at @@ -420,4 +421,16 @@ DisplaySPSCharacteristics ( IN UINT8 Option ); =20 +/** + Display TPM Device (Type 43) Characteristics. + + @param[in] Chara The information bits. + @param[in] Option The optional information. +**/ +VOID +DisplayTpmDeviceCharacteristics ( + IN UINT64 Chara, + IN UINT8 Option + ); + #endif diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTa= ble.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c index d0106c0b55..e1e79c4410 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. +++ c @@ -3,7 +3,7 @@ And give a interface of query a string out of a table. =20 Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.
- (C) Copyright 2016 Hewlett Packard Enterprise Development LP
+ (C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License which accompanies this distribution. The full text of the license may b= e found at @@ -3190,6 +3190,10 @@ TABLE_ITEM StructureTypeInfoTable[] =3D = { L" Management Controller Host Interface" }, { + 43, + L" TPM Device" + }, + { 0x7E, L" Inactive" }, diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosV= iewStrings.uni b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/Smb= iosViewStrings.uni index 9811542013..4fc7972663 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStri= ngs.uni +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewS +++ trings.uni @@ -2,7 +2,7 @@ // // Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.
= // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P.
-= // (C) Copyright 2015 Hewlett Packard Enterprise Development LP
+// (C) Copyright 2015-2017 Hewlett Packard Enterprise Development=20 +LP
// This program and the accompanying materials // are licensed and made a= vailable under the terms and conditions of the BSD License // which accomp= anies this distribution. The full text of the license may be found at @@ -4= 88,4 +488,10 @@ #string STR_SMBIOSVIEW_SMBIOSVIEW_SMBIOS_TABLE #language = en-US "SmbiosView: SMBIOS table damaged\r\n" #string STR_SMBIOSVIEW_SMBIOSVIEW_OUT_OF_MEM #language = en-US "SmbiosView: Out of memory\r\n" #string STR_SMBIOSVIEW_SMBIOSVIEW_CANNOT_ACCESS_STATS #language = en-US "SmbiosView: Cannot access statistics table\r\n" +#string STR_SMBIOSVIEW_PRINTINFO_TPM_DEVICE_CHAR #language = en-US "TPM Device Characteristics: \r\n" +#string STR_SMBIOSVIEW_PRINTINFO_TPM_DEVICE_CHAR_NOT_SUPPORTED #language = en-US "TPM Device Characteristics Not Supported\r\n" +#string STR_SMBIOSVIEW_PRINTINFO_TPM_DEVICE_CONFIG_FWU #language = en-US "Family configurable via firmware update\r\n" +#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" =20 -- 2.11.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel