]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: smbiosview - Change some type 17 field values format
authorSamer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Mon, 20 Jul 2020 19:32:31 +0000 (03:32 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 7 Aug 2020 04:19:19 +0000 (04:19 +0000)
Change how some SMBIOS TYpe 17 field values are printed:

 - TotalWidth, DataWidth, ConfiguredMemoryClockSpeed: Print as
   hex values instead of decimal, since there are some special meanings
   for certain values (e.g. 0xFFFF)
 - VolatileSize, NonVolatileSize, CacheSize, and LogicalSize: Print
   as "0x%lx" instead of "0x%x" to prevent truncating output when
   printing these QWORD fields.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>
Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@arm.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c

index 1ea7b84bd0fa8197fc8faf58654edb25431c4e7b..7517465ddd4945f4698d654b7a43a5b323f6fe9f 100644 (file)
@@ -746,8 +746,8 @@ SmbiosPrintStructure (
   case 17:\r
     PRINT_STRUCT_VALUE_H (Struct, Type17, MemoryArrayHandle);\r
     PRINT_STRUCT_VALUE_H (Struct, Type17, MemoryErrorInformationHandle);\r
-    PRINT_STRUCT_VALUE (Struct, Type17, TotalWidth);\r
-    PRINT_STRUCT_VALUE (Struct, Type17, DataWidth);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type17, TotalWidth);\r
+    PRINT_STRUCT_VALUE_H (Struct, Type17, DataWidth);\r
     PRINT_STRUCT_VALUE (Struct, Type17, Size);\r
     DisplayMemoryDeviceFormFactor (Struct->Type17->FormFactor, Option);\r
     PRINT_STRUCT_VALUE_H (Struct, Type17, DeviceSet);\r
@@ -765,7 +765,7 @@ SmbiosPrintStructure (
     }\r
     if (AE_SMBIOS_VERSION (0x2, 0x7) && (Struct->Hdr->Length > 0x1C)) {\r
       PRINT_STRUCT_VALUE (Struct, Type17, ExtendedSize);\r
-      PRINT_STRUCT_VALUE (Struct, Type17, ConfiguredMemoryClockSpeed);\r
+      PRINT_STRUCT_VALUE_H (Struct, Type17, ConfiguredMemoryClockSpeed);\r
     }\r
     if (AE_SMBIOS_VERSION (0x2, 0x8) && (Struct->Hdr->Length > 0x22)) {\r
       PRINT_STRUCT_VALUE (Struct, Type17, MinimumVoltage);\r
@@ -783,16 +783,16 @@ SmbiosPrintStructure (
         PRINT_STRUCT_VALUE_H (Struct, Type17, MemorySubsystemControllerProductID);\r
       }\r
       if (Struct->Hdr->Length > 0x34) {\r
-        PRINT_STRUCT_VALUE_H (Struct, Type17, NonVolatileSize);\r
+        PRINT_STRUCT_VALUE_LH (Struct, Type17, NonVolatileSize);\r
       }\r
       if (Struct->Hdr->Length > 0x3C) {\r
-        PRINT_STRUCT_VALUE_H (Struct, Type17, VolatileSize);\r
+        PRINT_STRUCT_VALUE_LH (Struct, Type17, VolatileSize);\r
       }\r
       if (Struct->Hdr->Length > 0x44) {\r
-        PRINT_STRUCT_VALUE_H (Struct, Type17, CacheSize);\r
+        PRINT_STRUCT_VALUE_LH (Struct, Type17, CacheSize);\r
       }\r
       if (Struct->Hdr->Length > 0x4C) {\r
-        PRINT_STRUCT_VALUE_H (Struct, Type17, LogicalSize);\r
+        PRINT_STRUCT_VALUE_LH (Struct, Type17, LogicalSize);\r
       }\r
     }\r
     break;\r