summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamer El-Haj-Mahmoud <elhaj@hpe.com>2015-12-18 07:41:39 +0000
committervanjeff <vanjeff@Edk2>2015-12-18 07:41:39 +0000
commitff8da347261ec80529f6c2398d9905a289b81ba3 (patch)
tree1086424d7c1c35867e8026a67729b8a83d7461cb
parent5fe2882981b8e4b9b179c7f3e0a58e96b5115a20 (diff)
downloadedk2-platforms-ff8da347261ec80529f6c2398d9905a289b81ba3.tar.xz
ShellPkg: Fix a bug in smbiosview PowerSupply Characteristics.
Fix bit shifting when isolating the Characteristics of Power Supply information. (Sync patch r19291 from main trunk.) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2015@19413 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
index e348c6f25c..3f99dc4825 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
@@ -3100,7 +3100,7 @@ DisplaySPSCharacteristics (
// Bits 13:10 - DMTF Power Supply Type
//
ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TYPE), gShellDebug1HiiHandle);
- Temp = (Characteristics & 0x1C00) << 10;
+ Temp = (Characteristics & 0x1C00) >> 10;
switch (Temp) {
case 1:
ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTHER_SPACE), gShellDebug1HiiHandle);
@@ -3141,7 +3141,7 @@ DisplaySPSCharacteristics (
// Bits 9:7 - Status
//
ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_STATUS_DASH), gShellDebug1HiiHandle);
- Temp = (Characteristics & 0x380) << 7;
+ Temp = (Characteristics & 0x380) >> 7;
switch (Temp) {
case 1:
ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTHER_SPACE), gShellDebug1HiiHandle);
@@ -3170,7 +3170,7 @@ DisplaySPSCharacteristics (
// Bits 6:3 - DMTF Input Voltage Range Switching
//
ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INPUT_VOLTAGE_RANGE), gShellDebug1HiiHandle);
- Temp = (Characteristics & 0x78) << 3;
+ Temp = (Characteristics & 0x78) >> 3;
switch (Temp) {
case 1:
ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTHER_SPACE), gShellDebug1HiiHandle);