From de81f994354bfce5731442bb6e1a9e2459b9d133 Mon Sep 17 00:00:00 2001 From: SergeySlice Date: Fri, 1 Jul 2022 21:47:51 +0300 Subject: [PATCH] add absent definitions Signed-off-by: SergeySlice --- MdePkg/Include/IndustryStandard/SmBios.h | 16 ++ .../SmbiosView/PrintInfo.c | 2 +- .../SmbiosView/QueryTable.c | 168 ++++++++++++++++++ .../SmbiosView/QueryTable.h | 34 ++++ .../SmbiosView/SmbiosViewStrings.uni | 37 ++-- 5 files changed, 240 insertions(+), 17 deletions(-) diff --git a/MdePkg/Include/IndustryStandard/SmBios.h b/MdePkg/Include/IndustryStandard/SmBios.h index e85058ae2..215bac750 100755 --- a/MdePkg/Include/IndustryStandard/SmBios.h +++ b/MdePkg/Include/IndustryStandard/SmBios.h @@ -1454,6 +1454,17 @@ typedef struct { UINT8 Reserved : 1; ///< Set to 0. } MISC_SLOT_CHARACTERISTICS2; +/// +/// System Slots - Slot Height +/// +typedef enum { + SlotHeightNone = 0x00, + SlotHeightOther = 0x01, + SlotHeightUnknown = 0x02, + SlotHeightFullHeight = 0x03, + SlotHeightLowProfile = 0x04 +} MISC_SLOT_HEIGHT; + /// /// System Slots - Peer Segment/Bus/Device/Function/Width Groups /// @@ -1499,6 +1510,11 @@ typedef struct { UINT8 SlotInformation; // MISC_SLOT_INFORMATION UINT8 SlotPhysicalWidth; // MISC_SLOT_PHYSICAL_WIDTH; UINT16 SlotPitch; + // + // Add for smbios 3.5 + // + UINT8 SlotHeight; ///< The enumeration value from MISC_SLOT_HEIGHT. + } SMBIOS_TABLE_TYPE9; /// diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c index 9046ce470..c016b75f0 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c @@ -1260,7 +1260,7 @@ DisplayBiosCharacteristics ( } if (BIT (Chara, 15) != 0) { - ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOT_FORM_CD_SUPPORTED), gShellDebug1HiiHandle); + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOT_FROM_CD_SUPPORTED), gShellDebug1HiiHandle); } if (BIT (Chara, 16) != 0) { diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c index cb34f9b36..5ad44e711 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c @@ -1626,6 +1626,30 @@ TABLE_ITEM SystemSlotLengthTable[] = { }, }; +TABLE_ITEM SystemSlotHeightTable[] = { + { + 0x00, + L" Not applicable" + }, + { + 0x01, + L" Other" + }, + { + 0x02, + L" Unkown" + }, + { + 0x03, + L" Full height" + }, + { + 0x04, + L" Low-Profile" + }, +}; + + TABLE_ITEM SlotCharacteristics1Table[] = { { 0, @@ -1677,6 +1701,98 @@ TABLE_ITEM SlotCharacteristics2Table[] = { } }; +TABLE_ITEM SystemSlotPhysicalWidthTable[] = { + { + 0x01, + L" Other" + }, + { + 0x02, + L" Unknown" + }, + { + 0x03, + L" 8 bit" + }, + { + 0x04, + L" 16 bit" + }, + { + 0x05, + L" 32 bit" + }, + { + 0x06, + L" 64 bit" + }, + { + 0x07, + L" 128 bit" + }, + { + 0x08, + L" 1x or x1" + }, + { + 0x09, + L" 2x or x2" + }, + { + 0x0A, + L" 4x or x4" + }, + { + 0x0B, + L" 8x or x8" + }, + { + 0x0C, + L" 12x or x12" + }, + { + 0x0D, + L" 16x or x16" + }, + { + 0x0E, + L" 32x or x32" + } +}; + + +TABLE_ITEM SystemSlotInformationTable[] = { + { + 0x00, + L" Others" + }, + { + 0x01, + L" Gen 1" + }, + { + 0x02, + L" Gen 2" + }, + { + 0x03, + L" Gen 3" + }, + { + 0x04, + L" Gen 4" + }, + { + 0x05, + L" Gen 5" + }, + { + 0x06, + L" Gen 6" + } +}; + + TABLE_ITEM OnboardDeviceTypesTable[] = { { 0x01, @@ -3925,6 +4041,8 @@ DisplayPortType ( PRINT_TABLE_ITEM (PortTypeTable, Type); } + + /** Display System Slots (Type 9) slot type. @@ -4027,6 +4145,56 @@ DisplaySlotCharacteristics2 ( PRINT_BITS_INFO (SlotCharacteristics2Table, Chara2); } +/** + Display System Slots (Type 9) Information. + @param[in] Width The key of the structure. + @param[in] Option The optional information. +**/ +VOID +DisplaySystemSlotInformation ( + IN UINT8 Width, + IN UINT8 Option + ) +{ + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_INFORMATION), gShellDebug1HiiHandle); + PRINT_INFO_OPTION (Width, Option); + PRINT_TABLE_ITEM (SystemSlotInformationTable, Width); +} + +/** + Display System Slots (Type 9) Physical Width. + @param[in] Width The key of the structure. + @param[in] Option The optional information. +**/ +VOID +DisplaySystemSlotPhysicalWidth ( + IN UINT8 Width, + IN UINT8 Option + ) +{ + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_PHYSICAL_WIDTH), gShellDebug1HiiHandle); + PRINT_INFO_OPTION (Width, Option); + PRINT_TABLE_ITEM (SystemSlotPhysicalWidthTable, Width); +} + +/** + Display System Slots (Type 9) slot height. + @param[in] Length The key of the structure. + @param[in] Option The optional information. +**/ +VOID +DisplaySystemSlotHeight ( + IN UINT8 Length, + IN UINT8 Option + ) +{ + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_HEIGHT), gShellDebug1HiiHandle); + PRINT_INFO_OPTION (Length, Option); + PRINT_TABLE_ITEM (SystemSlotHeightTable, Length); +} + + + /** Display On Board Devices Information (Type 10) types. diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.h b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.h index bd9e6898d..de2b63bf3 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.h +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.h @@ -419,6 +419,40 @@ DisplaySlotCharacteristics2 ( IN UINT8 Option ); +/** + Display System Slots (Type 9) Information. + @param[in] Width The key of the structure. + @param[in] Option The optional information. +**/ +VOID +DisplaySystemSlotInformation ( + IN UINT8 Width, + IN UINT8 Option + ); + +/** + Display System Slots (Type 9) Physical Width. + @param[in] Width The key of the structure. + @param[in] Option The optional information. +**/ +VOID +DisplaySystemSlotPhysicalWidth ( + IN UINT8 Width, + IN UINT8 Option + ); + +/** + Display System Slots (Type 9) slot height. + @param[in] Length The key of the structure. + @param[in] Option The optional information. +**/ +VOID +DisplaySystemSlotHeight ( + IN UINT8 Length, + IN UINT8 Option + ); + + /** Display On Board Devices Information (Type 10) types. diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni index 6b8e35a83..4b27f5417 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni @@ -1,15 +1,9 @@ // /** // -// Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.
+// Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
// (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P.
-// (C) Copyright 2015-2017 Hewlett Packard Enterprise Development LP
-// This program and the accompanying materials -// are licensed and made available under the terms and conditions of the BSD License -// which accompanies this distribution. The full text of the license may be found at -// http://opensource.org/licenses/bsd-license.php -// -// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +// (C) Copyright 2015-2019 Hewlett Packard Enterprise Development LP
+// SPDX-License-Identifier: BSD-2-Clause-Patent // // Module Name: // @@ -99,11 +93,17 @@ #string STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_STATE #language en-US "Power Supply State " #string STR_SMBIOSVIEW_PRINTINFO_THERMAL_STATE #language en-US "Thermal state " #string STR_SMBIOSVIEW_PRINTINFO_SECURITY_STATUS #language en-US "Security Status " +#string STR_SMBIOSVIEW_PRINTINFO_CONTAINED_ELEMENT #language en-US "Contained Element %d: " #string STR_SMBIOSVIEW_PRINTINFO_SUPOPRT #language en-US "Support " #string STR_SMBIOSVIEW_PRINTINFO_CURRENT #language en-US "Current " #string STR_SMBIOSVIEW_PRINTINFO_INSTALLED #language en-US "Installed " #string STR_SMBIOSVIEW_PRINTINFO_ENABLED #language en-US "Enabled " #string STR_SMBIOSVIEW_PRINTINFO_EXTERNAL #language en-US "External " +#string STR_SMBIOSVIEW_PRINTINFO_SLOT_PEER_GROUPS #language en-US "Peer Groups %d:\r\n" +#string STR_SMBIOSVIEW_PRINTINFO_SEGMENT_GROUP_NUM #language en-US " SegmentGroup Num: 0x%04x\r\n" +#string STR_SMBIOSVIEW_PRINTINFO_BUS_NUM #language en-US " Bus Num: 0x%02x\r\n" +#string STR_SMBIOSVIEW_PRINTINFO_DEV_FUNC_NUM #language en-US " DevFunc Num: 0x%02x\r\n" +#string STR_SMBIOSVIEW_PRINTINFO_DATA_BUS_WIDTH #language en-US " DataBus Width: %d\r\n" #string STR_SMBIOSVIEW_PRINTINFO_DESC_STRING #language en-US "Description String: " #string STR_SMBIOSVIEW_PRINTINFO_SUPOPRTED_EVENT #language en-US "Supported Event Log Type Descriptors %d:\r\n" #string STR_SMBIOSVIEW_PRINTINFO_ACCESS_METHOD_NOT_SUPOPRTED #language en-US "Access Method %d has not supported\r\n" @@ -129,7 +129,7 @@ #string STR_SMBIOSVIEW_PRINTINFO_BIOS_SHADOWING #language en-US "BIOS shadowing is allowed\r\n" #string STR_SMBIOSVIEW_PRINTINFO_VESA_SUPPORTED #language en-US "VL-VESA is supported\r\n" #string STR_SMBIOSVIEW_PRINTINFO_ECSD_SUPPORT #language en-US "ESCD support is available\r\n" -#string STR_SMBIOSVIEW_PRINTINFO_BOOT_FORM_CD_SUPPORTED #language en-US "Boot form CD is supported\r\n" +#string STR_SMBIOSVIEW_PRINTINFO_BOOT_FROM_CD_SUPPORTED #language en-US "Boot from CD is supported\r\n" #string STR_SMBIOSVIEW_PRINTINFO_SELECTED_BOOT_SUPPORTED #language en-US "Selectable Boot is supported\r\n" #string STR_SMBIOSVIEW_PRINTINFO_BIOS_ROM_SOCKETED #language en-US "BIOS ROM is socketed\r\n" #string STR_SMBIOSVIEW_PRINTINFO_BOOT_FROM_PC_CARD #language en-US "Boot From PC Card(PCMCIA)is supported\r\n" @@ -272,7 +272,7 @@ #string STR_SMBIOSVIEW_PRINTINFO_BIT15_NOT_ZERO #language en-US "Error, reserved BIT 15 must be zero\r\n" #string STR_SMBIOSVIEW_PRINTINFO_PROC_STATUS #language en-US "Processor Status:\r\n" #string STR_SMBIOSVIEW_PRINTINFO_CPU_SOCKET_POPULATED #language en-US "CPU Socket Populated\r\n" -#string STR_SMBIOSVIEW_PRINTINFO_CPU_SOCKET_UNPOPULATED #language en-US "CPU Socket Unpopulated Bits\r\n" +#string STR_SMBIOSVIEW_PRINTINFO_CPU_SOCKET_UNPOPULATED #language en-US "CPU Socket Unpopulated\r\n" #string STR_SMBIOSVIEW_PRINTINFO_CPU_ENABLED #language en-US "CPU Enabled\r\n" #string STR_SMBIOSVIEW_PRINTINFO_CPU_DISABLED_BY_USER #language en-US "CPU Disabled by User via BIOS Setup\r\n" #string STR_SMBIOSVIEW_PRINTINFO_CPU_DIABLED_BY_BIOS #language en-US "CPU Disabled By BIOS (POST Error)\r\n" @@ -296,7 +296,7 @@ #string STR_SMBIOSVIEW_PRINTINFO_MEM_SIZE #language en-US " Memory Size: %d MB\r\n" #string STR_SMBIOSVIEW_PRINTINFO_MEM_MODULE_DOUBLE_BANK #language en-US "The memory module has a Double-bank connection\r\n" #string STR_SMBIOSVIEW_PRINTINFO_MEM_MODULE_SINGLE_BANK #language en-US "The memory module has a Single-bank connection\r\n" -#string STR_SMBIOSVIEW_PRINTINFO_SLOT_ID #language en-US " Slot Id:" +#string STR_SMBIOSVIEW_PRINTINFO_SLOT_ID #language en-US "Slot Id:" #string STR_SMBIOSVIEW_PRINTINFO_LOGICAL_MICRO_CHAN #language en-US " the logical Micro Channel slot number is:" #string STR_SMBIOSVIEW_PRINTINFO_ONE_VAR_D #language en-US " %d\r\n" #string STR_SMBIOSVIEW_PRINTINFO_ERROR_NOT_1_15 #language en-US " error, not 1-15.\r\n" @@ -336,9 +336,9 @@ #string STR_SMBIOSVIEW_PRINTINFO_BOOT_OPTION_LIMIT #language en-US "Boot Option on Limit: " #string STR_SMBIOSVIEW_PRINTINFO_OP_SYSTEM_2 #language en-US "Operating system\r\n" #string STR_SMBIOSVIEW_PRINTINFO_SYSTEM_UTIL #language en-US "System utilities\r\n" -#string STR_SMBIOSVIEW_PRINTINFO_DO_NOT_REBOOT_BITS #language en-US "Do not reboot Bits\r\n" -#string STR_SMBIOSVIEW_PRINTINFO_BOOT_OPTION #language en-US "Boot Option :" #string STR_SMBIOSVIEW_PRINTINFO_DO_NOT_REBOOT #language en-US "Do not reboot\r\n" +#string STR_SMBIOSVIEW_PRINTINFO_BOOT_OPTION #language en-US "Boot Option :" +#string STR_SMBIOSVIEW_PRINTINFO_DO_NOT_REBOOT_BITS #language en-US "Do not reboot bits\r\n" #string STR_SMBIOSVIEW_PRINTINFO_HARDWARE_SECURITY_SET #language en-US "Hardware Security Settings: \r\n" #string STR_SMBIOSVIEW_PRINTINFO_POWER_ON_PASSWORD #language en-US "Power-on Password Status: " #string STR_SMBIOSVIEW_PRINTINFO_DISABLED #language en-US "Disabled\r\n" @@ -376,7 +376,7 @@ #string STR_SMBIOSVIEW_PRINTINFO_NOT_APPLICABLE #language en-US " Not applicable\r\n" #string STR_SMBIOSVIEW_PRINTINFO_RESERVED_3 #language en-US " Reserved \r\n" #string STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_UNPLUGGED #language en-US "Power supply is unplugged from the wall\r\n" -#string STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_PLUGGED #language en-US "Power supply is plugged from the wall\r\n" +#string STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_PLUGGED #language en-US "Power supply is plugged into the wall\r\n" #string STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_PRESENT #language en-US "Power supply is present\r\n" #string STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_NOT_PRESENT #language en-US "Power supply is not present\r\n" #string STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_REPLACE #language en-US "Power supply is hot replaceable\r\n" @@ -414,6 +414,9 @@ #string STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_LENGTH #language en-US "System Slot Length: " #string STR_SMBIOSVIEW_QUERYTABLE_SLOT_CHARACTERISTICS #language en-US "Slot characteristics 1: " #string STR_SMBIOSVIEW_QUERYTABLE_SLOT_CHARACTERISTICS_2 #language en-US "Slot characteristics 2: " +#string STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_INFORMATION #language en-US "System Slot Information: " +#string STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_HEIGHT #language en-US "System Slot Height: " +#string STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_PHYSICAL_WIDTH #language en-US "System Slot Physical Width: " #string STR_SMBIOSVIEW_QUERYTABLE_ONBOARD_DEVICE_TYPE #language en-US "Onboard Device Type: " #string STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_EVENT_LOG_TYPE #language en-US "System Event Log Type: " #string STR_SMBIOSVIEW_QUERYTABLE_EVENT_LOG_VAR_DATA_FORMAT #language en-US "Event Log Variable Data Format Types: " @@ -429,6 +432,8 @@ #string STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_FORM_FACTOR #language en-US "Memory Device - Form Factor: " #string STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_TYPE #language en-US "Memory Device - Type: " #string STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_TYPE_DETAIL #language en-US "Memory Device - Type Detail: " +#string STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_MEMORY_TECHNOLOGY #language en-US "Memory Device - Memory Technology: " +#string STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_MEM_OPER_MODE_CAPA #language en-US "Memory Device - Memory Operating Mode Capability: " #string STR_SMBIOSVIEW_QUERYTABLE_MEM_ERROR_INFO #language en-US "32-bit Memory Error Information - Type: " #string STR_SMBIOSVIEW_QUERYTABLE_MEM_ERROR_GRANULARITY #language en-US "Memory Error - Error granularity: " #string STR_SMBIOSVIEW_QUERYTABLE_MEM_ERROR_OP #language en-US "Memory Error - Error Operation: " @@ -448,6 +453,7 @@ #string STR_SMBIOSVIEW_QUERYTABLE_BMC_INTERFACE_TYPE #language en-US "BMC Interface Type:" #string STR_SMBIOSVIEW_QUERYTABLE_MC_HOST_INTERFACE_TYPE #language en-US "MC Host Interface Type:" #string STR_SMBIOSVIEW_QUERYTABLE_STRUCT_TYPE #language en-US "Structure Type:" +#string STR_SMBIOSVIEW_QUERYTABLE_PROCESSOR_ARCH_TYPE #language en-US "Processor Architecture Type:" #string STR_SMBIOSVIEW_SMBIOSVIEW_ONE_VAR_ARGV #language en-US "%s " #string STR_SMBIOSVIEW_SMBIOSVIEW_QUERY_STRUCT_COND #language en-US "Query Structure, conditions are:\r\n" #string STR_SMBIOSVIEW_SMBIOSVIEW_QUERYTYPE_RANDOM #language en-US "QueryType = Random \r\n" @@ -498,4 +504,3 @@ #string STR_SMBIOSVIEW_PRINTINFO_TPM_DEVICE_CONFIG_PLAT_SW #language en-US "Family configurable via platform software support\r\n" #string STR_SMBIOSVIEW_PRINTINFO_TPM_DEVICE_CONFIG_OEM #language en-US "Family configurable via OEM proprietary mechanism\r\n" #string STR_SMBIOSVIEW_PRINTINFO_BITS_06_63 #language en-US "Bits 6:63 are reserved\r\n" -