From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 2701581B34 for ; Tue, 10 Jan 2017 02:06:36 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP; 10 Jan 2017 02:06:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,343,1477983600"; d="scan'208";a="211624504" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga004.fm.intel.com with ESMTP; 10 Jan 2017 02:06:35 -0800 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 10 Jan 2017 02:06:34 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 10 Jan 2017 02:06:33 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.204]) with mapi id 14.03.0248.002; Tue, 10 Jan 2017 18:06:30 +0800 From: "Zeng, Star" To: Chris Phillips , "edk2-devel@lists.01.org" CC: "Carsey, Jaben" , "Ni, Ruiyu" , "Zeng, Star" Thread-Topic: [edk2] [PATCH] ShellPkg: Update smbiosview command to display Type 3 values Thread-Index: AQHSaw4s37QCEWS3j0G6nWlsvtCU8KExfEoA Date: Tue, 10 Jan 2017 10:06:29 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B815697@shsmsx102.ccr.corp.intel.com> References: <32569677-0813-4333-94bd-8b80011e2f15@AIA2PHNNRN.local> In-Reply-To: <32569677-0813-4333-94bd-8b80011e2f15@AIA2PHNNRN.local> 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] ShellPkg: Update smbiosview command to display Type 3 values 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: Tue, 10 Jan 2017 10:06:36 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Star Zeng -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Chri= s Phillips Sent: Tuesday, January 10, 2017 2:53 PM To: edk2-devel@lists.01.org Cc: Carsey, Jaben ; Ni, Ruiyu Subject: [edk2] [PATCH] ShellPkg: Update smbiosview command to display Type= 3 values The smbiosview command was not displaying SMBIOS Type 3 Height, NumberofPow= erCords, or SKU Number. Added handling to display these values. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chris Phillips --- .../UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c | 19 +++++++++++++++= +--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintIn= fo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c index 7e17b69d5a..000bbe53a7 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 @@ -390,8 +390,21 @@ SmbiosPrintStructure ( DisplaySystemEnclosureStatus (Struct->Type3->ThermalState, Option); ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SECU= RITY_STATUS), gShellDebug1HiiHandle); DisplaySESecurityStatus (Struct->Type3->SecurityStatus, Option); - if (AE_SMBIOS_VERSION (0x2, 0x3) && (Struct->Hdr->Length > 0xD)) { - PRINT_BIT_FIELD (Struct, Type3, OemDefined, 4); + if (AE_SMBIOS_VERSION (0x2, 0x3)) { + if (Struct->Hdr->Length > 0xD) { + PRINT_BIT_FIELD (Struct, Type3, OemDefined, 4); + } + if (Struct->Hdr->Length > 0x11) { + PRINT_STRUCT_VALUE (Struct, Type3, Height); + } + if (Struct->Hdr->Length > 0x12) { + PRINT_STRUCT_VALUE (Struct, Type3, NumberofPowerCords); + } + } + if (AE_SMBIOS_VERSION (0x2, 0x7) && (Struct->Hdr->Length > 0x13)) { + if (Struct->Hdr->Length > (0x15 + (Struct->Type3->ContainedElementCo= unt * Struct->Type3->ContainedElementRecordLength))) { + PRINT_SMBIOS_STRING (Struct, Buffer[0x15 + (Struct->Type3->Contain= edElementCount * Struct->Type3->ContainedElementRecordLength)], SKUNumber); + } } break; =20 -- 2.11.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel