Reviewed-by: Jaben Carsey <jaben.car...@intel.com> > -----Original Message----- > From: Samer El-Haj-Mahmoud [mailto:samer.el-haj-mahm...@hpe.com] > Sent: Monday, December 14, 2015 4:24 PM > To: edk2-devel@lists.01.org > Cc: Ni, Ruiyu <ruiyu...@intel.com>; Carsey, Jaben <jaben.car...@intel.com>; > Samer El-Haj-Mahmoud <samer.el-haj-mahm...@hpe.com>; Samer El-Haj- > Mahmoud <el...@hpe.com> > Subject: [PATCH] ShellPkg: Fix a bug in smbiosview PowerSupply > Characteristics > Importance: High > > Fix bit shifting when isolating the Characteristics of Power Supply > information > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> > --- > ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c | 6 > +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c > index e348c6f..3f99dc4 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); > -- > 2.6.3.windows.1
_______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel