summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
diff options
context:
space:
mode:
authorLinson Augustine <linson.augustine@hpe.com>2017-01-12 14:59:36 +0800
committerStar Zeng <star.zeng@intel.com>2017-01-13 09:15:57 +0800
commite9f0be021b7649c15d823e193110c0088cda9a89 (patch)
tree5e094018158da05855b36097ac4c7cee7279e5fb /ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
parent6157f6500c4098d7b541c1f1e9ba28e73fe9b70c (diff)
downloadedk2-e9f0be021b7649c15d823e193110c0088cda9a89.tar.gz
edk2-e9f0be021b7649c15d823e193110c0088cda9a89.tar.bz2
edk2-e9f0be021b7649c15d823e193110c0088cda9a89.zip
ShellPkg/SmbiosView: Add decoding of SMBIOS record type 43
Added decoding of the new SMBIOS Type 43 record. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Augustine Linson P <linson.augustine@hpe.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c')
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c70
1 files changed, 70 insertions, 0 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
index 000bbe53a7..d9adb1a7ab 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
@@ -1096,6 +1096,20 @@ SmbiosPrintStructure (
break;
//
+ // TPM Device (Type 43)
+ //
+ case 43:
+ PRINT_BIT_FIELD (Struct, Type43, VendorID, 4);
+ PRINT_STRUCT_VALUE_H (Struct, Type43, MajorSpecVersion);
+ PRINT_STRUCT_VALUE_H (Struct, Type43, MinorSpecVersion);
+ PRINT_STRUCT_VALUE_H (Struct, Type43, FirmwareVersion1);
+ PRINT_STRUCT_VALUE_H (Struct, Type43, FirmwareVersion2);
+ PRINT_PENDING_STRING (Struct, Type43, Description);
+ DisplayTpmDeviceCharacteristics (ReadUnaligned64 ((UINT64 *) (UINTN) &(Struct->Type43->Characteristics)), Option);
+ PRINT_STRUCT_VALUE_H (Struct, Type43, OemDefined);
+ break;
+
+ //
// Inactive (Type 126)
//
case 126:
@@ -3238,3 +3252,59 @@ DisplaySPSCharacteristics (
ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_NOT_REPLACE), gShellDebug1HiiHandle);
}
}
+
+/**
+ Display TPM Device (Type 43) Characteristics.
+
+ @param[in] Chara The information bits.
+ @param[in] Option The optional information.
+**/
+VOID
+DisplayTpmDeviceCharacteristics (
+ IN UINT64 Chara,
+ IN UINT8 Option
+ )
+{
+ //
+ // Print header
+ //
+ ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TPM_DEVICE_CHAR), gShellDebug1HiiHandle);
+ //
+ // print option
+ //
+ PRINT_INFO_OPTION (Chara, Option);
+
+ //
+ // Check all the bits and print information
+ // This function does not use Table because table of bits
+ // are designed not to deal with UINT64
+ //
+ if (BIT (Chara, 0) != 0) {
+ ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED_BIT), gShellDebug1HiiHandle);
+ }
+
+ if (BIT (Chara, 1) != 0) {
+ ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED_BIT), gShellDebug1HiiHandle);
+ }
+ if (BIT (Chara, 2) != 0) {
+ ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TPM_DEVICE_CHAR_NOT_SUPPORTED), gShellDebug1HiiHandle);
+ }
+
+ if (BIT (Chara, 3) != 0) {
+ ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TPM_DEVICE_CONFIG_FWU), gShellDebug1HiiHandle);
+ }
+
+ if (BIT (Chara, 4) != 0) {
+ ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TPM_DEVICE_CONFIG_PLAT_SW), gShellDebug1HiiHandle);
+ }
+
+ if (BIT (Chara, 5) != 0) {
+ ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TPM_DEVICE_CONFIG_OEM), gShellDebug1HiiHandle);
+ }
+
+ //
+ // Just print the Reserved
+ //
+ ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_06_63), gShellDebug1HiiHandle);
+
+}