diff options
author | raywu <raywu@aaeon.com.tw> | 2018-09-13 16:11:56 +0800 |
---|---|---|
committer | raywu <raywu@aaeon.com.tw> | 2018-09-13 16:11:56 +0800 |
commit | 31bb486c913795c8b67d1c4dbaae2bdec4943fc9 (patch) | |
tree | f0e04ad6fe983d8aa11f0f8a808518e39ab408f1 /EDK/MiniSetup/PasswordEncode | |
parent | 465bdc2f8b32bb4cc1ac2c420086ec79ccbd5f78 (diff) | |
download | zprj-31bb486c913795c8b67d1c4dbaae2bdec4943fc9.tar.xz |
SLP1.0 / SLP2.0 / Default Password / Logo / Fix Boot Order
Diffstat (limited to 'EDK/MiniSetup/PasswordEncode')
-rw-r--r-- | EDK/MiniSetup/PasswordEncode/TsePasswordEncode.c | 101 | ||||
-rw-r--r-- | EDK/MiniSetup/PasswordEncode/TsePasswordEncode.cif | 10 | ||||
-rw-r--r-- | EDK/MiniSetup/PasswordEncode/TsePasswordEncode.mak | 145 | ||||
-rw-r--r-- | EDK/MiniSetup/PasswordEncode/TsePasswordEncode.sdl | 34 |
4 files changed, 290 insertions, 0 deletions
diff --git a/EDK/MiniSetup/PasswordEncode/TsePasswordEncode.c b/EDK/MiniSetup/PasswordEncode/TsePasswordEncode.c new file mode 100644 index 0000000..461b626 --- /dev/null +++ b/EDK/MiniSetup/PasswordEncode/TsePasswordEncode.c @@ -0,0 +1,101 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2012, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +// $Archive: /Alaska/SOURCE/Modules/AMITSE2_0/AMITSE/PasswordEncode/TsePasswordEncode.c $ +// +// $Author: Arunsb $ +// +// $Revision: 2 $ +// +// $Date: 7/16/14 1:40p $ +// +//*****************************************************************// +//*****************************************************************// +// Revision History +// ---------------- +// $Log: /Alaska/SOURCE/Modules/AMITSE2_0/AMITSE/PasswordEncode/TsePasswordEncode.c $ +// +// 2 7/16/14 1:40p Arunsb +// [TAG] EIP178064 +// [Category] Bug Fix +// [Severity:] Normal +// [Symptom:] Password window hangs on post +// [Root Cause] Memory accessed over the allocated range +// [Solution] While changing the incoming password to non case sensitivie +// memory accessed only within range. +// [Files] PasswordEncode\PasswordEncode.c and +// PasswordEncode\TsePasswordEncode.c +// +// 1 5/08/14 4:37p Arunsb +// [TAG] EIP162197 +// [Category] Improvement +// [Description] Password encode feature. Modify to encode using Hashing +// based on token. +// Separate module created for TSE password encoding logic. +// +// +//************************************************************************* +//<AMI_FHDR_START> +// +// Name: CtrlCond.C +// +// Description: +// +//<AMI_FHDR_END> +//************************************************************************* + +//--------------------------------------------------------------------------- +#include "minisetup.h" + +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: TsePasswordEncodeLocal +// +// Description: Function to encode the password string +// +// Parameter: CHAR16 *Password, UINTN MaxSize +// +// Return value: VOID +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +BOOLEAN IsPasswordSupportNonCaseSensitive(); +VOID TsePasswordEncodeLocal ( CHAR16 *Password, UINTN MaxSize) +{ + UINTN ii; + unsigned int key = 0x935b; + + if (IsPasswordSupportNonCaseSensitive ()) + { + for ( ii = 0; ii < MaxSize/2; ii++ ) + Password[ii] = ((Password[ii]>=L'a')&&(Password[ii]<=L'z'))?(Password[ii]+L'A'-L'a'):Password[ii]; + } + // Encode the password.. + for ( ii = 1; ii <= MaxSize/2; ii++ ) + Password[ii-1] = (CHAR16)(Password[ii-1] ^ (key*ii)); +} + +//********************************************************************** +//********************************************************************** +//** ** +//** (C)Copyright 1985-2012, American Megatrends, Inc. ** +//** ** +//** All Rights Reserved. ** +//** ** +//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 ** +//** ** +//** Phone: (770)-246-8600 ** +//** ** +//********************************************************************** +//********************************************************************** diff --git a/EDK/MiniSetup/PasswordEncode/TsePasswordEncode.cif b/EDK/MiniSetup/PasswordEncode/TsePasswordEncode.cif new file mode 100644 index 0000000..ffa35ac --- /dev/null +++ b/EDK/MiniSetup/PasswordEncode/TsePasswordEncode.cif @@ -0,0 +1,10 @@ +<component> + name = "TSE Sources - PasswordEncode" + category = ModulePart + LocalRoot = "EDK\MiniSetup\PasswordEncode" + RefName = "TsePasswordEncode" +[files] +"TsePasswordEncode.sdl" +"TsePasswordEncode.mak" +"TsePasswordEncode.c" +<endComponent>
\ No newline at end of file diff --git a/EDK/MiniSetup/PasswordEncode/TsePasswordEncode.mak b/EDK/MiniSetup/PasswordEncode/TsePasswordEncode.mak new file mode 100644 index 0000000..d750c6b --- /dev/null +++ b/EDK/MiniSetup/PasswordEncode/TsePasswordEncode.mak @@ -0,0 +1,145 @@ +##*****************************************************************## +##*****************************************************************## +##*****************************************************************## +##** **## +##** (C)Copyright 2004, American Megatrends, Inc. **## +##** **## +##** All Rights Reserved. **## +##** **## +##** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **## +##** **## +##** Phone (770)-246-8600 **## +##** **## +##*****************************************************************## +##*****************************************************************## +##*****************************************************************## +## $Archive: /Alaska/SOURCE/Modules/AMITSE2_0/AMITSE/PasswordEncode/TsePasswordEncode.mak $ +## +## $Author: Arunsb $ +## +## $Revision: 1 $ +## +## $Date: 5/08/14 4:37p $ +## +##*****************************************************************## +##*****************************************************************## +## Revision History +## ---------------- +## $Log: /Alaska/SOURCE/Modules/AMITSE2_0/AMITSE/PasswordEncode/TsePasswordEncode.mak $ +# +# 1 5/08/14 4:37p Arunsb +# [TAG] EIP162197 +# [Category] Improvement +# [Description] Password encode feature. Modify to encode using Hashing +# based on token. +# Separate module created for TSE password encoding logic. +# +# 9 10/18/12 5:58a Arunsb +# Updated for 2.16.1235 QA submission +## +## 12 10/10/12 12:36p Arunsb +## Synched the source for v2.16.1232, backup with Aptio +# +# 8 4/02/10 6:13p Madhans +# EIP 37036 : To make TSE 2.01 Binary module to work with older Cores +# +# 7 2/26/10 8:53p Madhans +# For TSE 2.01.1024. refer changelog.log for file checkin history . +## +## 8 2/26/10 1:29p Madhans +## Bootonly source module need AMITSEStrTokens.h +## +## 7 2/19/10 8:14a Mallikarjunanv +## updated year in copyright message +## +## 6 2/17/10 1:02p Madhans +## minisetupstr.uni removed and Strings token are refered from +## AMITSEStrTokens.h +## +## 5 10/28/09 5:37p Madhans +## +## 4 8/17/09 12:22p Presannar +## Removed include directory Core +## +## 3 6/24/09 6:09p Madhans +## Made TSE_USE_EDK_LIBRARY=OFF to not to refer EDK module. +## +## 2 6/12/09 7:41p Presannar +## Initial implementation of coding standards +## +## 1 6/04/09 8:05p Madhans +# +# 1 4/28/09 11:12p Madhans +# Tse 2.0 Code complete Checkin. +## +## 5 4/28/09 9:39p Madhans +## Tse 2.0 Code complete Checkin. +## +## 4 3/31/09 3:58p Madhans +## +## 3 2/05/09 10:15a Madhans +## Style Module created. +## +## 2 1/30/09 6:06p Madhans +## Function headers added. +## +## 1 12/18/08 7:58p Madhans +## Intial version of TSE Lite sources +##*****************************************************************## + +# MAK file for the eModule:MiniSetup + +MINISETUP_INCLUDES = \ + -I $(TSESRC_DIR)\AMILogo \ + -I $(TSESRC_DIR) \ +!if "$(TSE_BOARD_SOURCE_SUPPORT)" == "1" + -I $(TSE_BOARD_DIR)\ +!endif + -I $(TSEBIN_DIR) \ + -I $(TSEBIN_DIR)\Inc \ + -I $(PROJECT_DIR)\Include\Protocol \ + -I $(PROJECT_DIR) \ + -I $(PROJECT_DIR)\Include \ + -I $(BUILD_DIR) \ + -I $(TSE_PWD_ENCODE_DIR) \ + +!if "$(TseLite_SUPPORT)" == "1" +MINISETUP_INCLUDES = -I $(UEFISRC_DIR) $(MINISETUP_INCLUDES) -I $(TSELITESRC_DIR) -I $(TSE_STYLE_DIR) +!endif + + +$(BUILD_DIR)\TsePasswordEncode.lib : TsePasswordEncodeLib + +TsePasswordEncodeLib : $(BUILD_DIR)\TsePasswordEncode.mak TsePasswordEncodeLibBin + +$(BUILD_DIR)\TsePasswordEncode.mak : $(TSE_PWD_ENCODE_DIR)\$(@B).cif $(TSE_PWD_ENCODE_DIR)\$(@B).mak $(BUILD_RULES) $(BUILD_DIR)\AMITSEStrTokens.h + $(CIF2MAK) $(TSE_PWD_ENCODE_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS) + +!if "$(TSE_USE_EDK_LIBRARY)" == "1" +TSE_DEFAULTS = $(EDK_DEFAULTS) +!else +TSE_DEFAULTS = $(BUILD_DEFAULTS) +!endif + +TsePasswordEncodeLibBin : + $(MAKE) /$(MAKEFLAGS) $(TSE_DEFAULTS)\ + /f $(BUILD_DIR)\TsePasswordEncode.mak all\ + "MY_INCLUDES=$(MINISETUP_INCLUDES)"\ + TYPE=LIBRARY \ + "EXT_HEADERS=$(BUILD_DIR)\token.h"\ + LIBRARY_NAME=$(BUILD_DIR)\TsePasswordEncode.lib\ + "CFLAGS=$(CFLAGS) /DTSE_FOR_APTIO_4_50" + +##*****************************************************************## +##*****************************************************************## +##** **## +##** (C)Copyright 2010, American Megatrends, Inc. **## +##** **## +##** All Rights Reserved. **## +##** **## +##** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **## +##** **## +##** Phone (770)-246-8600 **## +##** **## +##*****************************************************************## +##*****************************************************************## diff --git a/EDK/MiniSetup/PasswordEncode/TsePasswordEncode.sdl b/EDK/MiniSetup/PasswordEncode/TsePasswordEncode.sdl new file mode 100644 index 0000000..11e11ca --- /dev/null +++ b/EDK/MiniSetup/PasswordEncode/TsePasswordEncode.sdl @@ -0,0 +1,34 @@ +TOKEN + Name = "TSE_PASSWORD_ENCODE_SUPPORT" + Value = "1" + Help = "Main switch to enable TSE password encode support" + TokenType = Boolean + TargetEQU = Yes + TargetMAK = Yes + TargetH = Yes + Master = Yes +End + +PATH + Name = "TSE_PWD_ENCODE_DIR" +End + +MODULE + Help = "Includes TsePasswordEncode.mak to Project" + File = "TsePasswordEncode.mak" +End + +ELINK + Name = "$(BUILD_DIR)/TsePasswordEncode.lib" + Parent = "$(TSE_PWD_ENCODE_DIR)/TsePasswordEncode$(ARCH).lib" + InvokeOrder = ReplaceParent +End + +TOKEN + Name = "PASSWORDENCODELIB" + Value = "$(BUILD_DIR)/TsePasswordEncode.lib" + Help = "Password encode library" + TokenType = Expression + TargetMAK = Yes + TargetH = Yes +End
\ No newline at end of file |