summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
diff options
context:
space:
mode:
authorPrakash.K <prakashk@ami.com>2022-11-24 10:42:13 +0530
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-01-18 02:21:19 +0000
commit6c1988af7683f3234dfd06a6a99deb3ea6946c39 (patch)
tree737625252252d895e3eaf021b470ea3fc0a4bb2e /ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
parentea382b3b21ef6664d5850dfbe08793f77d10c15d (diff)
downloadedk2-6c1988af7683f3234dfd06a6a99deb3ea6946c39.tar.gz
edk2-6c1988af7683f3234dfd06a6a99deb3ea6946c39.tar.bz2
edk2-6c1988af7683f3234dfd06a6a99deb3ea6946c39.zip
ShellPkg: Display SMBIOS Type38 fields in smbiosview in formatted view
In smbiosview command in shell, below are the fields of SMBIOS Type38 table which can be displayed in formatted manner. 1. Base Address 1. IPMI Specification Version. 2. NV Storage Device Address. Base Address: As per spec, the value in Base Address field of SMBIOS type38 table should be right shifted by 1 if the interface type is SSIF. IPMI Specification Version: If the value in IPMI Specification Version field is 15H, it should be displayed 1.5. NV Storage Device Address: If the value in NV Storage Device Address field is 0xFF, it should be displayed as "No storage device is Present". Cc: Vasudevan Sambandan <vasudevans@ami.com> Cc: Sundaresan Selvaraj <sundaresans@ami.com> Cc: Gayathri Thunuguntla <gayathrit@ami.com> Signed-off-by: Prakash K <prakashk@ami.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c')
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
index e936ee8ea9..2611601230 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
@@ -1177,10 +1177,31 @@ SmbiosPrintStructure (
//
case 38:
DisplayIPMIDIBMCInterfaceType (Struct->Type38->InterfaceType, Option);
- PRINT_STRUCT_VALUE_H (Struct, Type38, IPMISpecificationRevision);
+
+ ShellPrintHiiEx (
+ -1,
+ -1,
+ NULL,
+ STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_IPMI_SPECIFICATION_REVISION),
+ gShellDebug1HiiHandle,
+ RShiftU64 ((UINT64)Struct->Type38->IPMISpecificationRevision, 4), \
+ Struct->Type38->IPMISpecificationRevision & 0x0F
+ );
+
PRINT_STRUCT_VALUE_H (Struct, Type38, I2CSlaveAddress);
- PRINT_STRUCT_VALUE_H (Struct, Type38, NVStorageDeviceAddress);
- PRINT_STRUCT_VALUE_LH (Struct, Type38, BaseAddress);
+
+ if (Struct->Type38->NVStorageDeviceAddress == 0xFF) {
+ ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NV_STORAGE_DEVICE_NOT_PRESENT), gShellDebug1HiiHandle);
+ } else {
+ PRINT_STRUCT_VALUE_H (Struct, Type38, NVStorageDeviceAddress);
+ }
+
+ if (Struct->Type38->InterfaceType == IPMIDeviceInfoInterfaceTypeSSIF) {
+ ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BASE_ADDRESS), gShellDebug1HiiHandle, RShiftU64 ((UINT64)Struct->Type38->BaseAddress, 1));
+ } else {
+ PRINT_STRUCT_VALUE_LH (Struct, Type38, BaseAddress);
+ }
+
break;
//