]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
ShellPkg: Update smbiosview command to display Type 3 values
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / SmbiosView / PrintInfo.c
index 7e17b69d5afa63537cbf3c0e1e3cf99891270a4c..000bbe53a71d2710ae448e34b4cd6f9e53b11f4b 100644 (file)
@@ -3,7 +3,7 @@
 \r
   Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>\r
   (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>  \r
-  (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
+  (C) Copyright 2015-2017 Hewlett Packard Enterprise Development LP<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -390,8 +390,21 @@ SmbiosPrintStructure (
     DisplaySystemEnclosureStatus (Struct->Type3->ThermalState, Option);\r
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SECURITY_STATUS), gShellDebug1HiiHandle);\r
     DisplaySESecurityStatus (Struct->Type3->SecurityStatus, Option);\r
-    if (AE_SMBIOS_VERSION (0x2, 0x3) && (Struct->Hdr->Length > 0xD)) {\r
-      PRINT_BIT_FIELD (Struct, Type3, OemDefined, 4);\r
+    if (AE_SMBIOS_VERSION (0x2, 0x3)) {\r
+      if (Struct->Hdr->Length > 0xD) {\r
+        PRINT_BIT_FIELD (Struct, Type3, OemDefined, 4);\r
+      }\r
+      if (Struct->Hdr->Length > 0x11) {\r
+        PRINT_STRUCT_VALUE (Struct, Type3, Height);\r
+      }\r
+      if (Struct->Hdr->Length > 0x12) {\r
+        PRINT_STRUCT_VALUE (Struct, Type3, NumberofPowerCords);\r
+      }\r
+    }\r
+    if (AE_SMBIOS_VERSION (0x2, 0x7) && (Struct->Hdr->Length > 0x13)) {\r
+      if (Struct->Hdr->Length > (0x15 + (Struct->Type3->ContainedElementCount * Struct->Type3->ContainedElementRecordLength))) {\r
+        PRINT_SMBIOS_STRING (Struct, Buffer[0x15 + (Struct->Type3->ContainedElementCount * Struct->Type3->ContainedElementRecordLength)], SKUNumber);\r
+      }\r
     }\r
     break;\r
 \r