From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from g2t2353.austin.hpe.com (g2t2353.austin.hpe.com [15.233.44.26]) (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 0335481962 for ; Mon, 9 Jan 2017 22:52:41 -0800 (PST) Received: from AIA2PHNNRN.local (unknown [16.214.90.9]) by g2t2353.austin.hpe.com (Postfix) with SMTP id 755C758; Tue, 10 Jan 2017 06:52:40 +0000 (UTC) Date: Tue, 10 Jan 2017 00:52:40 -0600 From: Chris Phillips CC: jaben.carsey@intel.com; ruiyu.ni@intel.com Sender: Chris Phillips To: edk2-devel@lists.01.org Message-ID: <32569677-0813-4333-94bd-8b80011e2f15@AIA2PHNNRN.local> X-Mailer: TortoiseGit MIME-Version: 1.0 Subject: [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 06:52:41 -0000 Content-Type: text/plain; The smbiosview command was not displaying SMBIOS Type 3 Height, NumberofPowerCords, 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/PrintInfo.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 @@ 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 @@ -390,8 +390,21 @@ SmbiosPrintStructure ( DisplaySystemEnclosureStatus (Struct->Type3->ThermalState, Option); ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SECURITY_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->ContainedElementCount * Struct->Type3->ContainedElementRecordLength))) { + PRINT_SMBIOS_STRING (Struct, Buffer[0x15 + (Struct->Type3->ContainedElementCount * Struct->Type3->ContainedElementRecordLength)], SKUNumber); + } } break; -- 2.11.0.windows.1