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 587838178D for ; Mon, 9 Jan 2017 02:06:07 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP; 09 Jan 2017 02:06:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,339,1477983600"; d="scan'208";a="1080823591" Received: from shzintpr01.sh.intel.com (HELO [10.7.209.18]) ([10.239.4.80]) by orsmga001.jf.intel.com with ESMTP; 09 Jan 2017 02:06:04 -0800 To: Linson Augustine , edk2-devel@lists.01.org References: <20170109091453.10820-1-linson.augustine@hpe.com> Cc: jaben.carsey@intel.com, ruiyu.ni@intel.com, leif.lindholm@linaro.org, ard.biesheuvel@linaro.org, star.zeng@intel.com From: "Zeng, Star" Message-ID: <28664684-5158-7657-7a7d-7e1505e3c79f@intel.com> Date: Mon, 9 Jan 2017 18:05:33 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170109091453.10820-1-linson.augustine@hpe.com> Subject: Re: [PATCH v1 1/1] ShellPkg/PrintInfo.c: 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: Mon, 09 Jan 2017 10:06:07 -0000 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Linson, Add some comments below. On 2017/1/9 17:14, 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 | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) > > diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c > index 7e17b69d5a..6eb4e5aada 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 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 may be found at > @@ -1083,6 +1083,20 @@ SmbiosPrintStructure ( > break; > > // > + // TPM Device (Type 43) > + // > + case 43: > + PRINT_SMBIOS_BIT_FIELD (Struct, &(Struct->Type43->VendorID), VendorID, 4); 1. I prefer to use 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_SMBIOS_STRING (Struct, Struct->Type43->Description, Description); 2. Similar to 1, I prefer to use PRINT_PENDING_STRING (Struct, Type43, Description); > + PRINT_SMBIOS_BIT_FIELD (Struct, &(Struct->Type43->Characteristics), Characteristics, 8); 3. Could you create a function similar with DisplayBiosCharacteristics() for the Characteristics? Thanks, Star > + PRINT_STRUCT_VALUE_H (Struct, Type43, OemDefined); > + break; > + > + // > // Inactive (Type 126) > // > case 126: >