]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
ShellPkg: Display SMBIOS Type38 fields in smbiosview in formatted view
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / SmbiosView / PrintInfo.c
index e936ee8ea96aa752a1814155b2aec1dcff9e387a..2611601230b9e544baee44a1ae076b5aa2ade563 100644 (file)
@@ -1177,10 +1177,31 @@ SmbiosPrintStructure (
     //\r
     case 38:\r
       DisplayIPMIDIBMCInterfaceType (Struct->Type38->InterfaceType, Option);\r
-      PRINT_STRUCT_VALUE_H (Struct, Type38, IPMISpecificationRevision);\r
+\r
+      ShellPrintHiiEx (\r
+        -1,\r
+        -1,\r
+        NULL,\r
+        STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_IPMI_SPECIFICATION_REVISION),\r
+        gShellDebug1HiiHandle,\r
+        RShiftU64 ((UINT64)Struct->Type38->IPMISpecificationRevision, 4), \\r
+        Struct->Type38->IPMISpecificationRevision & 0x0F\r
+        );\r
+\r
       PRINT_STRUCT_VALUE_H (Struct, Type38, I2CSlaveAddress);\r
-      PRINT_STRUCT_VALUE_H (Struct, Type38, NVStorageDeviceAddress);\r
-      PRINT_STRUCT_VALUE_LH (Struct, Type38, BaseAddress);\r
+\r
+      if (Struct->Type38->NVStorageDeviceAddress == 0xFF) {\r
+        ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NV_STORAGE_DEVICE_NOT_PRESENT), gShellDebug1HiiHandle);\r
+      } else {\r
+        PRINT_STRUCT_VALUE_H (Struct, Type38, NVStorageDeviceAddress);\r
+      }\r
+\r
+      if (Struct->Type38->InterfaceType == IPMIDeviceInfoInterfaceTypeSSIF) {\r
+        ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BASE_ADDRESS), gShellDebug1HiiHandle, RShiftU64 ((UINT64)Struct->Type38->BaseAddress, 1));\r
+      } else {\r
+        PRINT_STRUCT_VALUE_LH (Struct, Type38, BaseAddress);\r
+      }\r
+\r
       break;\r
 \r
     //\r