public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Zeng, Star" <star.zeng@intel.com>
To: Chris Phillips <chrisp@hpe.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Carsey, Jaben" <jaben.carsey@intel.com>,
	"Ni, Ruiyu" <ruiyu.ni@intel.com>,
	"Zeng, Star" <star.zeng@intel.com>
Subject: Re: [PATCH] ShellPkg: Update smbiosview command to display Type 3 values
Date: Tue, 10 Jan 2017 10:06:29 +0000	[thread overview]
Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B815697@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <32569677-0813-4333-94bd-8b80011e2f15@AIA2PHNNRN.local>

Reviewed-by: Star Zeng <star.zeng@intel.com>

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Chris Phillips
Sent: Tuesday, January 10, 2017 2:53 PM
To: edk2-devel@lists.01.org
Cc: Carsey, Jaben <jaben.carsey@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com>
Subject: [edk2] [PATCH] ShellPkg: Update smbiosview command to display Type 3 values

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 <chrisp@hpe.com>
---
 .../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.<BR>
   (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
-  (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
+  (C) Copyright 2015-2017 Hewlett Packard Enterprise Development LP<BR>
   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


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


      reply	other threads:[~2017-01-10 10:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10  6:52 [PATCH] ShellPkg: Update smbiosview command to display Type 3 values Chris Phillips
2017-01-10 10:06 ` Zeng, Star [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0C09AFA07DD0434D9E2A0C6AEB0483103B815697@shsmsx102.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox