summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
diff options
context:
space:
mode:
authorSimon Wang <simowang@nvidia.com>2023-05-04 10:34:20 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-06-08 07:11:06 +0000
commit8314a85893f5b75baa0031a5138028188a626243 (patch)
treeacda28b3bf2b536ba39c3ad02f8f34efcb64ba9e /ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
parent69abcf1e78b67e7ce9ac53a9fe1ce61877df984c (diff)
downloadedk2-8314a85893f5b75baa0031a5138028188a626243.tar.gz
edk2-8314a85893f5b75baa0031a5138028188a626243.tar.bz2
edk2-8314a85893f5b75baa0031a5138028188a626243.zip
ShellPkg/SmbiosView: type 45 and type 46 support.
The initial version of Smbios Specification 3.6.0 type 45 and type 46 support. Signed-off-by: Simon Wang <simowang@nvidia.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c')
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c81
1 files changed, 81 insertions, 0 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
index edb46817e4..29b5a29001 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
@@ -4,6 +4,7 @@
Copyright (c) 2005 - 2021, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016-2019 Hewlett Packard Enterprise Development LP<BR>
+ Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -3622,6 +3623,52 @@ TABLE_ITEM ProcessorArchitectureTypesTable[] = {
}
};
+TABLE_ITEM FirmwareInventoryCharTable[] = {
+ {
+ 0,
+ L"Updatable"
+ },
+ {
+ 1,
+ L"Write-Protect"
+ }
+};
+
+TABLE_ITEM FirmwareInventoryStateTable[] = {
+ {
+ 1,
+ L" Other"
+ },
+ {
+ 2,
+ L" Unknown "
+ },
+ {
+ 3,
+ L" Disabled: This firmware component is disabled. "
+ },
+ {
+ 4,
+ L" Enabled: This firmware component is enabled. "
+ },
+ {
+ 5,
+ L" Absent: This firmware component is either not present or not detected "
+ },
+ {
+ 6,
+ L" StandbyOffline: This firmware is enabled but awaits an external action to activate it. "
+ },
+ {
+ 7,
+ L" StandbySpare: This firmware is part of a redundancy set and awaits a failover or other external action to activate it. "
+ },
+ {
+ 8,
+ L" UnavailableOffline: This firmware component is present but cannot be used. "
+ },
+};
+
TABLE_ITEM StructureTypeInfoTable[] = {
{
0,
@@ -5127,6 +5174,40 @@ DisplayProcessorArchitectureType (
}
/**
+ Display Firmware Characteristics (Type 45) details.
+
+ @param[in] Chara The information bits.
+ @param[in] Option The optional information.
+**/
+VOID
+DisplayFirmwareCharacteristics (
+ IN UINT16 Chara,
+ IN UINT8 Option
+ )
+{
+ ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_FIRMWARE_INVENTORY_CHAR), gShellDebug1HiiHandle);
+ PRINT_INFO_OPTION (Chara, Option);
+ PRINT_BITS_INFO (FirmwareInventoryCharTable, Chara);
+}
+
+/**
+ Display Firmware state (Type 45) details.
+
+ @param[in] Key The key of the structure.
+ @param[in] Option The optional information.
+**/
+VOID
+DisplayFirmwareState (
+ IN UINT8 Key,
+ IN UINT8 Option
+ )
+{
+ ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_FIRMWARE_INVENTORY_STATE), gShellDebug1HiiHandle);
+ PRINT_INFO_OPTION (Key, Option);
+ PRINT_TABLE_ITEM (FirmwareInventoryStateTable, Key);
+}
+
+/**
Display the structure type information.
@param[in] Key The key of the structure.