summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView
diff options
context:
space:
mode:
authorChris Phillips <chrisp@hpe.com>2017-01-10 14:52:40 +0800
committerStar Zeng <star.zeng@intel.com>2017-01-12 16:46:36 +0800
commit12233c19177d3971b657200778b681c6132e598b (patch)
treecb7255b722911ec46e411a51f7b6221f2b2889ef /ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView
parenta679e8b1d977a494f77a9ec5535bea918f3b74f1 (diff)
downloadedk2-12233c19177d3971b657200778b681c6132e598b.zip
edk2-12233c19177d3971b657200778b681c6132e598b.tar.gz
edk2-12233c19177d3971b657200778b681c6132e598b.tar.bz2
ShellPkg: Update smbiosview command to display Type 3 values
The smbiosview command was not displaying SMBIOS Type 3 Height, NumberofPowerCords, or SKU Number. Added handling to display these values. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chris Phillips <chrisp@hpe.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView')
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
index 7e17b69..000bbe5 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
@@ -3,7 +3,7 @@
Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
- (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
+ (C) Copyright 2015-2017 Hewlett Packard Enterprise Development LP<BR>
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
@@ -390,8 +390,21 @@ SmbiosPrintStructure (
DisplaySystemEnclosureStatus (Struct->Type3->ThermalState, Option);
ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SECURITY_STATUS), gShellDebug1HiiHandle);
DisplaySESecurityStatus (Struct->Type3->SecurityStatus, Option);
- if (AE_SMBIOS_VERSION (0x2, 0x3) && (Struct->Hdr->Length > 0xD)) {
- PRINT_BIT_FIELD (Struct, Type3, OemDefined, 4);
+ if (AE_SMBIOS_VERSION (0x2, 0x3)) {
+ if (Struct->Hdr->Length > 0xD) {
+ PRINT_BIT_FIELD (Struct, Type3, OemDefined, 4);
+ }
+ if (Struct->Hdr->Length > 0x11) {
+ PRINT_STRUCT_VALUE (Struct, Type3, Height);
+ }
+ if (Struct->Hdr->Length > 0x12) {
+ PRINT_STRUCT_VALUE (Struct, Type3, NumberofPowerCords);
+ }
+ }
+ if (AE_SMBIOS_VERSION (0x2, 0x7) && (Struct->Hdr->Length > 0x13)) {
+ if (Struct->Hdr->Length > (0x15 + (Struct->Type3->ContainedElementCount * Struct->Type3->ContainedElementRecordLength))) {
+ PRINT_SMBIOS_STRING (Struct, Buffer[0x15 + (Struct->Type3->ContainedElementCount * Struct->Type3->ContainedElementRecordLength)], SKUNumber);
+ }
}
break;