From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on071e.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe41::71e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 416B681C0E for ; Wed, 11 Jan 2017 22:14:01 -0800 (PST) Received: from DF4PR84MB0236.NAMPRD84.PROD.OUTLOOK.COM (10.162.193.153) by DF4PR84MB0236.NAMPRD84.PROD.OUTLOOK.COM (10.162.193.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.829.7; Thu, 12 Jan 2017 06:13:59 +0000 Received: from DF4PR84MB0236.NAMPRD84.PROD.OUTLOOK.COM ([10.162.193.153]) by DF4PR84MB0236.NAMPRD84.PROD.OUTLOOK.COM ([10.162.193.153]) with mapi id 15.01.0829.017; Thu, 12 Jan 2017 06:13:59 +0000 From: "Augustine, Linson P" To: "Zeng, Star" , "edk2-devel@lists.01.org" CC: "Carsey, Jaben" , "Ni, Ruiyu" Thread-Topic: [edk2] [PATCH v2 1/1] ShellPkg/SmbiosView: Add decoding of SMBIOS record type 43 Thread-Index: AQHSa+i6u66yv7dvskOk9G0dBj/EP6EzCcgAgAFN3iCAAAUygIAAAU8w Date: Thu, 12 Jan 2017 06:13:59 +0000 Message-ID: References: <20170111085703.8180-1-linson.augustine@hpe.com> <4a32ae19-ab57-9715-df71-831e677a7356@intel.com> <0C09AFA07DD0434D9E2A0C6AEB0483103B81616F@shsmsx102.ccr.corp.intel.com> In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103B81616F@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=linson.augustine@hpe.com; x-originating-ip: [15.219.195.4] x-ms-office365-filtering-correlation-id: 24247578-6c4f-441a-2ae3-08d43ab2329d x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DF4PR84MB0236; x-microsoft-exchange-diagnostics: 1; DF4PR84MB0236; 7:NjndNs4G3BpxsC1LI02K4qMkb4NEeDcNSM8k9VunyhYJLvW9RCwn2Euo/TQ6Q0IIrZfoL/w8f7mCut6Rj3cnc9S5H91OZU6xs2k8ISmWWln7YRegKKQifDQI3851jMaWy7ORJxecv6U4+vXboO0gax9hGI5S047uFvhyD3xcmNPEo16xeoWQpXIcSsMpnVSZpZji/As2vBOhHF79TNP32gtV4irdaqe8MZTh17Y3nx0yghqyW5c6bse+hprVws5QVPAzZ1VzqIODu6Jjh+VldDfrl+uonEqlvK/ANHzA8JyHwSxMz/KaLfaVnwU2kdb0pPHkrPcvkYy6rJQUkceUugYhnymQo/LQM91iAjDnt9o/X8p6Z0+j5bR+EJGr9ea6GbgfTMnx30KrUuGpQ2FSdQGA/F4z+JqbozddOmostdO45AS/geUVe/Lp30SHS2E9vEkUiToidgjzADK41eQaww== x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(227479698468861)(162533806227266)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123562025)(20161123564025)(20161123560025)(20161123555025)(6072148); SRVR:DF4PR84MB0236; BCL:0; PCL:0; RULEID:; SRVR:DF4PR84MB0236; x-forefront-prvs: 018577E36E x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(39410400002)(39840400002)(39860400002)(39850400002)(39450400003)(24454002)(189002)(51914003)(13464003)(377454003)(199003)(76176999)(50986999)(54356999)(4326007)(106116001)(5001770100001)(105586002)(122556002)(2950100002)(5660300001)(92566002)(77096006)(9686003)(6306002)(2900100001)(229853002)(97736004)(81166006)(66066001)(33656002)(38730400001)(81156014)(7696004)(54906002)(6506006)(2501003)(68736007)(86362001)(189998001)(55016002)(6436002)(3846002)(2906002)(106356001)(8676002)(6116002)(102836003)(101416001)(3280700002)(3660700001)(93886004)(74316002)(305945005)(7736002)(575784001)(8936002)(21314002); DIR:OUT; SFP:1102; SCL:1; SRVR:DF4PR84MB0236; H:DF4PR84MB0236.NAMPRD84.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: hpe.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: hpe.com X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jan 2017 06:13:59.2061 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR84MB0236 Subject: Re: [PATCH v2 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: Thu, 12 Jan 2017 06:14:01 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Star, Thanks for the clarification. I will send the patch shortly. Regards, Linson -----Original Message----- From: Zeng, Star [mailto:star.zeng@intel.com]=20 Sent: Thursday, January 12, 2017 11:39 AM To: Augustine, Linson P ; edk2-devel@lists.01.org Cc: Carsey, Jaben ; Ni, Ruiyu ;= Zeng, Star Subject: RE: [edk2] [PATCH v2 1/1] ShellPkg/SmbiosView: Add decoding of SMB= IOS record type 43 Linson, " no comments to it" I said meant I have no comments to it, I just put a ma= rk at there as my following comments "How about use "Display TPM Device (Ty= pe 43) Characteristics" to align with the comment above?" will refer it. Sorry for confusing. Please update patch. Thanks, Star -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Augu= stine, Linson P Sent: Thursday, January 12, 2017 1:59 PM To: Zeng, Star ; edk2-devel@lists.01.org Cc: Carsey, Jaben ; Ni, Ruiyu Subject: Re: [edk2] [PATCH v2 1/1] ShellPkg/SmbiosView: Add decoding of SMB= IOS record type 43 Hi Star, This is regarding the following comments. > // > + // TPM Device (Type 43) The comment here is using "TPM Device (Type 43)", no comments to it. :) > + // All the comments in the function are using the heading of corresponding tab= le in SMBIOS spec. And for Type 43 it is " TPM Device (Type 43)". Please let me know if you like to change it. Based on this I will send the updated patch (addressing other comments as w= ell). Regards, Linson. -----Original Message----- From: Zeng, Star [mailto:star.zeng@intel.com] Sent: Wednesday, January 11, 2017 3:25 PM To: Augustine, Linson P ; edk2-devel@lists.01.org Cc: jaben.carsey@intel.com; ruiyu.ni@intel.com; star.zeng@intel.com Subject: Re: [edk2] [PATCH v2 1/1] ShellPkg/SmbiosView: Add decoding of SMB= IOS record type 43 Linson, Add minor comments inline. :) On 2017/1/11 16:57, Linson Augustine wrote: > Added decoding of the new SMBIOS Type 43 record. > > 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 +- > =20 > ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrin > gs.uni | 8 ++- > 4 files changed, 96 insertions(+), 3 deletions(-) > > diff --git > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c > index 7e17b69d5a..8d4a613c40 100644 > --- > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c > +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo > +++ .c > @@ -3,7 +3,7 @@ > > 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=20 > + LP
> This program and the accompanying materials > are licensed and made available under the terms and conditions of the = BSD License > which accompanies this distribution. The full text of the license=20 > may be found at @@ -1083,6 +1083,20 @@ SmbiosPrintStructure ( > break; > > // > + // TPM Device (Type 43) The comment here is using "TPM Device (Type 43)", no comments to it. :) > + // > + 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); > + DisplayTpmCharacteristics (ReadUnaligned64 ((UINT64 *) (UINTN) &(Str= uct->Type43->Characteristics)), Option); > + PRINT_STRUCT_VALUE_H (Struct, Type43, OemDefined); Thanks for the code update for this. > + break; > + > + // > // Inactive (Type 126) > // > case 126: > @@ -3225,3 +3239,59 @@ DisplaySPSCharacteristics ( > ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PO= WER_SUPPLY_NOT_REPLACE), gShellDebug1HiiHandle); > } > } > + > +/** > + Display TPM (Type 43) Device Characteristics. How about use "Display TPM Device (Type 43) Characteristics" to align with = the comment above? > + > + @param[in] Chara The information bits. > + @param[in] Option The optional information. > +**/ > +VOID > +DisplayTpmCharacteristics ( How about to use function name "DisplayTpmDeviceCharacteristics"? > + IN UINT64 Chara, > + IN UINT8 Option > + ) > +{ > + // > + // Print header > + // > + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN > +(STR_SMBIOSVIEW_PRINTINFO_TPM_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); }=20 > + if (BIT (Chara, 2) !=3D 0) { > + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN > + (STR_SMBIOSVIEW_PRINTINFO_TPM_CHAR_NOT_SUPPORTED), > + gShellDebug1HiiHandle); } > + > + if (BIT (Chara, 3) !=3D 0) { > + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN > + (STR_SMBIOSVIEW_PRINTINFO_TPM_CONFIG_FWU), gShellDebug1HiiHandle); } > + > + if (BIT (Chara, 4) !=3D 0) { > + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN > + (STR_SMBIOSVIEW_PRINTINFO_TPM_CONFIG_PLAT_SW), > + gShellDebug1HiiHandle); } > + > + if (BIT (Chara, 5) !=3D 0) { > + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN > + (STR_SMBIOSVIEW_PRINTINFO_TPM_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/PrintInfo.h > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.h > index 50667b684c..e5017990aa 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. > > Copyright (c) 2005 - 2015, Intel Corporation. All rights=20 > 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 = BSD License > which accompanies this distribution. The full text of the license=20 > may be found at @@ -420,4 +421,16 @@ DisplaySPSCharacteristics ( > IN UINT8 Option > ); > > +/** > + Display TPM (Type 43) Device Characteristics. > + > + @param[in] Chara The information bits. > + @param[in] Option The optional information. > +**/ > +VOID > +DisplayTpmCharacteristics ( > + IN UINT64 Chara, > + IN UINT8 Option > + ); > + > #endif > diff --git > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c > index d0106c0b55..e1e79c4410 100644 > --- > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c > +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTabl > +++ e.c > @@ -3,7 +3,7 @@ > And give a interface of query a string out of a table. > > Copyright (c) 2005 - 2015, Intel Corporation. All rights=20 > reserved.
> - (C) Copyright 2016 Hewlett Packard Enterprise Development LP
> + (C) Copyright 2016-2017 Hewlett Packard Enterprise Development=20 > + LP
> This program and the accompanying materials > are licensed and made available under the terms and conditions of the = BSD License > which accompanies this distribution. The full text of the license=20 > may be 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/SmbiosViewStr > ings.uni > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStr > ings.uni > index 9811542013..6c10db6993 100644 > --- > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStr > ings.uni > +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosVie > +++ wStrings.uni > @@ -2,7 +2,7 @@ > // > // Copyright (c) 2005 - 2015, Intel Corporation. All rights=20 > reserved.
// (C) Copyright 2014-2015 Hewlett-Packard Development=20 > Company, L.P.
-// (C) Copyright 2015 Hewlett Packard Enterprise=20 > Development LP
> +// (C) Copyright 2015-2017 Hewlett Packard Enterprise Development=20 > +LP
> // This program and the accompanying materials // are licensed and=20 > made available under the terms and conditions of the BSD License //=20 > which accompanies this distribution. The full text of the license may=20 > be found at @@ -488,4 +488,10 @@ > #string STR_SMBIOSVIEW_SMBIOSVIEW_SMBIOS_TABLE #languag= e en-US "SmbiosView: SMBIOS table damaged\r\n" > #string STR_SMBIOSVIEW_SMBIOSVIEW_OUT_OF_MEM #languag= e en-US "SmbiosView: Out of memory\r\n" > #string STR_SMBIOSVIEW_SMBIOSVIEW_CANNOT_ACCESS_STATS #languag= e en-US "SmbiosView: Cannot access statistics table\r\n" > +#string STR_SMBIOSVIEW_PRINTINFO_TPM_CHAR #languag= e en-US "TPM Characteristics: \r\n" > +#string STR_SMBIOSVIEW_PRINTINFO_TPM_CHAR_NOT_SUPPORTED #languag= e en-US "TPM Characteristics Not Supported\r\n" For the two strings above, how about use "TPM_DEVICE" instead "TPM" in STR_= SMBIOSVIEW_PRINTINFO_XXX and use "TPM Device" instead of "TPM" in string co= ntent? > +#string STR_SMBIOSVIEW_PRINTINFO_TPM_CONFIG_FWU #languag= e en-US "TPM Family configurable via firmware update\r\n" > +#string STR_SMBIOSVIEW_PRINTINFO_TPM_CONFIG_PLAT_SW #languag= e en-US "TPM Family configurable via platform software support\r\n" > +#string STR_SMBIOSVIEW_PRINTINFO_TPM_CONFIG_OEM #languag= e en-US "TPM Family configurable via OEM proprietary mechanism\r\n" For the three strings above, how about use "TPM_DEVICE" instead "TPM" in ST= R_SMBIOSVIEW_PRINTINFO_XXX and *remove* TPM in string content as the functi= on should have printed "TPM Device Characteristics:" before printing the Ch= aracteristics? Thanks, Star > +#string STR_SMBIOSVIEW_PRINTINFO_BITS_06_63 #languag= e en-US "Bits 6:63 are reserved\r\n" > > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel