public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Star Zeng <star.zeng@intel.com>
To: edk2-devel@lists.01.org
Cc: Star Zeng <star.zeng@intel.com>, Ruiyu Ni <ruiyu.ni@intel.com>,
	Jaben Carsey <jaben.carsey@intel.com>
Subject: [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.0
Date: Tue, 17 Jan 2017 11:24:59 +0800	[thread overview]
Message-ID: <1484623499-180236-4-git-send-email-star.zeng@intel.com> (raw)
In-Reply-To: <1484623499-180236-1-git-send-email-star.zeng@intel.com>

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=340

The decoding of TPM Device (Type 43) has been added at
e9f0be021b7649c15d823e193110c0088cda9a89.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
 .../SmbiosView/PrintInfo.c                         | 44 ++++++++++++++++-
 .../SmbiosView/QueryTable.c                        | 56 ++++++++++++++++++++++
 .../SmbiosView/SmbiosViewStrings.uni               |  1 +
 .../UefiShellDebug1CommandsLib.uni                 |  3 +-
 4 files changed, 102 insertions(+), 2 deletions(-)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
index abbc9835b5d0..ecb8e2492453 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
@@ -335,7 +335,17 @@ SmbiosPrintStructure (
       PRINT_STRUCT_VALUE (Struct, Type0, EmbeddedControllerFirmwareMajorRelease);
       PRINT_STRUCT_VALUE (Struct, Type0, EmbeddedControllerFirmwareMinorRelease);
     }
-
+    if (AE_SMBIOS_VERSION (0x3, 0x1) && (Struct->Hdr->Length > 0x18)) {
+      ShellPrintHiiEx (
+        -1,
+        -1,
+        NULL,
+        STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_EXTENDED_BIOS_SIZE),
+        gShellDebug1HiiHandle,
+        Struct->Type0->ExtendedBiosSize.Size,
+        (Struct->Type0->ExtendedBiosSize.Unit == 0x0) ? L"MB": L"GB"
+        );
+    }
     break;
 
   //
@@ -510,6 +520,10 @@ SmbiosPrintStructure (
     DisplayCacheErrCorrectingType (Struct->Type7->ErrorCorrectionType, Option);
     DisplayCacheSystemCacheType (Struct->Type7->SystemCacheType, Option);
     DisplayCacheAssociativity (Struct->Type7->Associativity, Option);
+    if (AE_SMBIOS_VERSION (0x3, 0x1) && (Struct->Hdr->Length > 0x13)) {
+      PRINT_STRUCT_VALUE_H (Struct, Type7, MaximumCacheSize2);
+      PRINT_STRUCT_VALUE_H (Struct, Type7, InstalledSize2);
+    }
     break;
 
   //
@@ -1584,6 +1598,18 @@ DisplayProcessorFamily (
     Print (L"Intel(R) Core(TM) M processor\n");
     break;
 
+  case 0x2D:
+    Print (L"Intel(R) Core(TM) m3 processor\n");
+    break;
+
+  case 0x2E:
+    Print (L"Intel(R) Core(TM) m5 processor\n");
+    break;
+
+  case 0x2F:
+    Print (L"Intel(R) Core(TM) m7 processor\n");
+    break;
+
   case 0x30:
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ALPHA_FAMILY_2), gShellDebug1HiiHandle);
     break;
@@ -1784,6 +1810,14 @@ DisplayProcessorFamily (
     Print (L"AMD Opteron(TM) X2000 Series APU\n");
     break;
 
+  case 0x69:
+    Print (L"AMD Opteron(TM) A-Series Processor\n");
+    break;
+
+  case 0x6A:
+    Print (L"AMD Opteron(TM) X3000 Series APU\n");
+    break;
+
   case 0x70:
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_HOBBIT_FAMILY), gShellDebug1HiiHandle);
     break;
@@ -2215,6 +2249,14 @@ DisplayProcessorFamily2 (
   // Use switch to check
   //
   switch (Family2) {
+    case 0x100:
+      Print (L"ARMv7\n");
+      break;
+
+    case 0x101:
+      Print (L"ARMv8\n");
+      break;
+
     case 0x104:
       Print (L"SH-3\n");
       break;
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
index acca00d5c37d..4a06c12e3b2b 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
@@ -260,6 +260,22 @@ TABLE_ITEM  SystemEnclosureTypeTable[] = {
     0x20,
     L"  Detachable"
   },
+  {
+    0x21,
+    L"  IoT Gateway"
+  },
+  {
+    0x22,
+    L"  Embedded PC"
+  },
+  {
+    0x23,
+    L"  Mini PC"
+  },
+  {
+    0x24,
+    L"  Stick PC"
+  },
 };
 
 TABLE_ITEM  SystemEnclosureStatusTable[] = {
@@ -531,6 +547,34 @@ TABLE_ITEM  ProcessorUpgradeTable[] = {
   {
     0x30,
     L"Socket BGA1364"
+  },
+  {
+    0x31,
+    L"Socket AM4"
+  },
+  {
+    0x32,
+    L"Socket LGA1151"
+  },
+  {
+    0x33,
+    L"Socket BGA1356"
+  },
+  {
+    0x34,
+    L"Socket BGA1440"
+  },
+  {
+    0x35,
+    L"Socket BGA1515"
+  },
+  {
+    0x36,
+    L"Socket LGA3647-1"
+  },
+  {
+    0x37,
+    L"Socket SP3"
   }
 };
 
@@ -1347,6 +1391,18 @@ TABLE_ITEM  SystemSlotTypeTable[] = {
     L"PCI Express Gen 3 SFF-8639"
   },
   {
+    0x21,
+    L"PCI Express Mini 52-pin (CEM spec. 2.0) with bottom-side keep-outs"
+  },
+  {
+    0x22,
+    L"PCI Express Mini 52-pin (CEM spec. 2.0) without bottom-side keep-outs"
+  },
+  {
+    0x23,
+    L"PCI Express Mini 76-pin (CEM spec. 2.0) Corresponds to Display-Mini card"
+  },
+  {
     0xA0,
     L"PC-98/C20 "
   },
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni
index 0596f1fb3126..b9032df076d2 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni
@@ -380,6 +380,7 @@
 #string STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_REPLACE           #language en-US "Power supply is hot replaceable\r\n"
 #string STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_NOT_REPLACE       #language en-US "Power supply is not hot replaceable\r\n"
 #string STR_SMBIOSVIEW_PRINTINFO_BIOS_SIZE                      #language en-US "BiosSize:  %d KB\r\n"
+#string STR_SMBIOSVIEW_PRINTINFO_EXTENDED_BIOS_SIZE             #language en-US "ExtendedBiosSize:  %d %s\r\n"
 #string STR_SMBIOSVIEW_QUERYTABLE_NO_INFO                       #language en-US "No Info"
 #string STR_SMBIOSVIEW_QUERYTABLE_RSVD_BITS_SET                 #language en-US "\r\nIt also has reserved bits set 1 --- reserved bits: 0x%x"
 #string STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_WAKEUP_TYPE            #language en-US "System Wakeup Type:"
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni
index 06865a42a292..609e1a80772e 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni
@@ -1,6 +1,6 @@
 // /**
 //
-// Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
 // (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
 // (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
 // This program and the accompanying materials
@@ -999,6 +999,7 @@
 "       40 - Additional Information\r\n"
 "       41 - Onboard Devices Extended Information\r\n"
 "       42 - Management Controller Host Interface\r\n"
+"       43 - TPM Device\r\n"
 "  2. Enter the SmbiosHandle parameter in hexadecimal format.\r\n"
 "     Do not use the '0x' prefix format for hexadecimal values.\r\n"
 "  3. Internal commands:\r\n"
-- 
2.7.0.windows.1



  parent reply	other threads:[~2017-01-17  3:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-17  3:24 [PATCH 0/3] Add SMBIOS spec 3.1.0 support Star Zeng
2017-01-17  3:24 ` [PATCH 1/3] MdePkg: Add definitions for SMBIOS spec 3.1.0 Star Zeng
2017-01-18  7:25   ` Gao, Liming
2017-01-17  3:24 ` [PATCH 2/3] MdeModulePkg: Update PcdSmbiosVersion to 0x0301 " Star Zeng
2017-01-17  3:24 ` Star Zeng [this message]
2017-01-17  5:50 ` [PATCH 0/3] Add SMBIOS spec 3.1.0 support Tian, Feng
2017-01-18 20:59 ` Carsey, Jaben

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=1484623499-180236-4-git-send-email-star.zeng@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