]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: Update smbiosview type 9 with SMBIOS 3.5 fields
authorBo Chang Ke <bo-changx.ke@intel.com>
Thu, 21 Apr 2022 10:54:46 +0000 (18:54 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 22 Apr 2022 01:48:09 +0000 (01:48 +0000)
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3896

update smbiosview type 9 related fileds.

Signed-off-by: Bo Chang Ke <bo-changx.ke@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.h
ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni

index b144600a2595ec5fb2a67c3e46c4dc11e24eccbf..5dbd39ca3b7416f0885a2e93aa338a251cf8f179 100644 (file)
@@ -635,6 +635,10 @@ SmbiosPrintStructure (
             ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DEV_FUNC_NUM), gShellDebug1HiiHandle, PeerGroupPtr[Index].DevFuncNum);\r
             ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DATA_BUS_WIDTH), gShellDebug1HiiHandle, PeerGroupPtr[Index].DataBusWidth);\r
           }\r
+\r
+          DisplaySystemSlotHeight (Struct->Type9->SlotHeight, Option);\r
+          DisplaySystemSlotPhysicalWidth (Struct->Type9->SlotPhysicalWidth, Option);\r
+          DisplaySystemSlotInformation (Struct->Type9->SlotInformation, Option);\r
         }\r
       }\r
 \r
@@ -2898,11 +2902,6 @@ DisplaySystemSlotId (
   IN UINT8   Option\r
   )\r
 {\r
-  //\r
-  // Display slot type first\r
-  //\r
-  DisplaySystemSlotType (SlotType, Option);\r
-\r
   ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SLOT_ID), gShellDebug1HiiHandle);\r
   //\r
   // print option\r
index 7ec6d2b5f1191b629f5f270d75d068bc9d21b542..2e62ae3a34f822def989fe45253fd1d847dd240c 100644 (file)
@@ -1447,6 +1447,26 @@ TABLE_ITEM  SystemSlotTypeTable[] = {
     0x23,\r
     L"PCI Express Mini 76-pin (CEM spec. 2.0) Corresponds to Display-Mini card"\r
   },\r
+  {\r
+    0x24,\r
+    L"PCI Express Gen 4 SFF-8639 (U.2)"\r
+  },\r
+  {\r
+    0x25,\r
+    L"PCI Express Gen 5 SFF-8639 (U.2)"\r
+  },\r
+  {\r
+    0x26,\r
+    L"OCP NIC 3.0 Small Form Factor (SFF)"\r
+  },\r
+  {\r
+    0x27,\r
+    L"OCP NIC 3.0 Large Form Factor (LFF)"\r
+  },\r
+  {\r
+    0x28,\r
+    L"OCP NIC Prior to 3.0"\r
+  },\r
   {\r
     SlotTypeCXLFlexbus10,\r
     L"CXL Flexbus 1.0"\r
@@ -1566,6 +1586,42 @@ TABLE_ITEM  SystemSlotTypeTable[] = {
   {\r
     SlotTypePciExpressGen4X16,\r
     L"PCI Express Gen 4 X16"\r
+  },\r
+  {\r
+    SlotTypePCIExpressGen5,\r
+    L"PCI Express Gen 5"\r
+  },\r
+  {\r
+    SlotTypePCIExpressGen5X1,\r
+    L"PCI Express Gen 5 x1"\r
+  },\r
+  {\r
+    SlotTypePCIExpressGen5X2,\r
+    L"PCI Express Gen 5 x2"\r
+  },\r
+  {\r
+    SlotTypePCIExpressGen5X4,\r
+    L"PCI Express Gen 5 x4"\r
+  },\r
+  {\r
+    SlotTypePCIExpressGen5X8,\r
+    L"PCI Express Gen 5 x8"\r
+  },\r
+  {\r
+    SlotTypePCIExpressGen5X16,\r
+    L"PCI Express Gen 5 x16"\r
+  },\r
+  {\r
+    SlotTypePCIExpressGen6andBeyond,\r
+    L"PCI Express Gen 6 and Beyond"\r
+  },\r
+  {\r
+    SlotTypeEnterpriseandDatacenter1UE1FormFactorSlot,\r
+    L"Enterprise and Datacenter 1U E1 Form Factor Slot"\r
+  },\r
+  {\r
+    SlotTypeEnterpriseandDatacenter3E3FormFactorSlot,\r
+    L"Enterprise and Datacenter 3'E3 Form Factor Slot"\r
   }\r
 };\r
 \r
@@ -1628,6 +1684,96 @@ TABLE_ITEM  SystemSlotDataBusWidthTable[] = {
   }\r
 };\r
 \r
+TABLE_ITEM  SystemSlotPhysicalWidthTable[] = {\r
+  {\r
+    0x01,\r
+    L" Other"\r
+  },\r
+  {\r
+    0x02,\r
+    L" Unknown"\r
+  },\r
+  {\r
+    0x03,\r
+    L" 8 bit"\r
+  },\r
+  {\r
+    0x04,\r
+    L" 16 bit"\r
+  },\r
+  {\r
+    0x05,\r
+    L" 32 bit"\r
+  },\r
+  {\r
+    0x06,\r
+    L" 64 bit"\r
+  },\r
+  {\r
+    0x07,\r
+    L" 128 bit"\r
+  },\r
+  {\r
+    0x08,\r
+    L" 1x or x1"\r
+  },\r
+  {\r
+    0x09,\r
+    L" 2x or x2"\r
+  },\r
+  {\r
+    0x0A,\r
+    L" 4x or x4"\r
+  },\r
+  {\r
+    0x0B,\r
+    L" 8x or x8"\r
+  },\r
+  {\r
+    0x0C,\r
+    L" 12x or x12"\r
+  },\r
+  {\r
+    0x0D,\r
+    L" 16x or x16"\r
+  },\r
+  {\r
+    0x0E,\r
+    L" 32x or x32"\r
+  }\r
+};\r
+\r
+TABLE_ITEM  SystemSlotInformationTable[] = {\r
+  {\r
+    0x00,\r
+    L" Others"\r
+  },\r
+  {\r
+    0x01,\r
+    L" Gen 1"\r
+  },\r
+  {\r
+    0x02,\r
+    L" Gen 2"\r
+  },\r
+  {\r
+    0x03,\r
+    L" Gen 3"\r
+  },\r
+  {\r
+    0x04,\r
+    L" Gen 4"\r
+  },\r
+  {\r
+    0x05,\r
+    L" Gen 5"\r
+  },\r
+  {\r
+    0x06,\r
+    L" Gen 6"\r
+  }\r
+};\r
+\r
 TABLE_ITEM  SystemSlotCurrentUsageTable[] = {\r
   {\r
     0x01,\r
@@ -1670,6 +1816,29 @@ TABLE_ITEM  SystemSlotLengthTable[] = {
   },\r
 };\r
 \r
+TABLE_ITEM  SystemSlotHeightTable[] = {\r
+  {\r
+    0x00,\r
+    L" Not applicable"\r
+  },\r
+  {\r
+    0x01,\r
+    L" Other"\r
+  },\r
+  {\r
+    0x02,\r
+    L" Unkown"\r
+  },\r
+  {\r
+    0x03,\r
+    L" Full height"\r
+  },\r
+  {\r
+    0x04,\r
+    L" Low-Profile"\r
+  },\r
+};\r
+\r
 TABLE_ITEM  SlotCharacteristics1Table[] = {\r
   {\r
     0,\r
@@ -1722,6 +1891,22 @@ TABLE_ITEM  SlotCharacteristics2Table[] = {
   {\r
     3,\r
     L" PCIe slot supports bifurcation"\r
+  },\r
+  {\r
+    4,\r
+    L" Slot supports async/surprise removal"\r
+  },\r
+  {\r
+    5,\r
+    L" Flexbus slot, CXL 1.0 capable"\r
+  },\r
+  {\r
+    6,\r
+    L" Flexbus slot, CXL 2.0 capable"\r
+  },\r
+  {\r
+    7,\r
+    L" Reserved"\r
   }\r
 };\r
 \r
@@ -4232,6 +4417,57 @@ DisplaySlotCharacteristics2 (
   PRINT_BITS_INFO (SlotCharacteristics2Table, Chara2);\r
 }\r
 \r
+/**\r
+  Display System Slots (Type 9) Information.\r
+\r
+  @param[in] Width      The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
+VOID\r
+DisplaySystemSlotInformation (\r
+  IN UINT8  Width,\r
+  IN UINT8  Option\r
+  )\r
+{\r
+  ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_INFORMATION), gShellDebug1HiiHandle);\r
+  PRINT_INFO_OPTION (Width, Option);\r
+  PRINT_TABLE_ITEM (SystemSlotInformationTable, Width);\r
+}\r
+\r
+/**\r
+  Display System Slots (Type 9) Physical Width.\r
+\r
+  @param[in] Width      The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
+VOID\r
+DisplaySystemSlotPhysicalWidth (\r
+  IN UINT8  Width,\r
+  IN UINT8  Option\r
+  )\r
+{\r
+  ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_PHYSICAL_WIDTH), gShellDebug1HiiHandle);\r
+  PRINT_INFO_OPTION (Width, Option);\r
+  PRINT_TABLE_ITEM (SystemSlotPhysicalWidthTable, Width);\r
+}\r
+\r
+/**\r
+  Display System Slots (Type 9) slot height.\r
+\r
+  @param[in] Length     The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
+VOID\r
+DisplaySystemSlotHeight (\r
+  IN UINT8  Length,\r
+  IN UINT8  Option\r
+  )\r
+{\r
+  ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_HEIGHT), gShellDebug1HiiHandle);\r
+  PRINT_INFO_OPTION (Length, Option);\r
+  PRINT_TABLE_ITEM (SystemSlotHeightTable, Length);\r
+}\r
+\r
 /**\r
   Display On Board Devices Information (Type 10) types.\r
 \r
index 5111d35f63b34ed47c60539243d66a8791ac063b..5f062762b3c47d1eaa39d90a2ac97ac033236117 100644 (file)
@@ -415,6 +415,42 @@ DisplaySlotCharacteristics2 (
   IN UINT8  Option\r
   );\r
 \r
+/**\r
+  Display System Slots (Type 9) Information.\r
+\r
+  @param[in] Width      The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
+VOID\r
+DisplaySystemSlotInformation (\r
+  IN UINT8  Width,\r
+  IN UINT8  Option\r
+  );\r
+\r
+/**\r
+  Display System Slots (Type 9) Physical Width.\r
+\r
+  @param[in] Width      The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
+VOID\r
+DisplaySystemSlotPhysicalWidth (\r
+  IN UINT8  Width,\r
+  IN UINT8  Option\r
+  );\r
+\r
+/**\r
+  Display System Slots (Type 9) slot height.\r
+\r
+  @param[in] Length     The key of the structure.\r
+  @param[in] Option     The optional information.\r
+**/\r
+VOID\r
+DisplaySystemSlotHeight (\r
+  IN UINT8  Length,\r
+  IN UINT8  Option\r
+  );\r
+\r
 /**\r
   Display On Board Devices Information (Type 10) types.\r
 \r
index 9433e8a25f5240b0a995b8a884280a0456210e36..a8728d6abcf81622a3e8e476c5cd6c68a7f37c36 100644 (file)
 #string STR_SMBIOSVIEW_PRINTINFO_MEM_SIZE                       #language en-US " Memory Size: %d MB\r\n"\r
 #string STR_SMBIOSVIEW_PRINTINFO_MEM_MODULE_DOUBLE_BANK         #language en-US "The memory module has a Double-bank connection\r\n"\r
 #string STR_SMBIOSVIEW_PRINTINFO_MEM_MODULE_SINGLE_BANK         #language en-US "The memory module has a Single-bank connection\r\n"\r
-#string STR_SMBIOSVIEW_PRINTINFO_SLOT_ID                        #language en-US " Slot Id:"\r
+#string STR_SMBIOSVIEW_PRINTINFO_SLOT_ID                        #language en-US "Slot Id:"\r
 #string STR_SMBIOSVIEW_PRINTINFO_LOGICAL_MICRO_CHAN             #language en-US " the logical Micro Channel slot number is:"\r
 #string STR_SMBIOSVIEW_PRINTINFO_ONE_VAR_D                      #language en-US " %d\r\n"\r
 #string STR_SMBIOSVIEW_PRINTINFO_ERROR_NOT_1_15                 #language en-US " error, not 1-15.\r\n"\r
 #string STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_LENGTH            #language en-US "System Slot Length: "\r
 #string STR_SMBIOSVIEW_QUERYTABLE_SLOT_CHARACTERISTICS          #language en-US "Slot characteristics 1: "\r
 #string STR_SMBIOSVIEW_QUERYTABLE_SLOT_CHARACTERISTICS_2        #language en-US "Slot characteristics 2: "\r
+#string STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_INFORMATION       #language en-US "System Slot Information: "\r
+#string STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_HEIGHT            #language en-US "System Slot Height: "\r
+#string STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_PHYSICAL_WIDTH    #language en-US "System Slot Physical Width: "\r
 #string STR_SMBIOSVIEW_QUERYTABLE_ONBOARD_DEVICE_TYPE           #language en-US "Onboard Device Type: "\r
 #string STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_EVENT_LOG_TYPE         #language en-US "System Event Log Type: "\r
 #string STR_SMBIOSVIEW_QUERYTABLE_EVENT_LOG_VAR_DATA_FORMAT     #language en-US "Event Log Variable Data Format Types: "\r