summaryrefslogtreecommitdiff
path: root/Core/EM/AMITSE
diff options
context:
space:
mode:
authorraywu <raywu0301@gmail.com>2018-06-15 00:00:50 +0800
committerraywu <raywu0301@gmail.com>2018-06-15 00:00:50 +0800
commitb7c51c9cf4864df6aabb99a1ae843becd577237c (patch)
treeeebe9b0d0ca03062955223097e57da84dd618b9a /Core/EM/AMITSE
downloadzprj-b7c51c9cf4864df6aabb99a1ae843becd577237c.tar.xz
init. 1AQQW051HEADmaster
Diffstat (limited to 'Core/EM/AMITSE')
-rw-r--r--Core/EM/AMITSE/AMITSE.chmbin0 -> 390707 bytes
-rw-r--r--Core/EM/AMITSE/AMITSE.cif52
-rw-r--r--Core/EM/AMITSE/AMITSE.mak614
-rw-r--r--Core/EM/AMITSE/AMITSE.sdl3655
-rw-r--r--Core/EM/AMITSE/AmiTSEStr.unibin0 -> 48960 bytes
-rw-r--r--Core/EM/AMITSE/CommonHelper.c6230
-rw-r--r--Core/EM/AMITSE/FakeTokens.c391
-rw-r--r--Core/EM/AMITSE/HookList.c187
-rw-r--r--Core/EM/AMITSE/HpkTool.exebin0 -> 57344 bytes
-rw-r--r--Core/EM/AMITSE/Inc/HiiLib.h127
-rw-r--r--Core/EM/AMITSE/Inc/HookAnchor.h252
-rw-r--r--Core/EM/AMITSE/Inc/LogoLib.h241
-rw-r--r--Core/EM/AMITSE/Inc/PwdLib.h148
-rw-r--r--Core/EM/AMITSE/Inc/TseCommon.h147
-rw-r--r--Core/EM/AMITSE/Inc/TseElinks.h159
-rw-r--r--Core/EM/AMITSE/Inc/boot.h537
-rw-r--r--Core/EM/AMITSE/Inc/mem.h100
-rw-r--r--Core/EM/AMITSE/Inc/setupdata.h421
-rw-r--r--Core/EM/AMITSE/Inc/variable.h251
-rw-r--r--Core/EM/AMITSE/Keymon.c302
-rw-r--r--Core/EM/AMITSE/Keymon.h106
-rw-r--r--Core/EM/AMITSE/OEMLogo.bmpbin0 -> 12918 bytes
-rw-r--r--Core/EM/AMITSE/SmLogo.bmpbin0 -> 20118 bytes
-rw-r--r--Core/EM/AMITSE/TseDrvHealth.h188
-rw-r--r--Core/EM/AMITSE/UefiHpkTool.exebin0 -> 69632 bytes
-rw-r--r--Core/EM/AMITSE/Uefisetup.ini533
-rw-r--r--Core/EM/AMITSE/bootflow.c445
-rw-r--r--Core/EM/AMITSE/bootflow.h207
-rw-r--r--Core/EM/AMITSE/changelog.log1269
-rw-r--r--Core/EM/AMITSE/commonoem.c2654
-rw-r--r--Core/EM/AMITSE/commonoem.h354
-rw-r--r--Core/EM/AMITSE/setup.ini533
-rw-r--r--Core/EM/AMITSE/setupdbg.h51
33 files changed, 20154 insertions, 0 deletions
diff --git a/Core/EM/AMITSE/AMITSE.chm b/Core/EM/AMITSE/AMITSE.chm
new file mode 100644
index 0000000..727ade4
--- /dev/null
+++ b/Core/EM/AMITSE/AMITSE.chm
Binary files differ
diff --git a/Core/EM/AMITSE/AMITSE.cif b/Core/EM/AMITSE/AMITSE.cif
new file mode 100644
index 0000000..d2c0206
--- /dev/null
+++ b/Core/EM/AMITSE/AMITSE.cif
@@ -0,0 +1,52 @@
+<component>
+ name = "TSE Binary"
+ category = eModule
+ LocalRoot = "Core\em\AMITSE\"
+ RefName = "AMITSE"
+[files]
+"AMITSE.sdl"
+"AMITSE.mak"
+"AMITSE.chm"
+"bootflow.c"
+"bootflow.h"
+"commonoem.c"
+"commonoem.h"
+"FakeTokens.c"
+"SmLogo.bmp"
+"setup.ini"
+"HpkTool.exe"
+"AmiTSEStr.uni"
+"Inc\boot.h"
+"Inc\HiiLib.h"
+"Inc\LogoLib.h"
+"Inc\mem.h"
+"Inc\PwdLib.h"
+"Inc\variable.h"
+"Inc\HookAnchor.h"
+"HookList.c"
+"CommonHelper.c"
+"Keymon.c"
+"Keymon.h"
+"Inc\TseElinks.h"
+"Inc\TseCommon.h"
+"Inc\setupdata.h"
+"Uefisetup.ini"
+"UefiHpkTool.exe"
+"changelog.log"
+"TseDrvHealth.h"
+"setupdbg.h"
+"OEMLogo.bmp"
+[parts]
+"TSEIncludes"
+"AMITSEBoard"
+"TseAdvancedBin"
+"MinisetupBin"
+"TseLiteBin"
+"Uefi20Bin"
+"TseOEM"
+"Uefi21Bin"
+"EzportBin"
+"LegacyBin"
+"EzportPlusBin"
+"PasswordEncodeBin"
+<endComponent>
diff --git a/Core/EM/AMITSE/AMITSE.mak b/Core/EM/AMITSE/AMITSE.mak
new file mode 100644
index 0000000..843907c
--- /dev/null
+++ b/Core/EM/AMITSE/AMITSE.mak
@@ -0,0 +1,614 @@
+#**********************************************************************
+#**********************************************************************
+#** **
+#** (C)Copyright 1985-2014, American Megatrends, Inc. **
+#** **
+#** All Rights Reserved. **
+#** **
+#** 5555 Oak brook Pkwy, Norcorss, GA 30093 **
+#** **
+#** Phone: (770)-246-8600 **
+#** **
+#**********************************************************************
+#**********************************************************************
+
+#**********************************************************************
+# $Header: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/AMITSE.mak 43 5/02/14 9:37a Premkumara $
+#
+# $Revision: 43 $
+#
+# $Date: 5/02/14 9:37a $
+#**********************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/AMITSE.mak $
+#
+# 43 5/02/14 9:37a Premkumara
+# [TAG] EIP162662
+# [Category] Improvement
+# [Description] Configuring adding RT access to variable in HPKTool
+# using SDL token
+# [Files] AMITSE.sdl, AMITSE.mak
+#
+# 42 5/02/14 5:40a Arunsb
+# [TAG] EIP156258
+# [Category] Improvement
+# [Description] Providing ELINK option to suppress the handle
+# comparison on dynamic parsing
+# [Files] AMITSE.mak, AMITSE.sdl, commonoem.c, commonoem.h and Parse.c
+#
+# 41 5/02/14 4:39a Premkumara
+# [TAG] EIP95647
+# [Category] Improvement
+# [Description] Dynamic Forms need to hide.
+# [Files] AMITSE.mak, AMITSE.sdl, CommonOem.c, Parse.c
+#
+# 40 5/02/14 3:43a Premkumara
+# [TAG] EIP151966
+# [Category] Improvement
+# [Description] Added the implementation for getting the BIOS build
+# year dynamically
+# from TimeStamp.h file and updated the Build year in copyright message
+# in both Setup and POST.
+# [Files] style.c,style.c,style.c,notify.c,minisetupext.c,CommonHelper
+# .c,
+# AmiTSEStr.uni,AMITSE.mak
+#
+# 39 4/16/14 2:54p Arunsb
+# [TAG] EIP154326
+# [Category] Bug Fix
+# [Severity] Normal
+# [Symptom] Build error if we have more TSE ELinks
+# [RootCause] Make file echo throwing build error if we have too many
+# ELinks
+# [Solution] echo removed and used redirections
+# [Files] amitse.mak
+#
+# 38 2/11/14 7:37p Arunsb
+# Copyright version modified
+#
+# 37 12/04/13 3:00a Premkumara
+# [TAG] EIP139099
+# [Category] New Feature
+# [Description] Supress formset other than
+# EFI_HII_PLATFORM_SETUP_FORMSET_GUID and
+# EFI_HII_DRIVER_HEALTH_FORMSET_GUID through elink based on token
+# [Files] AMITSE.sdl, AMITSE.mak, CommonOem.c, Hii.c, Parse.c,
+# TseUefiHii.h
+#
+# 36 4/18/13 9:56a Arunsb
+# Copyright year changed to 2013
+#
+# 35 4/17/13 1:50a Arunsb
+# [TAG] EIP100539
+# [Category] Improvement
+# [Description] HpkTool should generate proper header for StdDefaults
+# [Files] amitse.mak and uefihpktool.exe
+#
+# 34 3/29/13 8:39a Arunsb
+# [TAG] EIP111061
+# [Category] Improvement
+# [Description] Provide support for efivarstore opcode
+# [Files] Parse.c, amitse.mak and tseuefihii.h
+#
+# 33 3/25/13 8:51a Premkumara
+# [TAG] EIP116315
+# [Category] Improvement
+# [Description] Display control prompt string for password control.
+# (for String on CHAP secret popup)
+# [Files] - AMITSE.sdl
+# - CommonHelper.c
+# - FakeToken.c
+# - AmiTSEStr.uni
+# - TseLite\PopupPassword.c
+# - uefi2.1\UefiWapper21.c
+# - uefi2.0\UefiWapper20.c
+# - uefi2.0\HiiCallback.c
+# - uefi2.0\hii.h
+# - uefi2.0\hii.c
+#
+# 32 2/13/13 2:15a Arunsb
+# [TAG] EIP111742
+# [Category] Improvement
+# [Description] ChangeLogo romhole PI compatibility.
+# Support for romhole with changelogo in PI 0.9 also.
+# [Files] amitse.mak
+#
+# 31 10/18/12 5:30a Arunsb
+# Updated for 2.16.1235 QA submission
+##
+## 21 10/10/12 12:21p Arunsb
+## Synched the source for v2.16.1232 backup with Aptio
+#
+# 29 9/25/12 9:27a Rajashakerg
+# [TAG] EIP92053
+# [Category] Improvement
+# [Description] Need support define Root page order using elinks
+# [Files] AMITSE.sdl, Menu.c, AMIVfr.h, AMITSE.mak, commonoem.c
+#
+# 28 9/25/12 7:47a Rajashakerg
+# [TAG] EIP94424
+# [Category] Improvement
+# [Description] Some form can't normal display when add Hii item will
+# in runtime during
+# [Files] AMITSE.sdl, AMITSE.mak
+#
+# 27 5/29/12 3:01a Arunsb
+# [TAG] EIP91109
+# [Category] Improvement
+# [Description] Sync the Aptio IV source for AptioV
+#
+# 26 4/27/12 9:23a Arunsb
+# [TAG] EIP88895
+# [Category] Improvement
+# [Description] Changing GetUefiSpecVersion as board module hook and
+# also controlling callback spec version from TSE
+# [Files] Amitse.sdl, amitse.mak and commonhelper.c
+#
+# 25 2/03/12 5:43a Premkumara
+# Updated Copyright year to 2012
+#
+# 24 2/02/12 1:08a Premkumara
+# Updated ROMHOLE_GUID with TSE_ROMHOLE_MAKFILE_GUID for ROMHOLE
+#
+# 23 2/02/12 12:41a Premkumara
+# [TAG] EIP75136
+# [Category] New Feature
+# [Description] Generic support for logos in RomHoles
+# [Files] CommomHelper.c, AMITSE.sdl, AMITSE.mak, LogoLib.h
+#
+# 22 1/31/12 1:15p Premkumara
+# [TAG] EIP75136
+# [Category] New Feature
+# [Description] Generic support for logos in RomHoles
+# [Files] CommomHelper.c, AMITSE.sdl, AMITSE.mak, LogoLib.h,
+# Postmgmt.c, AMILogo.h
+#
+# 21 12/21/11 5:09a Arunsb
+# [TAG] EIP70892
+# [Category] Improvement
+# [Description] Provisioning to set manufacturing default language too
+# [Files] amitse.mak and uefihpktoo.exe
+#
+# 20 7/21/11 2:14a Arunsb
+# Copyright version updated to 2011
+#
+# 19 7/01/11 5:20p Madhans
+# [TAG] EIP60910
+# [Category] New Feature
+# [Description] PNG image support in TSE.
+# [Files] LogoLib.h, AMITSE.sdl, CommonHelper.c, logo.c, png.c,
+# png.h, pnguncmp.c, TseAdvanced.cif
+#
+# 18 6/19/11 4:07p Arunsb
+# [TAG] EIP58712
+# [Category] New Feature
+# [Description] To disable the BIOS Signon Message and TSE copyright
+# version in post screen.
+# [Files] amitse.sdl, amitse.mak, commonhelper.c and notify.c
+#
+# 17 4/29/11 4:26p Arunsb
+# For 2.13 public patch release signon message hiding feature is omitted
+#
+# 15 1/12/11 12:13p Madhans
+# To Update the CopyRight Year in SignOn message.
+#
+# 14 12/28/10 1:48p Mallikarjunanv
+# [TAG] EIP 51007
+# [Category] Improvement
+# [Description] Provided the sdl Token to customize the path of Setup
+# ini
+# [Files] AMITSE.sdl
+# AMITSE.mak
+#
+# 13 12/23/10 6:13p Madhans
+# [TAG] - EIP 50400
+# [Category]- Enhancment
+# [Severity]- Mordarate
+# [Symptom]- Neede Information on the ROM about Logo Type and Size
+# support.
+# [RootCause] - ChangeLogo need to validate of the Logo file is support
+# in the ROM image or not.
+# [Solution]- TSE creates $LGO$ section. Uses SETUP_BMP_LOGO_SUPPORT,
+# SETUP_JPEG_LOGO_SUPPORT, SETUP_GIF_LOGO_SUPPORT SETUP_PCX_LOGO_SUPPORT
+# for Image type support. And Uses MAX_POST_GC_MODE SDL (Assign one of
+# Max GC_MODEx SDL token) token for Size.
+# Clone MAX_POST_GC_MODE SDL token and Update the right Max Mode
+# supported in the project.
+# [Files] - amitse.sdl and amitse.mak
+#
+# 12 9/21/10 6:09p Madhans
+# [TAG] -
+# [Category] BUILD ISSUE FIX
+# [Symptom] Build issues when Build called with Today and Now parameters
+# [RootCause] Dater.mak is not created if today and Now parameters are
+# passed
+# [Solution] use timestamp.mak indtead of dater.mak
+# [Files] amitse.mak
+#
+# 11 9/16/10 8:39p Madhans
+# Updated for TSE 2.10. Refer changelog.log for more deatils.
+#
+## 16 8/27/10 4:54a Mallikarjunanv
+## EIP-39334: support to build TSE without the CSM module support
+##
+## 15 7/28/10 4:47a Mallikarjunanv
+## EIP-29951: TSE Device Path Name support updated
+##
+## 14 7/12/10 4:48p Madhans
+## EIP 39113: Sign ON Message Support.
+##
+## 13 4/21/10 12:13p Madhans
+##
+## 12 4/13/10 5:12p Madhans
+## EIP: 37439 To support extended OEM Key support.
+##
+## 11 4/05/10 10:36a Madhans
+## EIP 37036 : To make TSE 2.01 Binary module to work with older Cores
+##
+## 10 4/02/10 5:02p Madhans
+## EIP 36875. Support to add OEM multiple header files to TSE 2.x.
+##
+## 9 2/26/10 1:28p Madhans
+## Bootonly source module need AMITSEStrTokens.h
+##
+## 8 2/19/10 2:30p Madhans
+##
+## 5 10/28/09 5:34p Madhans
+## 1. Support to Add the String from other modules to TSE.
+## 2. Clean of GIF and Image code Control them with minimal code from TSE
+## binary.
+##
+##
+## 4 9/15/09 9:05a Sudhirv
+## added support for default langue handling
+##
+## 3 7/30/09 7:50a Mallikarjunanv
+## updated the code to move the exit page option elinks to Tse Binary
+##
+## 2 7/14/09 6:32p Blaines
+## For GTSE first Release.,
+##
+## 1 6/04/09 7:49p Madhans
+## AMI TSE Advanced.
+#
+# 2 5/07/09 10:31a Madhans
+# Changes After Bin module.
+##
+## 3 5/06/09 12:28p Mallikarjunanv
+## updated with tse bin support
+##
+## 2 5/05/09 3:26p Madhans
+## include the external UNI in the end to not to affect the index
+##
+## 1 4/28/09 10:24p Madhans
+## Tse 2.0 Code complete Checkin.
+##
+## 2 1/30/09 6:06p Madhans
+## Function headers added.
+#
+#**********************************************************************
+#<AMI_FHDR_START>
+#
+# Name: AMITSE.mak
+#
+# Description: AMI TSE BIN module makefile for Aptio.
+#
+#<AMI_FHDR_END>
+#**********************************************************************
+TSE_BINARY_INCLUDES = \
+ -I $(TSEBIN_DIR)\Inc \
+ -I $(TSE_BOARD_DIR) \
+ -I $(PROJECT_DIR)\Include\Protocol
+
+!INCLUDE Build\TimeStamp.mak
+
+!IF "$(TSE_SDBS)"!=""
+TSE_SDBS = -db $(TSE_SDBS: = -db )
+!ENDIF
+
+!IF "$(AMITSE_VERSION)"!=""
+#Dummy variable to append space
+SPACE_APPEND=
+AMITSE_VERSION=$(AMITSE_VERSION) $(SPACE_APPEND)
+!ENDIF
+
+all : AMITSE
+
+!IF "$(TSE_ROMHOLE_SUPPORT)" == "1"
+AMITSE : SetupData SignONPack $(BUILD_DIR)\AMITSE.mak AMITSESDB AMITSEHpk AMITSEBin $(BUILD_DIR)\SmLogo.FFS $(BUILD_DIR)\OEMLogo.FFS ROMHOLESupport $(BUILD_DIR)\ROMHOLE.ffs
+!ELSE
+AMITSE : SetupData SignONPack $(BUILD_DIR)\AMITSE.mak AMITSESDB AMITSEHpk AMITSEBin $(BUILD_DIR)\SmLogo.FFS $(BUILD_DIR)\OEMLogo.FFS
+!ENDIF
+
+$(BUILD_DIR)\AMITSE.mak : $(TSEBIN_DIR)\$(@B).cif $(TSEBIN_DIR)\$(@B).mak $(BUILD_RULES) ELinkList OemHeaderList
+ $(CIF2MAK) $(TSEBIN_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS)
+
+ElinkList :
+ @copy << $(BUILD_DIR)\AMITSEElinks.h
+
+#define HOOK_LIST_FROM_ELINKS $(AMITSE_Hooks)
+#define CONTROL_KEY_MAP_LIST $(CONTROL_KEY_MAP_LIST)
+#define EXIT_PAGE_OPTIONS_LIST $(EXIT_PAGE_OPTIONS_LIST)
+#define OEM_KEY_CALLBACK_FN $(OEM_KEY_CALLBACK_LIST)
+#define AMITSE_HIDDEN_PAGE_LIST $(AMITSE_HIDDEN_PAGE_LIST)
+#define AMITSE_SUBPAGE_AS_ROOT_PAGE_LIST $(AMITSE_SUBPAGE_AS_ROOT_PAGE_LIST)
+#define AMITSE_ROOT_PAGE_ORDER $(AMITSE_ROOT_PAGE_ORDER)
+#define PASSWORD_ENOCDE_LIST $(PASSWORD_ENOCDE_LIST)
+#define AMITSE_FILTER_CLASSGUID_FORMSETS $(AMITSE_FILTER_CLASSGUID_FORMSETS)
+#define AMITSE_SUPPRESS_DYNAMIC_FORMSET_LIST $(AMITSE_SUPPRESS_DYNAMIC_FORMSET_LIST)
+#define AMITSE_DYNAMICPARSING_HANDLE_SUPPRESS_LIST $(AMITSE_DYNAMICPARSING_HANDLE_SUPPRESS_LIST)
+
+<<
+
+OemHeaderList:$(AMITSE_OEM_HEADER_LIST) $(BUILD_DIR)\token.mak
+ type << >$(BUILD_DIR)\AMITSEOem.h
+!IF "$(AMITSE_OEM_HEADER_LIST)"!=""
+#include<$(AMITSE_OEM_HEADER_LIST: =>^
+#include<)>
+!ENDIF
+<<
+
+!if "$(UEFI_2_1_SUPPORT)" == "1"
+IFRSUPPORTLIB = $(UEFIEFIIFRSUPPORTLIB)
+!else
+IFRSUPPORTLIB = $(EFIIFRSUPPORTLIB)
+!endif
+
+AMITSE_Objects = $(AMITSE_Objects) \
+ $(BUILD_DIR)\$(TSEBIN_DIR)\bootflow.obj \
+ $(BUILD_DIR)\$(TSEBIN_DIR)\commonoem.obj \
+ $(BUILD_DIR)\$(TSEBIN_DIR)\HookList.obj \
+ $(BUILD_DIR)\$(TSEBIN_DIR)\CommonHelper.obj \
+ $(BUILD_DIR)\$(TSEBIN_DIR)\KeyMon.obj \
+
+
+!if "$(TSE_USE_EDK_LIBRARY)" == "1"
+EDK : AMITSEHpk
+AMITSEBin : $(MINISETUPLIB) $(EFIDRIVERLIB) $(IFRSUPPORTLIB) $(EDKFRAMEWORKGUIDLIB) $(EFIDRIVERLIB)
+!else
+AMITSEBin : $(MINISETUPLIB) $(AMIDXELIB)
+!endif
+ $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
+ /f $(BUILD_DIR)\AMITSE.mak all\
+ "MY_INCLUDES=$(TSE_BINARY_INCLUDES)"\
+ GUID=B1DA0ADF-4F77-4070-A88E-BFFE1C60529A\
+ ENTRY_POINT=MiniSetupApplication\
+ TYPE=BS_DRIVER HAS_RESOURCES=1 LIBRARIES= \
+ RESOURCE=$(BUILD_DIR)\setupdat.bin\
+ SECTION_GUID=FE612B72-203C-47B1-8560-A66D946EB371\
+ "EXT_HEADERS=$(BUILD_DIR)\token.h"\
+ COMPRESS=1\
+ SDB_FILES=\
+ "VFR_PACKS=$(BUILD_DIR)\AMITSEStr.hpk $(VFR_PACKS)"\
+ "OBJECTS=$(AMITSE_Objects)"\
+ "CFLAGS=$(CFLAGS) /DTSE_FOR_APTIO_4_50 /DTSE_CALLBACK_SPEC_VERSION=$(TSE_CALLBACK_SPEC_VERSION)"
+
+# "STRING_CONSUMERS=$(TSE_STRING_CONSUMERS_LIST)"\
+# "UNI_INCLUDE_PATH=$(TSEBIN_DIR) $(TSE_UNI_INCLUDE_PATH)"\
+
+SetupData :
+#The actual NVRAM size is $(NVRAM_SIZE) - $(NVRAM_HEADER_SIZE)
+ $(ECHO) SET /A NVRAM_SIZE=$(NVRAM_SIZE)-$(NVRAM_HEADER_SIZE) > $(BUILD_DIR)\HPKTOOL.bat
+## EIP-51007: changed the ini file path as sdl Token
+ $(ECHO) $(HPKTOOL) -i$(IFR_DIR_LIST: = -i) -f$(INI_FILE_PATH)\
+ -o$(BUILD_DIR)\setupdata_asm.asm -do$(BUILD_DIR)\NVRAM.bin\
+!IF "$(MANUFACTURING_MODE_SUPPORT)"=="1"
+ -dm -ml$(DEFAULT_LANGUAGE)\
+!ENDIF
+############################################################################
+## Adding RT attribute to DEFAULT_VAR_ATTRIBUTE in command-line
+## based on token RT_ACCESS_SUPPORT_IN_HPKTOOL
+## when token is enabled RT will add to DEFAULT_VAR_ATTRIBUTE to form 0x07
+#############################################################################
+!IF "$(RT_ACCESS_SUPPORT_IN_HPKTOOL)"=="1"
+ -RT\
+!ENDIF
+#############################################################################
+ -dl$(DEFAULT_LANGUAGE)\
+ -ds%%NVRAM_SIZE%% -dp$(SETUP_ORPHAN_PAGES_AS_ROOT_PAGE) -dn$(NVRAM_RECORD_CHECKSUM_SUPPORT) -de$(FLASH_ERASE_POLARITY) -vs$(EFI_SPECIFICATION_VERSION) -h$(AMITSE_HPK_FILE_ORDER) >> $(BUILD_DIR)\HPKTOOL.bat
+ $(BUILD_DIR)\HPKTOOL.bat
+ $(ASM) /c /nologo /Fo$(BUILD_DIR)\ $(BUILD_DIR)\setupdata_asm.asm
+ $(ASMLINK) $(BUILD_DIR)\setupdata_asm.obj, $(BUILD_DIR)\setupdat.exe, $(BUILD_DIR)\setupdata_asm.map,,,
+ exe2bin $(BUILD_DIR)\setupdat.exe $(BUILD_DIR)\setupdat.bin
+ -$(DEL) pkgtmp*.tmp
+
+$(BUILD_DIR)\SmLogo.ffs : $(TSEBIN_DIR)\SmLogo.bmp
+ $(MAKE) /f Core\FFS.mak \
+ BUILD_DIR=$(BUILD_DIR) \
+ GUID=63819805-67BB-46ef-AA8D-1524A19A01E4 \
+ TYPE=EFI_FV_FILETYPE_FREEFORM \
+ BINFILE=$** FFSFILE=$@ COMPRESS=1 NAME=$(**B)
+
+$(BUILD_DIR)\OEMLogo.ffs : $(OEMLogo_FILE_PATH)
+!IF "$(TSE_OEM_POSTLOGO_SUPPORT)" == "1"
+ $(MAKE) /f Core\FFS.mak \
+ BUILD_DIR=$(BUILD_DIR) \
+# Don't change the GUID. ChangeLogo expects this GUID.
+ GUID=294B1CEF-9BEB-42D5-9971-0C8963CDAF02 \
+ TYPE=EFI_FV_FILETYPE_FREEFORM \
+ BINFILE=$** FFSFILE=$@ COMPRESS=1 NAME=$(**B)
+!ENDIF
+
+$(BUILD_DIR)\AMITSEStrTokens.h : AMITSEHpk
+
+AMITSEHpk : $(BUILD_DIR)\AMITSE.mak AMITSESDB
+ $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
+ /f $(BUILD_DIR)\AMITSE.mak all\
+ "UNI_INCLUDE_PATH=$(TSEBIN_DIR) $(TSE_UNI_INCLUDE_PATH)"\
+ STRING_CONSUMERS=$(TSEBIN_DIR)\FakeTokens.c\
+ TYPE=SDB NAME=AMITSE
+
+ $(MAKE) /$(MAKEFLAGS) /a $(BUILD_DEFAULTS) TYPE=SDB\
+ "UNI_INCLUDE_PATH=$(TSEBIN_DIR) $(TSE_UNI_INCLUDE_PATH)"\
+ "STRING_CONSUMERS=$(TSE_STRING_CONSUMERS_LIST)"\
+ "STRGATHER_FLAGS=-db $(BUILD_DIR)\AMITSE.sdb $(TSE_SDBS)"\
+ /f $(BUILD_DIR)\AMITSE.mak $(BUILD_DIR)\AMITSEStrTokens.h
+# EIP-75136 ROMHOLE Support start
+##################################################################################################
+# ROMHOLE generation ##
+# Generating FV_HOLE_VOL.inf file for ROMHole ##
+##################################################################################################
+
+!IF "$(TSE_ROMHOLE_SUPPORT)" == "1"
+
+!IF EXIST ($(BUILD_DIR)\FV_HOLE_VOL.inf )
+ del $(BUILD_DIR)\FV_HOLE_VOL.inf
+!ENDIF
+ echo [options] >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+# This is a dummy base address to store logos in ROMHOLE.This address has no effect in ROMHOLE.
+ echo EFI_BASE_ADDRESS = 0xFFFE0000 >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_FILE_NAME = $(BUILD_DIR)\FV_HOLE_VOL.FV >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_NUM_BLOCKS = $(ROMHOLE_NUMBER_OF_BLOCK) >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_BLOCK_SIZE = $(ROMHOLE_BLOCK_SIZE) >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo IGNORE_COMPRESSION = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo [attributes] >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_READ_DISABLED_CAP = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_READ_ENABLED_CAP = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_READ_STATUS = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_WRITE_DISABLED_CAP = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_WRITE_ENABLED_CAP = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_WRITE_STATUS = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_LOCK_CAP = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_LOCK_STATUS = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_STICKY_WRITE = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_MEMORY_MAPPED = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_ERASE_POLARITY = 1 >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_ALIGNMENT_CAP = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_ALIGNMENT_2 = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_ALIGNMENT_4 = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_ALIGNMENT_8 = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_ALIGNMENT_16 = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_ALIGNMENT_32 = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_ALIGNMENT_64 = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_ALIGNMENT_128 = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_ALIGNMENT_256 = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_ALIGNMENT_512 = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_ALIGNMENT_1K = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_ALIGNMENT_2K = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_ALIGNMENT_4K = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_ALIGNMENT_8K = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_ALIGNMENT_16K = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_ALIGNMENT_32K = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_ALIGNMENT_64K = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_READ_LOCK_CAP = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_READ_LOCK_STATUS = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_WRITE_LOCK_CAP = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_WRITE_LOCK_STATUS = TRUE >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo EFI_FVB2_ALIGNMENT = 8 >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+ echo [files] >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+!IF "$(TSE_OEM_POSTLOGO_SUPPORT)" == "1"
+ echo EFI_FILE_NAME = $(BUILD_DIR)\OEMLogo__.pkg >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+!ENDIF
+ echo EFI_FILE_NAME = $(BUILD_DIR)\Logo__.pkg >> $(BUILD_DIR)\FV_HOLE_VOL.inf
+!ENDIF
+
+ROMHOLESupport:
+!IF $(PI_SPECIFICATION_VERSION) >= 0x00010000
+ $(FWBUILD) Build\ROMHOLE.fv /f $(BUILD_DIR)\FV_HOLE_VOL.inf /p 1.0
+!ELSE
+ $(FWBUILD) Build\ROMHOLE.fv /f $(BUILD_DIR)\FV_HOLE_VOL.inf
+!ENDIF
+
+$(BUILD_DIR)\ROMHOLE.ffs: Build\ROMHOLE.fv
+ $(MAKE) /f Core\FFS.mak \
+ BUILD_DIR=$(BUILD_DIR) \
+ GUID=$(TSE_ROMHOLE_MAKFILE_GUID)\
+ TYPE=EFI_FV_FILETYPE_RAW\
+ FFS_ALIGNMENT=1 FFS_CHECKSUM=0\
+ RAWFILE=$** FFSFILE=$@ COMPRESS=0 NAME=$(**B)
+
+#####################################################################################################################################
+# EIP-75136 ROMHOLE Support End
+# Signon Pack
+SignONPack :
+ copy << $(BUILD_DIR)\logomode.c
+ #include "token.h"
+ MAX_POST_GC_MODE
+<<
+ copy << $(BUILD_DIR)\logomode.bat
+ $(CP) /EP $(BUILD_DIR)\logomode.c > $(BUILD_DIR)\mode.txt
+ @for /F "tokens=4,5 delims=,}" %%B in ($(BUILD_DIR)\mode.txt) do @(
+ set MAX_X=%%B
+ set MAX_Y=%%C )
+ @echo LOGO_X EQU %MAX_X% > $(BUILD_DIR)\LogoRes.inc
+ @echo LOGO_Y EQU %MAX_Y% >> $(BUILD_DIR)\LogoRes.inc
+<<
+ $(BUILD_DIR)\logomode.bat
+ $(SILENT)copy << $(BUILD_DIR)\sgn.asm > NUL
+.586p
+.model flat,C
+.data
+
+include $(BUILD_DIR)\LogoRes.inc
+!IF "$(SETUP_BMP_LOGO_SUPPORT)" == "1"
+BMP_SUPPORT EQU 01h
+!ELSE
+BMP_SUPPORT EQU 00h
+!endif
+
+!IF "$(SETUP_JPEG_LOGO_SUPPORT)" == "1"
+JPEG_SUPPORT EQU 02h
+!ELSE
+JPEG_SUPPORT EQU 00h
+!endif
+
+!IF "$(SETUP_GIF_LOGO_SUPPORT)" == "1"
+GIF_SUPPORT EQU 04h
+!ELSE
+GIF_SUPPORT EQU 00h
+!endif
+
+!IF "$(SETUP_PCX_LOGO_SUPPORT)" == "1"
+PCX_SUPPORT EQU 08h
+!ELSE
+PCX_SUPPORT EQU 00h
+!endif
+
+!IF "$(SETUP_PNG_LOGO_SUPPORT)" == "1"
+PNG_SUPPORT EQU 10h
+!ELSE
+PNG_SUPPORT EQU 00h
+!endif
+
+
+public _SgnOn
+
+_SgnOn label byte
+
+ db 24h, 'S', 'G', 'N', 24h
+ db 2h
+ dw 0 ;Reserved
+ db '$(AMITSE_VERSION)Copyright (C) %04x American Megatrends, Inc.',0h
+ db '$(BIOS_SIGNON_MESSAGE2)',0h
+ db 24h,'L','G','O',24h
+ db 1h
+ dd BMP_SUPPORT+JPEG_SUPPORT+GIF_SUPPORT+PCX_SUPPORT+PNG_SUPPORT
+ dw LOGO_Y
+ dw LOGO_X
+end
+<<KEEP
+ $(ASM) /c /nologo /Fo$(BUILD_DIR)\ $(BUILD_DIR)\sgn.asm
+ $(ASMLINK) $(BUILD_DIR)\sgn.obj, $(BUILD_DIR)\sgn.exe, $(BUILD_DIR)\sgn.map,,,
+ exe2bin $(BUILD_DIR)\sgn.exe $(BUILD_DIR)\sgn.bin
+ $(MAKE) /f Core\FFS.mak BUILD_DIR=$(BUILD_DIR) \
+ GUID=A59A0056-3341-44b5-9C9C-6D76F7673817 \
+ HAS_RESOURCES=1 \
+ RESOURCE=$(BUILD_DIR)\sgn.bin\
+ SECTION_GUID=2EBE0275-6458-4af9-91ED-D3F4EDB100AA\
+ TYPE=EFI_FV_FILETYPE_FREEFORM \
+ FFSFILE=$(BUILD_DIR)\SignON.FFS COMPRESS=0 NAME=SignON
+
+#**********************************************************************
+#**********************************************************************
+#** **
+#** (C)Copyright 1985-2014, American Megatrends, Inc. **
+#** **
+#** All Rights Reserved. **
+#** **
+#** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **
+#** **
+#** Phone: (770)-246-8600 **
+#** **
+#**********************************************************************
+#**********************************************************************
diff --git a/Core/EM/AMITSE/AMITSE.sdl b/Core/EM/AMITSE/AMITSE.sdl
new file mode 100644
index 0000000..80e26af
--- /dev/null
+++ b/Core/EM/AMITSE/AMITSE.sdl
@@ -0,0 +1,3655 @@
+TOKEN
+ Name = "AMITSE_SUPPORT"
+ Value = "1"
+ Help = "Main switch to enable AMITSE support in Project"
+ TokenType = Boolean
+ TargetEQU = Yes
+ TargetMAK = Yes
+ Master = Yes
+End
+
+TOKEN
+ Name = "TSE_MAJOR"
+ Value = "0x02"
+ Help = "TSE Major Version number"
+ TokenType = Expression
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_MINOR"
+ Value = "0x17"
+ Help = "TSE Minor Version number"
+ TokenType = Expression
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_BUILD"
+ Value = "0x1247"
+ Help = "TSE Build number"
+ TokenType = Expression
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_BMP_LOGO_SUPPORT"
+ Value = "1"
+ Help = "BMP Logo support in Setup"
+ TokenType = Boolean
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_GIF_LOGO_SUPPORT"
+ Value = "0"
+ Help = "GIF Logo support in Setup"
+ TokenType = Boolean
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_JPEG_LOGO_SUPPORT"
+ Value = "0"
+ Help = "JPEG Logo support in Setup."
+ TokenType = Boolean
+ TargetEQU = Yes
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_PCX_LOGO_SUPPORT"
+ Value = "0"
+ Help = "PCX Logo support in Setup"
+ TokenType = Boolean
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_PNG_LOGO_SUPPORT"
+ Value = "0"
+ Help = "PNG Logo support in Setup"
+ TokenType = Boolean
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_OEM_FORMAT_LOGO_SUPPORT"
+ Value = "0"
+ Help = "GIF Logo support in Setup"
+ TokenType = Boolean
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_GRAYOUT_READONLY_CONTROL"
+ Value = "0"
+ Help = "Diaplay readonly controls as grayout"
+ TokenType = Boolean
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_SETUP_GRAYOUT_SELECTABLE"
+ Value = "0"
+ Help = "0 is DEFAULT. set 1=> to allow grayed-out options set focus and to be selectable by the user. Set 0=> to make grayed-out options not to focus and editable"
+ TokenType = Boolean
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "MAX_POST_GC_MODE"
+ Value = "$(GC_MODE0)"
+ Help = "Port this SDL to select the Maximum Support Graphical module. Should be one of (GC_MODEx SDL tokens). Based on this token logo capability table created."
+ TokenType = Expression
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_DEBUG_MESSAGES"
+ Value = "0x0"
+ Help = "A switch to enable TSE Debug messages: Bit0: Uefi functions, Bit1: HiiCallbacks, Bit2: HiiNotifications, Bit3: HiiParsing"
+ TokenType = Expression
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SUPPRESS_PRINT"
+ Value = "1"
+ Help = "A switch to supress TSE Debug messages."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SERIAL_DEBUG"
+ Value = "1"
+ Help = "A switch to print TSE Debug messages over Serial Port."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "HPKTOOL"
+ Value = "$(SILENT)$(TSEBIN_DIR)\HPKTOOL"
+ TokenType = Expression
+ TargetMAK = Yes
+ Token = "EFI_SPECIFICATION_VERSION" "<=" "0x20000"
+End
+
+TOKEN
+ Name = "HPKTOOL"
+ Value = "$(SILENT)$(TSEBIN_DIR)\UefiHPKTOOL"
+ TokenType = Expression
+ TargetMAK = Yes
+ Token = "EFI_SPECIFICATION_VERSION" ">" "0x20000"
+End
+
+TOKEN
+ Name = "SETUP_PRINT_ENTER_SETUP_MSG"
+ Value = "1"
+ Help = "Set to 1 to print the Setup Enter messages in POST"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_PRINT_ENTER_BBSPOPUP_MSG"
+ Value = "1"
+ Help = "Set to 1 to print the Setup BBS Popup Menu messages in POST"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_ENTRY_UNICODE"
+ Value = "0x0000"
+ Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT protocol or a character value like L'a'. Remember to check STR_DEL_ENTER_SETUP string in MiniSetupStr.uni."
+ TokenType = Expression
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_ENTRY_SCAN"
+ Value = "EFI_SCAN_DEL"
+ Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT protocol. Remember to check STR_DEL_ENTER_SETUP string in MiniSetupStr.uni."
+ TokenType = Expression
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_ENTRY_SHIFT_STATE"
+ Value = "0"
+ Help = "Set to one of the defined constants from AMI_KEY_CODE_PROTOCOL."
+ TokenType = Expression
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_ALT_ENTRY_ENABLE"
+ Value = "1"
+ Help = "Enable or disable the SETUP_ALT_ENTRY"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_ALT_ENTRY_UNICODE"
+ Value = "0x0000"
+ Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT protocol or a character value like L'a'. Remember to check STR_DEL_ENTER_SETUP string in MiniSetupStr.uni."
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_ALT_ENTRY_ENABLE" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_ALT_ENTRY_SCAN"
+ Value = "EFI_SCAN_ESC"
+ Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT protocol. Remember to check STR_DEL_ENTER_SETUP string in MiniSetupStr.uni."
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_ALT_ENTRY_ENABLE" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_ALT_ENTRY_SHIFT_STATE"
+ Value = "0"
+ Help = "Set to one of the defined constants from AMI_KEY_CODE_PROTOCOL."
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_ALT_ENTRY_ENABLE" "!=" "0"
+End
+
+TOKEN
+ Name = "TSE_ANSI_ESC_CODE_SUPPORT"
+ Value = "0"
+ Help = "Tse advanced Esc colour support"
+ TokenType = Integer
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_TOGGLE_KEY_UNICODE"
+ Value = "L'\t'"
+ Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT protocol or a character value like L'a'."
+ TokenType = Expression
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_TOGGLE_KEY_SCANCODE"
+ Value = "0x0000"
+ Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT protocol."
+ TokenType = Expression
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_BBS_POPUP_ENABLE"
+ Value = "0"
+ Help = "Enable or disable the SETUP_BBS_POPUP_ENABLE. CAUTION This works only if complete TSE sources are present."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "POPUP_MENU_ENTRY_UNICODE"
+ Value = "0x0000"
+ Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT protocol or a character value like L'a'"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_BBS_POPUP_ENABLE" "!=" "0"
+End
+
+TOKEN
+ Name = "POPUP_MENU_ENTRY_SCAN"
+ Value = "EFI_SCAN_F7"
+ Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT protocol"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_BBS_POPUP_ENABLE" "!=" "0"
+End
+
+TOKEN
+ Name = "POPUP_MENU_ENTRY_SHIFT_STATE"
+ Value = "0"
+ Help = "Set to one of the defined constants from AMI_KEY_CODE_PROTOCOL."
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_BBS_POPUP_ENABLE" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY1_ENABLE"
+ Value = "0"
+ Help = "Enable or disable the SETUP_OEM_KEY1"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY1_UNICODE"
+ Value = "0x0000"
+ Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT protocol or a character value like L'a'"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_OEM_KEY1_ENABLE" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY1_SCAN"
+ Value = "0x0000"
+ Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT protocol"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_OEM_KEY1_ENABLE" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY2_ENABLE"
+ Value = "0"
+ Help = "Enable or disable the SETUP_OEM_KEY2"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY2_UNICODE"
+ Value = "0x0000"
+ Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT protocol or a character value like L'a'"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_OEM_KEY2_ENABLE" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY2_SCAN"
+ Value = "0x0000"
+ Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT protocol"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_OEM_KEY2_ENABLE" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY3_ENABLE"
+ Value = "0"
+ Help = "Enable or disable the SETUP_OEM_KEY3"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY3_UNICODE"
+ Value = "0x0000"
+ Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT protocol or a character value like L'a'"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_OEM_KEY3_ENABLE" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY3_SCAN"
+ Value = "0x0000"
+ Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT protocol"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_OEM_KEY3_ENABLE" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY4_ENABLE"
+ Value = "0"
+ Help = "Enable or disable the SETUP_OEM_KEY4"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY4_UNICODE"
+ Value = "0x0000"
+ Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT protocol or a character value like L'a'"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_OEM_KEY4_ENABLE" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY4_SCAN"
+ Value = "0x0000"
+ Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT protocol"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_OEM_KEY4_ENABLE" "!=" "0"
+End
+
+TOKEN
+ Name = "TSE_BOOT_ONLY_SPLASH_LOGO_SUPPORT"
+ Value = "1"
+ Help = "Turn on the TSE to make boot only driver without UI"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_RUNTIME_IFR_PROCESSING"
+ Value = "1"
+ Help = "Processes IFR data that are added to hii at runtime. This will cause an increased FW footprint and remove AMIBCP compatibility for those new pages."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_HOOKBASE_VALUE"
+ Value = "0xFFFF0000"
+ Help = "Base value for the HOOK defines that Allows to manage TSE HOOKs.Format 0xXXXX0000,Makeure it is not conflicts physical memory Address"
+ TokenType = Expression
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_PASSWORD_LENGTH"
+ Value = "20"
+ Help = "Default maximum password length. TSE Source needed to change the length"
+ TokenType = Integer
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "MAX_MSGBOX_WIDTH"
+ Value = "45"
+ Help = "Set the value to change the message box dispaly width."
+ TokenType = Integer
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_PASSWORD_NON_CASE_SENSITIVE"
+ Value = "1"
+ Help = "Allow to use of case sensitive password. Note:This token should be OFF with SETUP_STORE_KEYCODE_PASSWORD value 1 or 2."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "WIDE_GLYPH_SUPPORT"
+ Value = "1"
+ Help = "Far east language support"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_DEFAULT_TIMEOUT"
+ Value = "10"
+ Help = "Default timeout value before system boots"
+ TokenType = Integer
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_TIMEOUT_IN_TENTHOFSEC"
+ Value = "0"
+ Help = "Maks the Setup Timout value as 1/10 Sec to support fast boot. Makesure to change the Vfr and Strings if this is ON."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_FOR_64BIT"
+ Value = "1"
+ Help = "Enable build support for 64 bit(x64/IA64) TSE"
+ TokenType = Boolean
+ TargetMAK = Yes
+ TargetH = Yes
+ Token = "x64_BUILD" "=" "1"
+End
+
+TOKEN
+ Name = "TSE_CSM_SUPPORT"
+ Value = "1"
+ Help = "Include CSM Support in TSE"
+ TokenType = Boolean
+ TargetH = Yes
+ Token = "CSM_SUPPORT" "=" "1"
+End
+
+TOKEN
+ Name = "PROGRESSBAR_BACKGROUNDCOLOR"
+ Value = "{0,0,0,0}"
+ Help = "Set the value of progressbar bgcolor in EFI_UGA_PIXEL format"
+ TokenType = Expression
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "PROGRESSBAR_BORDERCOLOR"
+ Value = "{0xc0,0xc0,0xc0,0}"
+ Help = "Set the value of progressbar border color in EFI_UGA_PIXEL format"
+ TokenType = Expression
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "PROGRESSBAR_FILLCOLOR"
+ Value = "{0xc0,0xc0,0xc0,0}"
+ Help = "Set the value of progressbar fill color in EFI_UGA_PIXEL format"
+ TokenType = Expression
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "POPUP_MENU_SHOW_ALL_BBS_DEVICES"
+ Value = "0"
+ Help = "1 => Shows all BBS devices in BBS POPup menu. 0 => Shows only the first device of a BBS type in BBS POPUP menu."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_SHOW_ALL_BBS_DEVICES"
+ Value = "0"
+ Help = "1 => Shows all BBS devices in boot override menu. 0 => Shows only the first device of a BBS type in override menu."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_DEVICE_PATH_NAME"
+ Value = "0"
+ Help = "Turn on to be able to configure name for legacy devices."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_DEVICE_PATH_UEFI_NAME"
+ Value = "1"
+ Help = "Turn on to be able to configure name for UEFI devices using Device path."
+ TokenType = Boolean
+ TargetH = Yes
+ Token = "TSE_DEVICE_PATH_NAME" "=" "1"
+End
+
+TOKEN
+ Name = "TSE_BOOT_NOW_IN_BOOT_ORDER"
+ Value = "0"
+ Help = "Turn on to see boot override/BBS Popup menu with in the devices listed in boot order."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_CLEAR_USERPW_WITH_ADMINPW"
+ Value = "0"
+ Help = "Support to clear the User password if Admin password is empty"
+ TokenType = Boolean
+ TargetEQU = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_USE_AMI_DEFAULTS"
+ Value = "1"
+ Help = "Use AMIBCP compatible defaults instead of HII defaults"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_LOAD_PASSWORD_ON_DEFAULTS"
+ Value = "0"
+ Help = "Loads the User/Admin password from Defaults.If Off, Passwords are unaffected while loading defaults"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "MINISETUP_MOUSE_SUPPORT"
+ Value = "0"
+ Help = "Mouse suport."
+ TokenType = Boolean
+ TargetEQU = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OLD_MOUSE_DRIVER_SUPPORT"
+ Value = "0"
+ Help = "Old Mouse Driver Mouse suport."
+ TokenType = Boolean
+ TargetH = Yes
+ Token = "MINISETUP_MOUSE_SUPPORT" "!=" "0"
+End
+
+TOKEN
+ Name = "SINGLE_CLICK_ACTIVATION"
+ Value = "0"
+ Help = "On- Single click will be used to enter the subMenu and Select the option. OFF- Double Click will be used."
+ TokenType = Boolean
+ TargetEQU = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_USE_AMI_EFI_KEYCODE_PROTOCOL"
+ Value = "1"
+ Help = "AMIKeyCode Protocol support. TSE Sources need to be present to disable this token"
+ TokenType = Boolean
+ TargetEQU = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_STORE_KEYCODE_PASSWORD"
+ Value = "0"
+ Help = "For Extened Password support, the Value can be 1 or 2. Set Value as 1 to support Efi Key as password. Set Value as 2 to support Scan Code in password. Need AMIKeyCode Protocol & TSE sources support, Set Value as 0 to support Unicode in password, which is the default"
+ TokenType = Integer
+ TargetEQU = Yes
+ TargetH = Yes
+ Token = "TSE_USE_AMI_EFI_KEYCODE_PROTOCOL" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_PRINT_EVAL_MSG"
+ Value = "0"
+ Help = "Enable/Disable Evaluation message in Post screen"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_PRN_SCRN_EVENT_SUPPORT"
+ Value = "0"
+ Help = "Turn on to generate Print screen event if TSE_PRN_SCRN_KEY_SCAN key pressed."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "STYLE_DATE_FORMAT"
+ Value = "0"
+ Help = "Controls the Date Format. (Default 0 => mm/dd/yyyy) (1 => yyyy/dd/mm)"
+ TokenType = Integer
+ TargetH = Yes
+ Range = "0-3"
+End
+
+TOKEN
+ Name = "STYLE_SHOW_DAY"
+ Value = "1"
+ Help = "Controls the display of Day in Date Format."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_USER_PASSWORD_POLICY"
+ Value = "1"
+ Help = "Allow to use system with Admin password set and User password NOT set (Boot Password policy)"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_SUPPORT_PLATFORM_LANG_VAR"
+ Value = "0"
+ Help = "Set to enable PlatformLang and PlatformLangCode Vars."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_SUPPORT_ADD_BOOT_OPTION"
+ Value = "0"
+ Help = "Set to enable Add/Delete boot option."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_SUPPORT_ADD_DRIVER_OPTION"
+ Value = "0"
+ Help = "Set to enable Add/Delete Driver option."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_SUPPORT_RES_ADD_DEL_BOOT_OPTION_NAME"
+ Value = "0"
+ Help = "Not to allow Reserved Names (RESERVED_ADD_DEL_BOOT_OPTION_NAME) for new Boot Options. Reserved names defined in RESERVED_ADD_DEL_BOOT_OPTION_NAME SDL token"
+ TokenType = Boolean
+ TargetH = Yes
+ Token = "SETUP_SUPPORT_ADD_BOOT_OPTION" "=" "1"
+End
+
+TOKEN
+ Name = "RESERVED_ADD_DEL_BOOT_OPTION_NAME"
+ Value = "UEFI:"
+ Help = "Reserved names that are not allowed to use for add or delete boot options"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_SUPPORT_RES_ADD_DEL_BOOT_OPTION_NAME" "=" "1"
+End
+
+TOKEN
+ Name = "SETUP_ENTRY_LEGACY_CODE"
+ Value = "0x53"
+ Help = "Set legacy scan code for entry key."
+ TokenType = Expression
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_ALT_ENTRY_LEGACY_CODE"
+ Value = "0x3c"
+ Help = "Set legacy code for Alternate entry key"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_ALT_ENTRY_ENABLE" "!=" "0"
+End
+
+TOKEN
+ Name = "POPUP_MENU_ENTRY_LEGACY_CODE"
+ Value = "0x41"
+ Help = "Set legacy scan code for popup menu entry"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_BBS_POPUP_ENABLE" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY1_LEGACY_CODE"
+ Value = "0x0"
+ Help = "Set legacy code for OEM key 1"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_OEM_KEY1_ENABLE" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY1_EFIKEY"
+ Value = "0x5F"
+ Help = "Set to one of the defined EFI_KEY enumeration"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_OEM_KEY1_ENABLE" "!=" "0"
+ Token = "TSE_USE_AMI_EFI_KEYCODE_PROTOCOL" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY1_SHIFT"
+ Value = "0x00000000"
+ Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT_EX protocol"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_OEM_KEY1_ENABLE" "!=" "0"
+ Token = "TSE_USE_AMI_EFI_KEYCODE_PROTOCOL" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY1_TOGGLE"
+ Value = "0x00"
+ Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT_EX protocol"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_OEM_KEY1_ENABLE" "!=" "0"
+ Token = "TSE_USE_AMI_EFI_KEYCODE_PROTOCOL" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY2_LEGACY_CODE"
+ Value = "0x0"
+ Help = "Set legacy code for OEM key 2"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_OEM_KEY2_ENABLE" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY2_EFIKEY"
+ Value = "0x00"
+ Help = "Set to one of the defined EFI_KEY enumeration"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_OEM_KEY2_ENABLE" "!=" "0"
+ Token = "TSE_USE_AMI_EFI_KEYCODE_PROTOCOL" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY2_SHIFT"
+ Value = "0x00000000"
+ Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT_EX protocol"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_OEM_KEY2_ENABLE" "!=" "0"
+ Token = "TSE_USE_AMI_EFI_KEYCODE_PROTOCOL" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY2_TOGGLE"
+ Value = "0x00"
+ Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT_EX protocol"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_OEM_KEY2_ENABLE" "!=" "0"
+ Token = "TSE_USE_AMI_EFI_KEYCODE_PROTOCOL" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY3_LEGACY_CODE"
+ Value = "0x0"
+ Help = "Set legacy code for OEM key 3"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_OEM_KEY3_ENABLE" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY3_EFIKEY"
+ Value = "0x00"
+ Help = "Set to one of the defined EFI_KEY enumeration"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_OEM_KEY3_ENABLE" "!=" "0"
+ Token = "TSE_USE_AMI_EFI_KEYCODE_PROTOCOL" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY3_SHIFT"
+ Value = "0x00000000"
+ Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT_EX protocol"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_OEM_KEY3_ENABLE" "!=" "0"
+ Token = "TSE_USE_AMI_EFI_KEYCODE_PROTOCOL" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY3_TOGGLE"
+ Value = "0x00"
+ Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT_EX protocol"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_OEM_KEY3_ENABLE" "!=" "0"
+ Token = "TSE_USE_AMI_EFI_KEYCODE_PROTOCOL" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY4_LEGACY_CODE"
+ Value = "0x0"
+ Help = "Set legacy code for OEM key 4"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_OEM_KEY4_ENABLE" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY4_EFIKEY"
+ Value = "0x00"
+ Help = "Set to one of the defined EFI_KEY enumeration"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_OEM_KEY4_ENABLE" "!=" "0"
+ Token = "TSE_USE_AMI_EFI_KEYCODE_PROTOCOL" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY4_SHIFT"
+ Value = "0x00000000"
+ Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT_EX protocol"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_OEM_KEY4_ENABLE" "!=" "0"
+ Token = "TSE_USE_AMI_EFI_KEYCODE_PROTOCOL" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_OEM_KEY4_TOGGLE"
+ Value = "0x00"
+ Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT_EX protocol"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_OEM_KEY4_ENABLE" "!=" "0"
+ Token = "TSE_USE_AMI_EFI_KEYCODE_PROTOCOL" "!=" "0"
+End
+
+TOKEN
+ Name = "SETUP_SUPPORT_KEY_MONITORING"
+ Value = "0"
+ Help = "Enable or Disable monitoring keys during Legacy mode"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_STORE_EFI_KEY_PASSWORD"
+ Value = "0"
+ Help = "This Token becomes Obsolete after adding the Token SETUP_STORE_KEYCODE_PASSWORD. / Enables support to store EFI_KEYs as password. TSE Sources should be required to present to Enable this token."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_CAPITAL_BOOT_OPTION"
+ Value = "0"
+ Help = "This Token Stores/Creates the Boot Option numbers to Capital Hex Numbers"
+ TokenType = Boolean
+ TargetH = Yes
+ Token = "CORE_COMBINED_VERSION" "<" "0x40281"
+End
+
+TOKEN
+ Name = "TSE_CAPITAL_BOOT_OPTION"
+ Value = "1"
+ Help = "This Token Stores/Creates the Boot Option numbers to Capital Hex Numbers"
+ TokenType = Boolean
+ TargetH = Yes
+ Token = "CORE_COMBINED_VERSION" ">=" "0x40281"
+End
+
+TOKEN
+ Name = "SETUP_IDE_SECURITY_SUPPORT"
+ Value = "1"
+ TokenType = Boolean
+ TargetH = Yes
+ Token = "SECURITY_SUPPORT" "=" "1"
+End
+
+TOKEN
+ Name = "PASSWORD_WITH_SPECIAL_CHAR_SUPPORT"
+ Value = "1"
+ Help = "0 => Only alphanumeric characters are support in the Password 1 => Also supports printable special characters."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_LINK_HISTORY_SUPPORT"
+ Value = "1"
+ Help = "Preserves navigation history of Ref linked pages. Pressing the <ESC> returns control to the previous page if the current page was linked from a REF control."
+ TokenType = Boolean
+ TargetEQU = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_DISPLAY_SUBMENU_PAGETITLE"
+ Value = "0"
+ Help = "Displays page title of submenu pages in the menu tab."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_GROUP_DYNAMIC_PAGES"
+ Value = "1"
+ Help = "Allows Dynamic IFR Pages to be relocated under subpages. Make sure to have the VFR changes to show the dynamic pages"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_ORPHAN_PAGES_AS_ROOT_PAGE"
+ Value = "0"
+ Help = "Allows Orphan IFR Pages to be relocated to root pages."
+ TokenType = Boolean
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_ITK_COMPATIBILITY"
+ Value = "0"
+ Help = "Enables and disables ITK compatibility. Need customization in Board module to support ITK projects."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "NO_VARSTORE_SUPPORT"
+ Value = "0"
+ Help = "Enables and disables no var store support. This needs modification of VFRs. Need customization of board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_CONTINUE_BOOT_NOW_ON_FAIL"
+ Value = "1"
+ Help = "Turn on to continue boot to other device when selected one fails."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_UPDATE_BOOT_ORDER_CURSOR"
+ Value = "0"
+ Help = "When the boot order is changed, the cursor moves with the selection. Else, the cursor remains in the same location as the current question."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_PRESERVE_DISABLED_BBS_DEVICE_ORDER"
+ Value = "0"
+ Help = "Prevents TSE from repositioning disabled BBS boot in the boot order."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_BOOT_TIME_OUT_AS_ZERO"
+ Value = "0"
+ Help = "1=>Provides Boot time out value as zero 0=> Reads from the NVRAM, defaultly it is disabled."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_SAVE_DISABLED_BBS_DEVICEPATH"
+ Value = "1"
+ Help = "1 => Saves the DevicePaths of Disabled BBS devices to NVRAM Variable. \Depends on that varaible to keep device disbaled in next boot. \0 => Doesn't save the Disabled BBS devicepath."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_POSTSCREEN_SCROLL_AREA"
+ Value = "{0,0,24,80}"
+ Help = "Format:{TopRow, TopCol, BottomRow, BottomCol}. Used to Configure the TSE PostScreen Scroll Area. Note Post message are still printed in whole Screen."
+ TokenType = Expression
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "DRIVER_HEALTH_SUPPORT"
+ Value = "1"
+ Help = "1 = Enabling Driver health support in TSE and 0 = Disabling Driver health support in TSE."
+ TokenType = Boolean
+ TargetH = Yes
+ Token = "EFI_SPECIFICATION_VERSION" ">=" "0x20014"
+End
+
+TOKEN
+ Name = "HONOR_DRVHLTH_CONFIGREQD_ON_BOOTFAIL"
+ Value = "0"
+ Help = "1 => If driver need to be configured during the device boot then this token should be enabled to display the form produced from dirver health protocol & 0 => Disables the form produced by the driver health protocol."
+ TokenType = Integer
+ TargetH = Yes
+ Token = "DRIVER_HEALTH_SUPPORT" "=" "1"
+End
+
+TOKEN
+ Name = "EDK_1_05_RETRIEVE_DATA"
+ Value = "1"
+ Help = "1=>If UEFI>=2.1 and Core>=4.6.5.1.Modified code to return BrowserCallback String according to either EDK browser or spec.Please be careful when to change this to 0, May cause Addon Card to not to work."
+ TokenType = Boolean
+ TargetH = Yes
+ TargetMAK = Yes
+ Token = "EFI_SPECIFICATION_VERSION" ">=" "0x2000A"
+ Token = "CORE_COMBINED_VERSION" ">=" "0x4028B"
+End
+
+
+TOKEN
+ Name = "EDK_1_05_RETRIEVE_DATA"
+ Value = "0"
+ Help = "0=>If UEFI>=2.1 and Core<4.6.5.1.Modified code to return BrowserCallback String according to either EDK browser or spec.Please be careful when to change this to 0, May cause Addon Card to not to work."
+ TokenType = Boolean
+ TargetH = Yes
+ TargetMAK = Yes
+ Token = "EFI_SPECIFICATION_VERSION" ">=" "0x2000A"
+ Token = "CORE_COMBINED_VERSION" "<" "0x4028B"
+End
+
+TOKEN
+ Name = "TSE_USE_OEM_ACTION_READ_KEY"
+ Value = "0"
+ Help = "If user likes to read the key in their own way then enable this token and define _OemActionReadKey function."
+ TokenType = Boolean
+ TargetH = Yes
+ TargetMAK = Yes
+End
+
+TOKEN
+ Name = "SECONDARY_BOOT_FROM_ENABLED_DEVICES"
+ Value = "0"
+ Help = "0-> Loads \EFI\BOOT\BOOT{machine type short-name}.EFI from any of the devices & 1-> Loads the default image only from enabled devices"
+ TokenType = Boolean
+ TargetH = Yes
+ TargetMAK = Yes
+End
+
+TOKEN
+ Name = "AMITSE_SUBPAGE_AS_ROOT_PAGE_LIST_SUPPORT"
+ Value = "0"
+ Help = "1 -> Shows subpages as root page & 0 -> Shows subpages as is"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "AMITSE_HIDE_ROOT_PAGE"
+ Value = "0"
+ Help = "1 -> Hides the root page & 0 -> The support is disabled"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_CheckIsAllowedPasswordChar"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the CheckIsAllowedPasswordChar function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_PopupPasswordFormCallback"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the PopupPasswordFormCallback function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_PopupPwdHandleActionOverRide"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the PopupPwdHandleActionOverRide function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_PasswordCheckInstalled"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the PasswordCheckInstalled function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_PasswordAuthenticate"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the PasswordAuthenticate function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_PasswordUpdate"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the PasswordUpdate function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_PasswordCommitChanges"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the PasswordCommitChanges function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_PopupPasswordCheckInstalled"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the PopupPasswordCheckInstalled function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_PopupPasswordAuthenticate"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the PopupPasswordAuthenticate function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_NoVarStoreSupport"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the NoVarStoreSupport function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_NoVarStoreUpdateSystemAccess"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the NoVarStoreUpdateSystemAccess function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_ItkSupport"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the ItkSupport function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_BbsItkBoot"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the BbsItkBoot function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_GetAMITSEVariable"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the GetAMITSEVariable function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_GetBootTimeOut"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the GetBootTimeOut function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_VarBuildItkDefaults"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the VarBuildItkDefaults function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_SetSystemAccessValueItk"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the SetSystemAccessValueItk function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_FindVarFromITKQuestionId"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the FindVarFromITKQuestionId function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_IsOEMLogoType"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the IsOEMLogoType function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_ConvertOEMFormatToUgaBlt"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the ConvertOEMFormatToUgaBlt function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_CleanUpOEMLogo"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the CleanUpOEMLogo function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_DoOEMLogoAnimate"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the DoOEMLogoAnimate function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_BBSBuildName"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the BBSBuildName function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_BBSGetNonStandardGroupType"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the BBSGetNonStandardGroupType function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_FramePwdCallbackIdePasswordUpdate"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the FramePwdCallbackIdePasswordUpdate function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_PopupPwdAuthenticateIDEPwd"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the PopupPwdAuthenticateIDEPwd function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_PopupPwdUpdateIDEPwd"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the PopupPwdUpdateIDEPwd function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEIDEPasswordGetName"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the TSEIDEPasswordGetName function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEIDEPasswordAuthenticate"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the TSEIDEPasswordAuthenticate function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEIDEPasswordUpdate"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the TSEIDEPasswordUpdate function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEIDEPasswordGetDataPtr"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the TSEIDEPasswordGetDataPtr function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEIDEPasswordGetLocked"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the TSEIDEPasswordGetLocked function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEIDEPasswordCheck"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the TSEIDEPasswordCheck function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEIDEPasswordFreezeDevices"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the TSEIDEPasswordFreezeDevices function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEUnlockHDD"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the TSEUnlockHDD function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSESetHDDPassword"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the TSESetHDDPassword function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEIDEUpdateConfig"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the TSEIDEUpdateConfig function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_OEMSpecialGetControlCount"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the OEMSpecialGetControlCount function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_OEMSpecialOneOfFixup"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the OEMSpecialOneOfFixup function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_OEMSpecialUpdateOneOf"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the OEMSpecialUpdateOneOf function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_OEMSpecialGotoFixup"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the OEMSpecialGotoFixup function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_OEMSpecialGotoSelect"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the OEMSpecialGotoSelect function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEMouseInitHook"
+ Value = "0"
+ Help = "set to 1 if oem/Modules wants to override the TSEMouseInitHook function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEMouseStopHook"
+ Value = "0"
+ Help = "set to 1 if oem/Modules wants to override the TSEMouseStopHook function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEMouseDestoryHook"
+ Value = "0"
+ Help = "set to 1 if oem/Modules wants to override the TSEMouseDestoryHook function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEMouseRefreshHook"
+ Value = "0"
+ Help = "set to 1 if oem/Modules wants to override the TSEMouseRefreshHook function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEMouseStartHook"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the TSEMouseStartHook function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEMouseIgnoreMouseActionHook"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the TSEMouseIgnoreMouseActionHook function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEStringReadLoopEntryHook"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the TSEStringReadLoopEntryHook function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEStringReadLoopExitHook"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the TSEStringReadLoopExitHook function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_GetMessageboxColorHook"
+ Value = "0"
+ Help = "Set to 1 if oem wants to override the GetMessageboxColorHook function from Board module"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_GOPSetScreenResolutionHook"
+ Value = "0"
+ Help = "Set to 1 if oem wants to override the GOPSetScreenResolutionHook function from Board module"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_LaunchHotKeyBootOption"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the LaunchHotKeyBootOption function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_DriverHealthSystemReset"
+ Value = "0"
+ Help = "set to 1 if oem wants to override the DriverHealthSystemReset function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_UefiBootFailHook"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the OVERRIDE_UefiBootFailHook function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_LegacyBootFailHook"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the OVERRIDE_LegacyBootFailHook function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_UpdateNumericDisplayString"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the UpdateNumericDisplayString function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_MainSetupLoopHook"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the MainSetupLoopHook function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_MainSetupLoopInitHook"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the MainSetupLoopInitHook function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_ProcessBrowserActionRequestHook"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the ProcessBrowserActionRequestHook function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_OEMCheckControlCondition"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the OemCheckControlCondition function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_GetUefiSpecVersion"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the GetUefiSpecVersion function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEMouseInit"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the TSEMouseInit function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEMouseStop"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the TSEMouseStop function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEIsMouseClickedonSoftkbd"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the TSEIsMouseClickedonSoftkbd function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEMouseRefresh"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the TSEMouseRefresh function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEMouseStart"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the TSEMouseStart function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEMouseFreeze"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the TSEMouseFreeze function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEGetCoordinates"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the TSEGetCoordinates function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEMouseReadInfo"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the TSEMouseReadInfo function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEMouseDestroy"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the TSEMouseDestroy function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSEGetactualScreentop"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the TSEGetactualScreentop function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSENumericSoftKbdInit"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the TSENumericSoftKbdInit function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TSENumericSoftKbdExit"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the TSENumericSoftKbdExit function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_LaunchSecondaryBootPath"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the LaunchSecondaryBootPath function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_OsUpdateCapsuleWrap"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the OsUpdateCapsuleWrap function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_UIUpdateCallbackHook"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the UIUpdateCallback function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_FixMergePagesExtraHook"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the FixMergePagesExtraHook function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_PageRemoveHook"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the PageRemoveHook function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_ProcessPackNotificationHook"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the ProcessPackNotification function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_CsmBBSBootOptionName"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the CsmBBSBootOptionName function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "MSGBOX_PROGRESS_BAR_SEGMENT_COUNT"
+ Value = "20"
+ Help = "Mod of 100 with this number should be 0, for example (100 % 20 = 0)."
+ TokenType = Integer
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "CONTRIB_BGRT_TABLE_TO_ACPI"
+ Value = "1"
+ Help = "Set to Contribute the BGRT table to ACPI."
+ TokenType = Integer
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "BIOS_SIGNON_MESSAGE2"
+ Value = "BIOS Date: $(TODAY) $(NOW) Ver: $(PROJECT_TAG)$(PROJECT_MAJOR_VERSION)$(PROJECT_MINOR_VERSION)"
+ Help = "BIOS Sign On Message"
+ TokenType = Expression
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_APTIO_5_SUPPORT"
+ Value = "0"
+ Help = "Turn on to to build under Aptio 5"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_USE_GETGYLPH_PRINTLENGH"
+ Value = "0"
+ Help = "Turn on to to build under Aptio 5"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "INI_FILE_PATH"
+ Value = "$(TSEBIN_DIR)\setup.ini"
+ TokenType = Expression
+ TargetMAK = Yes
+ Token = "EFI_SPECIFICATION_VERSION" "<=" "0x20000"
+End
+
+TOKEN
+ Name = "INI_FILE_PATH"
+ Value = "$(TSEBIN_DIR)\uefisetup.ini"
+ TokenType = Expression
+ TargetMAK = Yes
+ Token = "EFI_SPECIFICATION_VERSION" ">" "0x20000"
+End
+
+TOKEN
+ Name = "SETUP_HIDE_DISABLE_BOOT_OPTIONS"
+ Value = "0"
+ Help = "1 => Hide the disabled boot options in boot override menu. 0 => Shows all boot options boot override menu."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "POPUP_MENU_HIDE_DISABLE_BOOT_OPTIONS"
+ Value = "0"
+ Help = "1 => Hide the disabled boot options in BBS POPup menu. 0 => Shows all boot options in BBS POPup menu."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_LOAD_OPTION_HIDDEN"
+ Value = "1"
+ Help = "1 => Hide LOAD_OPTION_HIDDEN Boot option. 0 => Shows all boot options."
+ TokenType = Boolean
+ TargetH = Yes
+ Token = "EFI_SPECIFICATION_VERSION" ">" "0x20000"
+End
+
+TOKEN
+ Name = "SETUP_HIDE_BIOS_SIGNON_MESSAGE2"
+ Value = "0"
+ Help = "1 => Hides the BIOS signon message. 0 => Shows the BIOS sign on message."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "AMITSE_VERSION"
+ Value = "Version %x.%02x.%04x."
+ Help = "TSE Version for displaying in the init screen. If no need of version to display then use empty string, if changing the format specifiers then care should be taken in source."
+ TokenType = Expression
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "BOOT_FLOW_NORMAL_LAUNCH_DEFAULT_BOOTIMAGE"
+ Value = "1"
+ Help = "Support for UEFI specification v 2.3.1 section 3.4.1.1 and 3.4.1.2 to load the default boot image (efi\boot\boot####.efi) from any of the available file system if no boot option found. 1 = Enabling default image boot and 0 = Disabling default image boot."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "BOOT_FLOW_NORMAL_INFINITE_LOOP"
+ Value = "0"
+ Help = "1 = TSE tries to loads all the boot options and all fails checks for SETUP_ENTRY keys if found then enters the setup else TSE tries to load all the boot options once again and continues the mentioned procedure infinitely and 0 = Neglects the SETUP_ENTRY key check, always tries to load all the boot options infinitely."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "STYLE_HELP_AREA_SCROLLBAR"
+ Value = "0"
+ Help = "Support Scrollable Help Text"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_MULTILINE_CONTROLS"
+ Value = "0"
+ Help = "Turns on multi line controls. Currently subtitle and static text controls are supported. Default is DISABLE"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_ROMHOLE_SUPPORT"
+ Value = "0"
+ Help = "Enable to support ROMHOLE generation."
+ TokenType = Boolean
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_ROMHOLE_SUPPORT"
+ Value = "1"
+ Help = "Enable to support ROMHOLE generation. Default enable with secure boot module support"
+ TokenType = Boolean
+ TargetMAK = Yes
+ TargetH = Yes
+ Token = "SecureMod_SUPPORT" "=" "1"
+End
+
+TOKEN
+ Name = "TSE_OEM_POSTLOGO_SUPPORT"
+ Value = "0"
+ Help = "Enable to support OEMLogo image in postscreen."
+ TokenType = Boolean
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OEMLogo_FILE_PATH"
+ Value = "$(TSEBIN_DIR)\OEMLogo.bmp"
+ TokenType = Expression
+ TargetMAK = Yes
+ Token = "TSE_OEM_POSTLOGO_SUPPORT" "=" "1"
+End
+
+TOKEN
+ Name = "TSE_ROMHOLE_MAKFILE_GUID"
+ Value = "05ca020b-0fc1-11dc-9011-00173153eba8"
+ Help = "One among 16-GUID used to identify ROMHOLE by AMI utilities such as AFU, BCP, and MMTool. If TSE_ROMHOLE_MAKFILE_GUID token value is changed then TSE_ROMHOLE_HEADER_GUID token value should update "
+ TokenType = Expression
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_ROMHOLE_HEADER_GUID"
+ Value = "{0x05ca020b, 0x0fc1, 0x11dc, 0x90, 0x11, 0x00, 0x17, 0x31, 0x53, 0xeb, 0xa8}"
+ Help = "One among 16-GUID used to identify ROMHOLE by AMI utilities such as AFU, BCP, and MMTool. This value should sync with TSE_ROMHOLE_MAKFILE_GUID token value"
+ TokenType = Expression
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "ROMHOLE_BLOCK_SIZE"
+ Value = "0x10000"
+ Help = "Size of Block used for ROMHOLE"
+ TokenType = Integer
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "ROMHOLE_NUMBER_OF_BLOCK"
+ Value = "2"
+ Help = "Number of Block used for ROMHOLE"
+ TokenType = Integer
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_CALLBACK_SPEC_VERSION"
+ Value = "EFI_SPECIFICATION_VERSION"
+ Help = "Version to change the callback functionality"
+ TokenType = Integer
+ TargetMAK = Yes
+End
+
+TOKEN
+ Name = "OSIndication_SUPPORT"
+ Value = "1"
+ TokenType = Boolean
+ TargetEQU = Yes
+ TargetMAK = Yes
+ TargetH = Yes
+ Help = "Main token to disable or enable the OSIndication Support. If disable then OSIndication module can be used"
+End
+
+TOKEN
+ Name = "SETUP_DELAY_LOGO_TILL_INPUT"
+ Value = "0"
+ Help = "DISABLE is default. 1 => delays logo display untill SIMPLE TEXT IN protocol is available.0 => logo is displayed as soon as UGA DRAW, CONSOLE SPLITTER & SIMPLE TEXT OUT IS AVAILABLE (Will increase code size)."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_DELAY_POST_TILL_GOP"
+ Value = "1"
+ Help = "ENABLE is default.Wait for GOP"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "DRAW_POST_LOGO_AT_0POS"
+ Value = "0"
+ Help = "Displays the post logo at top(0,0) graphics position. Disable by default make it 1 to avail this feature"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_IGNORE_KEY_FOR_FASTBOOT"
+ Value = "0"
+ Help = "DISABLE is default. 1=> To ignore check for key when FastBoot is enabled. 0=> Allow check for key when FastBoot is enabled"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_CURSOR_SUPPORT"
+ Value = "1"
+ Help = "Token to display cursor for string, password type controls.ENABLE is default.1=>To display cursor in TSE.0=>Not to display cursor in TSE"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SUPPORT_ESRT"
+ Value = "1"
+ Help = "Enable to support ESRT"
+ TokenType = Boolean
+ TargetH = Yes
+ Token = "CORE_COMBINED_VERSION" ">=" "0x4028e"
+End
+
+TOKEN
+ Name = "TSE_SUPPORT_NATIVE_RESOLUTION"
+ Value = "1"
+ Help = "Sets the graphics mode for quiet boot from EDID. 1 - Defaultly enable make 0 to disable the feature"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "BOOT_OVERRIDE_BOOTNEXT_VARIABLE_FEATURE"
+ Value = "0"
+ Help = "DISABLE is default.1=> To show menu for BootOverride options to modifiy BootNext variable when BootNext variable is supported by project. 0=> Not to show menu for BootOverride options"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_SUPPRESS_MULTILINE_FOR_ONEOFLABEL"
+ Value = "0"
+ Help = "1=> is to suppress multiline support for one of option . 0=> is to support multiline for one of option which is defalut behaviour"
+ TokenType = Boolean
+ TargetH = Yes
+ Token = "TSE_MULTILINE_CONTROLS" "=" "1"
+End
+
+TOKEN
+ Name = "SETUP_SAVE_PSWD_TO_NVRAM"
+ Value = "0"
+ Help = "1 => Save password to Nvram. 0 => Save password to cache."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_DONOT_LOAD_PASSWORD_ON_DEFAULTS"
+ Value = "0"
+ Help = "1 => Will not load defaults for password when we press F3. 0 => Load default passowrd."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SHELL_TEXT_MODE"
+ Value = "0xFF"
+ Help = "Assign the GC_MODE while boot to SHELL.\0xFF = ignored, 0/1/2/.. = GC_MODE0/GC_MODE1/GC_MODE2/.."
+ TokenType = Integer
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "FLUSH_KEYS_AFTER_READ"
+ Value = "1"
+ Help = "Disable to flush the key buffer."
+ TokenType = Boolean
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_LOAD_DEFAULTS_FROM_DEFAULTS_BUFFER"
+ Value = "1"
+ Help = "0 => Will not load defaults from Default buffer(NVRAM.bin) on pressing F3. 1 => Will Load default from the default buffer."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "AMITSE_ROOT_PAGE_ORDER_SUPPORT"
+ Value = "0"
+ Help = "1 => Enable the Root Page Order support for TSE. 0 => Disable the Root Page Order support for TSE."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_ROOT_PAGE_ORDER_GUID"
+ Value = " { 0x9204ecbe, 0xa665, 0x49d3, 0x86, 0xde, 0x8, 0x12, 0x99, 0xe2, 0x23, 0xef }"
+ Help = "Setup root Page Order Guid"
+ TokenType = Expression
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SETUP_GO_TO_EXIT_PAGE_ON_EXIT_KEY"
+ Value = "0"
+ Help = "DISABLE is default.Set to ENABLE to goto Exit page on pressing ESC key. If Enabled, on Pressing ESC key, by default it will go to Exit page.If user needs to change the page then user has provide proper FormID in the dependency tokens"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "EXIT_PAGE_GUID"
+ Value = "{0xa43b03dc, 0xc18a, 0x41b1, 0x91, 0xc8, 0x3f, 0xf9, 0xaa, 0xa2, 0x57, 0x13}"
+ Help = "GUID used to identify exit page"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_GO_TO_EXIT_PAGE_ON_EXIT_KEY" "!=" "0"
+ Token = "EFI_SPECIFICATION_VERSION" ">=" "0x2000A"
+End
+
+TOKEN
+ Name = "EXIT_PAGE_GUID"
+ Value = "{0xEC87D643, 0xEBA4, 0x4BB5, 0xA1, 0xE5, 0x3F, 0x3E, 0x36, 0xB2, 0x0D, 0xA9}"
+ Help = "GUID used to identify exit page"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_GO_TO_EXIT_PAGE_ON_EXIT_KEY" "!=" "0"
+ Token = "EFI_SPECIFICATION_VERSION" "<" "0x2000A"
+End
+
+TOKEN
+ Name = "EXIT_PAGE_CLASS"
+ Value = "0x20"
+ Help = "Exit Page Formset class"
+ TokenType = Integer
+ TargetH = Yes
+ Token = "SETUP_GO_TO_EXIT_PAGE_ON_EXIT_KEY" "!=" "0"
+End
+
+TOKEN
+ Name = "EXIT_PAGE_SUB_CLASS"
+ Value = "0"
+ Help = "Exit Page Formset Subclass"
+ TokenType = Integer
+ TargetH = Yes
+ Token = "SETUP_GO_TO_EXIT_PAGE_ON_EXIT_KEY" "!=" "0"
+End
+
+TOKEN
+ Name = "EXIT_PAGE_FORM_ID"
+ Value = "EXIT_MAIN"
+ Help = "Exit Page ID"
+ TokenType = Expression
+ TargetH = Yes
+ Token = "SETUP_GO_TO_EXIT_PAGE_ON_EXIT_KEY" "!=" "0"
+End
+
+TOKEN
+ Name = "TSE_SHOW_PROMPT_STRING_AS_TITLE"
+ Value = "0"
+ Help = "0 is DEFAULT.1 => To use password control's prompt's string for Password Title. 0 => To use standard TSE string for Password Title."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_DONOT_LOAD_SYSTEM_ACCESS_FOR_USER_DEFAULT"
+ Value = "0"
+ Help = "0 is DEFAULT.1 => To enable to not to load SystemAccess variable on pressing Restore User Default. 0=> To load SystemAccess variable on pressing Restore User Default"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SHOW_FORMSETS_WITH_CLASSGUID"
+ Value = "1"
+ Help = "0 is DEFAULT.1 => To display formset based on formset ClassGUID in elink AMITSE_FILTER_CLASSGUID_FORMSETS(By default this elink will have EFI_HII_PLATFORM_SETUP_FORMSET_GUID and EFI_HII_DRIVER_HEALTH_FORMSET_GUID). 0 => To display all formset and no filter in formsets."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_DBG_DISABLE_APPDESTRUCTOR"
+ Value = "0"
+ Help = "0 => Free the TSE used memory. 1 => Won't free the TSE used memory, may be used only for debugging purposes. CAUTION: If making the token to 1 then TSE won't free the memory it used. We recommend not to make it enable."
+ TokenType = Boolean
+ TargetH = Yes
+ Token = "DEBUG_MODE" "=" "1"
+End
+
+TOKEN
+ Name = "TSE_HASH_PASSWORD"
+ Value = "0"
+ Help = "0 is Default. 1 => To encode the entered password using hash algorithm. 0 => Encode entered password using TSE logic."
+ TokenType = Boolean
+ TargetH = Yes
+ TargetMAK = Yes
+ Token = "CryptLib_SUPPORT" "=" "1"
+End
+
+TOKEN
+ Name = "AMITSE_SUPPRESS_DYNAMIC_FORMSET"
+ Value = "0"
+ Help = "0 is Default. 1 -> To suppress dynamic formset mentioned in elink AMITSE_SUPPRESS_DYNAMIC_FORMSET_LIST and do not show in setup. 0 -> Display dynamic page and not to suppress dynamic page"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SUPPRESS_HANDLE_FOR_VAR_CREATION"
+ Value = "0"
+ Help = "0 is DEFAULT.0 => Includes handle comparison to create new variable cache in TSE. 1 => Won't compare handle to create new variable. The variable detail should present in AMITSE_DYNAMICPARSING_HANDLE_SUPPRESS_LIST to not compare handle"
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_GetGraphicsBitMapFromFV"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the GetGraphicsBitMapFromFV function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_CheckAdvShiftState"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the CheckAdvShiftState function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_LaunchSecBootPathFromEnabledDevs"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the LaunchSecBootPathFromEnabledDevs function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_FramePasswordAdvancedCallback"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the FramePasswordAdvancedCallback function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "OVERRIDE_TseLaunchFileSystem"
+ Value = "0"
+ Help = "set to 1 if OEM wants to override the TseLaunchFileSystem function from Board module."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_DEFAULT_SETUP_PASSWORD_SUPPORT"
+ Value = "0"
+ Help = "0 is default.set 1=> to Enable default setup password"
+ TokenType = Expression
+ TargetH = Yes
+ TargetMAK = Yes
+End
+
+TOKEN
+ Name = "DEFAULT_SETUP_PWD_AT_FIRSTBOOT_ONLY"
+ Value = "1"
+ Help = "1 is default. 1 => Sets the TSE_ADMIN_PASSWORD and TSE_USER_PASSWORD at first boot only. 0 => Sets TSE_ADMIN_PASSWORD and TSE_USER_PASSWORD in TSE defaults, on load defaults these data will be loaded"
+ TokenType = Expression
+ TargetH = Yes
+ TargetMAK = Yes
+ Token = "TSE_DEFAULT_SETUP_PASSWORD_SUPPORT" "=" "1"
+End
+
+TOKEN
+ Name = "TSE_ADMIN_PASSWORD"
+ Value = "EMPTY_DATA"
+ Help = "Defaultly no password is given. Need TSE source to change this. Provide data to set as default admin password. Maximum string can be provide is based on SETUP_PASSWORD_LENGTH token. String should be atleat minimum length mentioned in vfr. If no password is given it will not set any default password. Note: specify EMPTY_DATA in value if default admin password is not required"
+ TokenType = Expression
+ TargetH = Yes
+ TargetMAK = Yes
+ Token = "TSE_DEFAULT_SETUP_PASSWORD_SUPPORT" "=" "1"
+End
+
+TOKEN
+ Name = "TSE_USER_PASSWORD"
+ Value = "EMPTY_DATA"
+ Help = "Defaultly no password is given. Need TSE source to change this. Provide data to set as default user password. Maximum string can be provide is based on SETUP_PASSWORD_LENGTH token. String should be minimum length mentioned in vfr. If no password is given it will not set any default password. Note: specify EMPTY_DATA in value if default user password is not required"
+ TokenType = Expression
+ TargetH = Yes
+ TargetMAK = Yes
+ Token = "TSE_DEFAULT_SETUP_PASSWORD_SUPPORT" "=" "1"
+End
+
+TOKEN
+ Name = "RT_ACCESS_SUPPORT_IN_HPKTOOL"
+ Value = "0"
+ Help = "0 is default no RT flag for variables. 1=> enable to add RT attribute for variables, uefisetup.ini attributes persists"
+ TokenType = Expression
+ TargetH = Yes
+ TargetMAK = Yes
+End
+
+TOKEN
+ Name = "DISABLE_ESC_IN_BBS"
+ Value = "0"
+ Help = "0 is DEFAULT.1 => To disable ESC behaviour in BBS menu and retain in BBS menu. 0 => To enable ESC behaviour in BBS menu."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_SUPPORT_DEFAULT_FOR_STRING_CONTROL"
+ Value = "0"
+ Help = "0 is DEFAULT. 1 => To construct optimal and failsafe defaults for STRING type controls based on CONTROLPtr from controlInfo.0 => Not to construct and load optimal and failsafe defaults for STRING type controls."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "TSE_BEST_TEXT_GOP_MODE"
+ Value = "0"
+ Help = "0 is DEFAULT.1 => To save and restore text(100*31) and GOP(800*600) mode before using any TSE Interfaces in post/after TSE. 0 => Not to handle text and GOP mode before using any TSE interfaces in post/after TSE and use post mode without any change."
+ TokenType = Boolean
+ TargetH = Yes
+End
+
+PATH
+ Name = "TSEBIN_DIR"
+End
+
+MODULE
+ Help = "Includes AMITSE.mak to Project"
+ File = "AMITSE.mak"
+End
+
+ELINK
+ Name = "DrawQuietBootLogoHook,"
+ Parent = "HOOK1,"
+ Priority = 1
+ Help = "Anchor for hook #1 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK1,"
+ Parent = "AMITSE_Hooks"
+ Priority = 1
+ Help = "Anchor for hook #1 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK2,"
+ Parent = "AMITSE_Hooks"
+ Priority = 2
+ Help = "Anchor for hook #2 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "ProcessConInAvailabilityHook,"
+ Parent = "HOOK2,"
+ Priority = 2
+ Help = "Anchor for hook #2 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "ProcessEnterSetupHook,"
+ Parent = "HOOK3,"
+ Priority = 3
+ Help = "Anchor for hook #3 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK3,"
+ Parent = "AMITSE_Hooks"
+ Priority = 3
+ Help = "Anchor for hook #3 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "ProcessProceedToBootHook,"
+ Parent = "HOOK4,"
+ Priority = 4
+ Help = "Anchor for hook #4 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK4,"
+ Parent = "AMITSE_Hooks"
+ Priority = 4
+ Help = "Anchor for hook #4 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "MinisetupDriverEntryHookHook,"
+ Parent = "HOOK5,"
+ Priority = 5
+ Help = "Anchor for hook #5 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK5,"
+ Parent = "AMITSE_Hooks"
+ Priority = 5
+ Help = "Anchor for hook #5 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "PostManagerHandShakeHookHook,"
+ Parent = "HOOK6,"
+ Priority = 6
+ Help = "Anchor for hook #6 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK6,"
+ Parent = "AMITSE_Hooks"
+ Priority = 6
+ Help = "Anchor for hook #6 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "MapControlKeysHook,"
+ Parent = "HOOK7,"
+ Priority = 7
+ Help = "Anchor for hook #7 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK7,"
+ Parent = "AMITSE_Hooks"
+ Priority = 7
+ Help = "Anchor for hook #7 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "CheckForKeyHook,"
+ Parent = "HOOK8,"
+ Priority = 8
+ Help = "Anchor for hook #8 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK8,"
+ Parent = "AMITSE_Hooks"
+ Priority = 8
+ Help = "Anchor for hook #8 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "BeforeLegacyBootLaunchHook,"
+ Parent = "HOOK9,"
+ Priority = 9
+ Help = "Anchor for hook #9 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK9,"
+ Parent = "AMITSE_Hooks"
+ Priority = 9
+ Help = "Anchor for hook #9 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "AfterLegacyBootLaunchHook,"
+ Parent = "HOOK10,"
+ Priority = 10
+ Help = "Anchor for hook #10 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK10,"
+ Parent = "AMITSE_Hooks"
+ Priority = 10
+ Help = "Anchor for hook #10 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "BeforeEfiBootLaunchHook,"
+ Parent = "HOOK11,"
+ Priority = 11
+ Help = "Anchor for hook #11 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK11,"
+ Parent = "AMITSE_Hooks"
+ Priority = 11
+ Help = "Anchor for hook #11 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "AfterEfiBootLaunchHook,"
+ Parent = "HOOK12,"
+ Priority = 12
+ Help = "Anchor for hook #12 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK12,"
+ Parent = "AMITSE_Hooks"
+ Priority = 12
+ Help = "Anchor for hook #12 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "SavedConfigChangesHook,"
+ Parent = "HOOK13,"
+ Priority = 13
+ Help = "Anchor for hook #13 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK13,"
+ Parent = "AMITSE_Hooks"
+ Priority = 13
+ Help = "Anchor for hook #13 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "LoadedConfigDefaultsHook,"
+ Parent = "HOOK14,"
+ Priority = 14
+ Help = "Anchor for hook #14 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK14,"
+ Parent = "AMITSE_Hooks"
+ Priority = 14
+ Help = "Anchor for hook #15 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "TimeOutLoopHookHook,"
+ Parent = "HOOK15,"
+ Priority = 15
+ Help = "Anchor for hook #15 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK15,"
+ Parent = "AMITSE_Hooks"
+ Priority = 15
+ Help = "Anchor for hook #15 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "OemKey1HookHook,"
+ Parent = "HOOK16,"
+ Priority = 16
+ Help = "Anchor for hook #16 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK16,"
+ Parent = "AMITSE_Hooks"
+ Priority = 16
+ Help = "Anchor for hook #16 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "OemKey2HookHook,"
+ Parent = "HOOK17,"
+ Priority = 17
+ Help = "Anchor for hook #17 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK17,"
+ Parent = "AMITSE_Hooks"
+ Priority = 17
+ Help = "Anchor for hook #17 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "OemKey3HookHook,"
+ Parent = "HOOK18,"
+ Priority = 18
+ Help = "Anchor for hook #18 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK18,"
+ Parent = "AMITSE_Hooks"
+ Priority = 18
+ Help = "Anchor for hook #18 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "OemKey4HookHook,"
+ Parent = "HOOK19,"
+ Priority = 19
+ Help = "Anchor for hook #19 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK19,"
+ Parent = "AMITSE_Hooks"
+ Priority = 19
+ Help = "Anchor for hook #19 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "PasswordEncodeHook,"
+ Parent = "HOOK20,"
+ Priority = 20
+ Help = "Anchor for hook #20 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK20,"
+ Parent = "AMITSE_Hooks"
+ Priority = 20
+ Help = "Anchor for hook #20 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "SetControlColorsHook,"
+ Parent = "HOOK21,"
+ Priority = 21
+ Help = "Anchor for hook #21 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK21,"
+ Parent = "AMITSE_Hooks"
+ Priority = 21
+ Help = "Anchor for hook #21 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "InvalidActionHook,"
+ Parent = "InvalidActionHookHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "InvalidActionHookHook,"
+ Parent = "HOOK22,"
+ Priority = 22
+ Help = "Anchor for hook #22 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK22,"
+ Parent = "AMITSE_Hooks"
+ Priority = 22
+ Help = "Anchor for hook #22 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "LoadedUserDefaults,"
+ Parent = "LoadedUserDefaultsHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "LoadedUserDefaultsHook,"
+ Parent = "HOOK23,"
+ Priority = 23
+ Help = "Anchor for hook #23 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK23,"
+ Parent = "AMITSE_Hooks"
+ Priority = 23
+ Help = "Anchor for hook #23 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "LoadedBuildDefaults,"
+ Parent = "LoadedBuildDefaultsHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "LoadedBuildDefaultsHook,"
+ Parent = "HOOK24,"
+ Priority = 24
+ Help = "Anchor for hook #24 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK24,"
+ Parent = "AMITSE_Hooks"
+ Priority = 24
+ Help = "Anchor for hook #24 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+
+ELINK
+ Name = "LoadedPreviousValues,"
+ Parent = "LoadedPreviousValuesHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "LoadedPreviousValuesHook,"
+ Parent = "HOOK25,"
+ Priority = 25
+ Help = "Anchor for hook #25 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK25,"
+ Parent = "AMITSE_Hooks"
+ Priority = 25
+ Help = "Anchor for hook #25 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+
+ELINK
+ Name = "SetupConfigModified,"
+ Parent = "SetupConfigModifiedHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "SetupConfigModifiedHook,"
+ Parent = "HOOK26,"
+ Priority = 26
+ Help = "Anchor for hook #26 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK26,"
+ Parent = "AMITSE_Hooks"
+ Priority = 26
+ Help = "Anchor for hook #26 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "DrawBbsPopupMenu,"
+ Parent = "DrawBootOnlyBbsPopupMenu,"
+ InvokeOrder = ReplaceParent
+ Token = "SETUP_BBS_POPUP_ENABLE" "=" "1"
+End
+
+ELINK
+ Name = "DrawBootOnlyBbsPopupMenu,"
+ Parent = "DrawPopupMenuHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK27,"
+ Parent = "AMITSE_Hooks"
+ Priority = 27
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "DrawPopupMenuHook,"
+ Parent = "HOOK27,"
+ Priority = 27
+ Help = "Anchor for hook #27 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+
+ELINK
+ Name = "BbsBoot,"
+ Parent = "BbsBootHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK28,"
+ Parent = "AMITSE_Hooks"
+ Priority = 28
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "BbsBootHook,"
+ Parent = "HOOK28,"
+ Priority = 28
+ Help = "Anchor for hook #28 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK29,"
+ Parent = "AMITSE_Hooks"
+ Priority = 29
+ Help = "Anchor for hook #29 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "LoadSetupDefaultsHook,"
+ Parent = "HOOK29,"
+ Priority = 29
+ Help = "Anchor for hook #29 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "LoadSetupDefaults,"
+ Parent = "LoadSetupDefaultsHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK30,"
+ Parent = "AMITSE_Hooks"
+ Priority = 30
+ Help = "Anchor for hook #30 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "PreSystemResetHookHook,"
+ Parent = "HOOK30,"
+ Priority = 30
+ Help = "Anchor for hook #30 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "PreSystemResetHook,"
+ Parent = "PreSystemResetHookHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK31,"
+ Parent = "AMITSE_Hooks"
+ Priority = 31
+ Help = "Anchor for hook #31 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "MapControlMouseActionHook,"
+ Parent = "HOOK31,"
+ Priority = 31
+ Help = "Anchor for hook #31 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "MapControlMouseAction,"
+ Parent = "MapControlMouseActionHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "ProcessProceedToBootNowHook,"
+ Parent = "HOOK32,"
+ Priority = 32
+ Help = "Anchor for hook #32 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK32,"
+ Parent = "AMITSE_Hooks"
+ Priority = 32
+ Help = "Anchor for hook #32 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "ProcessProceedToBootNow,"
+ Parent = "ProcessProceedToBootNowHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "ProcessConOutAvailableHook,"
+ Parent = "HOOK33,"
+ Priority = 33
+ Help = "Anchor for hook #32 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK33,"
+ Parent = "AMITSE_Hooks"
+ Priority = 33
+ Help = "Anchor for hook #33 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "ProcessConOutAvailable,"
+ Parent = "ProcessConOutAvailableHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "ProcessUIInitHookHook,"
+ Parent = "HOOK34,"
+ Priority = 34
+ Help = "Anchor for hook #34 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK34,"
+ Parent = "AMITSE_Hooks"
+ Priority = 34
+ Help = "Anchor for hook #34 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "AfterInitPostScreenHook,"
+ Parent = "HOOK35,"
+ Priority = 35
+ Help = "Anchor for hook #35 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "AfterInitPostScreen,"
+ Parent = "AfterInitPostScreenHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK35,"
+ Parent = "AMITSE_Hooks"
+ Priority = 35
+ Help = "Anchor for hook #35 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "CheckForClickHook,"
+ Parent = "HOOK36,"
+ Priority = 36
+ Help = "Anchor for hook #36 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK36,"
+ Parent = "AMITSE_Hooks"
+ Priority = 36
+ Help = "Anchor for hook #36 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "SwitchToPostScreenHook,"
+ Parent = "HOOK37,"
+ Priority = 37
+ Help = "Anchor for hook #37 - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "SwitchToPostScreen,"
+ Parent = "SwitchToPostScreenHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK37,"
+ Parent = "AMITSE_Hooks"
+ Priority = 37
+ Help = "Anchor for hook #37 - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+
+ELINK
+ Name = "ProcessUIInitHook,"
+ Parent = "ProcessUIInitHookHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "$(BUILD_DIR)\AMITSE.ffs"
+ Parent = "FV_MAIN"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "$(BUILD_DIR)\SignON.ffs"
+ Parent = "FV_MAIN"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "$(BUILD_DIR)\SmLogo.ffs"
+ Parent = "FV_MAIN"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "$(BUILD_DIR)\OEMLogo.ffs"
+ Parent = "FV_MAIN"
+ Token = "TSE_OEM_POSTLOGO_SUPPORT" "=" "1"
+ Token = "TSE_ROMHOLE_SUPPORT" "!=" "1"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = " "
+ Parent = "$(BUILD_DIR)\Logo.ffs"
+ InvokeOrder = ReplaceParent
+ Token = "TSE_ROMHOLE_SUPPORT" "=" "1"
+End
+
+ELINK
+ Name = "$(BUILD_DIR)\ROMHOLE.ffs"
+ Parent = "FV_MAIN"
+ Token = "TSE_ROMHOLE_SUPPORT" "=" "1"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "IFR_DIR_LIST"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "MINISETUPLIB"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "TSELITELIB"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "AMITSE_Objects"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "AMITSE_Hooks"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "DrawQuietBootLogo,"
+ Parent = "DrawQuietBootLogoHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "ProcessEnterSetup,"
+ Parent = "ProcessEnterSetupHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "ProcessProceedToBoot,"
+ Parent = "ProcessProceedToBootHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "MinisetupDriverEntryHook,"
+ Parent = "MinisetupDriverEntryHookHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "PostManagerHandShakeHook,"
+ Parent = "PostManagerHandShakeHookHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "MapControlKeys,"
+ Parent = "MapControlKeysHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "CheckForKey,"
+ Parent = "CheckForKeyHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "CheckForClick,"
+ Parent = "CheckForClickHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "BeforeLegacyBootLaunch,"
+ Parent = "BeforeLegacyBootLaunchHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "AfterLegacyBootLaunch,"
+ Parent = "AfterLegacyBootLaunchHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "BeforeEfiBootLaunch,"
+ Parent = "BeforeEfiBootLaunchHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "AfterEfiBootLaunch,"
+ Parent = "AfterEfiBootLaunchHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "SavedConfigChanges,"
+ Parent = "SavedConfigChangesHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "LoadedConfigDefaults,"
+ Parent = "LoadedConfigDefaultsHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "TimeOutLoopHook,"
+ Parent = "TimeOutLoopHookHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "ProcessConInAvailability,"
+ Parent = "ProcessConInAvailabilityHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "OemKey1Hook,"
+ Parent = "OemKey1HookHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "OemKey2Hook,"
+ Parent = "OemKey2HookHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "OemKey3Hook,"
+ Parent = "OemKey3HookHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "OemKey4Hook,"
+ Parent = "OemKey4HookHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "PasswordEncode,"
+ Parent = "PasswordEncodeHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "SetControlColors,"
+ Parent = "SetControlColorsHook,"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "LastTSEHook"
+ Parent = "HOOK0,"
+ Help = "Anchor for last hook - DO NOT MODIFY"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "HOOK0,"
+ Parent = "AMITSE_Hooks"
+ Help = "Anchor for last hook - DO NOT MODIFY."
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "$(TSEBIN_DIR)\setupdbg.h"
+ Parent = "AMITSE_OEM_HEADER_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{{SCAN_F11, 0},0, SetupShowDebugScreen, 0 },"
+ Parent = "HOTKEY_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{{TSE_PRN_SCRN_KEY_SCAN,0},0, PrntScrnKeyNotification, 0 },"
+ Parent = "HOTKEY_LIST"
+ InvokeOrder = AfterParent
+ Token = "TSE_PRN_SCRN_EVENT_SUPPORT" "=" "1"
+End
+
+
+ELINK
+ Name = "CONTROL_KEY_MAP_LIST"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "{ControlActionSelect, CHAR_CARRIAGE_RETURN, SCAN_NULL, 0},"
+ Parent = "CONTROL_KEY_MAP_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ControlActionNextSelection, CHAR_TAB, SCAN_NULL, 0},"
+ Parent = "CONTROL_KEY_MAP_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ControlActionPrevSelection, CHAR_TAB, SCAN_NULL, 0x80000003},"
+ Parent = "CONTROL_KEY_MAP_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ControlActionBackSpace, CHAR_BACKSPACE, SCAN_NULL, 0},"
+ Parent = "CONTROL_KEY_MAP_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ControlActionDecreament, L'-', SCAN_NULL, 0},"
+ Parent = "CONTROL_KEY_MAP_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ControlActionIncreament, L' ', SCAN_NULL, 0},"
+ Parent = "CONTROL_KEY_MAP_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ControlActionIncreament, L'+', SCAN_NULL, 0},"
+ Parent = "CONTROL_KEY_MAP_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ControlActionNextLeft, CHAR_NULL, SCAN_LEFT, 0},"
+ Parent = "CONTROL_KEY_MAP_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ControlActionNextRight, CHAR_NULL, SCAN_RIGHT, 0},"
+ Parent = "CONTROL_KEY_MAP_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ControlActionNextUp, CHAR_NULL, SCAN_UP, 0},"
+ Parent = "CONTROL_KEY_MAP_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ControlActionNextDown, CHAR_NULL, SCAN_DOWN, 0},"
+ Parent = "CONTROL_KEY_MAP_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ControlActionAbort, CHAR_NULL, SCAN_ESC, 0},"
+ Parent = "CONTROL_KEY_MAP_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ControlActionPageUp, CHAR_NULL, SCAN_PAGE_UP, 0},"
+ Parent = "CONTROL_KEY_MAP_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ControlActionPageDown, CHAR_NULL, SCAN_PAGE_DOWN, 0},"
+ Parent = "CONTROL_KEY_MAP_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ControlActionHelpPageUp, L'k', SCAN_NULL, 0},"
+ Parent = "CONTROL_KEY_MAP_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ControlActionHelpPageDown, L'm', SCAN_NULL, 0},"
+ Parent = "CONTROL_KEY_MAP_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ControlActionHome, CHAR_NULL, SCAN_HOME, 0},"
+ Parent = "CONTROL_KEY_MAP_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ControlActionEnd, CHAR_NULL, SCAN_END, 0},"
+ Parent = "CONTROL_KEY_MAP_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "EXIT_PAGE_OPTIONS_LIST"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "{ {SAVE_AND_EXIT_VALUE}, HandleSaveAndExit },"
+ Parent = "EXIT_PAGE_OPTIONS_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ {DISCARD_AND_EXIT_VALUE}, HandleExitApplication },"
+ Parent = "EXIT_PAGE_OPTIONS_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ {SAVE_AND_RESET_VALUE}, HandleSaveAndReset },"
+ Parent = "EXIT_PAGE_OPTIONS_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ {DISCARD_AND_RESET_VALUE}, HandleResetSys },"
+ Parent = "EXIT_PAGE_OPTIONS_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ {SAVE_VALUE}, HandleSaveWithoutExit },"
+ Parent = "EXIT_PAGE_OPTIONS_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ {DISCARD_VALUE}, HandleLoadPreviousValues },"
+ Parent = "EXIT_PAGE_OPTIONS_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ {RESTORE_DEFAULTS_VALUE}, HandleLoadOptimalDefaults },"
+ Parent = "EXIT_PAGE_OPTIONS_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ {SAVE_USER_DEFAULTS_VALUE}, HandleSaveUserDefaults },"
+ Parent = "EXIT_PAGE_OPTIONS_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ {RESTORE_USER_DEFAULTS_VALUE}, HandleRestoreUserDefaults },"
+ Parent = "EXIT_PAGE_OPTIONS_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ {SAVE_BOOT_OPTION}, HandleBootAddBootOption },"
+ Parent = "EXIT_PAGE_OPTIONS_LIST"
+ Token = "SETUP_SUPPORT_ADD_BOOT_OPTION" "=" "1"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ {LAUNCH_FILE_PATH}, HandleLaunchFileSystem },"
+ Parent = "EXIT_PAGE_OPTIONS_LIST"
+ Token = "SETUP_SUPPORT_ADD_BOOT_OPTION" "=" "1"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ {SAVE_DRIVER_OPTION}, HandleDriverAddDriverOption },"
+ Parent = "EXIT_PAGE_OPTIONS_LIST"
+ Token = "SETUP_SUPPORT_ADD_DRIVER_OPTION" "=" "1"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ {LAUNCH_FILE_PATH_DRIVER}, HandleLaunchFileSystemDriver },"
+ Parent = "EXIT_PAGE_OPTIONS_LIST"
+ Token = "SETUP_SUPPORT_ADD_DRIVER_OPTION" "=" "1"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "{ {END_OF_EXIT_PAGE_OPTION_LIST}, NULL },"
+ Parent = "EXIT_PAGE_OPTIONS_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "TSE_STRING_CONSUMERS_LIST"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "$(TSEBIN_DIR)\FakeTokens.c"
+ Parent = "TSE_STRING_CONSUMERS_LIST"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "TSE_UNI_INCLUDE_PATH"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "AMITSE_HPK_FILE_ORDER"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "TSE_SDBS"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "TSE_LIB_INCLUDES"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "-I $(TSEBIN_DIR)"
+ Parent = "TSE_LIB_INCLUDES"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "-I $(TSEBIN_DIR)\Inc"
+ Parent = "TSE_LIB_INCLUDES"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "-I $(TSESRC_DIR)"
+ Parent = "TSE_LIB_INCLUDES"
+ InvokeOrder = AfterParent
+ Token = "MiniSetup_SUPPORT" "=" "1"
+End
+
+ELINK
+ Name = "-I $(TSESRC_DIR)\AMILOGO"
+ Parent = "TSE_LIB_INCLUDES"
+ InvokeOrder = AfterParent
+ Token = "MiniSetup_SUPPORT" "=" "1"
+End
+
+ELINK
+ Name = "-I $(UEFISRC_DIR)"
+ Parent = "TSE_LIB_INCLUDES"
+ InvokeOrder = AfterParent
+ Token = "UEFI_SOURCES_SUPPORT" "=" "1"
+End
+
+ELINK
+ Name = "-I $(TSE_STYLE_DIR)"
+ Parent = "TSE_LIB_INCLUDES"
+ InvokeOrder = AfterParent
+ Token = "TSE_STYLE_EZPORT_SUPPORT" "=" "1"
+End
+
+ELINK
+ Name = "-I $(TSELITESRC_DIR)"
+ Parent = "TSE_LIB_INCLUDES"
+ InvokeOrder = AfterParent
+ Token = "TseLite_SUPPORT" "=" "1"
+End
+
+ELINK
+ Name = "-I $(TSE_ADVANCED_DIR)"
+ Parent = "TSE_LIB_INCLUDES"
+ InvokeOrder = AfterParent
+ Token = "TSE_ADVANCED_SUPPORT" "=" "1"
+End
+
+ELINK
+ Name = "-I $(TSE_BOARD_DIR)"
+ Parent = "TSE_LIB_INCLUDES"
+ InvokeOrder = AfterParent
+ Token = "TSE_BOARD_SOURCE_SUPPORT" "=" "1"
+End
+
+ELINK
+ Name = "-I $(PROJECT_DIR)"
+ Parent = "TSE_LIB_INCLUDES"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "-I $(PROJECT_DIR)\Include"
+ Parent = "TSE_LIB_INCLUDES"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "-I $(PROJECT_DIR)\Include\Protocol"
+ Parent = "TSE_LIB_INCLUDES"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "-I $(PROJECT_DIR)\Core"
+ Parent = "TSE_LIB_INCLUDES"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "-I $(BUILD_DIR)"
+ Parent = "TSE_LIB_INCLUDES"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "AMITSE_OEM_HEADER_LIST"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "OEM_KEY_CALLBACK_LIST"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "AMITSE_SUBPAGE_AS_ROOT_PAGE_LIST"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "AMITSE_HIDDEN_PAGE_LIST"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "AMITSE_ROOT_PAGE_ORDER"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "PASSWORD_ENOCDE_LIST"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "AMITSE_FILTER_CLASSGUID_FORMSETS"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "{ 0x93039971, 0x8545, 0x4b04, 0xb4, 0x5e, 0x32, 0xeb, 0x83, 0x26, 0x4, 0xe },{ 0xf22fc20c, 0x8cf4, 0x45eb, 0x8e, 0x6, 0xad, 0x4e, 0x50, 0xb9, 0x5d, 0xd3 }"
+ Parent = "AMITSE_FILTER_CLASSGUID_FORMSETS"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "AMITSE_SUPPRESS_DYNAMIC_FORMSET_LIST"
+ Help = "Provide GUIDs of dynmaic formset to suppress. Terminate entry with comma"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "AMITSE_DYNAMICPARSING_HANDLE_SUPPRESS_LIST"
+ Help = "Provide Guid followed by variable name with single quotes. Terminate entry with comma"
+ InvokeOrder = ReplaceParent
+End
+
+#ELINK
+# Name = "{{ 0xE770BB69, 0xBCB4, 0x4D04, 0x9E, 0x97, 0x23, 0xFF, 0x94, 0x56, 0xFE, 0xAC }, {'S','y','s','t','e','m','A','c','c','e','s','s'}},"
+# Parent = "AMITSE_DYNAMICPARSING_HANDLE_SUPPRESS_LIST"
+# Help = "Provide GUIDs of variable and Variable name as above format to suppress handle while parsing variable if it is present already in other formset."
+# InvokeOrder = AfterParent
+#End
+
diff --git a/Core/EM/AMITSE/AmiTSEStr.uni b/Core/EM/AMITSE/AmiTSEStr.uni
new file mode 100644
index 0000000..43301e1
--- /dev/null
+++ b/Core/EM/AMITSE/AmiTSEStr.uni
Binary files differ
diff --git a/Core/EM/AMITSE/CommonHelper.c b/Core/EM/AMITSE/CommonHelper.c
new file mode 100644
index 0000000..786f0c2
--- /dev/null
+++ b/Core/EM/AMITSE/CommonHelper.c
@@ -0,0 +1,6230 @@
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 1985-2014, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy , Norcross, GA 30071 **//
+//** **//
+//** Phone: (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+// $Archive: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/CommonHelper.c $
+//
+// $Author: Premkumara $
+//
+// $Revision: 158 $
+//
+// $Date: 9/05/14 2:28p $
+//
+//*****************************************************************//
+//*****************************************************************//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/CommonHelper.c $
+//
+// 158 9/05/14 2:28p Premkumara
+// Moved below functions from HiiString21.c to CommonHelper.c
+// - IsSupportDefaultForStringControl()
+// - IsTseBestTextGOPModeSupported()
+//
+// 157 9/05/14 6:29a Premkumara
+// [TAG] EIP141986
+// [Category] Improvement
+// [Description] Make grayedout control focusable and this feature is
+// handled by token TSE_SETUP_GRAYOUT_SELECTABLE
+// [Files] AMITSE.sdl, CommonHelper.c, Frame.c, Label.c, Minisetupext.c,
+// Numeric.c, PopupPassword.c, PopupSel.c, PopupString. SubMenu.c
+//
+// 156 8/28/14 10:08a Premkumara
+// [TAG] EIP174031
+// [Category] Improvement
+// [Description] Removed TODO comments and added proper comments in those
+// places
+// [Files] commonoem.c, commonhelper.c, special.c, submenu.c,
+// minisetupext.c, uefi21wapper.c and legacy.c
+//
+// 155 8/28/14 7:27a Premkumara
+// [TAG] EIP107833, 125388
+// [Category] Improvement
+// [Symptom:] Setting best text and GOP mode while using TSEPostinterfaces
+// before TSE or after TSE.
+// [Files] Protocol.c, AMITSE.sdl, CommonHelper.c, MiniSetup.sdl,
+// PostMgmtc, PostmgmtExt.c, MessagBox.c
+//
+// 154 8/28/14 4:28a Premkumara
+// EIP-135253 Updating file name proper in #include
+//
+// 153 7/12/14 5:44p Arunsb
+//
+// 152 5/08/14 9:09p Arunsb
+// [TAG] EIP162981
+// [Category] Improvement
+// [Description] Configuring default Password through SDL token.
+// Based on RT_ACCESS_SUPPORT_IN_HPKTOOL, attribute is set for amitsesetup
+// variable
+//
+// 151 5/08/14 4:26p Arunsb
+// [TAG] EIP162197
+// [Category] Improvement
+// [Description] Password encode feature modify to encode using Hashing
+// based on token.
+// IsPasswordSupportNonCaseSensitive moved to PasswordEncode module
+//
+// 150 5/02/14 9:22p Arunsb
+// EIP141986 changes reverted.
+//
+// 149 5/02/14 2:43p Premkumara
+// Resolve build error for undeclared fn CheckandDeactivateSoftkbd()
+//
+// 148 5/02/14 2:09p Premkumara
+// [TAG] EIP140123
+// [Category] Bug Fix
+// [Severity] Critical
+// [Symptom] While showing secureboot error msg mouse is not move and
+// get hang. Softkbd is displaying
+// [RootCause] MouseClickEvent is not stopped while boot to any option.
+// So clicking outside msg box causes displaying
+// softkbd and mouse is not init at this phase.
+// [Solution] Initialized mouse and deactivating any softkbd activated
+// before showing secureboot error msg box.
+// [Files] CommonHelper.c, CommonOem.c, MessageBox.c
+//
+// 147 5/02/14 1:09p Premkumara
+// [TAG] EIP128526
+// [Category] Improvement
+// [Description] Disable ESC action in BBS popup menu
+// [Files] AMITSE.sdl, CommonHelper.c, TseLite/MinisetupExt.c
+//
+// 146 5/02/14 11:08a Premkumara
+// [TAG] EIP141986
+// [Category] New Feature
+// [Description] Made Grayed controls to focus-able when token
+// TSE_SETUP_GRAYOUT_SELECTABLE
+// is enabled and can't edit the values
+// [Files] AMITSE.sdl,CommonHelper.c,frame.c,Label.c,minisetupext.h,
+// numeric.c,PopupPassword.c,PopupSel.c,PopupString.c,SubMenu.c
+//
+// 145 5/02/14 8:37a Premkumara
+// [TAG] EIP162981
+// [Category] Improvement
+// [Description] Configuring default Password through SDL token
+// [Files] AMITSE.sdl, CommonHelper.c, Minisetup.c, TseAdvanced.c
+//
+// 144 5/02/14 6:47a Premkumara
+// [TAG] EIP164232
+// [Category] Bug Fix
+// [Severity] Important
+// [Symptom] When password keyboard is launched and mouse pointer is
+// placed on softkbd mouse will flickers continously.
+// [RootCause] MouseRefresh and MouseStop is calling contiously in loop
+// so mouse pointer get flickers
+// [Solution] When mouse pointer is on softkbd and is static then stop
+// calling MouseRefresh and MouseFreeze
+// [Files] PopupPassword.c, CommonHelper.c, Mouse.c
+//
+// 143 5/02/14 6:08a Premkumara
+// [TAG] EIP123431
+// [Category] Improvement
+// [Description] Need create one override token to TSE.
+// [Files] CommonHelper.c, AMITSE.sdl
+//
+// 142 5/02/14 3:53a Premkumara
+// [TAG] EIP151966
+// [Category] Improvement
+// [Description] Added the implementation for getting the BIOS build
+// year dynamically
+// from TimeStamp.h file and updated the Build year in copyright message
+// in both Setup and POST.
+// [Files] style.c,style.c,style.c,notify.c,minisetupext.c,CommonHelper
+// .c,
+// AmiTSEStr.uni,AMITSE.mak
+//
+// 141 5/02/14 3:00a Arunsb
+// IsHashingSupported function removed since TSE_HASH_PASSWORD can he
+// handled directly. Since implementation is there in binary only.
+//
+// 140 5/02/14 2:30a Arunsb
+// Reverted 137341 change
+//
+// 137 5/02/14 2:13a Arunsb
+// [TAG] EIP142690
+// [Category] Improvement
+// [Description] Create token OVERRIDE_CsmBBSBootOptionName for function
+// CsmBBSBootOptionName
+// [Files] Amitse.sdl and commonhelper.c
+//
+// 135 5/02/14 1:19a Arunsb
+// [TAG] EIP137341
+// [Category] Bug Fix
+// [Symptom:] The use of T_ACPI_OEM_ID and T_ACPI_OEM_TBL_ID when
+// generating the BGRT does not display blank characters.
+// [Root Cause] The macro CONVERT_TO_STRING() will consume the blank char,
+// so there's nothing different between the use of " AMI" and "AMI" when
+// showing in the ACPI table.
+// [Solution] The functions GetACPIOEMID and GetACPIOEMTableID should no
+// longer use T_ACPI_OEM_ID and T_ACPI_OEM_TBL_ID in token.h
+// But should use the tokens ACPI_OEM_ID_MAK and ACPI_OEM_TBL_ID_MAK from
+// AcpiOemElinks.h
+// [Files] CommonHelper.c
+//
+// 134 2/11/14 7:03p Arunsb
+// Updated in synch with Aptio5.
+// For EIPs 129750, 130997, 131969, 131739, 130529, 126746 and 148693
+//
+// 133 12/05/13 1:00a Premkumara
+// [TAG] EIP140123
+// [Category] Bug Fix
+// [Symptom:] Not able to close SecureError Msgbox using touch/mouse and
+// softkeyboard is displaying while displaying secureerror msgbox
+// [Root Cause] Mouse is not not initilalized when showing msg box during
+// ProceedToBoot and sofkbd is not cleared in this case also.
+// [Solution] CommonHelper.c
+// [Files] CommonHelper.c
+//
+// 132 12/04/13 3:40p Premkumara
+// [TAG] EIP136946
+// [Category] Improvement
+// [Description] Made gBootFileName shell boot compatable with x32, x64
+// and ARM for aptio4&5
+// [Files] CommonHelper.c
+//
+// 131 12/03/13 1:26p Premkumara
+// [TAG] EIP128526
+// [Category] Improvement
+// [Description] Disable ESC action in BBS popup menu
+// [Files] AMITSE.sdl, CommonHelper.c, TseLite/MinisetupExt.c
+//
+// 130 12/03/13 12:52p Premkumara
+// [TAG] EIP141986
+// [Category] Improvement
+// [Description] Make grayedout control focusable and this feature is
+// handled by token TSE_SETUP_GRAYOUT_SELECTABLE
+// [Files] AMITSE.sdl, CommonHelper.c, Frame.c, Label.c, Minisetupext.c,
+// Numeric.c, PopupPassword.c, PopupSel.c, PopupString. SubMenu.c
+//
+// 129 11/26/13 10:24a Premkumara
+// [TAG] EIP123431
+// [Category] Improvement
+// [Description] Need create one override token to TSE.
+// [Files] CommonHelper.c, AMITSE.sdl
+//
+// 128 11/26/13 1:30a Premkumara
+// [TAG] EIP118342
+// [Category] Improvement
+// [Description] Show meaningful error message when HDD is locked after
+// reached maximum unlocking attempt.
+// [Files] TseAdvanced.c, CommonHelper.c
+//
+// 127 8/06/13 3:58a Premkumara
+// [TAG] EIP130529
+// [Category] Bug Fix
+// [Severity] Important
+// [Symptom] When entered into setup with User mode and On pressing
+// "Restore User Defaults" SystemAccess variable is loading and the user
+// mode is changes to Admin mode so the controls are editable
+// [RootCause] LoadUserDefaultsSilently() function is loading defaults
+// for all types of variable
+// [Solution] Skipping loading SystemAccess variable while loading
+// defaults for user default variable.
+// [Files] TseAdvanced.c, AMITSE.sdl, CommonHelper.c
+//
+// 126 4/18/13 9:49a Arunsb
+// Wrapper function introduced to avoid build error in 2.0 build
+//
+// 125 3/29/13 12:15p Premkumara
+// [TAG] EIP97611
+// [Category] New Feature
+// [Description] PrintScreen Support in TSE
+// [Files] AMITSE.sdl, CommonHelper.c, HotKeyBin.h, AddBootOption.c,
+// Page.c, TseUefiHii.h, Uefi21Wapper.c
+//
+// 124 3/25/13 8:46a Premkumara
+// [TAG] EIP116315
+// [Category] Improvement
+// [Description] Display control prompt string for password control.
+// (for String on CHAP secret popup)
+// [Files] - AMITSE.sdl
+// - CommonHelper.c
+// - FakeToken.c
+// - AmiTSEStr.uni
+// - TseLite\PopupPassword.c
+// - uefi2.1\UefiWapper21.c
+// - uefi2.0\UefiWapper20.c
+// - uefi2.0\HiiCallback.c
+// - uefi2.0\hii.h
+// - uefi2.0\hii.c
+//
+// 123 3/16/13 3:58a Rajashakerg
+// [TAG] EIP107221
+// [Category] Improvement
+// [Description] Logo disappear after HDD password verified
+// [Files] CommonHelper.c, notify.c, minisetupext.c
+//
+// 122 3/12/13 6:56a Rajashakerg
+// [TAG] EIP105167
+// [Category] Improvement
+// [Description] Making the specify setup items departing from F2/F3
+// effect.
+// [Files] AMITSE.sdl, CommonHelper.c, callback.c, minisetupext.h,
+// PopupPassword.c, SubMenu.c, HiiCallback.c
+//
+// 121 2/20/13 11:42p Rajashakerg
+// [TAG] EIP104521
+// [Category] Improvement
+// [Description] Customer needs AMITSE modification to popup boxes so
+// highlighted choices can be seen via VT100 console redirection
+// [Files] AMITSE.sdl, CommonHelper.c, Ezport\stylecommon.c,
+// EzportPlus\stylecommon.c, Legacy\stylecommon.c
+//
+// 120 2/19/13 4:15a Premkumara
+// [TAG] EIP103540
+// [Category] Bug Fix
+// [Severity] Minor
+// [Symptom] Currently _BootBuildFVDevicePath function using FV
+// protocol alone not FV2 protocol. So applications loading from ffs are
+// not loading properly.
+// [RootCause] _BootBuildFVDevicePath() function used
+// gEfiFirmwareVolumeProtocolGuid only not gEfiFirmwareVolume2ProtocolGuid
+// [Solution] Used gEfiFirmwareVolume2ProtocolGuid based on
+// PISpecVersion
+// [Files] CommonHelper.c, Boot.c
+//
+// 119 2/11/13 6:10a Premkumara
+// [TAG] EIP112628
+// [Category] Bug Fix
+// [Severity] Important
+// [Symptom] (JP000E)SETUP_GO_TO_EXIT_PAGE_ON_EXIT_KEY does not work on
+// 4.6.2_TSE_2_15_1234
+// [RootCause] The Exit FormID value will change if any form is
+// generated before Exit page
+// [Solution] Handled Exit FormID from Binary and handling Exit FormID
+// from binary
+// [Files] Ezport.c, Ezport.sdl, Legacy.c, Legacy.sdl, EzportPlus.c,
+// EzportPlus.sdl
+//
+// 118 2/10/13 11:51p Rajashakerg
+// [TAG] EIP104521
+// [Category] Improvement
+// [Description] Customer needs AMITSE modification to popup boxes so
+// highlighted choices can be seen via VT100 console redirection
+// [Files] AMITSE.sdl, CommonHelper.c, Ezport\stylecommon.c,
+// EzportPlus\stylecommon.c, Legacy\stylecommon.c
+//
+// 117 2/06/13 9:07a Arunsb
+// Checking in properly. Instead check in Alaska previously made in PBA.
+//
+// 117 1/31/13 12:49p Arunsb
+// [TAG] EIP109382
+// [Category] Bug Fix
+// [Severity] Important
+// [Symptom] Boot Device name incorrect when load default
+// [RootCause] Legacy offset in gbootdata corrupted so names displayed
+// improperly.
+// [Solution] Legacy offsets re-calculated properly
+// [Files] CommonHelper.c, BootOnly\bbs.c and callback.c
+//
+// 116 12/05/12 5:29a Rajashakerg
+// [TAG] EIP103381
+// [Category] Improvement
+// [Description] adopting SDL to control timeout spec
+// [Files] AMITSE.sdl, CommonHelper.c, protocol.c
+//
+// 115 10/18/12 5:31a Arunsb
+// Updated for 2.16.1235 QA submission
+//
+// 43 10/10/12 12:23p Arunsb
+// Synched the source for v2.16.1232 backup with Aptio
+//
+// 113 9/21/12 12:30p Premkumara
+// [TAG] EIP99022
+// [Category] Improvement
+// [Description] Tokenize the feature of flushing keyboard after every
+// key read
+// [Files] AMITSE.sdl, CommonHelper.c, TseAdvanced.c, Action.c
+//
+// 112 9/17/12 5:59a Rajashakerg
+// Updated EIP changes for 2.16 release.
+//
+// 110 9/12/12 5:21a Rajashakerg
+// [TAG] EIP94205
+// [Category] Improvement
+// [Description] OEM needs Token to assign the display mode of SHELL
+// [Files] AMITSE.sdl, boot.c, CommonHelper.c
+//
+// 109 9/10/12 5:03a Rajashakerg
+// [TAG] EIP93881 and 93873
+// [Category] Improvement
+// [Description] need keep system password after Load default and
+// Password saved into NVRAM immediately(not buffer) while it is installed
+// in TSE
+// [Files] frame.c, callback.c, AMITSE.sdl, CommonHelper.c
+//
+// 108 9/08/12 1:22p Arunsb
+// [TAG] EIP100558
+// [Category] New Feature
+// [Description] Provide solution to display the small logo in (0,0)
+// graphics position
+// [Files] AMITSE.sdl, commonhelper.c, postmgmt.c and boot.c
+//
+// 107 9/08/12 11:44a Arunsb
+// [TAG] EIP99059
+// [Category] Bug Fix
+// [Severity] Normal
+// [Symptom] _ReInitializeSetupdataPointers function crashes in Hii.C
+// when DyanmicPage processed with PageIdListSize =0
+// [RootCause] Hii pack notification installed for
+// SETUP_RUNTIME_IFR_PROCESSING is disabled also
+// [Solution] Hii pack notification installed only if
+// SETUP_RUNTIME_IFR_PROCESSING is enabled
+// [Files] commonhelper.c and Hii.c
+//
+// 106 9/06/12 1:06a Rajashakerg
+// [TAG] EIP91410
+// [Category] Improvement
+// [Description] TSE_MULTILINE_CONTROLS=1 makes one of option with max
+// string looks not good.
+// [Files] PopupSel.c, COmmonHelper.c, AMITSE.sdl
+//
+// 105 9/03/12 3:07a Premkumara
+// [TAG] EIP 96246
+// [Category] Improvement
+// [Description] Improvement of a boots override when firmware has a
+// BootNext variable
+// [Files] AMITSE.sdl, CommonHelper.c, FakeToken.c, AmiTSEStr.uni,
+// TseAdvanced.c
+//
+// 104 8/29/12 4:09p Arunsb
+// [TAG] EIP94702
+// [Description] Support for Native Resolution in POST/BOOT
+// [Files] amitse.sdl, commonhelper.c, commonoem.c, boot.c, logo.c,
+// notify.c, postmgmt.c, ezport/stylecommon.c,
+// ezportplus/stylecommon.c,legacy/stylecommon.c
+// tselite\minisetupext.c
+//
+// 103 8/29/12 12:35p Arunsb
+// [TAG] EIP93521
+// [Category] New Feature
+// [Description] Support of ESRT
+// [Files] amitse.sdl, bootflow.c, bootflow.h, commonhelper.c and
+// dobmpmgr.c
+//
+// 102 8/29/12 8:33a Premkumara
+// [TAG] EIP 91364
+// [Category] Improvement
+// [Description] Token to disable the Cursor of TSE Password Dialog
+// [Files] AMITSE.sdl, CommonHelper.c, Postmgmtext.c, PopupPassword.c,
+// PopupString.c
+//
+// 101 8/27/12 6:18a Premkumara
+// [TAG] EIP 94616
+// [Category] Improvement
+// [Description] TSE should not wait for key if fast boot is in progress
+// [Files] AMITSE.sdl, CommonHelper.c, Notify.c, Protocol.c
+//
+// 100 8/23/12 6:31p Arunsb
+//
+// 99 8/21/12 7:55p Arunsb
+// [TAG] EIP93521
+// [Category] New Feature
+// [Description] Support of ESRT
+// [Files] amitse.sdl, bootflow.c, bootflow.h, commonhelper.c and
+// dobmpmgr.c
+//
+// 98 6/28/12 8:19p Arunsb
+// [TAG] EIP93524
+// [Category] Improvement
+// [Description] Invalidate the BGRT table when boot device launched
+// from BBS popup or from shell or launched as second boot device
+// [Files] commonhelper.c, boot.c and minisetup.c
+//
+// 97 5/29/12 3:15a Arunsb
+// [TAG] EIP91109
+// [Category] Improvement
+// [Description] Sync the Aptio IV source for AptioV
+//
+// 96 5/28/12 12:30p Premkumara
+// [TAG] EIP67049 & 90224
+// [Category] New Feature
+// [Description] Support mouse drag operation in frame and list box
+// [Files] CommonHelper.c, Frame.c, ListBox.c, Minisetupext.h
+//
+// 95 5/28/12 12:00p Premkumara
+// [TAG] EIP89272
+// [Category] Improvement
+// [Description] Change softkbd layout for numeric control
+// [Files] CommonHelper.c, Mouse.c, Minisetup.h, C, Numeric.c
+//
+// 94 5/28/12 11:24a Premkumara
+// [TAG] EIP88912
+// [Category] Improvement
+// [Description] On password window display the softkbd with only with
+// valid key's
+// [Files] CommonHelper.c, Postmgmtext.c, Mouse.c, PopupPassword.c
+//
+// 93 5/28/12 6:08a Rajashakerg
+// [TAG] EIP89377
+// [Category] Improvement
+// [Description] Support to LegacyBootFailHook() in TSE.
+// [Files] AMITSE.sdl, CommonHelper.c, boot.c
+//
+// 92 5/28/12 5:35a Premkumara
+// [TAG] EIP75236
+// [Category] Improvement
+// [Description] Add the support to control the GOP dependency in TSE
+// notification.
+// [Files] AMITSE.sdl, CommonHelper.c, Notify.c, Minisetup.h,
+// Minisetup.sdl, protocol.c, FormBrowser.c, FormBrowser2.c
+//
+// 91 5/28/12 2:49a Arunsb
+// [TAG] EIP88447
+// [Category] New Feature
+// [Description] Disable UEFI boot option in BIOS setup should not load
+// the default image \EFI\BOOT\BOOT{machine type short-name}.EFI
+// [Files] Amitse.sdl, commonhelper.c and bootflow.c
+//
+// 90 5/09/12 6:31p Premkumara
+// EIP-83703 Updated CleareNumericShiftstate function
+//
+// 89 5/09/12 5:09p Premkumara
+// Removed #pragma optimize( "", off ) line
+//
+// 88 5/09/12 5:06p Premkumara
+// [TAG] EIP83703
+// [Category] Bug Fix
+// [Severity] Important
+// [Symptom] TSE hangs while clicking on the "link training time out"
+// value [this is happening while trying the specified steps immediate
+// after bios flash
+// [RootCause] When invalid range input is provided for numeric control
+// ESC sequence is not provided if it is handled by the mouse.
+// [Solution] Provided the proper ESC sequence to the control such that
+// it close the Invalid Range Fail MsgBox when handled with the mouse and
+// key.
+// [Files] Numeric.c, CommonHelper.c
+//
+// 87 4/27/12 9:23a Arunsb
+// [TAG] EIP88895
+// [Category] Improvement
+// [Description] Changing GetUefiSpecVersion as board module hook and
+// also controlling callback spec version from TSE
+// [Files] Amitse.sdl, amitse.mak and commonhelper.c
+//
+// 86 4/27/12 1:40a Premkumara
+// [TAG] EIP88527
+// [Category] Improvement
+// [Description] Implement BGRT logo calculation based on Windows-8
+// [Files] CommonHelper.c, Logo.c
+//
+// 85 4/05/12 7:09a Rajashakerg
+// [TAG] EIP87122,85508,86449
+// [Category] Improvement
+// [Description] Numeric in old style, softkbd issues
+// [Files] CommonHelper.c, Mouse.c, Date.c, edit.c, frame.c,
+// minisetupext.h, numeric.c, numeric.h, PopupEdit.c, PopupEdit.h, time.c
+//
+// 84 4/04/12 12:24a Rajashakerg
+// [TAG] EIP86253
+// [Category] Bug Fix
+// [Severity] Normal
+// [Symptom] Mouse and SoftKbd does not work after displaying "No option
+// to boot to" in POST
+// [RootCause] Mouse timer cleared once after displaying the "No option
+// to boot to" in POST
+// [Solution] Mouse timer cleared only when its going to boot.
+// [Files] CommonHelper.c, commonoem.c, minisetupext.c, protocol.c
+//
+// 83 2/04/12 9:08a Premkumara
+// Moved DrawOEMImage with some modification from binary to source
+//
+// 82 2/02/12 12:39a Premkumara
+// [TAG] EIP75136
+// [Category] New Feature
+// [Description] Generic support for logos in RomHoles
+// [Files] CommomHelper.c, AMITSE.sdl, AMITSE.mak, LogoLib.h,
+//
+// 81 2/01/12 4:55a Rajashakerg
+// [TAG] EIP77256
+// [Category] Improvement
+// [Description] Provide the Support to override the control Condition
+// checking() generically. And provide customization to supress the
+// controls with Security GUIDed opcode.
+// [Files] AMITSE.sdl, CommonHelper.c, CtrlCond.c and CtrlCond.h
+//
+// 80 1/31/12 1:17p Premkumara
+// [TAG] EIP75136
+// [Category] New Feature
+// [Description] Generic support for logos in RomHoles
+// [Files] CommomHelper.c, AMITSE.sdl, AMITSE.mak, LogoLib.h,
+// Postmgmt.c, AMILogo.h
+//
+// 79 1/31/12 6:08a Arunsb
+// [TAG] EIP81830
+// [Category] Improvement
+// [Description] Support to uninstall the BGRT on legacy boot.
+// [Files] Commonhelper.c, postmgmt.c and boot.c
+//
+// 78 1/27/12 12:03a Rajashakerg
+// [TAG] EIP81623
+// [Category] Bug Fix
+// [Severity] Normal
+// [Symptom] IDE security login dialog was not displayed properly and
+// observed password dialog label name displayed in text field
+// [RootCause] IDE security module uses _ReportInBox() to draw the
+// password text label which draws the text background.
+// [Solution] Provided the Gtse background color to the text label
+// field.
+// [Files] CommonHelper.c
+//
+// 77 1/25/12 7:59a Rajashakerg
+// [TAG] EIP81617
+// [Category] Improvement
+// [Description] Avoiding memory leaks in TSE
+// [Files] hiistring21.c, CommonHelper.c, notify.c
+//
+// 76 1/18/12 7:20a Premkumara
+// [TAG] EIP79959
+// [Category] Bug Fix
+// [Severity] Normal
+// [Symptom] Scree is not cleared properly while showing ""Secure boot
+// violation"" warning message
+// [RootCause] When any boot option fails then screen is not cleared
+// properly before display Violatioin MessageBox in UefiBootFailHook()
+// [Solution] When any boot option fails then clear screen before
+// display Violatioin MessageBox to avoid screen corruption in
+// UefiBootFailHook()
+// [Files] CommonHelper.c
+//
+// 75 1/18/12 4:54a Rajashakerg
+// [TAG] EIP79962
+// [Category] Bug Fix
+// [Severity] Normal
+// [Symptom] Mouse pointer corruption in GTSE
+// [RootCause] For GTSE, the cordanites comparison logic went wrong for
+// stopping the mouse pointer when it is present while
+// updating the screen buffer.
+// [Solution] Corrected the logic to stop the mouse when mouse pointer
+// is present on screen we are updating.
+// [Files] buffer.c, CommonHelper.c, Mouse.c
+//
+// 74 12/28/11 4:12a Arunsb
+// [TAG] EIP75021
+// [Category] Bug Fix
+// [Severity] Important
+// [Symptom] [TSE] In Date and Time item Press Shift+Tab key can't move
+// previous field.
+// [RootCause] Shift states not checked properly
+// [Solution] Shift state bits are cleared for every combinations and
+// compared at last
+// [Files] commonoem.c and commonhelper.c
+//
+// 73 12/08/11 9:03p Arunsb
+// Wrapper function added for GetFormSetTitleAndHelpWrapper fnc to resolve
+// the build error in 2.0
+//
+// 72 12/08/11 12:29p Rajashakerg
+// Updated the file to overcome build errors when build for x32 mode.
+//
+// 71 12/08/11 9:34a Rajashakerg
+// [TAG] EIP77108
+// [Category] Improvement
+// [Description] Updated the file to aviod build errors when build for
+// UEFI 20
+//
+// 70 12/08/11 12:04a Arunsb
+// [TAG] EIP75021
+// [Category] Bug Fix
+// [Severity] Important
+// [Symptom] In Date and Time item Press Shift+Tab key can't move
+// previous field
+// [RootCause] Combination of keys not handled properly
+// [Solution] Combination of keys handled properly
+// [Files] commonhelper.c
+//
+// 69 12/07/11 9:29a Rajashakerg
+// [TAG] EIP77108
+// [Category] Improvement
+// [Description] Make ProcessBrowserActionRequest as board module hook
+// [Files] AMITSE.sdl, CommonHelper.c, HiiCallback.c
+//
+// 68 12/01/11 5:34a Rajashakerg
+// [TAG] EIP74963
+// [Category] Improvement
+// [Description] MAX_MSGBOX_WIDTH cannot be overridden
+// [Files] AMITSE.sdl, CommonHelper.c, minisetup.h, legacy.c,
+// MessageBox.c, MessageBox.h, FormBrowser.c
+//
+// 67 11/22/11 1:09a Premkumara
+// Updated GetPasswordReportInboxcolor() with missing #endif
+//
+// 66 11/22/11 12:08a Premkumara
+// [TAG] EIP70175
+// [Category] Improvement
+// [Description] Color of Password Validation for TSE and GTSE
+// [Files] CommonHelper.c, postmgmtext.c
+//
+// 65 11/21/11 10:31a Premkumara
+// [TAG] EIP72610
+// [Category] Improvement
+// [Description] Moving TSE_MULTILINE_CONTROLS to Binary
+// [Files] AMITSE-CommonHelper.c, AMITSE.sdl,
+// TSELITE-UefiAction.c, TseLite.sdl, Time.h, Text.c,
+// SubMenu.c, ResetButton.c, PopupString.c, PopupSel.h, PopupSel.c,
+// PopupPassword.c, OrderListBox.c, Numeric.c, Label.c, Frame.c, Edit.c,
+// Date.h, Date.c,
+// LEGACY-Legacy.c,
+// BOOTONLY- Minisetup.h
+//
+// 64 11/21/11 9:42a Rajashakerg
+// [TAG] EIP62763
+// [Description] For avoiding build errors when softkbd present and
+// MINISETUP_MOUSE_SUPPORT is disabled.
+//
+// 63 11/21/11 5:44a Rajashakerg
+// [TAG] EIP74591
+// [Category] Improvement
+// [Description] Make MainSetupLoop as board module hook
+// [Files] AMITSE.sdl, CommonHelper.c, protocol.c, minisetup.h,
+// FormBrowser.c, FormBrowser2.
+//
+// 62 11/20/11 8:09a Premkumara
+// [TAG] EIP70175
+// [Category] Improvement
+// [Description] Color of PopupPassword Window to validate password in
+// GTSE style
+// [Files] CommonHelper.c, postmgmtext.c, minisetup.h
+//
+// 61 11/20/11 6:48a Rajashakerg
+// [TAG] EIP62763
+// [Category] Improvement
+// [Description] Utilize the Improvements done from mouse driver in
+// AMITSE
+// [Files] HookAnchor.h, TseCommon.h, AMITSE.sdl, CommonHelper.c,
+// commonoem.c, commonoem.h, buffer.c, globals.c, HookAnchor.c,
+// minisetup.h, notify.c, postmgmt.c, protocol.c, ezport.c, stylecommon.c,
+// Mouse.c, Action.c, Date.c, frame.c, MessageBox.c, minisetupext.c,
+// minisetupext.h, numeric.c, numeric.h, page.c, PopupEdit.c, PopupEdit.h,
+// PopupPassword.c, postmgmtext.c, time.c.
+//
+// 60 11/19/11 9:22a Premkumara
+// [TAG] EIP70175
+// [Category] Improvement
+// [Description] Color of PopupPassword Window to validate password in
+// GTSE style
+// [Files] CommonHelper.c, postmgmtext.c, minisetup.h
+//
+// 59 11/14/11 6:52p Blaines
+// [TAG] - EIP 75486
+// [Category]- Function Request
+// [Synopsis]- Support grayout condition for readonly controls.
+// [Description] - Display readonly controls as grayout, non-selectable.
+// [Files]
+// AMITSE.sdl, CommonHelper.c, Minisetupext.h, stylecommon.c, Legacy.c,
+// date.c, edit.c, label.c, memo.c, menu.c,, numeric.c, ordlistbox.c,
+// PopupPassword.c,
+// PopupSel.c, PopupString.c, ResetButton.c, SubMenu.c, Text.c, Time.c,
+// UefiAction.c, ctrlcond.c,
+//
+// 58 11/13/11 12:17p Arunsb
+// [TAG] EIP70421
+// [Category] New Feature
+// [Description] Support for driver order in TSE
+// [Files] AMITSE.SDL, CommonHelper.c, setup.ini, uefisetup.ini,
+// boot.c,
+// minisetup.h, bbs.c, special.c, special.h, tseadvanced.c,
+// addbootoption.c,
+// callback.c, minisetupext.c, minisetupext.h, popupsel.c, popupsel.h,
+// TseLitehelper.c, variable.c, Uefi21Wapper.c, AMIVfr.h, boot.h,
+// TseElink.h, variable.h,
+// setup.h, Boot.vfr and Setup.uni
+//
+// 57 11/09/11 9:57a Premkumara
+// [TAG] EIP74375
+// [Category] Improvement
+// [Description] Control STYLE_HELP_AREA_SCROLLBAR from binary
+// [Files] CommonHelper.c, AMITSE.sdl, StyleHook.h,
+// Legacy\StyleCommon.c, Legacy.sdl,
+// EzportPlus\StyleCommon.c, EzportPlus.sdl, Ezport\StyleCommon.c,
+// Ezport.sdl
+//
+// 56 11/01/11 4:19a Arunsb
+// [Category] Improvement
+// [Description] To change the single click behaviour as like double
+// click
+// [Files] amitse.sdl, commonhelper.c, commonoem.c and listbox.c
+//
+// 55 10/20/11 12:23p Blaines
+// Correct the comments.
+//
+// 54 10/20/11 11:44a Blaines
+// [TAG] EIP 72333
+// [Category] Sighting
+// [Symptom] Some SAS controller card HII Screen Titles are displaying
+// the wrong information
+// [RootCause] Menu tab always displays the root page title when
+// navigating submenu pages. TSE did not support the display of Formset
+// Help.
+//
+// [Solution] Display Formset Help for Dynamic page, Display page title of
+// submenu pages in the menu tab.
+//
+// [Files Changed]
+// - AMITSE.sdl, CommonHelper.c, special.c, Menu.c, minisetupext.h,
+// TseUefiHii.h, Uefi21Wapper.c
+//
+// 53 10/10/11 1:43a Arunsb
+// [TAG] EIP66976
+// [Category] Improvement
+// [Description] Provision to change the Numeric string format
+// [Files] Amitse.sdl, commonhelper.c and numeric.c
+//
+// 52 9/04/11 3:57a Arunsb
+// [TAG] EIP65320
+// [Category] Improvement
+// [Description] Board module hook for LoadImage failure.
+// Review comment addressed.
+// [Files] Commonhelper.c, amitsestr.uni, boot.c and faketokens.c
+//
+// 51 7/20/11 3:23p Rajashakerg
+// Removed the unwanted function for mouse hot click operation
+//
+// 48 7/01/11 4:23a Rajashakerg
+// Updated to avoid Build errors when build with binaries alone
+//
+// 47 6/30/11 11:52a Arunsb
+// EDKVersion_1_05_RetrieveData wrapper function added to return the
+// EDK_1_05_RETRIEVE_DATA token value.
+//
+// 46 6/30/11 4:00a Arunsb
+// [TAG] EIP57661
+// [Category] New Feature
+// [Description] Boot manager algorithm for interaction with Driver
+// Health protocol.
+// Wrapper functions added.
+// Added board module hook to perform rebooting the
+// system.
+// [Files] amitse.cif, amitse.sdl, faketokens.c, amitsestr.uni,
+// commonhelper.c, uefisetup.ini, tsedrvhealth.h,
+// amivfr.h, minisetupbin.mak,
+// hiistring21.c, hiistring20.c, tseadvanced.c, special.c,
+// special.h, boot.h, minisetup.h,
+// uefi20wapper.c, formbrowser2.c, hii.c, parse.c and
+// uefi21wapper.c.
+//
+// 45 6/29/11 4:35p Rajashakerg
+// Updated for Help frame scroll changes
+//
+// 44 6/29/11 2:01p Arunsb
+// gHotKeyBootOption declaration added and the same is removed in
+// commonoem.c file.
+//
+// 43 6/29/11 1:32p Rajashakerg
+// [TAG] EIP47086
+// [Category] New Feature
+// [Description] Right clicking from the Main page is not exiting from
+// BIOS setup.
+//
+// [Files] minisetup.h, Ezport\style.h,Ezport\EzportBin.sdl,
+// Ezport\EzportBin.mak, Ezport\ezport.c, Ezport\EzportBin.cif,
+// EzportPlus\style.h, EzportPlus\EzportPlusBin.sdl, EzportPlusBin.mak,
+// EzportPlus\EzportPlusBin.cif, EzportPlus\ezportplus.c, Legacy\style.h,
+// Legacy\EzportPlusBin.sdl, Legacy\LegacyBin.mak, Legacy\LegacyBin.cif,
+// Legacy\legacy.c, TseLiteBin.sdl, TseLite.cif, Memo.c, frame.c,
+// application.h, application.c, commonoem.h, CommonHelper.c
+//
+// 42 6/29/11 5:50a Arunsb
+// [TAG] EIP 62631
+// [Category] New Feature
+// [Description] Hot key boot option support in TSE as per UEFI spec.
+// section 3.1.6.
+// CheckAdvShiftState function moved from commonoem.c to
+// here.
+// LaunchHotKeyBootOption function added to launch hot key
+// boot device.
+// [Files] AMITSE.sdl, bootflow.c, bootflow.h, CommonHelper.c,
+// commonoem.c, commonoem.h, boot.c,
+// hiistring20.c, hiistring21.c and notify.c.
+//
+// 41 6/23/11 3:39p Rajashakerg
+// [TAG] EIP55762, 58925, 59971
+// [Category] New Feature
+// [Description] Support REF2,REF3 and REF4 in AMITSE
+// Support direct form navigation path
+// Improper layout of controls in the root page when Dynamic pages are
+// added using the Legacy Setup Style
+// [Files] setupdata.h, CommonHelper.c, AMITSE.sdl, Legacy\Legacy.c,
+// Legacy\style.h, Legacy\style.h, frame.c, minisetupext.c,
+// minisetupext.h, numeric.c, page.c Popupstring.c, Hii.c,
+// Uefi21Wrapper.c, Parse.c Hii.c
+//
+// 40 6/23/11 5:30a Rajashakerg
+// [TAG] EIP63073
+// [Category] New Feature
+// [Description] Source modules in TSE should get the version details
+// from binary in run time not at build time
+// [Files] CommonHelper.c, minisetupext.c, notify.c, Ezport\style.c,
+// EzportPlus\style.c, Legacy\style.c
+//
+// 37 6/20/11 11:41a Rajashakerg
+// [TAG] EIP59417
+// [Category] New Feature
+// [Description] Spport LOAD_OPTION_HIDDEN option in TSE
+// [Files] boot.h, AMITSE.sdl, CommonHelper.c, bbs.c, boot.c,
+// minisetup.h, special.c, callback.c
+//
+// 36 6/19/11 4:13p Arunsb
+// [TAG] EIP58712
+// [Category] New Feature
+// [Description] To disable the BIOS Signon Message and TSE copyright
+// version in post screen.
+// [Files] amitse.sdl, amitse.mak, commonhelper.c and notify.c
+//
+// 35 6/13/11 12:37p Rajashakerg
+// [TAG] EIP60910
+// [Category] New Feature
+// [Description] PNG image support in TSE.
+// [Files] LogoLib.h, AMITSE.sdl, CommonHelper.c, logo.c, png.c,
+// png.h, pnguncmp.c, TseAdvanced.cif
+//
+// 34 6/04/11 1:54p Arunsb
+// [TAG] EIP58954
+// [Category] New Feature
+// [Description] Wrapper function added for InvalidateStatusInBgrt
+// function.
+// [Files] Postmgmt.c, boot.c, logo.c commonoem.c and
+// commonhelper.c
+//
+// 33 5/29/11 12:02p Arunsb
+// [TAG] EIP58954
+// [Category] New Feature
+// [Description] Quiet boot logo's only added for BGRT. BGRT status
+// field cleared if any changes happened in screen other than displaying
+// the image.
+// [Files] Postmgmt.c, boot.c, logo.c commonoem.c and
+// commonhelper.c
+//
+// 32 5/13/11 12:42p Arunsb
+// [TAG] EIP58954
+// [Category] New Feature
+// [Description] Contributing BGRT table to ACPI table. Image blt formed
+// with the coordinates drawn onto the screen.
+// [Files] Postmgmt.c, commonoem.c,logo.c and commonhelper.c
+//
+// 31 5/04/11 5:03p Arunsb
+// [TAG] EIP58954
+// [Category] New Feature
+// [Description] Contributing BGRT table to ACPI table.
+// CONTRIB_BGRT_TABLE_TO_ACPI token added. Wrapper function
+// ContribBGRTTableToAcpi added.
+// [Files] Postmgmt.c, commonoem.c,logo.c and commonhelper.c
+//
+// 30 4/29/11 5:03p Arunsb
+// For 2.13 public patch release signon message hiding feature is omitted
+//
+// 29 4/29/11 4:49p Madhans
+// [TAG] EIP59177
+// [Category] Improvement
+// [Description] Support for JPEG with RSI markers. Fix to support logo
+// size that bigger then Screen resolution.
+// [Files] Logo.c
+// Jpeg6.c
+// commonHelper.c
+//
+// 28 4/23/11 4:56p Arunsb
+// [TAG] EIP58712
+// [Category] New Feature
+// [Description] To disable the BIOS Signon Message and TSE copyright
+// version in post screen.
+// [Files] amitse.sdl, amitse.mak, commonhelper.c and notify.c
+//
+// 27 4/23/11 3:13p Arunsb
+// [TAG] EIP58954
+// [Category] New Feature
+// [Description] Contributing BGRT table to ACPI table.
+// CONTRIB_BGRT_TABLE_TO_ACPI token added.
+// [Files] Postmgmt.c, commonoem.c and commonhelper.c
+//
+// 26 4/22/11 5:34p Arunsb
+// [TAG] EIP58009
+// [Category] Bug Fix
+// [RootCause] Certain controls not compatible with UEFI 2.3 version.
+// [Solution] The UEFI 2.3 features will be added only if core supports
+// it.
+// [Files] Hiicallback.c and commonhelper.c
+//
+// 25 4/04/11 10:40a Arunsb
+// Small logo cleared properly when it is placed at the top most
+//
+// 24 4/04/11 10:31a Arunsb
+// Added GetGraphicsBitMapFromFV function.
+//
+// 23 3/28/11 11:39p Madhans
+// [TAG] EIP50878
+// [Category] Improvement
+// [Description] Support to move the Control With Boot Order Change.
+// [Files] AMITSE.sdl
+// commonoem.c
+// minisetup.h
+// popupsel.c
+//
+// 22 3/28/11 9:06p Madhans
+// [TAG] EIP41744
+// [Category] Improvement
+// [Description] SoftKeyBoard Support in TSE. and Support to Work with
+// new mouse driver(Label 07).
+// [Files] HookAnchor.h
+// AMITSE.sdl
+// CommonHelper.c
+// commonoem.c
+// commonoem.h
+// HookList.c
+// HookAnchor.c
+// Mouse.c
+// minisetupext.c
+// postmgmtext.c
+// minisetupext.h
+// PopupPassword.c
+// PopupString.c
+// TseLiteCommon.c
+//
+// 21 3/23/11 8:37p Blaines
+// [TAG] - EIP 23601
+// [Category]- Enhancement
+// [Symptom]- Add support for OEM special controls.
+// [Files] - AmiTse.sdl, CommonHelper.c, Setup.ini, UefiSetup.ini,
+// AmiVfr.h, minisetup.h, minisetup.sdl, variable.c, special.c
+//
+// 20 3/15/11 5:12a Rajashakerg
+// [TAG] EIP51671
+// [Category] New Feature
+// [Description] Boot overide menu devices are not disable
+// [Files] boot.c, minisetup.h, special.c, minisetupext.c, AMITSE.sdl,
+// boot.h, CommonHelper.c
+//
+// 19 3/07/11 4:54p Arunsb
+// [TAG] EIP53106
+// [Category] Bug Fix
+// [Severity] Minor
+// [Symptom] Invalid string appears in the boot order for Network
+// related devices.
+// [RootCause] Handle not obtained for network related devices.
+// [Solution] Disabled option is checked only if
+// GROUP_BOOT_OPTIONS_BY_TAG token is enabled.
+// [Files] bbs.c and commonhelper.c
+//
+// 18 2/10/11 12:31p Blaines
+// [TAG] - EIP 53146
+// [Category]- New Feature
+// [Description] -Add the support to Move the Dynamic IFR Pages under
+// subpages. It should be customizable to move around.
+//
+// 17 12/28/10 6:01p Mallikarjunanv
+// [TAG] EIP41615
+// [Category] New Feature
+// [Description] Added the file browser support for the Add boot option
+// reated controls
+// [Files] AmiVfr.h, AmiTse.sdl, AmiTseStr.uni, CommonHelper.c,
+// Faketokens.c, TseElinks.h, EdkHelper.h, minisetup.h, TseAdvanced.c,
+// AddBootOption.c
+//
+// 16 10/06/10 5:58p Madhans
+// [TAG] - EIP 45620
+// [Category]- Enhancment
+// [Severity]- Mordarate
+// [Symptom]- TSE with TSE_CONTINUE_BOOT_NOW_ON_FAIL ON Not allows to boot
+// to USB group of devices with customized BDS.
+// [RootCause] - BBSTable does not contain the DeviceType called USB. Only
+// in EFI Logical group is created in EFI variables.
+// TSE was checking the DeviceType to set the priorities.
+// [Solution]- TSE is changed to not check for DeviceType in BBSTable. But
+// set the priorities based on LegacyDevOrder.
+// [Files] - bbs.c commonhelper.c minisetup.h
+//
+// 15 10/05/10 5:37p Madhans
+// [TAG] - EIP 45299
+// [Category]- Enhancment
+// [Severity]- Minor
+// [Symptom]- TSE by default saves the Disbaled BBS devices device path in
+// NVRAM Varaiable "DisabledDevs" Variable. In Next boots it depend on
+// this variable to consider the device as disabled inaddtion to
+// LegacyDevOrder.
+// Some BDS customized projects don't want this.
+// [Solution]- TSE_SAVE_DISABLED_BBS_DEVICEPATH SDL token created to
+// control this option. Bydefault It is Enabled.
+// [Files] - callback.c bbs.c commonhelper.c minisetup.h AMITSE.sdl
+//
+// 14 9/20/10 6:46p Madhans
+// [TAG] EIP44542
+// [Category] BUILD ISSUE FIX
+// [Symptom] Build issues with TSE label (INT)4.6.2_TSE_2_10_1207_TEST
+// when IdeSecurity and FastBoot modules added to the project
+// [RootCause] -
+// [Solution] Build issues resolved
+// [Files] CommonHelper.c, Tsecommon.h, Hiilib.h, Boot.h, minisetup.h,
+// bbs.c, special.c, Bds.c TseLitehelp
+//
+// 13 9/16/10 8:39p Madhans
+// Updated for TSE 2.10. Refer changelog.log for more deatils.
+//
+// 35 9/08/10 6:57a Mallikarjunanv
+// EIP-42080: TSE updates with respect to Fast Boot Support
+//
+// 34 8/27/10 4:54a Mallikarjunanv
+// EIP-39334: support to build TSE without the CSM module support
+//
+// 33 8/27/10 4:43a Mallikarjunanv
+// EIP-39764: Setup password non-case sensitive support and password
+// encode support updated
+//
+// 32 8/19/10 12:50p Mallikarjunanv
+// EIP-42520: Updated to get the BBS group type from the Board module in
+// case of a non standard type.
+//
+// 31 8/13/10 11:03a Mallikarjunanv
+// EIP-39670: handled the function CheckIsAllowedPasswordChar() with
+// override token
+//
+// 30 7/28/10 4:47a Mallikarjunanv
+// EIP-29951: TSE Device Path Name support updated
+//
+// 29 6/08/10 4:59p Blaines
+// Add SDL tokens to overrie the following functions:
+//
+// TseFramePwdCallbackIdePasswordUpdate
+// TsePopupPwdAuthenticateIDEPwd
+// TsePopupPwdUpdateIDEPwd
+// IDEPasswordGetName
+// IDEPasswordAuthenticate
+// IDEPasswordUpdate
+// IDEPasswordGetDataPtr
+// IDEPasswordGetLocked
+// IDEPasswordCheck
+// IDEPasswordFreezeDevices
+// UnlockHDD
+// SetHDDPassword
+// IDEUpdateConfig
+//
+// 28 4/07/10 6:23p Madhans
+// Post Screen Scroll Area Support.TSE_POSTSCREEN_SCROLL_AREA Sdl token
+// Controls it.
+//
+// 27 4/02/10 4:46p Madhans
+// To getride of OEM header files from TSE sources..
+//
+// 26 3/26/10 6:08p Madhans
+// Eip 35562 To create Boot Option variables
+//
+// 25 3/23/10 5:03p Blaines
+// Preseve the order of disabled BBS boot devices.
+//
+// 24 3/19/10 2:39p Madhans
+// Support to Load Defaults from NVRAM Defaults.
+//
+// 23 2/19/10 7:59a Mallikarjunanv
+// updated the year in copyright message
+//
+// 22 2/15/10 10:01p Madhans
+// Wide Glyph support for uefi 2.1
+//
+// 21 2/04/10 11:07p Madhans
+// Mouse Support Code optimized
+//
+// 20 1/29/10 5:15p Madhans
+// To avoid build error of CSM support is off
+//
+// 19 1/25/10 1:35a Mallikarjunanv
+// eip-24791: changed the function BBSBuildName as a board module hook
+//
+// 18 1/09/10 2:32a Mallikarjunanv
+// Updated TSE2.01 Release sources with coding standards
+//
+// 17 1/04/10 9:49a Mallikarjunanv
+// Added support for reserved boot option names and added condition not to
+// accept empty boot option names
+//
+// 16 12/18/09 2:23p Madhans
+// To avoid compiler issues.
+//
+// 15 10/28/09 5:34p Madhans
+// 1. Support to Add the String from other modules to TSE.
+// 2. Clean of GIF and Image code Control them with minimal code from TSE
+// binary.
+//
+//
+// 14 9/24/09 9:42a Sudhirv
+// EIP-24971: moved the dependency for TSE_CONTINUE_BOOT_NOW_ON_FAIL to
+// Tse Binary
+//
+// 13 9/17/09 9:03a Sudhirv
+// Remove Load Driver Option from TSE 2.x as it will be handled from Core
+//
+// 12 9/16/09 6:14p Madhans
+// EIP 25416 : Support have 1/10 sec Timeout
+//
+// 11 9/15/09 9:14a Sudhirv
+// updated ADD DEL boot opions handling and added empty functions to
+// support SETUP_OEM_SPECIAL_CONTROL_SUPPORT
+//
+// 10 8/20/09 6:41p Madhans
+// Fix for the Mouse Click crash issue.
+//
+// 9 8/17/09 9:00a Mallikarjunanv
+// Updated with the board module logo and keyhook fucntions to keep the
+// empty board module as empty
+//
+// 8 8/13/09 12:09p Blaines
+// Move Image support to binary module
+//
+// 7 8/13/09 7:31a Mallikarjunanv
+// eips: 25075, 24971 and hii functions miving from binary to uefi module
+//
+// 6 8/03/09 7:54a Mallikarjunanv
+// Moved the IDE Security related hook functions from Tse Binary to Tse
+// Board Module
+//
+// 5 7/20/09 1:05p Mallikarjunanv
+// updated the code for PASSWORD_WITH_SPECIAL_CHAR_SUPPORT token
+//
+// 4 7/14/09 6:32p Blaines
+// For GTSE first Release.,
+//
+// 3 6/24/09 6:33p Madhans
+// Coding Standards
+//
+// 2 6/08/09 5:33p Madhans
+// Funtionality to get the Lang/PlatformLang variable name based on SDL
+// setting.
+//
+// 1 6/04/09 7:49p Madhans
+// AMI TSE Advanced.
+//
+// 3 5/07/09 10:31a Madhans
+// Changes After Bin module.
+//
+// 2 4/29/09 9:01p Madhans
+// Bug Fixes after unit Testing..
+//
+// 1 4/28/09 10:49p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+// 1 4/28/09 10:24p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+// 2 1/30/09 6:06p Madhans
+// Function headers added.
+//
+//
+//*****************************************************************//
+//*****************************************************************//
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: commonhelper.c
+//
+// Description: This file is Helper file for Boot only TSE module
+// This functions may be overridden by Other Advanced TSE module.
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+
+
+#pragma warning( disable : 4028 )
+
+#include "TimeStamp.h"
+#ifdef TSE_FOR_APTIO_4_50
+
+#include "Token.h"
+#include <Efi.h>
+#include <Protocol/SimpleTextIn.h>
+#include <Protocol/SimpleTextOut.h>
+#include <Protocol/EfiOemBadging.h>
+#include <Protocol/AMIPostMgr.h>
+#include "AMITSEStrTokens.h"
+#include <Protocol/FirmwareVolume.h>
+#include "AmiLib.h" //Added for using CONVERT_TO_STRING macro
+#include "AmiDxeLib.h"
+#include "AMITSEElinks.h"
+#include "AutoId.h" //EIP-112628
+#include "TseElinks.h" //EIP106950
+
+VOID *
+EfiLibAllocateZeroPool (
+ IN UINTN AllocationSize
+ );
+
+#else //#ifdef TSE_FOR_APTIO_4_50
+
+#include "minisetup.h"
+
+#endif //#ifdef TSE_FOR_APTIO_4_50
+
+#include "commonoem.h"
+#include "LogoLib.h"
+#include "Mem.h"
+#include "HiiLib.h"
+#include "PwdLib.h"
+#include "boot.h"
+#include "bootflow.h"
+#include "variable.h"
+#include "TseCommon.h"
+// Build time file generated from AMITSE_OEM_HEADER_LIST elink.
+#include "AmiTseOem.h"
+#include "SetupData.h"
+#if SUPPORT_ESRT
+#include "amireflashprotocol.h"
+#endif
+
+
+
+
+/////////////OEM_SPECIAL_CONTROL////////////////
+#if SETUP_OEM_SPECIAL_CONTROL_SUPPORT
+//#include "SetupData.h"
+
+VOID *VarGetVariable( UINT32 variable, UINTN *size );
+#define VARIABLE_ID_OEM_TSE_VAR 17
+
+#endif //SETUP_OEM_SPECIAL_CONTROL_SUPPORT
+
+#if SETUP_OEM_SPECIAL_CONTROL_SUPPORT
+UINT16 OEMSpecialGetControlCount(CONTROL_INFO *controlInfo);
+VOID OEMSpecialOneOfFixup( CONTROL_INFO *control , UINT16 value );
+VOID OEMSpecialGotoFixup(CONTROL_INFO *control, UINT16 value );
+#endif //#if SETUP_OEM_SPECIAL_CONTROL_SUPPORT
+
+//#include EFI_PROTOCOL_DEFINITION(LegacyBios)
+
+//EIP:39334 - START
+//#if !TSE_APTIO_5_SUPPORT
+#if !TSE_CSM_SUPPORT
+EFI_GUID gEfiLegacyBiosProtocolGuid = EFI_LEGACY_BIOS_PROTOCOL_GUID;
+#endif
+//#endif
+//EIP:39334 - END
+
+#define VARIABLE_NAME_LENGTH 40
+#define _CharIsUpper(c) ((c >= L'A') && (c <= L'Z'))
+#define _CharIsLower(c) ((c >= L'a') && (c <= L'z'))
+#define _CharIsAlpha(c) (_CharIsUpper(c) || _CharIsLower(c))
+#define _CharIsNumeric(c) ((c >= L'0') && (c <= L'9'))
+#define _CharIsAlphaNumeric(c) (_CharIsAlpha(c) || _CharIsNumeric(c))
+#define _CharIsAlphaNumericSpecial(c) ((c >= (CHAR16)0x20) && (c <= (CHAR16)0x7E))
+#define Str2No(A) (A - '0')
+#define TSE_STRUCT_OFFSET(type, field) (UINTN)&(((type *)0)->field)
+
+//EIP-75236 Starts
+#define NOTIFY_MASK_UGA (0x00000001)
+#define NOTIFY_MASK_CONSOLE_CONTROL (0x00000002)
+#define NOTIFY_MASK_CONSOLE_IN (0x00000004)
+#define NOTIFY_MASK_CONSOLE_OUT (0x00000008)
+#define NOTIFY_MASK_MOUSE_DRIVER (0x00000010)
+
+#if SETUP_DELAY_POST_TILL_GOP
+ #if SETUP_DELAY_LOGO_TILL_INPUT
+ #define SOMETHING (NOTIFY_MASK_UGA | NOTIFY_MASK_CONSOLE_CONTROL | NOTIFY_MASK_CONSOLE_IN | NOTIFY_MASK_CONSOLE_OUT /*| NOTIFY_MASK_MOUSE_DRIVER*/)
+ //EIP160126 no need of mouse dependency lets have only if pwd set
+ #else
+ #define SOMETHING (NOTIFY_MASK_UGA | NOTIFY_MASK_CONSOLE_CONTROL | NOTIFY_MASK_CONSOLE_OUT /*| NOTIFY_MASK_MOUSE_DRIVER*/)
+ #endif
+#else
+ #if SETUP_DELAY_LOGO_TILL_INPUT
+ #define SOMETHING ( NOTIFY_MASK_CONSOLE_CONTROL | NOTIFY_MASK_CONSOLE_IN | NOTIFY_MASK_CONSOLE_OUT /*| NOTIFY_MASK_MOUSE_DRIVER*/)
+ #else
+ #define SOMETHING ( NOTIFY_MASK_CONSOLE_CONTROL | NOTIFY_MASK_CONSOLE_OUT /*| NOTIFY_MASK_MOUSE_DRIVER*/)
+ #endif
+#endif
+//EIP-75236 Ends
+
+#ifndef SCAN_F12
+#define SCAN_F12 EFI_SCAN_F12
+#endif
+
+extern EFI_BOOT_SERVICES *gBS;
+extern EFI_SYSTEM_TABLE *gST;
+extern EFI_RUNTIME_SERVICES *gRT;
+extern BOOLEAN gQuietBoot;
+VOID *VarGetNvramName( CHAR16 *name, EFI_GUID *guid, UINT32 *attributes, UINTN *size );
+VOID GetTseBuildVersion(UINTN *TseMajor, UINTN *TseMinor, UINTN *TseBuild);//EIP 63073 : Source modules in TSE should get the version details from binary in run time not at build time
+
+#if TSE_FOR_64BIT
+CHAR16 gBootFileName[]=L"\\EFI\\BOOT\\BOOTX64.EFI";
+#else
+CHAR16 gBootFileName[]=L"\\EFI\\BOOT\\BOOTIA32.EFI";
+#endif //TSE_FOR_64BIT
+
+#if TSE_CAPITAL_BOOT_OPTION
+CHAR16 gBootFormarSpecifier[]=L"Boot%04X";
+CHAR16 gDriverFormarSpecifier[]=L"Driver%04X";
+#else
+CHAR16 gBootFormarSpecifier[]=L"Boot%04x";
+CHAR16 gDriverFormarSpecifier[]=L"Driver%04x";
+#endif
+
+BOOLEAN gPopupMenuShowAllBbsDev = POPUP_MENU_SHOW_ALL_BBS_DEVICES;
+BOOLEAN gShowAllBbsDev = SETUP_SHOW_ALL_BBS_DEVICES;
+BOOLEAN gIsSaveDisabledBBSDevicePath = TSE_SAVE_DISABLED_BBS_DEVICEPATH;
+BOOLEAN gSetupHideDisableBootOptions = SETUP_HIDE_DISABLE_BOOT_OPTIONS;//EIP:51671 Global declerations to access the tokens from Binary
+BOOLEAN gPopupMenuHideDisableBootOptions = POPUP_MENU_HIDE_DISABLE_BOOT_OPTIONS;
+#ifdef TSE_LOAD_OPTION_HIDDEN
+BOOLEAN gLoadOptionHidden = TSE_LOAD_OPTION_HIDDEN;//EIP:59417 -Global declerations to access the tokens from Binary
+#else
+BOOLEAN gLoadOptionHidden = 0;
+#endif
+
+const UINTN TsePasswordLength = SETUP_PASSWORD_LENGTH;
+
+
+
+
+EFI_STATUS GetGifNextFrame( IN OUT VOID **UgaBlt, OUT UINTN *GifDelay );
+extern VOID DrawBltBuffer( EFI_UGA_PIXEL *UgaBlt, CO_ORD_ATTRIBUTE Attribute, UINTN Width, UINTN Height,
+ INTN DestX, INTN DestY, UINTN BufferWidth);
+
+
+extern EFI_STATUS ConvertBmpToUgaBlt (IN VOID *BmpImage, IN UINTN BmpImageSize, IN OUT VOID **UgaBlt,
+ IN OUT UINTN *UgaBltSize, OUT UINTN *PixelHeight, OUT UINTN *PixelWidth );
+
+extern EFI_STATUS ConvertGifToUgaBlt ( IN VOID *GifImage, IN UINTN GifImageSize, IN OUT VOID **UgaBlt,
+ IN OUT UINTN *UgaBltSize, OUT UINTN *PixelHeight, OUT UINTN *PixelWidth, OUT UINTN *GifDelay );
+
+extern EFI_STATUS ConvertJPEGToUgaBlt ( IN VOID *JPEGImage, IN UINT32 JPEGImageSize, IN OUT VOID **UgaBlt,
+ IN OUT UINT32 *UgaBltSize, OUT UINT32 *PixelHeight, OUT UINT32 *PixelWidth, OUT UINT32 *punBufferWidth);
+
+extern EFI_STATUS ConvertPCXToUgaBlt ( IN VOID *PCXImage, IN UINT32 PCXImageSize, IN OUT VOID **UgaBlt,
+ IN OUT UINT32 *UgaBltSize, OUT UINT32 *PixelHeight, OUT UINT32 *PixelWidth);
+
+extern EFI_STATUS ConvertPNGToUgaBlt ( IN VOID *PCXImage, IN UINT32 PCXImageSize, IN OUT VOID **UgaBlt,
+ IN OUT UINT32 *UgaBltSize, OUT UINT32 *PixelHeight, OUT UINT32 *PixelWidth);
+//Functions
+VOID DoAddBootOptionFixup (VOID *ControlInfo);
+VOID SpecialFixupDelBootOption( VOID *ControlInfo);
+VOID BootAddBootOption();
+BOOLEAN DoBootDelBootOption(VOID *popupSel);
+void TseUpdateAddDeleteBootVar (void);
+VOID DiscardAddDelBootOptions(VOID);
+VOID SaveAddDelBootOptions();
+UINT16 * TseBootNowinBootOrderInit(VOID);
+EFI_STATUS TseVarBuildAMIDefaults(VOID);
+VOID TSEMouseInit(VOID);
+VOID TSEMouseStop(VOID);
+EFI_STATUS TSEGetCoordinates(INT32 *x, INT32 *y, INT32 *z);
+BOOLEAN TSEIsMouseClickedonSoftkbd(VOID);
+VOID TSEMouseRefresh(VOID);
+VOID TSEMouseFreeze(VOID);
+VOID TSEMouseStart(VOID);
+VOID TSEMouseDestroy(VOID);
+INT32 TSEGetactualScreentop(VOID);
+VOID TSENumericSoftKbdExit(VOID);
+VOID TSENumericSoftKbdInit(VOID);
+VOID TSESetPwdKeyboardLayout(VOID);//EIP-88912
+VOID TSEResetPwdKeyboardLayout(VOID);//EIP-88912
+VOID TSEPrintableKeysSoftKbdInit(VOID);//EIP-89272
+VOID TSEPrintableKeysSoftKbdExit(VOID);//EIP-89272
+EFI_STATUS TSEMouseReadInfo(VOID *MouseInfo);
+EFI_STATUS TSEMouseScrollBarMove(VOID *frame, BOOLEAN bScrollUp, UINT32 Size); //EIP-67049
+EFI_STATUS TSEMouseListBoxScrollBarMove(VOID *listbox, BOOLEAN bScrollUp, UINT32 Size); //EIP-67049
+EFI_STATUS TSEMouseFrameHandleAction( VOID *frame, VOID *action,VOID *control );
+EFI_STATUS TSEMouseSubMenuHandleAction( VOID *submenu, VOID *Data);
+EFI_STATUS TSEMouseMsgBoxHandleAction( VOID *msgbox, VOID *Data,BOOLEAN * pRedraw);
+EFI_STATUS TSEMousePopupSelHandleAction( VOID *popupSel, VOID *Data);
+EFI_STATUS TSEMousePopupEditHandleAction( VOID *PopupEdit, VOID *Data, BOOLEAN * pRedraw );
+EFI_STATUS TSEMouseMenuHandleAction( VOID *menu, VOID *Data );
+EFI_STATUS TSEMouseListBoxHandleAction( VOID *listbox, VOID *Data);
+VOID ClearUserPasswordPolicy(VOID *callbackData,VOID *saveData);
+EFI_STATUS TseFramePwdCallbackIdePasswordUpdate ( VOID *control,VOID *saveData);
+EFI_STATUS TsePopupPwdAuthenticateIDEPwd(VOID *popuppassword, BOOLEAN *AbortUpdate,VOID *data);
+VOID TsePopupPwdUpdateIDEPwd (VOID);
+VOID RTIfrProcessExit(VOID);
+VOID RTIfrProcessAddVarListAndPageIDList(VOID);
+BOOLEAN RTIfrProcessFormIfUpdated(UINT16 link);
+VOID RTIfrProcessRunTimeForms(VOID*ref);
+LOGO_TYPE GetBmpLogoType(UINT8 *ImageData);
+LOGO_TYPE GetGifLogoType(UINT8 *ImageData);
+LOGO_TYPE GetJPEGLogoType(UINT8 *ImageData);
+LOGO_TYPE GetPCXLogoType(UINT8 *ImageData);
+LOGO_TYPE GetOEMLogoType(UINT8 *ImageData);
+VOID CleanUpGif(VOID);
+VOID DoGifAnimate(CO_ORD_ATTRIBUTE Attribute,INTN CoordinateX,INTN CoordinateY);
+UINTN HiiTestPrintLength ( IN CHAR16 *String );
+UINTN UefiHiiTestPrintLength ( IN CHAR16 *String );
+UINTN EfiTestPrintLength ( IN CHAR16 *String );
+VOID BBSSetBootPriorities( BOOT_DATA *pBootData, UINT16 *pOrder, UINTN u16OrderCount);
+BOOLEAN IsBBSDevicePath( EFI_DEVICE_PATH_PROTOCOL *DevicePath );
+CHAR16 * GetBBSBootOptionName( BOOT_DATA *bootData);
+EFI_STATUS BBSSetBootNowPriority( BOOT_DATA *BootData,UINTN uiPrefferedDevice,BOOLEAN ShowAllBbsDev);
+VOID BBSGetDeviceList( VOID );
+VOID BBSBuildDefaultName( CHAR16 *String, VOID *info, UINTN index, VOID *HDDInfo );
+VOID BBSBuildDevicePathName( CHAR16 *String, VOID *info, UINTN index, VOID *HDDInfo );
+VOID SaveBBSOrder(VOID*);
+VOID BBSSetDisabled(UINT16 Index, VOID **DisDPs, UINTN *DPSize);
+VOID RearrangeBBSOrderVariable(VOID *popupSel, UINT8 bIncrease,UINT16 *newOption);
+VOID LoadDefaultLegDevOrder(VOID);
+VOID BBSUpdateOrder(UINT16 *newOption,UINT32 *offset,UINTN *size, VOID **buffer);
+VOID BBSSetBootPriorities_BootOrder(UINT16);
+UINTN GetANSIEscapeCode(CHAR16 *String,UINT8 *Bold,UINT8 *Foreground, UINT8 *Background);
+CHAR16 *StrDup(CHAR16 *String);
+CHAR16 *SkipEscCode(CHAR16 *String);
+BOOLEAN CheckShiftState(UINT32 ActionKey, UINT32 HotkeyState);
+BOOLEAN SupportPrintScreenEvent();
+VOID SupportPrintScreen();
+VOID GetBootLanguages( VOID );
+VOID GetPlatformBootLanguages( VOID );
+VOID RTIfrUpdateVariableInfo( UINT32 ControlVariable, EFI_HANDLE Handle );
+void ClearGrphxScreen (void);
+VOID ConvertBmpandAddBGRT (
+ BOOLEAN GifImagePresence
+ );
+VOID InvalidateStatusInBgrt (VOID);
+UINT32 GetMsgboxWidth(VOID);//EIP74963 : MAX_MSGBOX_WIDTH macro changed as token and handled from binary
+INTN gHotKeyBootOption = -1;
+extern UINT32 gBootFlow;
+VOID InvalidateStatusInBgrtWrapper (VOID);
+
+//EIP70421 & 70422 Support for driver order starts
+VOID SpecialFixupDelDriverOption (VOID *);
+BOOLEAN DoDriverDelDriverOption (VOID *);
+void TseUpdateAddDeleteDriverVar (VOID );
+VOID DiscardAddDelDriverOptions (VOID);
+VOID SaveAddDelDriverOptions ();
+//EIP70421 & 70422 Support for driver order Ends
+VOID UninstallBGRT (VOID); //EIP81830 Support to uninstall the BGRT on legacy boot
+//EIP-75136 ROMHole Support
+LOGO_TYPE GetExtendedLogoType(UINT8 *ImageData);
+//EIP-75136 End
+
+VOID *SavePostScreen( UINTN *SizeOfX, UINTN *SizeOfY );
+VOID RestorePostScreen( VOID *UgaBlt, UINTN SizeOfX, UINTN SizeOfY );
+
+extern BOOT_DATA *gBootData; //EIP 88447
+extern UINTN gBootOptionCount;
+extern EFI_GUID _gBootFlowGuid;
+
+VOID SetupDebugPrint(IN CONST CHAR8 *Format, ...) ;
+#if SUPPRESS_PRINT
+ #define SETUP_DEBUG_TSE(format,...)
+#else //Else of SUPPRESS_PRINT
+ #define SETUP_DEBUG_TSE(format,...) SetupDebugPrint(format, __VA_ARGS__)
+#endif
+
+//EIP106950 : Starts
+//Controlling from binary
+PASSWORD_ENOCDE_LIST_TEMPLATE gPasswordEncodeList [] = {PASSWORD_ENOCDE_LIST {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 0, 0}}; //Last structure for avoiding build error.
+UINT32 gEncodeListCount = sizeof (gPasswordEncodeList)/ sizeof (PASSWORD_ENOCDE_LIST_TEMPLATE);
+//EIP106950 : Ends
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------------------
+// Procedure: CheckForAddDelBootOption
+//
+// Description: Function to return the SETUP_SUPPORT_ADD_BOOT_OPTION token value
+//
+// Input: None
+//
+// Output: BOOLEAN
+//
+//--------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN CheckForAddDelBootOption ()
+{
+#if SETUP_SUPPORT_ADD_BOOT_OPTION
+ return 1;
+#else
+ return 0;
+#endif //#if SETUP_SUPPORT_ADD_BOOT_OPTION
+}
+
+//EIP70421 & 70422 Support for driver order
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------------------
+// Procedure: CheckForAddDelDriverOption
+//
+// Description: Function to return the SETUP_SUPPORT_ADD_DRIVER_OPTION token value
+//
+// Input: None
+//
+// Output: BOOLEAN
+//
+//--------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN CheckForAddDelDriverOption (VOID)
+{
+#ifdef SETUP_SUPPORT_ADD_DRIVER_OPTION
+ return SETUP_SUPPORT_ADD_DRIVER_OPTION; //Since there is no token dependency for this, returning as such
+#else
+ return 0;
+#endif
+}
+
+VOID TseDoAddBootOptionFixup(VOID *ControlInfo )
+{
+#if SETUP_SUPPORT_ADD_BOOT_OPTION
+ DoAddBootOptionFixup(ControlInfo);
+#endif //#if SETUP_SUPPORT_ADD_BOOT_OPTION
+}
+
+
+VOID TSESpecialFixupDelBootOption(VOID *ControlInfo)
+{
+#if SETUP_SUPPORT_ADD_BOOT_OPTION
+ SpecialFixupDelBootOption(ControlInfo);
+#endif //#if SETUP_SUPPORT_ADD_BOOT_OPTION
+}
+
+//EIP70421 & 70422 Support for driver order
+VOID TSESpecialFixupDelDriverOption (VOID *ControlInfo)
+{
+#if SETUP_SUPPORT_ADD_DRIVER_OPTION
+ SpecialFixupDelDriverOption (ControlInfo);
+#endif
+}
+
+VOID TseBootAddBootOption()
+{
+#if SETUP_SUPPORT_ADD_BOOT_OPTION
+ BootAddBootOption();
+#endif //#if SETUP_SUPPORT_ADD_BOOT_OPTION
+}
+
+//EIP70421 & 70422 Support for driver order
+VOID TseDriverAddDriverOption ()
+{
+#if SETUP_SUPPORT_ADD_DRIVER_OPTION
+ DriverAddDriverOption ();
+#endif
+}
+
+// EIP-41615: Start.
+EFI_STATUS FileBrowserLaunchFileSystem (UINT32 Variable);
+EFI_STATUS FileBrowserLaunchFilePath (UINT32 Variable);
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TseLaunchFileSystem
+//
+// Description: This function to handle launching file system
+//
+// Input: UINT32
+//
+// Output: EFI_STATUS
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_TseLaunchFileSystem
+EFI_STATUS TseLaunchFileSystem (UINT32 Variable)
+{
+ EFI_STATUS Status = EFI_SUCCESS;
+#if SETUP_SUPPORT_ADD_BOOT_OPTION || SETUP_SUPPORT_ADD_DRIVER_OPTION //EIP70421 & 70422 Support for driver order
+ Status = FileBrowserLaunchFileSystem (Variable);
+ if(!EFI_ERROR(Status))
+ Status = FileBrowserLaunchFilePath (Variable);
+#endif
+ return Status;
+}
+#endif
+// EIP-41615: End
+
+BOOLEAN TseDoBootDelBootOption(VOID *popupSel)
+{
+#if SETUP_SUPPORT_ADD_BOOT_OPTION
+ return DoBootDelBootOption(popupSel);
+#else
+ return 0;
+#endif //#if SETUP_SUPPORT_ADD_BOOT_OPTION
+}
+
+//EIP70421 & 70422 Support for driver order
+BOOLEAN TseDoDriverDelDriverOption (VOID *popupSel)
+{
+#if SETUP_SUPPORT_ADD_DRIVER_OPTION
+ return DoDriverDelDriverOption (popupSel);
+#else
+ return 0;
+#endif
+}
+
+void UpdateAddDeleteBootVar(void)
+{
+#if SETUP_SUPPORT_ADD_BOOT_OPTION
+ TseUpdateAddDeleteBootVar();
+#endif //#if SETUP_SUPPORT_ADD_BOOT_OPTION
+}
+
+//EIP70421 & 70422 Support for driver order
+void UpdateAddDeleteDriverVar (void)
+{
+#if SETUP_SUPPORT_ADD_DRIVER_OPTION
+ TseUpdateAddDeleteDriverVar ();
+#endif
+}
+
+VOID TseDiscardAddDelBootOptions()
+{
+#if SETUP_SUPPORT_ADD_BOOT_OPTION
+ DiscardAddDelBootOptions();
+#endif //#if SETUP_SUPPORT_ADD_BOOT_OPTION
+}
+
+//EIP70421 & 70422 Support for driver order
+VOID TseDiscardAddDelDriverOptions ()
+{
+#if SETUP_SUPPORT_ADD_DRIVER_OPTION
+ DiscardAddDelDriverOptions ();
+#endif
+}
+
+VOID TseSaveAddDelBootOptions()
+{
+#if SETUP_SUPPORT_ADD_BOOT_OPTION
+ SaveAddDelBootOptions();
+#endif //#if SETUP_SUPPORT_ADD_BOOT_OPTION
+}
+
+//EIP70421 & 70422 Support for driver order
+VOID TseSaveAddDelDriverOptions ()
+{
+#if SETUP_SUPPORT_ADD_DRIVER_OPTION
+ SaveAddDelDriverOptions ();
+#endif
+}
+
+//EIP# 58925 start
+BOOLEAN IsLinkHistorySupport()
+{
+#if SETUP_LINK_HISTORY_SUPPORT
+ return 1;
+#else
+ return 0;
+#endif
+}
+
+//EIP# 58925 End
+
+
+//EIP# 72333
+BOOLEAN IsSubMenuDisplayTitle()
+{
+#if SETUP_DISPLAY_SUBMENU_PAGETITLE
+ return 1;
+#else
+ return 0;
+#endif
+}//EIP# 72333
+
+//EIP 75486
+BOOLEAN IsReadOnlyGrayout()
+{
+#if SETUP_GRAYOUT_READONLY_CONTROL
+ return 1;
+#else
+ return 0;
+#endif
+}//EIP# 75486
+
+BOOLEAN IsGroupDynamicPages()
+{
+#if SETUP_GROUP_DYNAMIC_PAGES
+ return 1;
+#else
+ return 0;
+#endif
+}
+
+BOOLEAN IsOrphanPagesAsRootPage()
+{
+#if SETUP_ORPHAN_PAGES_AS_ROOT_PAGE
+ return 1;
+#else
+ return 0;
+#endif
+}
+
+BOOLEAN IsUpdateBootOrderCursor()
+{
+#if SETUP_UPDATE_BOOT_ORDER_CURSOR
+ return 1;
+#else
+ return 0;
+#endif
+}
+
+BOOLEAN IsPreservedDisabledBootOptionOrder()
+{
+#if TSE_PRESERVE_DISABLED_BBS_DEVICE_ORDER
+ return 1;
+#else
+ return 0;
+#endif
+}
+
+BOOLEAN IsReservedBootOptionNamesEnable()
+{
+#if SETUP_SUPPORT_RES_ADD_DEL_BOOT_OPTION_NAME
+ return 1;
+#else
+ return 0;
+#endif //#if SETUP_SUPPORT_RES_ADD_DEL_BOOT_OPTION_NAME
+}
+
+//EIP 103381 - START
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: IsBootTimeOutValueZero
+//
+// Description: function to return TSE_BOOT_TIME_OUT_AS_ZERO value
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN IsBootTimeOutValueZero()
+{
+#ifdef TSE_BOOT_TIME_OUT_AS_ZERO
+ return TSE_BOOT_TIME_OUT_AS_ZERO;
+#else
+ return 0;
+#endif //#if TSE_BOOT_TIME_OUT_AS_ZERO
+}
+//EIP 103381 - END
+
+BOOT_DATA * BootGetBootNowBootData(BOOT_DATA *bootData, UINT16 *BootOrder, UINTN i )
+{
+#if TSE_BOOT_NOW_IN_BOOT_ORDER
+ return BootGetBootData(BootOrder[i]);
+#else
+ return (bootData + i);
+#endif
+}
+
+
+UINT16 * BootNowinBootOrderInit(VOID)
+{
+#if TSE_BOOT_NOW_IN_BOOT_ORDER
+ return TseBootNowinBootOrderInit();
+#else
+ return NULL;
+#endif
+}
+
+
+EFI_STATUS VarBuildAMIDefaults(VOID)
+{
+#if SETUP_USE_AMI_DEFAULTS
+ return TseVarBuildAMIDefaults();
+#else
+ return EFI_UNSUPPORTED;
+#endif // SETUP_USE_AMI_DEFAULTS
+}
+
+///
+/// Mouse Functions
+///
+
+VOID MouseInit(VOID)
+{
+#if MINISETUP_MOUSE_SUPPORT
+ TSEMouseInit();
+#endif
+}
+
+BOOLEAN IsMouseSupported(VOID)
+{
+#if MINISETUP_MOUSE_SUPPORT
+ return TRUE;
+#else
+ return FALSE;
+#endif
+}
+
+BOOLEAN IsSoftKbdSupported(VOID)
+{
+#if AMITSE_SOFTKBD_SUPPORT
+ return TRUE;
+#else
+ return FALSE;
+#endif
+}
+
+
+VOID MouseStop(VOID)
+{
+#if MINISETUP_MOUSE_SUPPORT
+ TSEMouseStop();
+#endif
+}
+
+VOID GetCoordinates(INT32 *x, INT32 *y, INT32 *z)
+{
+#if MINISETUP_MOUSE_SUPPORT
+ TSEGetCoordinates(x,y,z);
+#endif
+}
+
+VOID MouseRefresh(VOID)
+{
+#if MINISETUP_MOUSE_SUPPORT
+ TSEMouseRefresh();
+#endif
+}
+BOOLEAN IsMouseClickedonSoftkbd(VOID)
+{
+#if MINISETUP_MOUSE_SUPPORT
+ return TSEIsMouseClickedonSoftkbd();
+#endif
+return FALSE;
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: IsMouseOnSoftkbd
+//
+// Description: Function to return whether MousePointer is on softkbd or not
+//
+// Input: None
+//
+// Output: TRUE/FALSE
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+TSEIsMouseOnSoftkbd(VOID);
+BOOLEAN IsMouseOnSoftkbd(VOID)
+{
+#if (MINISETUP_MOUSE_SUPPORT && AMITSE_SOFTKBD_SUPPORT)
+ return TSEIsMouseOnSoftkbd();
+#endif
+ return FALSE;
+}
+
+VOID MouseFreeze(VOID)
+{
+#if MINISETUP_MOUSE_SUPPORT
+ TSEMouseFreeze();
+#endif
+}
+
+VOID MouseStart(VOID)
+{
+#if MINISETUP_MOUSE_SUPPORT
+ TSEMouseStart();
+#endif
+}
+
+VOID NumericSoftKbdInit(VOID)
+{
+#if (MINISETUP_MOUSE_SUPPORT && AMITSE_SOFTKBD_SUPPORT)
+ TSENumericSoftKbdInit();
+#endif
+
+}
+
+VOID NumericSoftKbdExit(VOID)
+{
+#if (MINISETUP_MOUSE_SUPPORT && AMITSE_SOFTKBD_SUPPORT)
+ TSENumericSoftKbdExit();
+#endif
+
+}
+//EIP-88912 Starts
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: SetPwdKeyboardLayout
+//
+// Description: function to initialize SetKeyboardLayout
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID SetPwdKeyboardLayout(VOID)
+{
+#if (MINISETUP_MOUSE_SUPPORT && AMITSE_SOFTKBD_SUPPORT)
+ TSESetPwdKeyboardLayout();
+#endif
+
+}
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: ResetPwdKeyboardLayout
+//
+// Description: function to exit ResetKeyboardLayout and reset with default keyboard layout
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID ResetPwdKeyboardLayout(VOID)
+{
+#if (MINISETUP_MOUSE_SUPPORT && AMITSE_SOFTKBD_SUPPORT)
+ TSEResetPwdKeyboardLayout();
+#endif
+
+}
+//EIP-88912 Ends
+
+//EIP-89272 Starts
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: PrintableKeysSoftKbdInit
+//
+// Description: function to launch PrintableKeysSoftKbd layout
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID PrintableKeysSoftKbdInit(VOID)
+{
+#if (MINISETUP_MOUSE_SUPPORT && AMITSE_SOFTKBD_SUPPORT)
+ TSEPrintableKeysSoftKbdInit();
+#endif
+
+}
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: PrintableKeysSoftKbdExit
+//
+// Description: function to exit PrintableKeysSoftKbd and reset with default keyboard layout
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID PrintableKeysSoftKbdExit(VOID)
+{
+#if (MINISETUP_MOUSE_SUPPORT && AMITSE_SOFTKBD_SUPPORT)
+ TSEPrintableKeysSoftKbdExit();
+#endif
+
+}
+//EIP-89272 Ends
+
+EFI_STATUS MouseReadInfo(VOID *MouseInfo)
+{
+#if MINISETUP_MOUSE_SUPPORT
+ return TSEMouseReadInfo(MouseInfo);
+#else
+ return EFI_UNSUPPORTED;
+#endif
+}
+
+VOID MouseDestroy(VOID)
+{
+#if MINISETUP_MOUSE_SUPPORT
+ TSEMouseDestroy();
+#endif
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: GetactualScreentop
+//
+// Description: function to get the actual screen top value for mouse
+//
+// Input: None
+//
+// Output: INT32
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+INT32 GetactualScreentop(VOID)
+{
+#if MINISETUP_MOUSE_SUPPORT
+ return TSEGetactualScreentop();//EIP79962 function to return the actual screen top of the setup
+#endif
+
+return 0;
+}
+EFI_STATUS MouseFrameHandleAction( VOID *frame, VOID *action,VOID *control )
+{
+#if MINISETUP_MOUSE_SUPPORT
+ return TSEMouseFrameHandleAction(frame, action, control);
+#else
+ return EFI_UNSUPPORTED;
+#endif
+}
+
+EFI_STATUS MouseMsgBoxHandleAction( VOID *msgbox, VOID *Data,BOOLEAN * pRedraw)
+{
+#if MINISETUP_MOUSE_SUPPORT
+ return TSEMouseMsgBoxHandleAction(msgbox, Data, pRedraw);
+#else
+ return EFI_UNSUPPORTED;
+#endif
+}
+
+EFI_STATUS MouseMenuHandleAction( VOID *menu, VOID *Data )
+{
+#if MINISETUP_MOUSE_SUPPORT
+ return TSEMouseMenuHandleAction(menu, Data);
+#else
+ return EFI_UNSUPPORTED;
+#endif
+}
+
+
+EFI_STATUS MouseListBoxHandleAction( VOID *listbox, VOID *Data)
+{
+#if MINISETUP_MOUSE_SUPPORT
+ return TSEMouseListBoxHandleAction(listbox, Data);
+#else
+ return EFI_UNSUPPORTED;
+#endif
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: FramePasswordAdvancedCallback
+//
+// Description: This function to handle password callback inside setup
+//
+// Input: VOID*, VOID*
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_FramePasswordAdvancedCallback
+VOID FramePasswordAdvancedCallback(VOID *callbackData,VOID *saveData)
+{
+#if TSE_CLEAR_USERPW_WITH_ADMINPW
+ ClearUserPasswordPolicy(callbackData,saveData);
+#endif //#if TSE_CLEAR_USERPW_WITH_ADMINPW
+}
+#endif
+
+
+#if !OVERRIDE_FramePwdCallbackIdePasswordUpdate
+EFI_STATUS FramePwdCallbackIdePasswordUpdate ( VOID *control,VOID *saveData)
+{
+#if SETUP_IDE_SECURITY_SUPPORT
+ return TseFramePwdCallbackIdePasswordUpdate ( control,saveData);
+#else
+ return EFI_UNSUPPORTED;
+#endif
+}
+#endif
+
+#if !OVERRIDE_PopupPwdAuthenticateIDEPwd
+EFI_STATUS PopupPwdAuthenticateIDEPwd(VOID *popuppassword, BOOLEAN *AbortUpdate,VOID *data)
+{
+#if SETUP_IDE_SECURITY_SUPPORT
+ return TsePopupPwdAuthenticateIDEPwd(popuppassword, AbortUpdate,data);
+#else
+ return EFI_UNSUPPORTED;
+#endif
+}
+#endif
+
+#if !OVERRIDE_PopupPwdUpdateIDEPwd
+VOID PopupPwdUpdateIDEPwd (VOID)
+{
+#if SETUP_IDE_SECURITY_SUPPORT
+ TsePopupPwdUpdateIDEPwd ();
+#endif
+}
+#endif
+
+LOGO_TYPE GetBmpLogoType(UINT8 *ImageData)
+{
+#if SETUP_BMP_LOGO_SUPPORT
+// if ( ((BMP_IMAGE_HEADER *)ImageData)->CharB == 'B' && ((BMP_IMAGE_HEADER *)ImageData)->CharM == 'M' )
+ if ( ImageData[0] == 'B' && ImageData[1] == 'M' )
+ return BMP_Logo;
+#endif
+ return Unsupported_Logo;
+}
+
+
+LOGO_TYPE GetGifLogoType(UINT8 *ImageData)
+{
+#if SETUP_GIF_LOGO_SUPPORT
+ if ( 0 == EfiCompareMem(ImageData, "GIF87a", 6) || 0 == EfiCompareMem(ImageData, "GIF89a", 6) )
+ return GIF_Logo;
+#endif
+
+ return Unsupported_Logo;
+}
+
+
+
+LOGO_TYPE GetJPEGLogoType(UINT8 *ImageData)
+{
+
+#if SETUP_JPEG_LOGO_SUPPORT
+ // Start of Image
+ if(0x0D8FF == *((UINT16*)ImageData))
+ return JPEG_Logo;
+#endif
+
+ return Unsupported_Logo;
+}
+
+LOGO_TYPE GetPCXLogoType(UINT8 *ImageData)
+{
+
+#if SETUP_PCX_LOGO_SUPPORT
+ if (((*ImageData) == 0x0A) && (*(ImageData+2) == 0x01))
+ return PCX_Logo;
+#endif
+
+ return Unsupported_Logo;
+}
+
+LOGO_TYPE GetPNGLogoType(UINT8 *ImageData)
+{
+
+#if SETUP_PNG_LOGO_SUPPORT
+ if ((ImageData[0] == 0x89) && (ImageData[1] == 0x50) && (ImageData[2] == 0x4E ) && (ImageData[3] == 0x47 ) && (ImageData[4] == 0x0D ) && (ImageData[5] == 0x0A ) && (ImageData[6] == 0x1A ) && (ImageData[7] == 0x0A ))
+ return PNG_Logo;
+#endif
+
+ return Unsupported_Logo;
+}
+
+LOGO_TYPE GetOEMLogoType(UINT8 *ImageData)
+{
+
+#if SETUP_OEM_FORMAT_LOGO_SUPPORT
+ if(IsOEMLogoType(ImageData))
+ return OEM_Format_LOGO;
+#endif
+
+ return Unsupported_Logo;
+}
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: ConvertOEMFormatToUgaBltWrapper
+//
+// Description: Wrapper function to process ConvertOEMFormatToUgaBlt
+// functionallity based on SDL token.
+//
+//
+// Input: OEMImage - Pointer to GIF file
+// OEMImageSize - Number of bytes in BmpImage
+// UgaBlt - Buffer containing UGA version of GifImage.
+// UgaBltSize - Size of UgaBlt in bytes.
+// Height - Height of UgaBlt/BmpImage in pixels
+// Width - Width of UgaBlt/BmpImage in pixels
+// Animate -
+//
+// Output: EFI_SUCCESS - UgaBlt and UgaBltSize are returned.
+// EFI_UNSUPPORTED - GifImage is not a valid *.GIF image
+// EFI_BUFFER_TOO_SMALL - The passed in UgaBlt buffer is not big enough.
+// UgaBltSize will contain the required size.
+// EFI_OUT_OF_RESOURCES - No enough buffer to allocate
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS ConvertOEMFormatToUgaBltWrapper ( IN VOID *OEMImage, IN UINT32 OEMImageSize, IN OUT VOID **UgaBlt,
+ IN OUT UINT32 *UgaBltSize, OUT UINT32 *Height, OUT UINT32 *Width, BOOLEAN * Animate)
+{
+ EFI_STATUS Status = EFI_UNSUPPORTED;
+
+#if SETUP_OEM_FORMAT_LOGO_SUPPORT
+ Status = ConvertOEMFormatToUgaBlt(
+ ImageData,
+ (UINT32)ImageSize,
+ UgaBlt,
+ (UINT32*)UgaBltSize,
+ (UINT32*)Height,
+ (UINT32*)Width,
+ Animate
+ );
+#endif
+ return Status ;
+}
+
+
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: ConvertBmpToUgaBltWrapper
+//
+// Description: Wrapper function to process ConvertBmpToUgaBlt
+// functionallity based on SDL token.
+//
+// Input: BmpImage - Pointer to BMP file
+// BmpImageSize - Number of bytes in BmpImage
+// UgaBlt - Buffer containing UGA version of BmpImage.
+// UgaBltSize - Size of UgaBlt in bytes.
+// PixelHeight - Height of UgaBlt/BmpImage in pixels
+// PixelWidth - Width of UgaBlt/BmpImage in pixels
+//
+// Output: EFI_SUCCESS - UgaBlt and UgaBltSize are returned.
+// EFI_UNSUPPORTED - BmpImage is not a valid *.BMP image
+// EFI_BUFFER_TOO_SMALL - The passed in UgaBlt buffer is not big enough.
+// UgaBltSize will contain the required size.
+// EFI_OUT_OF_RESOURCES - No enough buffer to allocate
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS ConvertBmpToUgaBltWrapper(
+ IN VOID *BmpImage,
+ IN UINTN BmpImageSize,
+ IN OUT VOID **UgaBlt,
+ IN OUT UINTN *UgaBltSize,
+ OUT UINTN *PixelHeight,
+ OUT UINTN *PixelWidth)
+{
+ EFI_STATUS Status = EFI_UNSUPPORTED;
+
+#if SETUP_BMP_LOGO_SUPPORT
+ Status = ConvertBmpToUgaBlt(
+ BmpImage,
+ BmpImageSize,
+ UgaBlt,
+ UgaBltSize,
+ PixelHeight,
+ PixelWidth
+ );
+#endif
+ return Status ;
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: CleanUpExtendedLogoWrapper
+//
+// Description: function to clear the logo
+//
+// Input: None
+//
+// Output: None
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID CleanUpExtendedLogoWrapper()
+{
+#if SETUP_GIF_LOGO_SUPPORT
+ CleanUpGif();
+#endif
+#if SETUP_OEM_FORMAT_LOGO_SUPPORT
+ CleanUpOEMLogo();
+#endif
+ ClearGrphxScreen ();
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: DoLogoAnimateWrapper
+//
+// Description: function to Handle logo animation
+//
+// Input: CO_ORD_ATTRIBUTE Attribute,
+// INTN CoordinateX,INTN CoordinateY
+//
+// Output: None
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID DoLogoAnimateWrapper(CO_ORD_ATTRIBUTE Attribute,INTN CoordinateX,INTN CoordinateY)
+{
+
+#if SETUP_GIF_LOGO_SUPPORT
+ DoGifAnimate(Attribute,CoordinateX,CoordinateY);
+#endif
+
+#if SETUP_OEM_FORMAT_LOGO_SUPPORT
+ DoOEMLogoAnimate(Attribute,CoordinateX,CoordinateY);
+#endif
+}
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: ConvertGifToUgaBltWrapper
+//
+// Description: Wrapper function to process ConvertGifToUgaBlt
+// functionallity based on SDL token.
+//
+//
+// Input: GifImage - Pointer to GIF file
+// GifImageSize - Number of bytes in BmpImage
+// UgaBlt - Buffer containing UGA version of GifImage.
+// UgaBltSize - Size of UgaBlt in bytes.
+// PixelHeight - Height of UgaBlt/BmpImage in pixels
+// PixelWidth - Width of UgaBlt/BmpImage in pixels
+// GifDelay -
+//
+// Output: EFI_SUCCESS - UgaBlt and UgaBltSize are returned.
+// EFI_UNSUPPORTED - GifImage is not a valid *.GIF image
+// EFI_BUFFER_TOO_SMALL - The passed in UgaBlt buffer is not big enough.
+// UgaBltSize will contain the required size.
+// EFI_OUT_OF_RESOURCES - No enough buffer to allocate
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS
+ConvertGifToUgaBltWrapper (
+ IN VOID *GifImage,
+ IN UINTN GifImageSize,
+ IN OUT VOID **UgaBlt,
+ IN OUT UINTN *UgaBltSize,
+ OUT UINTN *PixelHeight,
+ OUT UINTN *PixelWidth,
+ OUT BOOLEAN *Animate
+ )
+{
+ EFI_STATUS Status = EFI_UNSUPPORTED;
+#if SETUP_GIF_LOGO_SUPPORT
+ UINTN GifDelay;
+
+ GifDelay = 0;
+
+ Status = ConvertGifToUgaBlt(
+ GifImage,
+ GifImageSize,
+ UgaBlt,
+ UgaBltSize,
+ PixelHeight,
+ PixelWidth,
+ &GifDelay
+ );
+ //the first frame usually doesn't have valid data so we get the
+ //second one and set the timer
+ if(!EFI_ERROR(Status) )
+ {
+ if(GifDelay)
+ {
+ *Animate = TRUE;
+ }
+ }
+
+#endif
+ return Status ;
+}
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: ConvertJPEGToUgaBltWrapper
+//
+// Description: Wrapper function to process ConvertJPEGToUgaBlt
+// functionallity based on SDL token.
+//
+// Input: IN VOID *JPEGImage - Pointer to the memory that has the
+// JPEG Image that need to be decoded.
+// IN UINT32 JPEGImageSize - Size of the JPEG Image
+// IN OUT VOID **UgaBlt - Two cases
+// Case 1: Memory is expected to be allocated by the callee.
+// Address provided as input should be NULL.
+// pointer that will recieve the address of the UGA buffer.
+// The buffer is allocated by callee.
+// This buffer need to be freed by the caller.
+// Case 2: Memory is allocated by the caller
+// IN OUT UINT32 *UgaBltSize - Pointer that stores Size of UgaBlt
+// in bytes. This will be treated as an input. This should have
+// value ZERO for Case 2 above.
+// OUT UINT32 *PixelHeight - Height of UgaBlt/JPEG Image in pixels
+// OUT UINT32 *PixelWidth - Width of UgaBlt/JPEG Image in pixels
+// OUT UINT32 *pun32BufferWidth - Width of UgaBlt/JPEG Buffer
+//
+// Output: EFI_SUCCESS - The image was successfully decoded and placed in the buffer
+// EFI_UNSUPPORTED
+// EFI_BUFFER_TOO_SMALL
+// EFI_OUT_OF_RESOURCES
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS ConvertJPEGToUgaBltWrapper (
+ IN VOID *JPEGImage,
+ IN UINT32 JPEGImageSize,
+ IN OUT VOID **UgaBlt,
+ IN OUT UINT32 *UgaBltSize,
+ OUT UINT32 *PixelHeight,
+ OUT UINT32 *PixelWidth,
+ OUT UINT32 *pun32BufferWidth)
+{
+ EFI_STATUS Status = EFI_UNSUPPORTED;
+
+#if SETUP_JPEG_LOGO_SUPPORT
+ Status = ConvertJPEGToUgaBlt(
+ JPEGImage,
+ (UINT32)JPEGImageSize,
+ UgaBlt,
+ (UINT32*)UgaBltSize,
+ (UINT32*)PixelHeight,
+ (UINT32*)PixelWidth,
+ (UINT32*)pun32BufferWidth
+ );
+#endif
+
+ return Status;
+}
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: ConvertPCXToUgaBltWrapper
+//
+// Description: Wrapper function to process ConvertPCXToUgaBlt
+// functionallity based on SDL token.
+//
+// Input: VOID *PCXImage - Pointer to the memory that has the PCX
+// Image that need to be decoded.
+// UINT32 PCXImageSize - Size of the PCX Image
+// OUT VOID **UgaBlt - Two cases
+// Case 1: Memory is expected to be allocated by the callee.
+// Address provided as input should be NULL.
+// pointer that will receive the address of the UGA buffer.
+// The buffer is allocated by callee.
+// This buffer need to be freed by the caller.
+// Case 2: Memory is allocated by the caller
+// OUT UINT32 *UgaBltSize - Pointer that stores Size of UgaBlt in bytes.
+// This will be treated as an input. This should have value ZERO for Case 2 above.
+// UINT32 *PixelHeight - Height of UgaBlt/PCX Image in pixels
+// UINT32 *PixelWidth - Width of UgaBlt/PCX Image in pixels
+//
+// Output: EFI_STATUS
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS ConvertPCXToUgaBltWrapper (
+ IN VOID *PCXImage,
+ IN UINT32 PCXImageSize,
+ IN OUT VOID **UgaBlt,
+ IN OUT UINT32 *UgaBltSize,
+ OUT UINT32 *PixelHeight,
+ OUT UINT32 *PixelWidth)
+{
+ EFI_STATUS Status = EFI_UNSUPPORTED;
+
+#if SETUP_PCX_LOGO_SUPPORT
+ Status = ConvertPCXToUgaBlt (
+ PCXImage,
+ PCXImageSize,
+ UgaBlt,
+ UgaBltSize,
+ PixelHeight,
+ PixelWidth);
+#endif
+
+ return Status;
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: ConvertPNGToUgaBltWrapper
+//
+// Description: Wrapper function to process ConvertPNGToUgaBlt
+// functionallity based on SDL token.
+//
+// Input: VOID *PNGImage - Pointer to the memory that has the PNG
+// Image that need to be decoded.
+// UINT32 PNGImageSize - Size of the PNG Image
+// OUT VOID **UgaBlt - Two cases
+// Case 1: Memory is expected to be allocated by the callee.
+// Address provided as input should be NULL.
+// pointer that will receive the address of the UGA buffer.
+// The buffer is allocated by callee.
+// This buffer need to be freed by the caller.
+// Case 2: Memory is allocated by the caller
+// OUT UINT32 *UgaBltSize - Pointer that stores Size of UgaBlt in bytes.
+// This will be treated as an input. This should have value ZERO for Case 2 above.
+// UINT32 *PixelHeight - Height of UgaBlt/PNG Image in pixels
+// UINT32 *PixelWidth - Width of UgaBlt/PNG Image in pixels
+//
+// Output: EFI_STATUS
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS ConvertPNGToUgaBltWrapper (
+ IN VOID *PNGImage,
+ IN UINT32 PNGImageSize,
+ IN OUT VOID **UgaBlt,
+ IN OUT UINT32 *UgaBltSize,
+ OUT UINT32 *PixelHeight,
+ OUT UINT32 *PixelWidth)
+{
+ EFI_STATUS Status = EFI_UNSUPPORTED;
+
+#if SETUP_PNG_LOGO_SUPPORT
+ Status = ConvertPNGToUgaBlt (
+ PNGImage,
+ PNGImageSize,
+ UgaBlt,
+ UgaBltSize,
+ PixelHeight,
+ PixelWidth);
+#endif
+
+ return Status;
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: RTIfrProcessExitWrapper
+//
+// Description: Wrapper function to process the RuntimeParsing Exit
+// functionallity based on SDL token.
+//
+// Input: none
+//
+// Output: none
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID RTIfrProcessExitWrapper(VOID)
+{
+#if SETUP_RUNTIME_IFR_PROCESSING
+ RTIfrProcessExit();
+#endif
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: RTIfrProcessAddVarListAndPageIDListWrapper
+//
+// Description: Wrapper function to add runtime variable and Pages
+// based on SDL token.
+//
+// Input: none
+//
+// Output: none
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID RTIfrProcessAddVarListAndPageIDListWrapper(VOID)
+{
+#if SETUP_RUNTIME_IFR_PROCESSING
+ RTIfrProcessAddVarListAndPageIDList();
+#endif
+}
+
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: RTIfrProcessFormIfUpdatedWrapper
+//
+// Description: Wrapper function to include RTIfrProcessFormIfUpdated
+// based on SDL token.
+//
+// Input: Link
+//
+// Output: Bool
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN RTIfrProcessFormIfUpdatedWrapper(UINT16 link)
+{
+#if SETUP_RUNTIME_IFR_PROCESSING
+ return RTIfrProcessFormIfUpdated(link);
+#else
+ return FALSE;
+#endif
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: RTIfrUpdateVariableInfoWrapper
+//
+// Description: Wrapper function to include RTIfrUpdateVariableInfo
+// based on SDL token.
+//
+// Input: ControlVariable, Handle
+//
+// Output: Bool
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if UEFI_2_1_SUPPORT
+BOOLEAN RTIfrUpdateVariableInfoWrapper(UINT32 ControlVariable, EFI_HANDLE Handle)
+{
+#if SETUP_RUNTIME_IFR_PROCESSING
+ RTIfrUpdateVariableInfo(ControlVariable, Handle);
+ return TRUE;
+#else
+ return FALSE;
+#endif
+}
+#endif
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: RTIfrProcessRunTimeFormsWrapper
+//
+// Description: Wrapper function to process runtime Ifrs
+// based on SDL token.
+//
+// Input: Link
+//
+// Output: Bool
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID RTIfrProcessRunTimeFormsWrapper(VOID*ref)
+{
+#if SETUP_RUNTIME_IFR_PROCESSING
+ RTIfrProcessRunTimeForms(ref);
+#endif
+}
+
+EFI_STATUS Uefi20HiiInitializeProtocol( VOID );
+EFI_STATUS Uefi21HiiInitializeProtocol(VOID);
+EFI_STATUS HiiInitializeProtocol( VOID )
+{
+#if UEFI_2_1_SUPPORT
+ return Uefi21HiiInitializeProtocol();
+#else
+ return Uefi20HiiInitializeProtocol();
+#endif
+}
+
+CHAR16 *Uefi20HiiGetStringLanguage( VOID* handle, UINT16 token, CHAR16 *lang );
+CHAR16 *Uefi21HiiGetStringLanguage(VOID * handle, UINT16 token, CHAR16 *lang);
+CHAR16 *HiiGetStringLanguage( VOID* handle, UINT16 token, CHAR16 *lang )
+{
+#if UEFI_2_1_SUPPORT
+ return Uefi21HiiGetStringLanguage(handle,token,lang);
+#else
+ return Uefi20HiiGetStringLanguage(handle,token,lang);
+#endif
+}
+
+UINT16 Uefi20HiiChangeStringLanguage( VOID* handle, UINT16 token, CHAR16 *lang, CHAR16 *string );
+UINT16 Uefi21HiiChangeStringLanguage(VOID* handle, UINT16 token, CHAR16 *lang, CHAR16 *string);
+UINT16 HiiChangeStringLanguage( VOID* handle, UINT16 token, CHAR16 *lang, CHAR16 *string )
+{
+#if UEFI_2_1_SUPPORT
+ return Uefi21HiiChangeStringLanguage( handle, token, lang, string );
+#else
+ return Uefi20HiiChangeStringLanguage( handle, token, lang, string);
+#endif
+}
+
+UINTN Uefi20HiiGetGlyphWidth(VOID);
+UINTN Uefi20HiiGetGlyphHeight(VOID);
+UINTN Uefi21HiiGetGlyphWidth(VOID);
+UINTN Uefi21HiiGetGlyphHeight(VOID);
+UINTN HiiGetGlyphWidth(VOID)
+{
+#if UEFI_2_1_SUPPORT
+ return Uefi21HiiGetGlyphWidth();
+#else
+ return Uefi20HiiGetGlyphWidth();
+#endif
+}
+
+UINTN HiiGetGlyphHeight(VOID)
+{
+#if UEFI_2_1_SUPPORT
+ return Uefi21HiiGetGlyphHeight();
+#else
+ return Uefi20HiiGetGlyphHeight();
+#endif
+}
+
+
+EFI_STATUS GetUnicodeCollection2Protocol(VOID **Protocol);
+EFI_STATUS GetUnicodeCollectionProtocol(VOID **Protocol);
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure : InitUnicodeCollectionProtocol
+//
+// Description : function to add a string
+//
+// Input : .
+//
+// Output : status and VOID** UnicodeCollectionProtocol
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS InitUnicodeCollectionProtocol(VOID **Protocol)
+{
+#if UEFI_2_1_SUPPORT
+ return GetUnicodeCollection2Protocol(Protocol);
+#else
+ return GetUnicodeCollectionProtocol(Protocol);
+#endif
+}
+
+//----------------------------------------------------------------------------
+// In Aptio UnicodeCollation2 protocol is supported in the same file as
+// UnicodeCollation Protocol depending on EFI_SPECIFICATION_VERSION
+//----------------------------------------------------------------------------
+#include EFI_PROTOCOL_DEFINITION(UnicodeCollation)
+#if UEFI_2_1_SUPPORT
+#ifndef TSE_FOR_APTIO_4_50
+#include EFI_PROTOCOL_DEFINITION(UnicodeCollation2)
+#endif
+#endif
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure : MetaiMatch
+//
+// Description : Calles MetaiMatch of EFI_UNICODE_COLLATION2_PROTOCOL or EFI_UNICODE_COLLATION_PROTOCOL
+//
+// Input :
+//
+// Output : Boolean
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN MetaiMatch(VOID *Protocol,IN CHAR16 *String,IN CHAR16 *Pattern)
+{
+#if UEFI_2_1_SUPPORT
+ return ((EFI_UNICODE_COLLATION2_PROTOCOL*)Protocol)->MetaiMatch((EFI_UNICODE_COLLATION2_PROTOCOL*)Protocol,String,Pattern);
+#else
+ return ((EFI_UNICODE_COLLATION_PROTOCOL*)Protocol)->MetaiMatch((EFI_UNICODE_COLLATION_PROTOCOL*)Protocol,String,Pattern);
+#endif
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure : StringColl
+//
+// Description : Calles StriColl of EFI_UNICODE_COLLATION2_PROTOCOL or EFI_UNICODE_COLLATION_PROTOCOL
+//
+// Input : VOID *Protocol,IN CHAR16 *String1,IN CHAR16 *String2
+//
+// Output : INTN
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+INTN StringColl(VOID *Protocol,IN CHAR16 *String1,IN CHAR16 *String2)
+{
+#if UEFI_2_1_SUPPORT
+ return ((EFI_UNICODE_COLLATION2_PROTOCOL*)Protocol)->StriColl((EFI_UNICODE_COLLATION2_PROTOCOL*)Protocol, String1, String2 );
+#else
+ return ((EFI_UNICODE_COLLATION_PROTOCOL*)Protocol)->StriColl((EFI_UNICODE_COLLATION_PROTOCOL*)Protocol, String1, String2 );
+#endif
+}
+
+UINTN TestPrintLength ( IN CHAR16 *String )
+{
+#if WIDE_GLYPH_SUPPORT
+#if !UEFI_2_1_SUPPORT
+ return HiiTestPrintLength ( String );
+#else
+ return UefiHiiTestPrintLength ( String );
+#endif /* #if !UEFI_2_1_SUPPORT */
+#else
+ return EfiTestPrintLength ( String );
+#endif //WIDE_GLYPH_SUPPORT
+}
+
+//#undef TSE_CSM_SUPPORT
+//#define TSE_CSM_SUPPORT 0
+
+
+VOID CsmBBSSetBootPriorities( BOOT_DATA *pBootData, UINT16 *pOrder, UINTN u16OrderCount)
+{
+#if TSE_CSM_SUPPORT
+ BBSSetBootPriorities( pBootData, pOrder, u16OrderCount);
+#endif
+}
+
+BOOLEAN BBSValidDevicePath( EFI_DEVICE_PATH_PROTOCOL *DevicePath )
+{
+#if TSE_CSM_SUPPORT
+ return IsBBSDevicePath(DevicePath);
+#else
+ return FALSE;
+#endif
+}
+
+//----------------------------------------------------------------------------
+// Procedure: CsmBBSBootOptionName
+//
+// Description: Override function. OEM can override this function to change the
+// default behaviour of function
+//----------------------------------------------------------------------------
+#if !OVERRIDE_CsmBBSBootOptionName
+CHAR16 * CsmBBSBootOptionName( BOOT_DATA *bootData)
+{
+#if TSE_CSM_SUPPORT
+ return GetBBSBootOptionName( bootData);
+#else
+ return NULL;
+#endif
+}
+#endif
+
+EFI_STATUS CsmBBSSetBootNowPriority( BOOT_DATA *BootData,UINTN uiPrefferedDevice,BOOLEAN ShowAllBbsDev)
+{
+#if TSE_CSM_SUPPORT
+ return BBSSetBootNowPriority( BootData, uiPrefferedDevice, ShowAllBbsDev);
+#else
+ return EFI_UNSUPPORTED;
+#endif
+}
+
+
+VOID CsmBBSGetDeviceList( VOID )
+{
+#if TSE_CSM_SUPPORT
+ BBSGetDeviceList();
+#endif
+}
+EFI_STATUS BBSLaunchDevicePath( EFI_DEVICE_PATH_PROTOCOL *DevicePath );
+EFI_STATUS CsmBBSLaunchDevicePath( EFI_DEVICE_PATH_PROTOCOL *DevicePath )
+{
+#if TSE_CSM_SUPPORT
+ return BBSLaunchDevicePath( DevicePath);
+#else
+ return EFI_UNSUPPORTED;
+#endif
+}
+
+
+VOID CsmSaveBBSOrder( VOID *nvPtr )
+{
+#if TSE_CSM_SUPPORT
+ SaveBBSOrder(nvPtr);
+#endif
+}
+
+//EIP109382 Starts
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure : CsmRearrangeBBSOrder
+//
+// Description : Calls RearrangeBBSOrder function
+//
+// Input : VOID * -> Cache buffer, VOID * -> Default buffer
+//
+// Output : VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID RearrangeBBSOrder (NVRAM_VARIABLE *nvPtr, NVRAM_VARIABLE *DefaultBuffer);
+VOID CsmRearrangeBBSOrder (VOID *nvPtr, VOID *DefaultBuffer)
+{
+#if TSE_CSM_SUPPORT
+ RearrangeBBSOrder (nvPtr, DefaultBuffer);
+#endif
+}
+//EIP109382 Ends
+
+VOID CsmBBSSetDisabled(UINT16 Index, VOID **DisDPs, UINTN *DPSize)
+{
+#if TSE_CSM_SUPPORT
+ BBSSetDisabled(Index, DisDPs, DPSize);
+#endif
+}
+
+
+VOID CsmRearrangeBBSOrderVariable(VOID *popupSel, UINT8 bIncrease,UINT16 *newOption)
+{
+#if TSE_CSM_SUPPORT
+ RearrangeBBSOrderVariable(popupSel, bIncrease,newOption);
+#endif
+}
+
+VOID CsmLoadDefaultLegDevOrder(VOID)
+{
+#if TSE_CSM_SUPPORT
+ LoadDefaultLegDevOrder();
+#endif
+}
+
+EFI_STATUS CsmBBSUpdateOrder(UINT16 *newOption,UINT32 *offset,UINTN *size, VOID **buffer)
+{
+#if TSE_CSM_SUPPORT
+ BBSUpdateOrder(newOption,offset,size, buffer);
+ return EFI_SUCCESS;
+#else
+ return EFI_INVALID_PARAMETER;
+#endif
+}
+
+// EIP-24971: Start , moving dependency to board module...
+VOID TseBBSSetBootPriorities_BootOrder(UINT16 Priority)
+{
+#if TSE_CONTINUE_BOOT_NOW_ON_FAIL
+ BBSSetBootPriorities_BootOrder(Priority);
+#endif
+}
+//EIP-24971: End
+
+VOID GetProgressColor(EFI_UGA_PIXEL * BGColor, EFI_UGA_PIXEL * BDRColor, EFI_UGA_PIXEL * FillColor)
+{
+ EFI_UGA_PIXEL backgroundColor = PROGRESSBAR_BACKGROUNDCOLOR;
+ EFI_UGA_PIXEL borderColor = PROGRESSBAR_BORDERCOLOR;
+ EFI_UGA_PIXEL fillColor = PROGRESSBAR_FILLCOLOR;
+
+ MemCopy( BGColor, &backgroundColor, sizeof(EFI_UGA_PIXEL) );
+ MemCopy( BDRColor, &borderColor, sizeof(EFI_UGA_PIXEL) );
+ MemCopy( FillColor, &fillColor, sizeof(EFI_UGA_PIXEL) );
+}
+
+///IDE Password Hooks...
+UINTN gCurrIDESecPage;
+
+#if !OVERRIDE_TSEIDEPasswordGetName
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TSEIDEPasswordGetName
+//
+// Description: Hook function for the IDE Password fuctionality based on
+// the security token SETUP_IDE_SECURITY_SUPPORT
+//
+// Input: UINT16 Index
+//
+// Output: UINT16
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+UINT16 TSEIDEPasswordGetName(UINT16 Index)
+{
+#if SETUP_IDE_SECURITY_SUPPORT
+ return IDEPasswordGetName(Index);
+#else
+ return 0;
+#endif
+}
+#endif
+
+#if !OVERRIDE_TSEIDEPasswordAuthenticate
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TSEIDEPasswordAuthenticate
+//
+// Description: Hook function for the IDE Password fuctionality based on
+// the security token SETUP_IDE_SECURITY_SUPPORT
+//
+// Input: CHAR16 *Password, VOID* DataPtr, BOOLEAN bCheckUser
+//
+// Output: EFI_STATUS
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS TSEIDEPasswordAuthenticate(CHAR16 *Password, VOID* DataPtr, BOOLEAN bCheckUser)
+{
+#if SETUP_IDE_SECURITY_SUPPORT
+ return IDEPasswordAuthenticate(Password, DataPtr, bCheckUser);
+#else
+ return FALSE;
+#endif
+}
+#endif
+
+#if !OVERRIDE_TSEIDEPasswordUpdate
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TSEIDEPasswordUpdate
+//
+// Description: Hook function for the IDE Password fuctionality based on
+// the security token SETUP_IDE_SECURITY_SUPPORT
+//
+// Input: UINT32 DeviceIndex, CHAR16 *Password, BOOLEAN bCheckUser
+//
+// Output: BOOLEAN
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN TSEIDEPasswordUpdate( UINT32 DeviceIndex, CHAR16 *Password, BOOLEAN bCheckUser)
+{
+#if SETUP_IDE_SECURITY_SUPPORT
+ return IDEPasswordUpdate(DeviceIndex, Password, bCheckUser);
+#else
+ return FALSE;
+#endif
+}
+#endif
+
+#if !OVERRIDE_TSEIDEPasswordGetDataPtr
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TSEIDEPasswordGetDataPtr
+//
+// Description: Hook function for the IDE Password fuctionality based on
+// the security token SETUP_IDE_SECURITY_SUPPORT
+//
+// Input: UINTN Index
+//
+// Output: VOID*
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID* TSEIDEPasswordGetDataPtr(UINTN Index)
+{
+#if SETUP_IDE_SECURITY_SUPPORT
+ return IDEPasswordGetDataPtr(Index);
+#else
+ return NULL;
+#endif
+}
+#endif
+
+#if !OVERRIDE_TSEIDEPasswordGetLocked
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TSEIDEPasswordGetLocked
+//
+// Description: Hook function for the IDE Password fuctionality based on
+// the security token SETUP_IDE_SECURITY_SUPPORT
+//
+// Input: UINTN Index
+//
+// Output: BOOLEAN
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN TSEIDEPasswordGetLocked(UINTN Index)
+{
+#if SETUP_IDE_SECURITY_SUPPORT
+ return IDEPasswordGetLocked(Index);
+#else
+ return FALSE;
+#endif
+}
+#endif
+
+#if !OVERRIDE_TSEIDEPasswordCheck
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TSEIDEPasswordCheck
+//
+// Description: Hook function for the IDE Password fuctionality based on
+// the security token SETUP_IDE_SECURITY_SUPPORT
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID TSEIDEPasswordCheck()
+{
+ VOID *UgaBlt = NULL;
+ UINTN SizeOfX=0, SizeOfY=0;
+
+#if SETUP_IDE_SECURITY_SUPPORT
+ UgaBlt = SavePostScreen(&SizeOfX, &SizeOfY);
+ IDEPasswordCheck();
+ RestorePostScreen( UgaBlt, SizeOfX, SizeOfY);
+#endif
+}
+#endif
+
+#if !OVERRIDE_TSEIDEPasswordFreezeDevices
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TSEIDEPasswordFreezeDevices
+//
+// Description: Hook function for the IDE Password fuctionality based on
+// the security token SETUP_IDE_SECURITY_SUPPORT
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID TSEIDEPasswordFreezeDevices()
+{
+#if SETUP_IDE_SECURITY_SUPPORT
+ IDEPasswordFreezeDevices();
+#endif
+}
+#endif
+
+#if !OVERRIDE_TSEUnlockHDD
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TSEUnlockHDD
+//
+// Description: Hook function for the IDE Password fuctionality based on
+// the security token SETUP_IDE_SECURITY_SUPPORT
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID TSEUnlockHDD()
+{
+#if SETUP_IDE_SECURITY_SUPPORT
+ UnlockHDD();
+#endif
+}
+#endif
+
+#if !OVERRIDE_TSESetHDDPassword
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TSESetHDDPassword
+//
+// Description: Hook function for the IDE Password fuctionality based on
+// the security token SETUP_IDE_SECURITY_SUPPORT
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID TSESetHDDPassword()
+{
+#if SETUP_IDE_SECURITY_SUPPORT
+ SetHDDPassword();
+#endif
+}
+#endif
+
+#if !OVERRIDE_TSEIDEUpdateConfig
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TSEIDEUpdateConfig
+//
+// Description: Hook function for the IDE Password fuctionality based on
+// the security token SETUP_IDE_SECURITY_SUPPORT
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID TSEIDEUpdateConfig(VOID *ideSecConfig, UINTN value)
+{
+#if SETUP_IDE_SECURITY_SUPPORT
+ IDEUpdateConfig(ideSecConfig, value);
+#endif
+}
+#endif
+
+UINTN TseGetANSIEscapeCode(CHAR16 *String,UINT8 *Bold,UINT8 *Foreground, UINT8 *Background)
+{
+#if TSE_ANSI_ESC_CODE_SUPPORT
+ return GetANSIEscapeCode(String, Bold, Foreground, Background);
+#else
+ return 0;
+#endif
+}
+
+CHAR16 *TseSkipEscCode(CHAR16 *String)
+{
+#if TSE_ANSI_ESC_CODE_SUPPORT
+ return (CHAR16 *)SkipEscCode(String);
+#else
+ return StrDup(String);
+#endif
+}
+
+BOOLEAN TseCheckShiftState(AMI_EFI_KEY_DATA ActionKey, UINT32 HotkeyState)
+{
+#if TSE_USE_AMI_EFI_KEYCODE_PROTOCOL
+ return (TSE_CHECK_SHIFTSTATE(ActionKey.KeyState.KeyShiftState, HotkeyState));
+#else
+ return 1;
+#endif
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TsePrintScreenSupport
+//
+// Description: Function to return print screen support feature
+//
+// Input: UINT16 ScanCode
+//
+// Output: TRUE/FALSE
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN TsePrintScreenEventSupport(UINT16 ScanCode)
+{
+#if TSE_PRN_SCRN_EVENT_SUPPORT
+ if( ScanCode == TSE_PRN_SCRN_KEY_SCAN )
+ return 1;
+ else
+ return 0;
+#else
+ return 0;
+#endif
+}
+
+
+VOID TseHotkeyPrintScreenSupport()
+{
+#if TSE_PRN_SCRN_EVENT_SUPPORT
+ SupportPrintScreen();
+#endif
+}
+
+BOOLEAN CheckSystemPasswordPolicy(UINT32 PasswordInstalled)
+{
+#if SETUP_USER_PASSWORD_POLICY
+ return (PasswordInstalled & AMI_PASSWORD_USER)?TRUE:FALSE;
+#else
+ return (PasswordInstalled & AMI_PASSWORD_ANY)?TRUE:FALSE;
+#endif
+}
+
+
+
+extern VOID EfiStrCpy(IN CHAR16 *Destination, IN CHAR16 *Source);
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure : GetVariableNameByID
+//
+// Description : function to get Variable Name based on ID
+//
+// Input : UINT32 VariableID
+//
+// Output : CHAR16 *
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+CHAR16 *GetVariableNameByID( UINT32 VariableID )
+{
+ CHAR16 *varName = (CHAR16 *)EfiLibAllocateZeroPool(VARIABLE_NAME_LENGTH);
+ if(varName != NULL)
+ {
+ switch(VariableID)
+ {
+ case VARIABLE_ID_LANGUAGE:
+#if SETUP_SUPPORT_PLATFORM_LANG_VAR
+ EfiStrCpy(varName, L"PlatformLang");
+#else
+ EfiStrCpy(varName, L"Lang");
+#endif
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ return varName;
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure : GetGUIDNameByID
+//
+// Description : function to get GUID Name based on Variable ID
+//
+// Input : UINT32 VariableID
+//
+// Output : CHAR16 *
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+CHAR16 *GetGUIDNameByID( UINT32 VariableID )
+{
+ CHAR16 *guidName = (CHAR16 *)EfiLibAllocateZeroPool(VARIABLE_NAME_LENGTH);
+ if(guidName != NULL)
+ {
+ switch(VariableID)
+ {
+ case VARIABLE_ID_LANGUAGE:
+#if SETUP_SUPPORT_PLATFORM_LANG_VAR
+ EfiStrCpy(guidName, L"PlatformLangCodes");
+#else
+ EfiStrCpy(guidName, L"LangCodes");
+#endif
+ break;
+ default:
+ break;
+ }
+ }
+ return guidName;
+}
+
+VOID BootGetLanguages()
+{
+#if SETUP_SUPPORT_PLATFORM_LANG_VAR
+ GetPlatformBootLanguages();
+#else
+ GetBootLanguages();
+#endif
+}
+
+
+///EIP - 24971
+BOOLEAN PlatformLangVerSupport()
+{
+#if SETUP_SUPPORT_PLATFORM_LANG_VAR
+ return 1;
+#else
+ return 0;
+#endif
+}
+
+BOOLEAN BootNowInBootOrderSupport()
+{
+#if TSE_BOOT_NOW_IN_BOOT_ORDER
+ return 1;
+#else
+ return 0;
+#endif
+}
+
+BOOLEAN IsTseLoadPasswordOnDefaults()
+{
+ return TSE_LOAD_PASSWORD_ON_DEFAULTS;
+}
+
+UINT16 GetNoVarStoreBootCountOffset()
+{
+#if NO_VARSTORE_SUPPORT
+ return (UINT16)(TSE_STRUCT_OFFSET(TSE_SETUP_DATA, BootCount));
+#else
+ return 0;
+#endif
+}
+
+
+VOID SetPostScreenScrollArea(UINTN TopRow, UINTN TopCol, UINTN BottomRow, UINTN BottomCol);
+VOID ConfigPostScrollArea(VOID)
+{
+ UINTN X[]= TSE_POSTSCREEN_SCROLL_AREA;
+ SetPostScreenScrollArea(X[0],X[1],X[2],X[3]);
+}
+
+///EIP - 24971
+
+////////// BOARD MODULE FUNCTIONS /////////////
+
+#if !OVERRIDE_CheckIsAllowedPasswordChar
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: CheckIsAllowedPasswordChar
+//
+// Description: Check is the char allowed for password control
+// based on SDL token.
+//
+// Input: Input character
+//
+// Output: Bool
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN CheckIsAllowedPasswordChar(CHAR16 Char)
+{
+#if PASSWORD_WITH_SPECIAL_CHAR_SUPPORT
+ return (BOOLEAN)_CharIsAlphaNumericSpecial(Char);
+#else
+ return (BOOLEAN)_CharIsAlphaNumeric(Char);
+#endif
+}
+#endif
+
+#if !OVERRIDE_PopupPasswordFormCallback
+EFI_STATUS PopupPasswordFormCallback(/*CONTROL_INFO*/VOID * pControlData,UINT16 Key,UINT8 Flags)
+{
+ return EFI_UNSUPPORTED;
+}
+#endif
+
+#if !OVERRIDE_PopupPwdHandleActionOverRide
+EFI_STATUS _PopupPasswordHandleAction( VOID *popuppassword, VOID *Data);
+EFI_STATUS PopupPwdHandleActionOverRide(VOID *popuppassword, VOID *Data)
+{
+ return _PopupPasswordHandleAction(popuppassword, Data);
+}
+#endif
+
+#if !OVERRIDE_PasswordCheckInstalled
+UINT32 PasswordCheckInstalledLocal(VOID);
+UINT32 PasswordCheckInstalled( VOID )
+{
+ UINT32 Installed = AMI_PASSWORD_NONE;
+
+ Installed = PasswordCheckInstalledLocal();
+
+ return Installed;
+}
+#endif
+
+#if !OVERRIDE_PasswordAuthenticate
+UINT32 PasswordAuthenticateLocal( CHAR16 *Password );
+UINT32 PasswordAuthenticate( CHAR16 *Password )
+{
+ UINT32 PasswordType = AMI_PASSWORD_NONE;
+
+ PasswordType = PasswordAuthenticateLocal(Password);
+
+ return PasswordType;
+}
+#endif
+
+#if !OVERRIDE_PasswordUpdate
+CHAR16 *PasswordUpdateLocal( CHAR16 *Password, UINTN Size );
+CHAR16 *PasswordUpdate( CHAR16 *Password, UINTN Size )
+{
+ CHAR16 *Buffer = NULL;
+
+ Buffer = PasswordUpdateLocal(Password, Size);
+
+ return Buffer;
+}
+#endif
+
+#if !OVERRIDE_PasswordCommitChanges
+VOID PasswordCommitChanges( BOOLEAN SaveChanges )
+{
+}
+#endif
+
+#if !OVERRIDE_PopupPasswordCheckInstalled
+UINT32 PopupPasswordCheckInstalledLocal(VOID *popuppassword);
+UINT32 PopupPasswordCheckInstalled(VOID *popuppassword)
+{
+ return PopupPasswordCheckInstalledLocal(popuppassword);
+}
+#endif
+
+#if !OVERRIDE_PopupPasswordAuthenticate
+BOOLEAN PopupPasswordAuthenticateLocal( VOID *popuppassword, CHAR16 *Password );
+BOOLEAN PopupPasswordAuthenticate( VOID *popuppassword, CHAR16 *Password )
+{
+ return PopupPasswordAuthenticateLocal( popuppassword, Password );
+}
+#endif
+
+/*
+BOOLEAN IsPasswordSupportNonCaseSensitive()
+{
+#if SETUP_PASSWORD_NON_CASE_SENSITIVE
+ return TRUE;
+#endif
+ return FALSE;
+}
+*/
+
+#if !OVERRIDE_NoVarStoreSupport
+BOOLEAN NoVarStoreSupport(VOID)
+{
+ return NO_VARSTORE_SUPPORT;
+}
+#endif
+
+#if !OVERRIDE_NoVarStoreUpdateSystemAccess
+VOID NoVarStoreUpdateSystemAccess(UINT8 sysAccessValue)
+{
+}
+#endif
+
+#if !OVERRIDE_ItkSupport
+BOOLEAN ItkSupport(VOID)
+{
+ return SETUP_ITK_COMPATIBILITY;
+}
+#endif
+
+
+#if !OVERRIDE_BbsItkBoot
+EFI_STATUS BbsItkBoot()
+{
+ return EFI_UNSUPPORTED;
+}
+#endif
+
+#if !OVERRIDE_GetAMITSEVariable
+VOID GetAMITSEVariableLocal(VOID **mSysConf, UINT8 **setup, UINTN *VarSize);
+VOID GetAMITSEVariable(VOID **mSysConf, UINT8 **setup, UINTN *VarSize)
+{
+ GetAMITSEVariableLocal(mSysConf, setup, VarSize);
+}
+#endif
+
+#if !OVERRIDE_GetBootTimeOut
+UINT16 GetBootTimeOutLocal(UINT16 DefaultValue);
+UINT16 GetBootTimeOut(UINT16 DefaultValue)
+{
+ UINT16 Val;
+
+ Val = GetBootTimeOutLocal(SETUP_DEFAULT_TIMEOUT);
+
+ if(Val == 0xFFFF)
+ return Val;
+ if(SETUP_TIMEOUT_IN_TENTHOFSEC)
+ return Val; //timeout Value Calcualted in 1/0 Sec. Value is already in 1/10 Sec.
+ else
+ {
+ //timeout Value Calcualted in 1/0 Sec. Value is in Sec and Multiply by 10 to make 1/10.
+ if((65530/10) > Val) // To avoid overflow
+ return Val*10;
+ else
+ return 0xFFFE; // return Max timeout possible.
+ }
+
+}
+#endif
+
+#if !OVERRIDE_VarBuildItkDefaults
+VOID VarBuildItkDefaults(VOID)
+{
+}
+#endif
+
+#if !OVERRIDE_SetSystemAccessValueItk
+VOID SetSystemAccessValueItk(UINT8 sysAccessValue)
+{
+}
+#endif
+
+#if !OVERRIDE_FindVarFromITKQuestionId
+UINT32 FindVarFromITKQuestionId(UINT16 QuestionId)
+{
+ return 0;
+}
+#endif
+
+#if !OVERRIDE_IsOEMLogoType
+BOOLEAN IsOEMLogoType(UINT8 *ImageData)
+{
+ // Return TRUE if OEM format.
+ return FALSE;
+}
+#endif
+
+#if !OVERRIDE_ConvertOEMFormatToUgaBlt
+EFI_STATUS ConvertOEMFormatToUgaBlt ( IN VOID *OEMImage, IN UINT32 OEMImageSize, IN OUT VOID **UgaBlt,
+ IN OUT UINT32 *UgaBltSize, OUT UINT32 *Height, OUT UINT32 *Width, BOOLEAN * Animate)
+{
+ // Use this override function to convert the oem image to UGABlt.
+ return EFI_UNSUPPORTED;
+}
+#endif
+
+#if !OVERRIDE_CleanUpOEMLogo
+VOID CleanUpOEMLogo(VOID)
+{
+ //Use this override function to free up memory If needed
+}
+#endif
+
+#if !OVERRIDE_DoOEMLogoAnimate
+VOID DoOEMLogoAnimate(CO_ORD_ATTRIBUTE Attribute,INTN CoordinateX,INTN CoordinateY)
+{
+ //Takecare to init the timer to animate.
+}
+#endif
+
+#if !OVERRIDE_BBSBuildName
+VOID BBSBuildName( CHAR16 *String, VOID *info, UINTN index, VOID *HDDInfo )
+{
+#if TSE_CSM_SUPPORT
+#if TSE_DEVICE_PATH_NAME
+ BBSBuildDevicePathName(String, info, index, HDDInfo);
+#else
+ BBSBuildDefaultName(String, info, index, HDDInfo );
+#endif
+#endif
+}
+#endif
+
+VOID StopClickEvent(VOID);
+/// EIP74591: START
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: MainSetupLoopHook
+//
+// Description: Set OVERRIDE_MainSetupLoopHook to 1, if OEM wants to override the MainSetupLoopHook function from Board module.
+//
+// Input: VOID
+//
+// Output: EFI_STATUS
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_MainSetupLoopHook
+EFI_STATUS MainSetupLoop( VOID );
+EFI_STATUS MainSetupLoopHook( VOID )
+{//EIP74591 : Modified MainSetupLoop as board module hook
+ StopClickEvent();//EIP 86253 : Mouse and SoftKbd does not work after displaying "No option to boot to" in POST
+ return MainSetupLoop();
+}
+#endif
+#if EFI_SPECIFICATION_VERSION>=0x2000A
+//EIP77108 : START
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: ProcessBrowserActionRequestHook
+//
+// Description: Set OVERRIDE_ProcessBrowserActionRequestHook to 1, if OEM wants to override the ProcessBrowserActionRequestHook function from Board module.
+//
+// Input: EFI_BROWSER_ACTION_REQUEST ActionReq
+//
+// Output: EFI_STATUS
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_ProcessBrowserActionRequestHook
+EFI_STATUS ProcessBrowserActionRequest(EFI_BROWSER_ACTION_REQUEST ActionReq);
+EFI_STATUS ProcessBrowserActionRequestHook(EFI_BROWSER_ACTION_REQUEST ActionReq)
+{//EIP77108 : Modified ProcessBrowserActionRequest as board module hook
+ return ProcessBrowserActionRequest(ActionReq);
+}
+#endif
+#endif
+//EIP77108 : END
+/// EIP74591: END
+/// EIP-42520: START
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: BBSGetNonStandardGroupType
+//
+// Description: Set OVERRIDE_BBSGetNonStandardGroupType to 1, then add the OEM
+// specific function to override this function to provide a non standard
+// group type for the given Device Type.
+//
+// Input: BBS Device Type
+//
+// Output: String Token
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_BBSGetNonStandardGroupType
+UINT16 BBSGetNonStandardGroupType(UINT16 DeviceType)
+{
+ // By default return the Unknown order
+ return STRING_TOKEN(STR_UNKNOWN_ORDER);
+}
+#endif
+/// EIP-42520: END
+
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TSEMouseInitHook
+//
+// Description: Hook function which is called when Mouse init is done.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_TSEMouseInitHook
+VOID TSEMouseInitHook(VOID)
+{
+}
+#endif
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TSEMouseStopHook
+//
+// Description: Hook function which is called when Mouse Stop is done.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_TSEMouseStopHook
+VOID TSEMouseStopHook(VOID)
+{
+}
+#endif
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TSEMouseRefreshHook
+//
+// Description: Hook function which is called when Mouse Refresh action is done.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_TSEMouseRefreshHook
+VOID TSEMouseRefreshHook(VOID)
+{
+}
+#endif
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TSEMouseStartHook
+//
+// Description: Hook function which is called when Mouse start action is done.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_TSEMouseStartHook
+VOID TSEMouseStartHook(VOID)
+{
+}
+#endif
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TSEMouseDestroyHook
+//
+// Description: Hook function which is called when Mouse Destory is done.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_TSEMouseDestoryHook
+VOID TSEMouseDestroyHook(VOID)
+{
+}
+#endif
+
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TSEMouseIgnoreMouseActionHook
+//
+// Description: Hook function which can make TSE to Ignore the mouse action.
+// This function is called whenever TSE read the mouse action
+// This hook need to be used carefully. It can used in the cases when Mouse
+// actions consumes by modules like Softkeyboard and not to be used by TSE
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+// TRUE - Mouse actions will be ignored by TSE
+// FALSE - Mouse action
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_TSEMouseIgnoreMouseActionHook
+BOOLEAN TSEMouseIgnoreMouseActionHook(VOID)
+{
+ return FALSE;
+}
+#endif
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TSEStringReadLoopEntryHook
+//
+// Description: Hook function which is called when Strings/Password is going to be read.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_TSEStringReadLoopEntryHook
+VOID TSEStringReadLoopEntryHook(VOID)
+{
+}
+#endif
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TSEStringReadLoopExitHook
+//
+// Description: Hook function which is called after Strings/Password read.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_TSEStringReadLoopExitHook
+VOID TSEStringReadLoopExitHook(VOID)
+{
+}
+#endif
+
+EFI_STATUS GetAdvanceDeviceName( CHAR16 *String, VOID *info, UINTN index, VOID *HDDInfo )
+{
+#if TSE_ADVANCED_BIN_SUPPORT
+ BBSBuildDevicePathName(String, info, index, HDDInfo);
+ return EFI_SUCCESS;
+#endif
+ return EFI_UNSUPPORTED;
+}
+
+CHAR16 *GetUefiDevPathString(EFI_DEVICE_PATH_PROTOCOL *DevPath);
+CHAR16 *TseGetUefiDevPathString(EFI_DEVICE_PATH_PROTOCOL *DevPath)
+{
+#if TSE_DEVICE_PATH_UEFI_NAME
+ return GetUefiDevPathString(DevPath);
+#endif
+ return NULL;
+}
+
+/////////////OEM_SPECIAL_CONTROL////////////////
+#if SETUP_OEM_SPECIAL_CONTROL_SUPPORT
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: OEMSpecialGetControlCount
+//
+// Description: OEM Hook Function can allows exploding into multiple controls.
+// Based on the OEM policies it returns number controls need to exploded.
+//
+//
+// Input: CONTROL_INFO *controlInfo
+//
+// Output: UINT16 Control Count.
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_OEMSpecialGetControlCount
+UINT16 OEMSpecialGetControlCount(CONTROL_INFO *controlInfo)
+{
+// SAMPLE CODE: START
+
+// SAMPLE Code : for One of Special control returns 1 and for Other(Submenu) it returns the OemTseVar
+/*
+ if(controlInfo->ControlType == CONTROL_TYPE_POPUPSEL)
+ return 1;
+ else
+ {
+ UINT16 * pValue=NULL,Val;
+ UINTN size;
+
+ pValue = VarGetVariable( VARIABLE_ID_OEM_TSE_VAR, &size );
+ if(pValue)
+ {
+ Val = *pValue;
+ MemFreePointer((VOID **) &pValue);
+ return Val;
+ }
+ else
+ return 1;
+ }
+*/
+// SAMPLE CODE: END
+
+ //Add the OEM code like above for customization
+
+ return 1;
+}
+#endif
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: OEMSpecialOneOfFixup
+//
+// Description: If the OEM Special control is One of Control the members of the one of control
+// Can be fixed up in this function. If OEM needs multiple control,
+// for each one of it will be called.
+// This function has to create dynamic IFR Oneof Options
+//
+// Input: CONTROL_INFO *control - ControlInfo that need to be patched.
+// UINT16 value - Index of the control that need to be pathched.
+//
+// Output: NONE
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_OEMSpecialOneOfFixup
+VOID OEMSpecialOneOfFixup( CONTROL_INFO *control , UINT16 value )
+{
+// SAMPLE CODE: START
+
+// Sample Code: To create the One of options based in the OemTSEVar count.
+/*
+ EFI_IFR_ONE_OF *ifrPtr;
+ EFI_IFR_ONE_OF_OPTION *templatePtr, *oneOf;
+
+ VOID *tempPtr;
+ UINTN i, size;
+ CHAR16 Number[]=L"0";
+ UINT16 * pValue=NULL,Val=0;
+
+ pValue = VarGetVariable( VARIABLE_ID_OEM_TSE_VAR, &size );
+ if(pValue)
+ {
+ Val = *pValue;
+ MemFreePointer((VOID **) &pValue);
+ }
+
+ //Create one one_of_option for each OEM option
+ size = sizeof(EFI_IFR_ONE_OF) + sizeof(EFI_IFR_END_ONE_OF) + (Val) * sizeof(EFI_IFR_ONE_OF_OPTION);
+ tempPtr = EfiLibAllocateZeroPool( size );
+ if ( tempPtr == NULL )
+ return;
+
+ ifrPtr = (VOID *)control->ControlPtr;
+ MemCopy( tempPtr, ifrPtr, ifrPtr->Header.Length );
+ control->ControlPtr = (UINTN)tempPtr;
+
+ templatePtr = (EFI_IFR_ONE_OF_OPTION *)((UINTN)ifrPtr + ifrPtr->Header.Length);
+ oneOf = (EFI_IFR_ONE_OF_OPTION *)((UINTN)tempPtr + ifrPtr->Header.Length);
+ for ( i = 0; i < Val; i++, oneOf++ )
+ {
+ MemCopy( oneOf, templatePtr, sizeof(EFI_IFR_ONE_OF_OPTION) );
+ oneOf->Value = (UINT16)i+1;
+ Number[0]=L'0'+(UINT16)i+1;
+ oneOf->Option = HiiAddString( control->ControlHandle, Number );
+ }
+
+ oneOf->Header.OpCode = EFI_IFR_END_ONE_OF_OP;
+ oneOf->Header.Length = sizeof(EFI_IFR_END_ONE_OF);
+
+ ifrPtr = (EFI_IFR_ONE_OF *)control->ControlPtr;
+ control->ControlHelp = ifrPtr->Help;
+*/
+// SAMPLE CODE: END
+
+ //Add the OEM code like above for customization
+
+ return;
+}
+#endif
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: OEMSpecialUpdateOneOf
+//
+// Description: Hook to update the OEM Variable based on Selection.
+// TSE updates the varible buffer in the normal way (updates with option value selected)
+// If any OEM Special updatation required OEM may use this function and return EFI_SUCCESS.
+//
+//
+// Input: newOption - Option value selected.
+// offset - Variable offset
+// Size - size of the variable
+// buffer - OutBuffer Allocate and fill this if OEM Updated the buffer. (Return Success)
+//
+// Output: EFI_SUCCESS - If OEM Updates the Buffer with OEM policy
+// EFI_ERROR (EFI_INVALID_PARAMETER) - Standard TSE Update is enough. No Updates done for OEM
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_OEMSpecialUpdateOneOf
+EFI_STATUS OEMSpecialUpdateOneOf(UINT16 newOption,UINT32 *offset,UINTN *size, VOID OUT **buffer)
+{
+
+ return EFI_INVALID_PARAMETER;
+}
+#endif
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: OEMSpecialGotoFixup
+//
+// Description: If the OEM Special control is Submenu Control. Based on the OEMSpecialGetControlCount
+// The submenus are added with same promt/help. If OEM want to Fix the prompt and help fields
+// of the submenu control. It can be done here.
+// For each submenu of that OEM special control it is called.
+//
+// Input: CONTROL_DATA *ctrlData - Control data.
+// UINT16 value - Index of the control that need to be pathched.
+//
+// Output: None
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_OEMSpecialGotoFixup
+VOID OEMSpecialGotoFixup(CONTROL_INFO *control, UINT16 value )
+{
+// SAMPLE CODE: START
+ // Sample Code: To Fix the OEM One of controls prompt based on Value.
+/*
+UINTN
+SPrint (
+ OUT CHAR16 *Buffer,
+ IN UINTN BufferSize,
+ IN CONST CHAR16 *Format,
+ ...
+ );
+
+ CHAR16 str[100];
+ SPrint(str,200,L"OEM Goto Control %d",value);
+ ((EFI_IFR_REF *)control->ControlPtr)->Prompt = HiiAddString( control->ControlHandle,str);
+*/
+// SAMPLE CODE: END
+
+ //Add the OEM code like above for customization
+
+ return;
+}
+#endif
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: OEMSpecialGotoSelect
+//
+// Description: Hook for OEM Goto control Action Handler.
+// On Selection of the OEM Goto control it is called.
+//
+// Input: UINT16 value - Index of the control that is selected
+//
+// Output: None
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_OEMSpecialGotoSelect
+VOID OEMSpecialGotoSelect(UINT16 value)
+{
+// SAMPLE CODE: START
+/*
+ // Sample Code: To display the message box on what is selected.
+
+ CHAR16 str[100];
+ UINT8 ShowPostMsgBox(IN CHAR16 *MsgBoxTitle,IN CHAR16 *Message,IN UINT8 MsgBoxType);
+
+ SPrint(str,200,L"OEM Goto Control %d Selected",value);
+ ShowPostMsgBox(L"OEM Goto Select",str,MSGBOX_TYPE_OK);
+*/
+// SAMPLE CODE: END
+
+ //Add the OEM code like above for customization
+
+ return;
+}
+#endif
+
+#endif // SETUP_OEM_SPECIAL_CONTROL_SUPPORT
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: OemCheckControlCondition
+//
+// Description: Set OVERRIDE_OemCheckControlCondition to 1, if OEM wants to override the OemCheckControlCondition function from Board module.
+//
+// Input: UINT8 FinalCond, CONTROL_INFO *controlInfo
+//
+// Output: UINT8
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_OEMCheckControlCondition
+UINT8 OEMCheckControlCondition(UINT8 FinalCond, CONTROL_INFO *controlInfo)
+{
+ return FinalCond;
+}
+#endif
+
+#if !OVERRIDE_FastBootLaunch
+EFI_STATUS FastBootLaunch()
+{
+ return EFI_UNSUPPORTED;
+}
+#endif
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: StyleGetMessageboxColorHook
+//
+// Description: Hook function to set Messagebox Color.
+//
+// Input: UINT8 **Color
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_GetMessageboxColorHook
+VOID GetMessageboxColorHook(UINT8 **Color)
+{
+// **Color = EFI_BACKGROUND_LIGHTGRAY | EFI_BLUE;
+}
+#endif
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: GOPScreenResolution
+//
+// Description: Hook function to set GOPScreen Resolution.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_GOPSetScreenResolutionHook
+EFI_STATUS GOPSetScreenResolutionHook(UINTN *Width, UINTN *Height, UINT32 Index)
+{
+ return EFI_SUCCESS;
+}
+#endif
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: LaunchHotKeyBootOption
+//
+// Description: Board module hook for LaunchHotKeyBootOption function
+//
+// Input: BOOT_FLOW *
+//
+// Output: EFI_STATUS
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_LaunchHotKeyBootOption
+EFI_STATUS LaunchHotKeyBootOption (BOOT_FLOW *Bflow)
+{
+ if (-1 != gHotKeyBootOption)
+ {
+ return (BootLaunchBootOption ((UINT16)gHotKeyBootOption, NULL, 0) );
+ }
+ return EFI_NOT_FOUND;
+}
+#endif
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: DriverHealthSystemReset
+//
+// Description: Board module hook for DriverHealthSystemReset function
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_DriverHealthSystemReset
+VOID DriverHealthSystemReset (VOID)
+{
+ CHAR16 *Text = NULL;
+ Text = HiiGetString (gHiiHandle, STRING_TOKEN (STR_DRV_HLTH_REBOOT_POST));
+ PostManagerDisplayPostMessage (Text);
+ gBS->Stall (2000000);
+ gRT->ResetSystem (EfiResetWarm, EFI_SUCCESS, 0, NULL);
+}
+#endif
+
+void SetDesiredTextMode();
+//EIP 89377 : START
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: LegacyBootFailHook
+//
+// Description: Board module hook for LegacyBootFailHook function
+// This function invoked when LoadImage fails
+//
+// Input: EFI_STATUS => Status returned from CsmBBSLaunchDevicePath
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+void CheckandDeactivateSoftkbd();
+#if !OVERRIDE_LegacyBootFailHook
+VOID LegacyBootFailHook (EFI_STATUS Status)
+{
+ UINT8 Sel;
+ UINT16 OptionToken = STR_CTRL_OK;
+ CHAR16 *Title = NULL;
+ CHAR16 *Message = NULL;
+ AMI_POST_MGR_KEY Key;
+
+ if(EFI_SECURITY_VIOLATION == Status)
+ {
+ MouseInit();
+ CheckandDeactivateSoftkbd (); //EIP-140123 disabling any softkbd activated while showing msgbox
+
+ SetDesiredTextMode(); //EIP94702
+ Title = HiiGetString (gHiiHandle, STRING_TOKEN (STR_SECBOOT_VIOLATION));
+ Message = HiiGetString (gHiiHandle, STRING_TOKEN (STR_SECBOOT_INV_SIGN));
+ ClearScreen( EFI_BACKGROUND_BLACK | EFI_LIGHTGRAY );
+ PostManagerDisplayMsgBoxEx (
+ Title,
+ Message,
+ NULL,
+ MSGBOX_EX_CATAGORY_ERROR,
+ MSGBOX_TYPE_CUSTOM,
+ &OptionToken,
+ 1,
+ NULL,
+ 0,
+ &Sel,
+ &Key
+ );
+ MouseDestroy(); //EIP-140123
+ }
+}
+#endif
+////EIP 89377 : END
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: UefiBootFailHook
+//
+// Description: Board module hook for UefiBootFailHook function
+// This function invoked when LoadImage fails
+//
+// Input: EFI_STATUS => Status returned from LoadImage
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_UefiBootFailHook
+VOID UefiBootFailHook (EFI_STATUS Status)
+{
+ UINT8 Sel;
+ UINT16 OptionToken = STR_CTRL_OK;
+ CHAR16 *Title = NULL;
+ CHAR16 *Message = NULL;
+ AMI_POST_MGR_KEY Key;
+
+ if ((EFI_SECURITY_VIOLATION == Status) || (EFI_ACCESS_DENIED == Status))
+ {
+ MouseInit();
+ CheckandDeactivateSoftkbd (); //EIP-140123 disabling any softkbd activated while showing msgbox
+
+ SetDesiredTextMode(); //EIP94702
+ Title = HiiGetString (gHiiHandle, STRING_TOKEN (STR_SECBOOT_VIOLATION));
+ Message = HiiGetString (gHiiHandle, STRING_TOKEN (STR_SECBOOT_INV_SIGN));
+ ClearScreen( EFI_BACKGROUND_BLACK | EFI_LIGHTGRAY );//EIP-79959 Clear screen before display Violatioin MessageBox to avoid screen corruption
+ PostManagerDisplayMsgBoxEx (
+ Title,
+ Message,
+ NULL,
+ MSGBOX_EX_CATAGORY_ERROR,
+ MSGBOX_TYPE_CUSTOM,
+ &OptionToken,
+ 1,
+ NULL,
+ 0,
+ &Sel,
+ &Key
+ );
+ InvalidateStatusInBgrtWrapper (); //Since mode changed invalidating status field in BGRT table. EIP93524
+ MouseDestroy(); //EIP-140123
+ }
+}
+#endif
+
+//<AMI_PHDR_START>
+//---------------------------------------------------------------------------------------
+// Procedure: UpdateNumericDisplayString
+//
+// Description: Board module hook for UpdateNumericDisplayString function
+// This function invoked before displaying the numeric control
+// Can use this function to change the display style of numeric control
+//
+// Input: CHAR16 ** => Numeric string to be formatted
+// INT64 => Numeric data to be formatted
+// UINT8 => Base of the numeric control, might be AMI_BASE_HEX, AMI_BASE_INT_DEC, AMI_BASE_DEC
+// UINT16 => Width of the numeric control
+// UINT16 => Size of the CHAR16 **Text
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_UpdateNumericDisplayString
+VOID UpdateNumericDisplayString (CHAR16 **Text, INT64 Num, UINT8 Base, UINT16 ControlDataWidth, UINT16 SizeofText)
+{
+#if 0 //Replace 0 with 1
+ #define AMI_BASE_HEX 16
+//Example for showing the numeric hex variables in uppercase and with leading zeroes
+ if (AMI_BASE_HEX == Base)
+ {
+ SPrint (*Text, SizeofText, L"%0*X", (ControlDataWidth * 2), Num);
+ }
+#endif
+}
+#endif
+
+//EIP 88895 Starts
+//<AMI_PHDR_START>
+//-------------------------------------------------------------------------------------------------------------
+// Procedure: GetUEFISpecVersion
+//
+// Description: Returns the Specification version assigned to TSE_CALLBACK_SPEC_VERSION
+//
+// Input: VOID
+//
+// Output: UINT32 => Callback Version
+//
+//-------------------------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_GetUefiSpecVersion
+UINT32 GetUefiSpecVersion (VOID)
+{
+ return TSE_CALLBACK_SPEC_VERSION;
+}
+#endif
+//EIP 88895 Ends
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: FBBootFlow
+//
+// Description:
+//
+// Input: BOOT_FLOW *
+//
+// Output: EFI_STATUS
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS FBBootFlow ( BOOT_FLOW * Bflow)
+{
+ gBootFlow = BOOT_FLOW_CONDITION_FAST_BOOT;
+ return EFI_SUCCESS;
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: IsBootOptionsGroupingEnabled
+//
+// Description: Returns the value for grouping the boot options
+//
+// Input: void
+//
+// Output: UINT8 - Value for grouping boot options
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+
+UINT8 IsBootOptionsGroupingEnabled (void)
+{
+#ifdef GROUP_BOOT_OPTIONS_BY_TAG
+ return ((UINT8)GROUP_BOOT_OPTIONS_BY_TAG);
+#else
+ return 1; //In older version grouping is defaultly enabled
+#endif
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: IsSetupHideBiosSignOnMsg
+//
+// Description: Returns the value for hiding the bios signon msg
+//
+// Input: void
+//
+// Output: UINT8 - Value for hiding bios signon msg
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+
+UINT8 IsSetupHideBiosSignOnMsg (void)
+{
+#ifdef SETUP_HIDE_BIOS_SIGNON_MESSAGE2
+ return ((UINT8)SETUP_HIDE_BIOS_SIGNON_MESSAGE2);
+#else
+ return 0; //In older version no chance for hiding sign on msg
+#endif
+}
+//EIP-75136 ROMHole support Start
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: IsOEMPOSTLogoSupport
+//
+// Description: To Return OEMLogo Draw Support token value
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+
+BOOLEAN IsOEMPOSTLogoSupport()
+{
+#ifdef TSE_OEM_POSTLOGO_SUPPORT
+ return TSE_OEM_POSTLOGO_SUPPORT;
+#else
+ return 0;
+#endif
+}
+//EIP-75136 ROMHole support End
+
+//<AMI_PHDR_START>
+//-------------------------------------------------------------------------------------------------------------
+// Procedure: GetGraphicsBitMapFromFV.
+// This is Override function. OEM can override the default behaviour
+//
+// Description: Return the graphics image file named FileNameGuid into Image
+// and return it's size in ImageSize. All Firmware Volumes (FV)
+// in the system are searched for the file name.
+//
+// Input: FileNameGuid - File Name of graphics file in the FV(s).
+// Image - Pointer to pointer to return graphics image.
+// If NULL, a buffer will be allocated.
+// ImageSize - Size of the graphics Image in bytes. Zero if no image found.
+//
+// Output: EFI_SUCCESS - Image and ImageSize are valid.
+// EFI_BUFFER_TOO_SMALL - Image not big enough. ImageSize has required size
+// EFI_NOT_FOUND - FileNameGuid not found
+//
+//-------------------------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_GetGraphicsBitMapFromFV
+EFI_STATUS
+GetGraphicsBitMapFromFV ( IN EFI_GUID *FileNameGuid, OUT VOID **Image, OUT UINTN *ImageSize )
+{
+ EFI_STATUS Status;
+ UINTN FvProtocolCount;
+ EFI_HANDLE *FvHandles;
+ UINTN Index;
+ UINT32 AuthenticationStatus;
+
+#if (TSE_ROMHOLE_SUPPORT) //EIP-75136 Start
+ EFI_FV_FILE_ATTRIBUTES Attrib = (EFI_FV_FILE_ATTRIBUTES)NULL;
+ EFI_FIRMWARE_VOLUME_HEADER *FvVolume = (EFI_FIRMWARE_VOLUME_HEADER *)NULL;
+ EFI_HANDLE processFvHandle = NULL;
+ DXE_SERVICES *DXE_Service = NULL;
+ EFI_TPL CurrentTpl = 0;
+ EFI_GUID DxeServicesTableGuid = DXE_SERVICES_TABLE_GUID;
+ EFI_GUID AMIROMHOLEGuid = TSE_ROMHOLE_HEADER_GUID;
+#endif //EIP-75136 End
+
+#if (PI_SPECIFICATION_VERSION < 0x00010000)
+ EFI_FIRMWARE_VOLUME_PROTOCOL *Fv;
+#else
+ EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv;
+#endif
+
+ Status = gBS->LocateHandleBuffer (
+ ByProtocol,
+#if (PI_SPECIFICATION_VERSION < 0x00010000)
+ &gEfiFirmwareVolumeProtocolGuid,
+#else
+ &gEfiFirmwareVolume2ProtocolGuid,
+#endif
+ NULL,
+ &FvProtocolCount,
+ &FvHandles
+ );
+ if (EFI_ERROR (Status))
+ return EFI_NOT_FOUND;
+
+ for (Index = 0; Index < FvProtocolCount; Index++)
+ {
+ Status = gBS->HandleProtocol (
+ FvHandles[Index],
+#if (PI_SPECIFICATION_VERSION < 0x00010000)
+ &gEfiFirmwareVolumeProtocolGuid,
+#else
+ &gEfiFirmwareVolume2ProtocolGuid,
+#endif
+ (VOID **) &Fv
+ );
+
+ // Assuming Image and ImageSize are correct on input.
+ Status = Fv->ReadSection (
+ Fv,
+ FileNameGuid,
+ EFI_SECTION_RAW,
+ 0,
+ Image,
+ ImageSize,
+ &AuthenticationStatus
+ );
+
+ if (!EFI_ERROR (Status))
+ {
+ //81617 : Avoiding memory leaks in TSE
+ gBS->FreePool(FvHandles);
+ return EFI_SUCCESS;
+ }
+ else if (Status == EFI_BUFFER_TOO_SMALL) // ImageSize updated to needed size so return
+ {
+ //81617 : Avoiding memory leaks in TSE
+ gBS->FreePool(FvHandles);
+ return EFI_BUFFER_TOO_SMALL;
+ }
+ }
+//EIP-75136 Start
+#if (TSE_ROMHOLE_SUPPORT)
+
+ for (Index = 0; Index < FvProtocolCount; Index++)
+ {
+ Status = gBS->HandleProtocol (
+ FvHandles[Index],
+#if (PI_SPECIFICATION_VERSION < 0x00010000)
+ &gEfiFirmwareVolumeProtocolGuid,
+#else
+ &gEfiFirmwareVolume2ProtocolGuid,
+#endif
+ (VOID **) &Fv
+ );
+ if (EFI_ERROR (Status)) {
+ continue;
+ }
+
+ // Get FV buffer and FV_ImageSize from RomHole FV
+ Status = Fv->ReadFile (
+ Fv,
+ &AMIROMHOLEGuid,
+ Image,
+ ImageSize,
+ (VOID *)EFI_SECTION_RAW,
+ &Attrib,
+ &AuthenticationStatus
+ );
+
+ if (!EFI_ERROR (Status))//If it found before end of iteration then break the loop
+ {
+ if (*ImageSize)
+ *ImageSize = 0;
+ break;
+ }
+
+ }
+
+ MemFreePointer ((VOID **)&FvHandles);
+ if (EFI_ERROR (Status)){
+ return EFI_NOT_FOUND;
+ }
+
+ DXE_Service = (DXE_SERVICES *)GetEfiConfigurationTable(gST,&DxeServicesTableGuid);
+ FvVolume = (EFI_FIRMWARE_VOLUME_HEADER *)*Image;
+
+ //Raise TPL level to Install FV protocol for ROMHole
+ CurrentTpl = gBS->RaiseTPL( TPL_HIGH_LEVEL );
+ gBS->RestoreTPL( TPL_APPLICATION);
+
+ //Install new FV protocol for ROMHole
+ Status = DXE_Service->ProcessFirmwareVolume (FvVolume, FvVolume->HeaderLength, &processFvHandle);
+
+ //Free Image data after ProcessFirmwareVolume
+ MemFreePointer((VOID **)Image);
+
+ if (EFI_ERROR(Status)){
+ return Status;
+ }
+
+ gBS->RaiseTPL( TPL_HIGH_LEVEL );
+ gBS->RestoreTPL( CurrentTpl );
+
+ Status = gBS->LocateHandleBuffer (
+ ByProtocol,
+#if (PI_SPECIFICATION_VERSION < 0x00010000)
+ &gEfiFirmwareVolumeProtocolGuid,
+#else
+ &gEfiFirmwareVolume2ProtocolGuid,
+#endif
+ NULL,
+ &FvProtocolCount,
+ &FvHandles
+ );
+
+ if (EFI_ERROR (Status)){
+ return EFI_NOT_FOUND;
+ }
+
+ for (Index = 0; Index < FvProtocolCount; Index++)
+ {
+ Status = gBS->HandleProtocol (
+ FvHandles[Index],
+#if (PI_SPECIFICATION_VERSION < 0x00010000)
+ &gEfiFirmwareVolumeProtocolGuid,
+#else
+ &gEfiFirmwareVolume2ProtocolGuid,
+#endif
+ (VOID **) &Fv
+ );
+
+ if (EFI_ERROR (Status)) {
+ continue;
+ }
+
+ // Assuming Image and ImageSize are correct on input.
+ Status = Fv->ReadSection (
+ Fv,
+ FileNameGuid,
+ EFI_SECTION_RAW,
+ 0,
+ Image,
+ ImageSize,
+ &AuthenticationStatus
+ );
+
+ if (!EFI_ERROR (Status))
+ {
+ MemFreePointer ((VOID **)&FvHandles);
+ return EFI_SUCCESS;
+ }
+ else if (EFI_BUFFER_TOO_SMALL == Status) // ImageSize updated to needed size so return
+ {
+ MemFreePointer ((VOID **)&FvHandles);
+ return EFI_BUFFER_TOO_SMALL;
+ }
+ }
+#endif
+//EIP-75136 End
+
+ //81617 : Avoiding memory leaks in TSE
+ gBS->FreePool(FvHandles);
+ return EFI_NOT_FOUND;
+}
+#endif
+//<AMI_PHDR_START>
+//-------------------------------------------------------------------------------------------------------------
+// Procedure: GetACPIOEMID
+//
+// Description: Returns the ACPI OEM ID
+//
+// Input: VOID
+//
+// Output: UINT8 * => OEM ID String
+//
+//-------------------------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+UINT8 *GetACPIOEMID (VOID)
+{
+#ifdef T_ACPI_OEM_ID
+ return CONVERT_TO_STRING (T_ACPI_OEM_ID);
+#else
+ return 0;
+#endif
+}
+
+//<AMI_PHDR_START>
+//-------------------------------------------------------------------------------------------------------------
+// Procedure: GetACPIOEMTableID
+//
+// Description: Returns the ACPI OEM Table ID
+//
+// Input: VOID
+//
+// Output: UINT8 * => OEM Table ID String
+//
+//-------------------------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+UINT8 *GetACPIOEMTableID (VOID)
+{
+#ifdef T_ACPI_OEM_TBL_ID
+ return CONVERT_TO_STRING (T_ACPI_OEM_TBL_ID);
+#else
+ return 0;
+#endif
+}
+
+//<AMI_PHDR_START>
+//-------------------------------------------------------------------------------------------------------------
+// Procedure: GetACPIOEMRevision
+//
+// Description: Returns the ACPI OEM Revision
+//
+// Input: VOID
+//
+// Output: UINT32 => ACPI OEM Revision
+//
+//-------------------------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+UINT32 GetACPIOEMRevision (VOID)
+{
+#ifdef ACPI_OEM_REV
+ return ACPI_OEM_REV;
+#else
+ return 0;
+#endif
+}
+
+//<AMI_PHDR_START>
+//-------------------------------------------------------------------------------------------------------------
+// Procedure: ContribBGRTTableToAcpi
+//
+// Description: Wrapper function to call ConvertBmpandAddBGRT
+//
+// Input: BOOLEAN
+//
+// Output: VOID
+//
+//-------------------------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID ContribBGRTTableToAcpi (
+ BOOLEAN GifImagePresence
+ )
+{
+#if CONTRIB_BGRT_TABLE_TO_ACPI
+ ConvertBmpandAddBGRT (GifImagePresence);
+#endif
+}
+
+
+//<AMI_PHDR_START>
+//-------------------------------------------------------------------------------------------------------------
+// Procedure: InvalidateStatusInBgrtWrapper
+//
+// Description: Wrapper function to call InvalidateStatusInBgrt
+//
+// Input: BOOLEAN
+//
+// Output: VOID
+//
+//-------------------------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID InvalidateStatusInBgrtWrapper (
+ )
+{
+#if CONTRIB_BGRT_TABLE_TO_ACPI
+ InvalidateStatusInBgrt ();
+#endif
+}
+
+//<AMI_PHDR_START>
+//-------------------------------------------------------------------------------------------------------------
+// Procedure: LoadDefaultsFromDefaultBuffer
+//
+// Description: Wrapper function to provide TSE_LOAD_DEFAULTS_FROM_DEFAULTS_BUFFER
+//
+// Input: BOOLEAN
+//
+// Output: VOID
+//
+//-------------------------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+//EIP 105167 : START
+BOOLEAN LoadDefaultsFromDefaultBuffer( VOID )
+{
+
+#ifdef TSE_LOAD_DEFAULTS_FROM_DEFAULTS_BUFFER
+ return TSE_LOAD_DEFAULTS_FROM_DEFAULTS_BUFFER;
+#else
+ return FALSE;
+#endif
+
+}
+//EIP 105167 : END
+
+//EIP81830 starts - Support to uninstall the BGRT on legacy boot starts
+//<AMI_PHDR_START>
+//-------------------------------------------------------------------------------------------------------------
+// Procedure: UninstallBgrtWrapper
+//
+// Description: Wrapper function to call UninstallBgrtWrapper
+//
+// Input: BOOLEAN
+//
+// Output: VOID
+//
+//-------------------------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID UninstallBgrtWrapper (
+ )
+{
+#if CONTRIB_BGRT_TABLE_TO_ACPI
+ UninstallBGRT ();
+#endif
+}
+//EIP81830 ends
+
+//EIP 63073 START
+//<AMI_PHDR_START>
+//-------------------------------------------------------------------------------------------------------------
+// Procedure: GetTseBuildVersion
+//
+// Description: Function to fill the TSE build information
+//
+// Input: UINTN *TseMajor, UINTN *TseMinor, UINTN *TseBuild
+//
+// Output: VOID
+//
+//-------------------------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID GetTseBuildVersion(UINTN *TseMajor, UINTN *TseMinor, UINTN *TseBuild)
+{
+ *TseMajor = TSE_MAJOR;
+ *TseMinor = TSE_MINOR;
+ *TseBuild = TSE_BUILD;
+}
+//EIP 63073 END
+
+//<AMI_PHDR_START>
+//-------------------------------------------------------------------------------------------------------------
+// Procedure: GetTseBuildYear
+//
+// Description: Function to fill the TSE build Year
+//
+// Input: UINT16 *TseBuildYear
+//
+//
+// Output: VOID
+//
+//-------------------------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID GetTseBuildYear(UINT16 *TseBuildYear)
+{
+ CHAR8 BuildYear[5]=FOUR_DIGIT_YEAR;
+ *TseBuildYear=(Str2No(BuildYear[0])*0x1000+Str2No(BuildYear[1])*0x100+Str2No(BuildYear[2])*0x10+Str2No(BuildYear[3]));
+}
+#if TSE_USE_AMI_EFI_KEYCODE_PROTOCOL
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------------------
+// Procedure: CheckAdvShiftState
+// This is override function. OEM can override default behaviour of this function
+//
+// Description: Checks the input shift state with the condition shift state
+//
+// Input: UINT32 = Key shift state obtained from console input devices
+// UINT32 = Shift state condition to match with input key shift state
+//
+// Output: BOOLEAN = TRUE => When input and condition shift states matches
+// FALSE => When input and condition shift states not matches
+//
+//-----------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_CheckAdvShiftState
+BOOLEAN CheckAdvShiftState (UINT32 AmiKeyShiftState, UINT32 CondShiftState)
+{
+ BOOLEAN Result = TRUE;
+
+ AmiKeyShiftState = AmiKeyShiftState & (~SHIFT_STATE_VALID);
+ CondShiftState = CondShiftState & (~SHIFT_STATE_VALID);
+
+ if (AmiKeyShiftState == CondShiftState)
+ {
+ goto DONE;
+ }
+ else
+ {
+ Result = FALSE;
+ //If condition shift state has both the shift key set then checking for any one pressed
+ if ((CondShiftState & RIGHT_LEFT_SHIFT_PRESSED) == RIGHT_LEFT_SHIFT_PRESSED)
+ {
+ if (!(AmiKeyShiftState & RIGHT_LEFT_SHIFT_PRESSED))
+ {
+ goto DONE;
+ }
+ AmiKeyShiftState &= ~RIGHT_LEFT_SHIFT_PRESSED; //Clearing the left right bits
+ CondShiftState &= ~RIGHT_LEFT_SHIFT_PRESSED;
+ }
+ //If condition shift state has both the Ctrl key set then checking for any one pressed
+ if ((CondShiftState & RIGHT_LEFT_CONTROL_PRESSED) == RIGHT_LEFT_CONTROL_PRESSED)
+ {
+ if (!(AmiKeyShiftState & RIGHT_LEFT_CONTROL_PRESSED))
+ {
+ goto DONE;
+ }
+ AmiKeyShiftState &= ~RIGHT_LEFT_CONTROL_PRESSED;
+ CondShiftState &= ~RIGHT_LEFT_CONTROL_PRESSED;
+ }
+ //If condition shift state has both the Alt key set then checking for any one pressed
+ if ((CondShiftState & RIGHT_LEFT_ALT_PRESSED) == RIGHT_LEFT_ALT_PRESSED)
+ {
+ if (!(AmiKeyShiftState & RIGHT_LEFT_ALT_PRESSED))
+ {
+ goto DONE;
+ }
+ AmiKeyShiftState &= ~RIGHT_LEFT_ALT_PRESSED;
+ CondShiftState &= ~RIGHT_LEFT_ALT_PRESSED;
+ }
+ //If condition shift state has both the logo key set then checking for any one pressed
+ if ((CondShiftState & RIGHT_LEFT_LOGO_PRESSED) == RIGHT_LEFT_LOGO_PRESSED)
+ {
+ if (!(AmiKeyShiftState & RIGHT_LEFT_LOGO_PRESSED))
+ {
+ goto DONE;
+ }
+ AmiKeyShiftState &= ~RIGHT_LEFT_LOGO_PRESSED;
+ CondShiftState &= ~RIGHT_LEFT_LOGO_PRESSED;
+ }
+ if (CondShiftState == AmiKeyShiftState)
+ {
+ Result = TRUE;
+ }
+ }
+DONE:
+ return Result;
+}
+#endif
+#endif
+
+//<AMI_PHDR_START>
+//------------------------------------------------------------------------------
+// Procedure: IsDriverHealthSupported
+//
+// Description: Retrurns DRIVER_HEALTH_SUPPORT token value
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//-----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN IsDriverHealthSupported (VOID)
+{
+#ifdef DRIVER_HEALTH_SUPPORT
+ return DRIVER_HEALTH_SUPPORT;
+#else
+ return 0; //Defaultly disabled.
+#endif
+}
+
+//<AMI_PHDR_START>
+//------------------------------------------------------------------------------
+// Procedure: AdvancedRepairSupported
+//
+// Description: Returns the SHOW_DRV_HEALTH_BOOT_TIME_SENDFORM token value
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//-----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN AdvancedRepairSupported (VOID)
+{
+#ifdef HONOR_DRVHLTH_CONFIGREQD_ON_BOOTFAIL
+ return HONOR_DRVHLTH_CONFIGREQD_ON_BOOTFAIL;
+#else
+ return 0;
+#endif
+}
+
+//<AMI_PHDR_START>
+//------------------------------------------------------------------------------
+// Procedure: EDKVersion_1_05_RetrieveData
+//
+// Description: Returns the EDK_1_05_RETRIEVE_DATA token value
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//-----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN EDKVersion_1_05_RetrieveData (VOID)
+{
+#ifdef EDK_1_05_RETRIEVE_DATA
+ return EDK_1_05_RETRIEVE_DATA;
+#else
+ return 1;
+#endif
+}
+
+//<AMI_PHDR_START>
+//------------------------------------------------------------------------------
+// Procedure: SingleClickActivation
+//
+// Description: Returns the SINGLE_CLICK_ACTIVATION token value
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//-----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN SingleClickActivation (VOID)
+{
+ return SINGLE_CLICK_ACTIVATION;
+}
+//EIP-74375
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: IsHelpAreaScrollBarSupport
+//
+// Description: Returns value as enable or disable STYLE_HELP_AREA_SCROLLBAR support
+//
+// Input: void
+//
+// Output: UINT8 - Value for grouping boot options
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN IsHelpAreaScrollBarSupport (void)
+{
+#if STYLE_HELP_AREA_SCROLLBAR
+ return STYLE_HELP_AREA_SCROLLBAR;
+#else
+ return 0;
+#endif
+}
+//<--End EIP-74375 Control STYLE_HELP_AREA_SCROLLBAR from binary
+
+//Start_EIP-70175 Set Password Popup Window and PopupTextBox color
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: GetPasswordPopupTextBoxColor
+//
+// Description: Function to Get PasswordPopupTextBox Color
+//
+// Input: VOID
+//
+// Output:
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+UINT8 GetPasswordPopupTextBoxColor(VOID)
+{
+#if TSE_STYLE_GTSE_BIN_SUPPORT
+ return (EFI_BACKGROUND_BLACK | EFI_WHITE);//For GTSE
+#else
+ return (EFI_BACKGROUND_LIGHTGRAY | EFI_BLUE);//For TSE
+#endif
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: GetPasswordPopupWindowColor
+//
+// Description: Function to Get PasswordPopupWindow Color
+//
+// Input: VOID
+//
+// Output:
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+UINT8 GetPasswordPopupWindowColor(VOID)
+{
+#if TSE_STYLE_GTSE_BIN_SUPPORT
+ return (EFI_BACKGROUND_LIGHTGRAY | EFI_WHITE);//For GTSE
+#else
+ return (EFI_BACKGROUND_BLUE | EFI_WHITE);//For TSE
+#endif
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: GetPasswordReportInboxcolor
+//
+// Description: Function to Get PasswordReportInBox Color
+//
+// Input: VOID
+//
+// Output:
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+UINT8 GetPasswordReportInboxcolor(VOID)
+{
+#if TSE_STYLE_GTSE_BIN_SUPPORT
+ return (EFI_BACKGROUND_LIGHTGRAY | EFI_WHITE);//EIP 81623 : For GTSE IDE security password dialog label name displayed in text field
+#else
+ return (EFI_BACKGROUND_BLUE | EFI_WHITE);//For TSE
+#endif
+}
+//End_EIP-70175
+//<AMI_PHDR_START>
+//------------------------------------------------------------------------------
+// Procedure: IsTSEMultilineControlSupported
+//
+// Description: Retrurns TSE_MULTILINE_CONTROLS token value
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//-----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN IsTSEMultilineControlSupported (VOID)
+{
+#ifdef TSE_MULTILINE_CONTROLS
+ return TSE_MULTILINE_CONTROLS;
+#endif
+ return FALSE; //Defaultly disabled.
+}
+//EIP74963 : MAX_MSGBOX_WIDTH macro changed as token and handled from binary
+//<AMI_PHDR_START>
+//-------------------------------------------------------------------------------------------------------------
+// Procedure: GetMsgboxWidth
+//
+// Description: Returns the message box width
+//
+// Input: VOID
+//
+// Output: UINT32
+//
+//-------------------------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+UINT32 GetMsgboxWidth(VOID)
+{
+ return MAX_MSGBOX_WIDTH;
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+//
+// Procedure: GetFormSetTitleAndHelp
+//
+// Description: GetFormSetTitleAndHelp
+//
+// Parameter: EFI_HII_HANDLE Handle, EFI_STRING_ID *Title, EFI_STRING_ID *Help
+//
+// Return value: status
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS GetFormSetTitleAndHelp (EFI_HII_HANDLE Handle, UINT16 *Title, UINT16 *Help);
+EFI_STATUS GetFormSetTitleAndHelpWrapper (VOID *Handle, UINT16 *Title, UINT16 *Help)
+{
+#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)
+ return GetFormSetTitleAndHelp (Handle, Title, Help);
+#else
+ return EFI_UNSUPPORTED;
+#endif
+}
+//EIP-88527 Starts
+//<AMI_PHDR_START>
+//------------------------------------------------------------------------------
+// Procedure: IsBGRTSupported
+//
+// Description: Retrurns CONTRIB_BGRT_TABLE_TO_ACPI token value
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//-----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN IsBGRTSupported (VOID)
+{
+#ifdef CONTRIB_BGRT_TABLE_TO_ACPI
+ return CONTRIB_BGRT_TABLE_TO_ACPI; //Default is ENABLE
+#endif
+ return FALSE;
+}
+//EIP-88527 Ends
+
+//<AMI_PHDR_START>
+//------------------------------------------------------------------------------
+// Procedure: ClearNumericShiftState
+//
+// Description:
+//
+// Input: VOID*
+//
+// Output:
+//
+//-----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID ClearNumericShiftState (AMI_EFI_KEY_DATA *Data)
+{
+#if TSE_USE_AMI_EFI_KEYCODE_PROTOCOL
+ Data->KeyState.KeyShiftState = 0;
+#endif
+}
+
+//EIP 88447 Starts
+//<AMI_PHDR_START>
+//------------------------------------------------------------------------------
+// Procedure: FindDevPathTotLength
+//
+// Description: Find the length of the complete device path
+//
+// Input: EFI_DEVICE_PATH_PROTOCOL *
+//
+// Output: UINTN
+//
+//-----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+UINTN FindDevPathTotLength (EFI_DEVICE_PATH_PROTOCOL *DevPath)
+{
+ EFI_DEVICE_PATH_PROTOCOL *TempDevPath = DevPath;
+ UINTN TotalLength = sizeof (EFI_DEVICE_PATH_PROTOCOL);
+
+ while (!isEndNode (TempDevPath))
+ {
+ TotalLength += NODE_LENGTH (TempDevPath);
+ TempDevPath = NEXT_NODE (TempDevPath);
+ }
+ return TotalLength;
+}
+
+//<AMI_PHDR_START>
+//-----------------------------------------------------------------------------------------------------
+// Procedure: BootDevPathMatchEnabled
+//
+// Description: Checks whether the input device path matches exactly with any of the boot options
+// device path. This will be useful for USB, Floppy....
+//
+// Input: EFI_DEVICE_PATH_PROTOCOL *
+//
+// Output: BOOLEAN - TRUE - Device path matched and the corresponding boot option is enabled
+// FALSE - Device path matched and the corresponding boot option is disbled
+//
+//------------------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN BootDevPathMatchEnabled (EFI_DEVICE_PATH_PROTOCOL *DevicePath)
+{
+ UINTN iIndex = 0;
+// UINTN CmpLength = 0; Not used
+ EFI_DEVICE_PATH_PROTOCOL *TempDevPath = DevicePath;
+
+ while (!isEndNode (TempDevPath))
+ {
+ if ((MEDIA_DEVICE_PATH == TempDevPath->Type) && (MEDIA_FILEPATH_DP == TempDevPath->SubType))
+ {
+ for (iIndex = 0; iIndex < gBootOptionCount; iIndex ++)
+ {
+ if (((UINTN)TempDevPath - (UINTN)DevicePath) <= FindDevPathTotLength (gBootData [iIndex].DevicePath))
+ {
+ if (!MemCmp (DevicePath, gBootData [iIndex].DevicePath, (UINTN)TempDevPath - (UINTN)DevicePath))
+ {
+ if (!gBootData [iIndex].Active)
+ {
+ return FALSE;
+ }
+ }
+ }
+ }
+ break;
+ }
+ TempDevPath = NEXT_NODE (TempDevPath);
+ }
+ return TRUE; //If nothing matched then boot from that device path
+}
+
+//<AMI_PHDR_START>
+//-----------------------------------------------------------------------------------------------------
+// Procedure: MediaDevPathMatchEnabled
+//
+// Description: Checks whether the input device path matches with any of the boot options
+// media device path. This will be useful for drives with partition.
+//
+// Input: EFI_DEVICE_PATH_PROTOCOL *
+//
+// Output: BOOLEAN - TRUE - Device path matched and the corresponding boot option is enabled
+// FALSE - Device path matched and the corresponding boot option is disbled
+//
+//------------------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN MediaDevPathMatchEnabled (EFI_DEVICE_PATH_PROTOCOL *DevicePath)
+{
+ UINTN iIndex = 0;
+ UINTN CmpLength = 0;
+ EFI_DEVICE_PATH_PROTOCOL *TempDevPath = DevicePath;
+
+ while (!isEndNode (TempDevPath))
+ {
+ if ((MEDIA_DEVICE_PATH == TempDevPath->Type) && (MEDIA_HARDDRIVE_DP == TempDevPath->SubType))
+ {
+ CmpLength = NODE_LENGTH (TempDevPath);
+ break;
+ }
+ TempDevPath = NEXT_NODE (TempDevPath);
+ }
+ if (CmpLength)
+ {
+ for (iIndex = 0; iIndex < gBootOptionCount; iIndex ++)
+ {
+ if (CmpLength <= FindDevPathTotLength (gBootData [iIndex].DevicePath))
+ {
+ if (!MemCmp (TempDevPath, gBootData [iIndex].DevicePath, CmpLength))
+ {
+ if (!gBootData [iIndex].Active)
+ {
+ return FALSE;
+ }
+ }
+ }
+ }
+ }
+ return TRUE; //If nothing matched then boot from that device path
+}
+
+//<AMI_PHDR_START>
+//-----------------------------------------------------------------------------------------------------
+// Procedure: LaunchSecBootPathFromEnabledDevs
+// This is override function. OEM can override default behaviour of this function
+//
+// Description: Launches default image from the path \EFI\BOOT\BOOT{machine type short-name}.EFI
+// from the enabled devices in setup.
+//
+// Input: CHAR16 *
+//
+// Output: EFI_STATUS - EFI_SUCCESS -> If default image loaded successfully
+// !EFI_SUCCESS -> If default image not loaded successfully
+//
+//------------------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_DEVICE_PATH_PROTOCOL *_BootBuildFileDevicePath( UINT32 *, CHAR16 *);
+EFI_STATUS _BootLaunchDevicePath( EFI_DEVICE_PATH_PROTOCOL *, VOID *, UINTN, BOOLEAN);
+#if !OVERRIDE_LaunchSecBootPathFromEnabledDevs
+EFI_STATUS LaunchSecBootPathFromEnabledDevs (CHAR16 *FileName)
+{
+ EFI_STATUS Status = EFI_UNSUPPORTED;
+ UINT32 index = 0;
+
+ EFI_DEVICE_PATH_PROTOCOL *devicePath;
+ do
+ {
+ devicePath = _BootBuildFileDevicePath (&index, FileName);
+ if (index != (UINT32)-1)
+ {
+ if ((BootDevPathMatchEnabled (devicePath)) && (MediaDevPathMatchEnabled (devicePath)))
+ {
+ Status = _BootLaunchDevicePath (devicePath, NULL, 0,FALSE);
+ }
+ }
+ MemFreePointer ((VOID **)&devicePath);
+ } while ((EFI_ERROR (Status)) && (index != (UINT32)-1));
+ return Status;
+}
+#endif
+
+//<AMI_PHDR_START>
+//-----------------------------------------------------------------------------------------------------
+// Procedure: LaunchSecondaryPath
+//
+// Description: Launches default image from the path \EFI\BOOT\BOOT{machine type short-name}.EFI
+//
+// Input: CHAR16 *
+//
+// Output: EFI_STATUS - EFI_SUCCESS -> If default image loaded successfully
+// !EFI_SUCCESS -> If default image not loaded successfully
+//
+//------------------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_LaunchSecondaryBootPath
+EFI_STATUS LaunchSecondaryBootPath (CHAR16 *FileName)
+{
+#if SECONDARY_BOOT_FROM_ENABLED_DEVICES
+ return LaunchSecBootPathFromEnabledDevs (FileName); //If user need to boot the default image from only enabled devices
+#else //Default case
+ return BootLaunchFilename (FileName); //EIP 57660 loads the default image from any of the file system
+#endif
+}
+#endif
+//EIP 88447 Ends
+
+//EIP-75236 Starts
+//<AMI_PHDR_START>
+//------------------------------------------------------------------------------
+// Procedure: IsDelayLogoTillInputSupported
+//
+// Description: Retrurns SETUP_DELAY_LOGO_TILL_INPUT token value
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//-----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN IsDelayLogoTillInputSupported (VOID)
+{
+#ifdef SETUP_DELAY_LOGO_TILL_INPUT
+ return SETUP_DELAY_LOGO_TILL_INPUT;
+#else
+ return 0;
+#endif
+}
+
+//<AMI_PHDR_START>
+//------------------------------------------------------------------------------
+// Procedure: GetNotifyMaskValue
+//
+// Description: Retrurns notify mask vaule
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//-----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+UINT32 GetNotifyMaskValue (VOID)
+{
+//#if AMITSE_SOFTKBD_SUPPORT
+ return SOMETHING;
+/*#else
+ return (SOMETHING & (~NOTIFY_MASK_MOUSE_DRIVER));
+#endif*/
+}
+//EIP-75236 Ends
+
+//EIP-67049 Start
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+//
+// Procedure: MouseScrollBarMove
+//
+// Description: Function to move scrollbar in Frame using mouse
+//
+// Parameter: VOID *, BOOLEAN, UINT32
+//
+// Return value: status
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS MouseScrollBarMove(VOID *frame, BOOLEAN bScrollUp, UINT32 Size)
+{
+#if MINISETUP_MOUSE_SUPPORT
+ return TSEMouseScrollBarMove( frame, bScrollUp, Size );
+#else
+ return EFI_UNSUPPORTED;
+#endif
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+//
+// Procedure: MouseListBoxScrollBarMove
+//
+// Description: Function to move scrollbar in ListBox using mouse
+//
+// Parameter: VOID *, BOOLEAN, UINT32
+//
+// Return value: status
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS MouseListBoxScrollBarMove(VOID *listbox, BOOLEAN bScrollUp, UINT32 Size)
+{
+#if MINISETUP_MOUSE_SUPPORT
+ return TSEMouseListBoxScrollBarMove( listbox, bScrollUp, Size );
+#else
+ return EFI_UNSUPPORTED;
+#endif
+}
+//EIP-67049 End
+
+//EIP-94616 Starts
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+//
+// Procedure: TseIgnoreKeyForFastBoot
+//
+// Description: Function to return FastBoot is ENABLED or DISABLED
+//
+// Parameter: VOID
+//
+// Return value: BOOLEAN
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+
+BOOLEAN TseIgnoreKeyForFastBoot()
+{
+#if TSE_IGNORE_KEY_FOR_FASTBOOT
+ UINT32 *currentBootFlow;
+ UINTN size = 0;
+
+ currentBootFlow = VarGetNvramName( L"BootFlow", &_gBootFlowGuid, NULL, &size );
+ if (currentBootFlow != NULL && *currentBootFlow == BOOT_FLOW_CONDITION_FAST_BOOT)
+ {
+ MemFreePointer( (VOID **)&currentBootFlow );
+ return TRUE;
+ }
+ else
+ {
+ if (currentBootFlow)
+ {
+ MemFreePointer ((VOID **)&currentBootFlow );
+ }
+ return FALSE;
+ }
+#else
+ return FALSE;
+#endif
+}
+//EIP-94616 Ends
+
+//<AMI_PHDR_START>
+//------------------------------------------------------------------------------
+// Procedure: IsTSECursorSupport
+//
+// Description: Function to return TSE_CURSOR_SUPPORT token value
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//-----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN IsTSECursorSupport (VOID)
+{
+#ifdef TSE_CURSOR_SUPPORT
+ return TSE_CURSOR_SUPPORT;
+#else
+ return 0;
+#endif
+}
+
+
+//EIP93521 Starts
+//<AMI_PHDR_START>
+//-----------------------------------------------------------------------------------------------------
+// Procedure: OsUpdateCapsuleWrap
+//
+// Description: Dispalys the image obtained form OS Update and calls the capsule to update
+//
+// Input: BOOT_FLOW *
+//
+// Output: EFI_STATUS - EFI_SUCCESS -> Capsule update is success
+// !EFI_SUCCESS -> Fault happenend in capsule update
+//
+//------------------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_OsUpdateCapsuleWrap
+TSE_POST_STATUS PostManagerGetPostStatus(VOID);
+LOGO_TYPE GetLogoType(UINT8 *ImageData);
+EFI_STATUS OsUpdateCapsuleWrap (BOOT_FLOW *bootFlowPtr)
+{
+ EFI_STATUS Status = EFI_SUCCESS;
+#if SUPPORT_ESRT
+ EFI_GUID ReflashGuid = EFI_REFLASH_PROTOCOL_GUID;
+ UINT8 *ImageData = NULL;
+ UINTN ImageSize = 0;
+ UINTN CoordinateX = 0;
+ UINTN CoordinateY = 0;
+ UINTN Width = 0;
+ UINTN Height = 0;
+ UINTN LogoType = 0;
+ UINTN UgaBltSize = 0;
+ UINTN unBufferWidth = 0;
+ EFI_BADGING_DISPLAY_ATTRIBUTE Attribute;
+ EFI_UGA_PIXEL *UgaBlt = NULL;
+ EFI_REFLASH_PROTOCOL *ReFlash = NULL;
+
+ SETUP_DEBUG_TSE ("\nEntering OsUpdateCapsuleWrap");
+ Status = gBS->LocateProtocol (&ReflashGuid, NULL, &ReFlash);
+ if (!EFI_ERROR (Status))
+ {
+ Status = ReFlash->GetDisplayImage (ReFlash, &CoordinateX, &CoordinateY, &ImageData); //Recovery module have to allocate and send the image data
+ SETUP_DEBUG_TSE ("\nGetDisplayImage status is %x", Status);
+ if (!EFI_ERROR (Status)) //TSE wont free the ImageData
+ { //Recovery module have to provide the X,Y coordinates too
+ Attribute = EfiBadgingDisplayAttributeCustomized; //and wont free the memory
+ Height = 0;
+ Width = 0;
+ LogoType = GetLogoType (ImageData);
+
+ if (BMP_Logo == LogoType) //Draw only for BMP image
+ {
+ Status = ConvertBmpToUgaBltWrapper(
+ ImageData,
+ ImageSize,
+ &UgaBlt,
+ &UgaBltSize,
+ &Height,
+ &Width );
+ SETUP_DEBUG_TSE ("\nStatus for blt wrap is %x", Status);
+ unBufferWidth = Width;
+ SETUP_DEBUG_TSE ("\nCoordinateX is %x CoordinateY is %x", CoordinateX, CoordinateY);
+ SETUP_DEBUG_TSE ("\nDrawing the string");
+ DrawBltBuffer (UgaBlt, Attribute, Width, Height, CoordinateX, CoordinateY, unBufferWidth);
+ }
+ SETUP_DEBUG_TSE ("\nCalling CapUpdProgress");
+ Status = ReFlash->CapUpdProgress (ReFlash);
+ }
+ }
+#endif
+ SETUP_DEBUG_TSE ("\nExiting OsUpdateCapsuleWrap");
+ return Status;
+}
+#endif
+//EIP93521 Ends
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+//
+// Procedure: IsBootOverrideBootNextSupport
+//
+// Description: Function to return BOOT_OVERRIDE_BOOTNEXT_VARIABLE_FEATURE value
+//
+// Parameter: VOID
+//
+// Return value: BOOLEAN
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN IsBootOverrideBootNextSupport (VOID)
+{
+#if BOOT_OVERRIDE_BOOTNEXT_VARIABLE_FEATURE
+ return BOOT_OVERRIDE_BOOTNEXT_VARIABLE_FEATURE;
+#else
+ return 0;
+#endif
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+//
+// Procedure: TseSuppressOneofMultilineSupport
+//
+// Description: Function to return TSE_SUPPRESS_MULTILINE_FOR_ONEOFLABEL value
+//
+// Parameter: VOID
+//
+// Return value: BOOLEAN
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN TseSuppressOneofMultilineSupport(VOID)
+{
+
+#ifdef TSE_SUPPRESS_MULTILINE_FOR_ONEOFLABEL
+ return TSE_SUPPRESS_MULTILINE_FOR_ONEOFLABEL;
+#else
+ return FALSE;
+#endif
+
+}
+
+//EIP99059 starts
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: RTIfrRegFormNotificationWrapper
+//
+// Description: Wrapper function for RegFormNotification
+//
+// Input: VOID
+//
+// Output: EFI_STATUS
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS RegFormNotification (VOID);
+EFI_STATUS RTIfrRegFormNotificationWrapper (VOID)
+{
+#if SETUP_RUNTIME_IFR_PROCESSING
+ return RegFormNotification ();
+#else
+ return EFI_SUCCESS;
+#endif
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: RTIfrUnRegFormNotificationWrapper
+//
+// Description: Wrapper function for UnRegFormNotification
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID UnRegFormNotification (VOID);
+VOID RTIfrUnRegFormNotificationWrapper (VOID)
+{
+#if SETUP_RUNTIME_IFR_PROCESSING
+ UnRegFormNotification ();
+#endif
+}
+//EIP99059 ends
+
+//EIP94234 starts
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+//
+// Procedure: DrawPostLogoAt0Pos
+//
+// Description: Retrurns DRAW_POST_LOGO_AT_0POS token value
+//
+// Parameter: VOID
+//
+// Return value: BOOLEAN
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN DrawPostLogoAt0Pos (VOID)
+{
+#ifdef DRAW_POST_LOGO_AT_0POS
+ return DRAW_POST_LOGO_AT_0POS;
+#else
+ return FALSE;
+#endif
+}
+//EIP94234 ends
+//EIP 93881 & 93873 : START
+//Save pwd to nvram and not loading empty pwd on loading defaults.
+//<AMI_PHDR_START>
+//-------------------------------------------------------------------------------------------------------------
+// Procedure: TSEPwdSavetoNvram
+//
+// Description: Returns the token value for SETUP_SAVE_PSWD_TO_NVRAM
+//
+// Input: VOID
+//
+// Output: UINT32
+//
+//-------------------------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN TSEPwdSavetoNvram(VOID)
+{
+
+#ifdef SETUP_SAVE_PSWD_TO_NVRAM
+ return SETUP_SAVE_PSWD_TO_NVRAM;
+#endif
+ return FALSE; //Defaultly disabled.
+
+}
+
+//<AMI_PHDR_START>
+//-------------------------------------------------------------------------------------------------------------
+// Procedure: TSEDonotLoadPasswordOnDefaults
+//
+// Description: Returns the token value for TSE_DONOT_LOAD_PASSWORD_ON_DEFAULTS
+//
+// Input: VOID
+//
+// Output: UINT32
+//
+//-------------------------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN TSEDonotLoadPasswordOnDefaults(VOID)
+{
+
+#ifdef TSE_DONOT_LOAD_PASSWORD_ON_DEFAULTS
+ return TSE_DONOT_LOAD_PASSWORD_ON_DEFAULTS;
+#endif
+ return FALSE; //Defaultly disabled.
+
+}
+//EIP 93881 & 93873 : END
+//EIP 94205 START
+//<AMI_PHDR_START>
+//------------------------------------------------------------------------------
+// Procedure: ShellTextMode
+//
+// Description: Returns type of shell text mode
+//
+// Input: VOID
+//
+// Output: UINT32
+//
+//-----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+UINT32 ShellTextMode (VOID)
+{//EIP 94205 : OEM needs Token to assign the display mode of SHELL.
+#ifdef SHELL_TEXT_MODE
+ return SHELL_TEXT_MODE;
+#else
+ return 0xFF;
+#endif
+}
+//EIP 94205 END
+
+//EIP-99022 Starts
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: FlushKeysAfterRead
+//
+// Description: Returns value of disable FLUSH_KEYS_AFTER_READ
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN FlushKeysAfterRead(VOID)
+{
+#ifdef FLUSH_KEYS_AFTER_READ
+ return FLUSH_KEYS_AFTER_READ;
+#else
+ return 0;
+#endif
+}
+//EIP-99022 Ends
+
+//EIP-112628 Starts
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: gotoExitOnEscKey
+//
+// Description: Returns value of disable SETUP_GO_TO_EXIT_PAGE_ON_EXIT_KEY
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN gotoExitOnEscKey(EFI_GUID *exitPageGuid, UINT16 *pageClass, UINT16 *pageSubclass, UINT16 *pageFormID)
+{
+#if SETUP_GO_TO_EXIT_PAGE_ON_EXIT_KEY
+
+ EFI_GUID ExitPageGuid = EXIT_PAGE_GUID;
+ MemCopy(exitPageGuid, &ExitPageGuid, sizeof(EFI_GUID));
+ *pageClass = (UINT16)EXIT_PAGE_CLASS;
+ *pageSubclass = (UINT16)EXIT_PAGE_SUB_CLASS;
+ *pageFormID = (UINT16)EXIT_PAGE_FORM_ID;
+
+ return TRUE;
+#else
+ return FALSE;
+#endif
+}
+//EIP-112628 ENDS
+
+//EIP-103540 Starts
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: PISpecVersion
+//
+// Description: Returns PI_SPECIFICATION_VERSION value
+//
+// Input: VOID
+//
+// Output: UINTN
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+UINTN PISpecVersion(VOID)
+{
+#ifdef PI_SPECIFICATION_VERSION
+ return PI_SPECIFICATION_VERSION;
+#else
+ return 0;
+#endif
+}
+//EIP-103540 Ends
+
+//EIP-116315 Starts
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: IsShowPromptStringAsTitle
+//
+// Description: Returns token value TSE_SHOW_PROMPT_STRING_AS_TITLE
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN IsShowPromptStringAsTitle(VOID)
+{
+#if TSE_SHOW_PROMPT_STRING_AS_TITLE
+ return TSE_SHOW_PROMPT_STRING_AS_TITLE;
+#else
+ return 0;
+#endif
+}
+//EIP-116315 Ends
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: PrntScrnKeyHandleactionWrapper
+//
+// Description: Wrapper function to call PrntScrnKeyHandleaction
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS WriteDataToFile(CHAR16 *filename, VOID *Data, UINTN length, UINT32 index);
+EFI_STATUS WriteDataToFileWrapper (CHAR16 *filename, VOID *Data, UINTN length, UINT32 index)
+{
+ EFI_STATUS Status = EFI_SUCCESS;
+#if EFI_SPECIFICATION_VERSION>=0x2000A
+ Status = WriteDataToFile (filename, Data, length, index);
+#endif
+ return Status;
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: UIUpdateCallbackHook
+//
+// Description: Set OVERRIDE_UIUpdateCallbackHook to 1, if OEM wants to override the UIUpdateCallbackHook function from Board module.
+//
+// Input: VOID
+//
+// Output: EFI_STATUS
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_UIUpdateCallbackHook
+VOID UIUpdateCallback( VOID * Handle, UINT32 OldVariableCount );
+VOID UIUpdateCallbackHook( VOID * Handle, UINT32 OldVariableCount )
+{ //EIP 129750 : Modified UIUpdateCallback as module hook
+ UIUpdateCallback((VOID*)Handle, OldVariableCount);
+}
+#endif
+
+
+//<AMI_PHDR_START>
+//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+// Procedure: FixMergePagesExtraHook
+//
+// Description: Set OVERRIDE_FixMergePagesExtraHook to 1, if OEM wants to override the UIUpdateCallbackHook function from Board module.
+//
+// Input: VOID
+//
+// Output: EFI_STATUS
+//
+//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_FixMergePagesExtraHook
+VOID FixMergePagesExtraHook (VOID *gPages, VOID *tempPages)
+{
+
+}
+#endif
+
+//<AMI_PHDR_START>
+//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+// Procedure: PageRemoveHook
+//
+// Description: Set OVERRIDE_PageRemoveHook to 1, if OEM wants to override the PageRemoveHook function from Board module.
+//
+// Input: VOID
+//
+// Output: EFI_STATUS
+//
+//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_PageRemoveHook
+void PageRemoveHook (UINTN PageIndex, void *pageInfo, void *PageHandle, UINT16 PageFormID)
+{
+
+}
+#endif
+
+//<AMI_PHDR_START>
+//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+// Procedure: ProcessPackNotificationHook
+//
+// Description: Set OVERRIDE_ProcessPackNotificationHook to 1, if OEM wants to override the ProcessPackNotificationHook function from Board module.
+//
+// Input: VOID
+//
+// Output: EFI_STATUS
+//
+//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_ProcessPackNotificationHook
+EFI_STATUS ProcessPackNotification (void);
+EFI_STATUS ProcessPackNotificationHook (void)
+{
+ return ProcessPackNotification ();
+}
+#endif
+
+//EIP131739 Starts
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: MainSetupLoopInitHook
+//
+// Description: Set OVERRIDE_MainSetupLoopInitHook to 1, if OEM wants to override the MainSetupLoopInitHook function from Board module.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#if !OVERRIDE_MainSetupLoopInitHook
+VOID MainSetupLoopInit(VOID);
+VOID MainSetupLoopInitHook ( VOID )
+{ //EIP131739 : Modified MainSetupLoopInit as module hook for TSE
+ MainSetupLoopInit();
+}
+#endif
+//EIP131739 Ends
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: IsLoadSysteAccessOnUserDefault
+//
+// Description: Returns token value TSE_DONOT_LOAD_SYSTEM_ACCESS_FOR_USER_DEFAULT
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN IsLoadSysteAccessOnUserDefault(VOID)
+{
+#if TSE_DONOT_LOAD_SYSTEM_ACCESS_FOR_USER_DEFAULT
+ return TSE_DONOT_LOAD_SYSTEM_ACCESS_FOR_USER_DEFAULT;
+#else
+ return 0;
+#endif
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: IsANSIEscapeCodeSupported
+//
+// Description: Returns token value TSE_ANSI_ESC_CODE_SUPPORT
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN IsANSIEscapeCodeSupported(VOID)
+{
+#if TSE_ANSI_ESC_CODE_SUPPORT
+ return TSE_ANSI_ESC_CODE_SUPPORT;
+#else
+ return 0;
+#endif
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TseDebugDisableApplicationDestructor
+//
+// Description: Returns token value TSE_DBG_DISABLE_APPDESTRUCTOR
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN TseDebugDisableApplicationDestructor (VOID)
+{
+#ifdef TSE_DBG_DISABLE_APPDESTRUCTOR
+ return TSE_DBG_DISABLE_APPDESTRUCTOR;
+#else
+ return FALSE;
+#endif
+}
+
+//EIP 162981 Providing defaults through sdl tokens starts
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TseDefaultSetupPasswordSupported
+//
+// Description: Returns token value TSE_DEFAULT_SETUP_PASSWORD_SUPPORT
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN TseDefaultSetupPasswordSupported (void)
+{
+#ifdef TSE_DEFAULT_SETUP_PASSWORD_SUPPORT
+ return TSE_DEFAULT_SETUP_PASSWORD_SUPPORT;
+#else
+ return FALSE;
+#endif
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: DefaultSetupPwdAtFirstBootOnly
+//
+// Description: Returns token value DEFAULT_SETUP_PWD_AT_FIRSTBOOT_ONLY
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN DefaultSetupPwdAtFirstBootOnly (void)
+{
+#ifdef DEFAULT_SETUP_PWD_AT_FIRSTBOOT_ONLY
+ return DEFAULT_SETUP_PWD_AT_FIRSTBOOT_ONLY;
+#else
+ return FALSE;
+#endif
+}
+//EIP 162981 Providing defaults through sdl tokens ends
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: IsDisableESCinBBSMenu
+//
+// Description: Returns token DISABLE_ESC_IN_BBS value
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN IsDisableESCinBBSMenu (VOID)
+{
+#ifdef DISABLE_ESC_IN_BBS
+ return DISABLE_ESC_IN_BBS;
+#else
+ return 0;
+#endif
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TseRtAccessSupport
+//
+// Description: Returns token RT_ACCESS_SUPPORT_IN_HPKTOOL value
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN TseRtAccessSupport (VOID)
+{
+#ifdef RT_ACCESS_SUPPORT_IN_HPKTOOL
+ return RT_ACCESS_SUPPORT_IN_HPKTOOL;
+#else
+ return 0;
+#endif
+}
+
+
+//<AMI_PHDR_START>
+// Procedure: IsGrayoutSelectable
+//
+// Description: Returns token value TSE_SETUP_GRAYOUT_SELECTABLE
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN IsGrayoutSelectable()
+{
+#if TSE_SETUP_GRAYOUT_SELECTABLE
+ return 1;
+#else
+ return 0;
+#endif
+}
+
+//EIP-93340 Start
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: IsSupportDefaultForStringControl
+//
+// Description: Returns TSE_SUPPORT_DEFAULT_FOR_STRING_CONTROL token value
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN IsSupportDefaultForStringControl (VOID)
+{
+#if TSE_SUPPORT_DEFAULT_FOR_STRING_CONTROL
+ return TSE_SUPPORT_DEFAULT_FOR_STRING_CONTROL;
+#else
+ return FALSE;
+#endif
+}
+//EIP-93340 End
+
+//EIP-107833 Start
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: IsTseBestTextGOPModeSupported
+//
+// Description: Returns token TSE_BEST_TEXT_GOP_MODE value
+//
+// Input: VOID
+//
+// Output: BOOLEAN
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN IsTseBestTextGOPModeSupported (VOID)
+{
+#ifdef TSE_BEST_TEXT_GOP_MODE
+ return TSE_BEST_TEXT_GOP_MODE;
+#else
+ return FALSE;
+#endif
+}
+//EIP-197833 End
+//**********************************************************************
+//**********************************************************************
+//** **
+//** (C)Copyright 1985-2014, American Megatrends, Inc. **
+//** **
+//** All Rights Reserved. **
+//** **
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **
+//** **
+//** Phone: (770)-246-8600 **
+//** **
+//**********************************************************************
+//**********************************************************************
diff --git a/Core/EM/AMITSE/FakeTokens.c b/Core/EM/AMITSE/FakeTokens.c
new file mode 100644
index 0000000..80289b3
--- /dev/null
+++ b/Core/EM/AMITSE/FakeTokens.c
@@ -0,0 +1,391 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 1985-2013, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+// $Archive: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/FakeTokens.c $
+//
+// $Author: Arunsb $
+//
+// $Revision: 25 $
+//
+// $Date: 2/11/14 7:35p $
+//
+//*****************************************************************//
+//*****************************************************************//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/FakeTokens.c $
+//
+// 25 2/11/14 7:35p Arunsb
+// Changes reverted for 2.16.1243 label
+//
+// 24 11/26/13 9:49a Premkumara
+// [TAG] EIP118342
+// [Category] Improvement
+// [Description] Show meaningful error message when HDD is locked after
+// reached maximum unlocking attempt.
+// [Files] TseAdvanced.c, CommonHelper.c, FakeToken.c, AmiTseStr.uni
+//
+// 23 5/22/13 11:18p Premkumara
+// [TAG] EIP123432
+// [Category] Bug Fix
+// [Issue Faced] Take print screen for save & Exit msg box. OK
+// of msg box is consumed by Save & Exit msg box.
+// - Cursor is missing after taking print screen of popupedit box in
+// string control
+// - Printscreen support is not given for Filebrowser feature
+// [RootCause] - When msg box for Save&Exit is popped and printscreen
+// event is called and displaying msg box over Save&Exit. Then msgbox
+// handleaction for printscreen event will change the result value in
+// _CallbackMsgbox() function so it will break the while loop in
+// _CallbackGetValue() function so destroy the next msg box in
+// CallbackShowMessageBox() function.
+// - DrawCursor variable is not set to TRUE after printscreen event
+// [Solution] - Returning EFI_UNSUPPORTED for printscreen event handling
+// function for messgebox and change the result value to 0xff
+// - Support given for file browser feature
+// [Files] Callback.c, MessageBox.c, Minisetupext.c, PopupString.c,
+// AddBootOption.c
+// AmiTSEStr.uni, FakeToken.c
+//
+// 22 4/18/13 1:48a Arunsb
+// [TAG] EIP81490
+// [Category] New Feature
+// [Description] Post message support for BBS popup menu
+// [Files] AMITSE.sdl, AmiTSEStr.uni, commonoem.c, FakeTokens.c and
+// globals.c
+//
+// 21 3/25/13 8:42a Premkumara
+// [TAG] EIP116315
+// [Category] Improvement
+// [Description] Display control prompt string for password control.
+// (for String on CHAP secret popup)
+// [Files] - AMITSE.sdl
+// - CommonHelper.c
+// - FakeToken.c
+// - AmiTSEStr.uni
+// - TseLite\PopupPassword.c
+// - uefi2.1\UefiWapper21.c
+// - uefi2.0\UefiWapper20.c
+// - uefi2.0\HiiCallback.c
+// - uefi2.0\hii.h
+// - uefi2.0\hii.c
+//
+// 20 10/18/12 5:31a Arunsb
+// Updated for 2.16.1235 QA submission
+//
+// 11 10/10/12 12:23p Arunsb
+// Synched the source for v2.16.1232 backup with Aptio
+//
+// 18 9/17/12 5:59a Rajashakerg
+// Updated EIP changes for 2.16 release.
+//
+// 16 9/03/12 3:08a Premkumara
+// [TAG] EIP 96246
+// [Category] Improvement
+// [Description] Improvement of a boots override when firmware has a
+// BootNext variable
+// [Files] AMITSE.sdl, CommonHelper.c, FakeToken.c, AmiTSEStr.uni,
+// TseAdvanced.c
+//
+// 15 1/09/12 1:38a Arunsb
+// [TAG] EIP79952
+// [Category] Bug Fix
+// [Severity] Normal
+// [Symptom] Add driver option displays select boot option as title
+// [RootCause] Title problem
+// [Solution] Title changes
+// [Files] Faketokens.c, amitsestr.uni, addbootoption.c,
+// uefi2.0\hiicallback.c and uefi21wapper.c
+//
+// 14 12/16/11 7:16a Arunsb
+// Ordered the strings as Bootonly strings then normal strings
+//
+// 13 12/16/11 6:05a Premkumara
+// [TAG] EIP63190
+// [Category] Improvement
+// [Description] Changed Order of Strings based on TSE flavors.
+// [Files] AmiTSEStr.uni, FakeTokens.c
+//
+// 12 11/20/11 7:38a Premkumara
+// [TAG] EIP73226
+// [Category] New Feature
+// [Description] Extended support for password prompt
+// [Files] FakeToken.c, Uefi21Wapper.c, AmiTSEStr.uni, PopupPassword.c,
+//
+// 11 11/14/11 2:40p Blaines
+// [TAG] - EIP 75481
+// [Category]- Function Request
+// [Synopsis]- TSE debug print infrastructure.
+// [Description]- Add TSE debug print info for basic functions such as
+// Hiiparsing, HiiNotifications, HiiCallbacks. Variables, and Ifrforms
+// data.
+// [Files]
+// AMITSE.sdl, AmiTSEStr.uni, CommonHelper.c, commonoem.c, FakeTokens.c
+// Globals.c, Minisetup.cif, Minisetup.h, print.c, FormBrowser2.c, Hii.c,
+// HiiCallback.c, HiiNotificationHandler.c, Parse.c, TseUefiHii.h,
+// Uefi21Wrapper.c, setupdbg.h
+//
+// 10 9/04/11 3:59a Arunsb
+// [TAG] EIP65320
+// [Category] Improvement
+// [Description] Board module hook for LoadImage failure.
+// Review comment addressed.
+// [Files] Commonhelper.c, amitsestr.uni, boot.c and faketokens.c
+//
+// 9 6/30/11 3:57a Arunsb
+// [TAG] EIP57661
+// [Category] New Feature
+// [Description] Boot manager algorithm for interaction with Driver
+// Health protocol.
+// Driver health related string tokens added.
+// [Files] amitse.cif, amitse.sdl, faketokens.c, amitsestr.uni,
+// commonhelper.c, uefisetup.ini, tsedrvhealth.h,
+// amivfr.h, minisetupbin.mak,
+// hiistring21.c, hiistring20.c, tseadvanced.c, special.c,
+// special.h, boot.h, minisetup.h,
+// uefi20wapper.c, formbrowser2.c, hii.c, parse.c and
+// uefi21wapper.c.
+//
+// 8 3/28/11 11:00p Madhans
+// [TAG] EIP56414
+// [Category] Improvement
+// [Description] TSE: Support for EFI_IFR_NO_SUBMIT_IF opcode
+// [Files] Callback.c, FakeToken.c, AMITSEstr.uni, Parse.c, CtrlCond.c,
+// CtrlCond.h, ctrlcond.h, ctrlcond.c
+//
+// 7 12/28/10 5:59p Mallikarjunanv
+// [TAG] EIP41615
+// [Category] New Feature
+// [Description] Added the file browser support for the Add boot option
+// reated controls
+// [Files] AmiVfr.h, AmiTse.sdl, AmiTseStr.uni, CommonHelper.c,
+// Faketokens.c, TseElinks.h, EdkHelper.h, minisetup.h, TseAdvanced.c,
+// AddBootOption.c
+//
+// 6 9/16/10 8:39p Madhans
+// Updated for TSE 2.10. Refer changelog.log for more deatils.
+//
+// 5 8/04/10 12:12a Mallikarjunanv
+// EIP-29951 : Device Path Name support updates
+//
+// 4 4/16/10 5:10p Madhans
+// Changes for Tse 2.02. Please see Changelog.log for more details.
+//
+// 3 2/19/10 12:58p Madhans
+// Updated for TSE 2.01. Refer Changelog.log for File change history.
+//
+// 4 2/19/10 7:59a Mallikarjunanv
+// updated the year in copyright message
+//
+// 3 1/04/10 9:49a Mallikarjunanv
+// Added support for reserved boot option names and added condition not to
+// accept empty boot option names
+//
+// 2 10/28/09 5:34p Madhans
+// 1. Support to Add the String from other modules to TSE.
+// 2. Clean of GIF and Image code Control them with minimal code from TSE
+// binary.
+//
+//
+// 1 6/04/09 7:49p Madhans
+// AMI TSE Advanced.
+//
+// 1 4/28/09 10:49p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+// 1 4/28/09 10:24p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+//
+//*****************************************************************//
+//*****************************************************************//
+//**********************************************************************
+//<AMI_FHDR_START>
+//
+// Name: faketokens.c
+//
+// Description:
+// This file does not add any code. It has, all the string tokens that
+// are used by Minisetup, to fake the usage to strgather.exe. Add to
+// this list, the new string tokens that are defined in
+// AmiTSEStrstr.uni and to be used by Minisetup
+//
+//<AMI_FHDR_END>
+//**********************************************************************
+
+
+//Following code is to force strgatherer to include these strings
+#if 0
+STRING_TOKEN(STR_MAIN_TITLE)
+STRING_TOKEN(STR_MAIN_COPYRIGHT)
+STRING_TOKEN(STR_CTRL_CHKBOX_ENABLE)
+STRING_TOKEN(STR_CTRL_CHKBOX_DISABLE)
+STRING_TOKEN(STR_HELP_TITLE)
+
+STRING_TOKEN(STR_FDD)
+STRING_TOKEN(STR_HDD)
+STRING_TOKEN(STR_CDROM)
+STRING_TOKEN(STR_NETWORK)
+STRING_TOKEN(STR_BEV)
+STRING_TOKEN(STR_PRI_MAS)
+STRING_TOKEN(STR_PRI_SLA)
+STRING_TOKEN(STR_SEC_MAS)
+STRING_TOKEN(STR_SEC_SLA)
+STRING_TOKEN(STR_SATA_X)
+STRING_TOKEN(STR_NO_BOOT_OPTIONS)
+STRING_TOKEN(STR_PASSWORD_PROMPT)
+STRING_TOKEN(STR_ERROR_PSWD)
+STRING_TOKEN(STR_DRV_HLTH_REBOOT_POST)
+STRING_TOKEN(STR_EVAL_MSG)
+STRING_TOKEN(STR_ACK_BBS_POPUP)
+STRING_TOKEN(STR_DEL_ENTER_SETUP)
+STRING_TOKEN(STR_ACK_ENTER_SETUP)
+STRING_TOKEN(STR_GENERAL_HELP)
+STRING_TOKEN(STR_GENERAL_HELP_MSG)
+STRING_TOKEN(STR_BOOT_MANAGER)
+STRING_TOKEN(STR_BOOT_MANAGER_HELP)
+STRING_TOKEN(STR_LANGUAGE)
+STRING_TOKEN(STR_LANGUAGE_HELP)
+STRING_TOKEN(STR_LOAD_PREVIOUS)
+STRING_TOKEN(STR_LOAD_PREVIOUS_MSG)
+STRING_TOKEN(STR_LOAD_FAILSAFE)
+STRING_TOKEN(STR_LOAD_FAILSAFE_HELP)
+STRING_TOKEN(STR_LOAD_FAILSAFE_MSG)
+STRING_TOKEN(STR_LOAD_OPTIMAL)
+STRING_TOKEN(STR_LOAD_OPTIMAL_HELP)
+STRING_TOKEN(STR_LOAD_OPTIMAL_MSG)
+STRING_TOKEN(STR_SAVE_EXIT)
+STRING_TOKEN(STR_SAVE_EXIT_HELP)
+STRING_TOKEN(STR_SAVE_EXIT_MSG)
+STRING_TOKEN(STR_SAVE_RESET)
+STRING_TOKEN(STR_SAVE_RESET_HELP)
+STRING_TOKEN(STR_SAVE_RESET_MSG)
+STRING_TOKEN(STR_SAVE_VALUES)
+STRING_TOKEN(STR_SAVE_VALUES_MSG)
+STRING_TOKEN(STR_EXIT)
+STRING_TOKEN(STR_EXIT_MSG)
+STRING_TOKEN(STR_RESET)
+STRING_TOKEN(STR_RESET_MSG)
+STRING_TOKEN(STR_SAVE_USER_DEFAULTS)
+STRING_TOKEN(STR_LOAD_USER_DEFAULTS)
+STRING_TOKEN(STR_LOAD_USER_MSG)
+STRING_TOKEN(STR_SUBMENU_OPTION)
+STRING_TOKEN(STR_CTRL_OK)
+STRING_TOKEN(STR_CTRL_CANCEL)
+STRING_TOKEN(STR_CTRL_YES)
+STRING_TOKEN(STR_CTRL_NO)
+STRING_TOKEN(STR_DAY_SUNDAY)
+STRING_TOKEN(STR_DAY_MONDAY)
+STRING_TOKEN(STR_DAY_TUESDAY)
+STRING_TOKEN(STR_DAY_WEDNESDAY)
+STRING_TOKEN(STR_DAY_THURSDAY)
+STRING_TOKEN(STR_DAY_FRIDAY)
+STRING_TOKEN(STR_DAY_SATURDAY)
+STRING_TOKEN(STR_OLD_PSWD)
+STRING_TOKEN(STR_NEW_PSWD)
+STRING_TOKEN(STR_CONFIRM_NEW_PSWD)
+STRING_TOKEN(STR_PSWD_CLR)
+STRING_TOKEN(STR_ERROR)
+STRING_TOKEN(STR_WARNING)
+STRING_TOKEN(STR_WARNING_NOT_FOUND)
+STRING_TOKEN(STR_ERROR_INPUT)
+STRING_TOKEN(STR_EMPTY_STRING)
+STRING_TOKEN(STR_INCONSISTENT_MSG_TITLE)
+STRING_TOKEN(STR_NOSUBMITIF_MSG_TITLE)
+STRING_TOKEN(STR_BBS_POPUP_TITLE_STRING)
+STRING_TOKEN(STR_BBS_POPUP_HELP1_STRING)
+STRING_TOKEN(STR_BBS_POPUP_HELP2_STRING)
+STRING_TOKEN(STR_BBS_POPUP_HELP3_STRING)
+STRING_TOKEN(STR_BBS_POPUP_HELP_STRING)
+STRING_TOKEN(STR_POPUPMENU_ENTER_SETUP)
+STRING_TOKEN(STR_USB)
+STRING_TOKEN(STR_VENDOR)
+STRING_TOKEN(STR_FILEPATH)
+STRING_TOKEN(STR_PROTOCOL)
+STRING_TOKEN(STR_FV_FILEPATH)
+STRING_TOKEN(STR_USB_DP)
+STRING_TOKEN(STR_SCSI_DP)
+STRING_TOKEN(STR_FIBRE_CHANNEL_DP)
+STRING_TOKEN(STR_1394_DP)
+STRING_TOKEN(STR_I20_DP)
+STRING_TOKEN(STR_INFINIBAND_DP)
+STRING_TOKEN(STR_VENDOR_DP)
+STRING_TOKEN(STR_MAC_DP)
+STRING_TOKEN(STR_NETWORK_IPV4_DP)
+STRING_TOKEN(STR_NETWORK_IPV6_DP)
+STRING_TOKEN(STR_UART_DP)
+STRING_TOKEN(STR_USB_CLASS_DP)
+STRING_TOKEN(STR_USB_CLASS_PHY_DP)
+STRING_TOKEN(STR_USB_CLASS_MASS_DP)
+STRING_TOKEN(STR_USB_LOGICAL_DP)
+STRING_TOKEN(STR_USB_SATA_DP)
+STRING_TOKEN(STR_USB_ISCSI_DP)
+STRING_TOKEN(STR_HARD_DISK_ORDER)
+STRING_TOKEN(STR_CDROM_ORDER)
+STRING_TOKEN(STR_FLOPPY_DISK_ORDER)
+STRING_TOKEN(STR_NETWORK_ORDER)
+STRING_TOKEN(STR_BEV_ORDER)
+STRING_TOKEN(STR_USB_ORDER)
+STRING_TOKEN(STR_PCMCIA_ORDER)
+STRING_TOKEN(STR_UNKNOWN_ORDER)
+STRING_TOKEN(STR_ADD_BOOT_OPTION_RESERVED)
+STRING_TOKEN(STR_ADD_BOOT_OPTION_EMPTY)
+STRING_TOKEN(STR_ADD_DRIVER_OPTION_EMPTY)
+STRING_TOKEN(STR_DEL_BOOT_OPTION_RESERVED)
+STRING_TOKEN(STR_MSGBOX_PROGRESS_TITLE)
+STRING_TOKEN(STR_MSGBOX_PROGRESS_TEXT)
+STRING_TOKEN(STR_FILE_SYSTEM)
+STRING_TOKEN(STR_FILE_PATH)
+STRING_TOKEN(STR_DRIVER_PATH)
+STRING_TOKEN(STR_DRV_HLTH_TITLE)
+STRING_TOKEN(STR_DRV_HLTH_RECON)
+STRING_TOKEN(STR_DRV_HLTH_REBOOT)
+STRING_TOKEN(STR_SECBOOT_VIOLATION)
+STRING_TOKEN(STR_SECBOOT_INV_SIGN)
+STRING_TOKEN(STR_DBG_PRINT_CHECKED)
+STRING_TOKEN(STR_DBG_PRINT_HIIPARSING)
+STRING_TOKEN(STR_DBG_PRINT_HIIFUNCTION)
+STRING_TOKEN(STR_DBG_PRINT_HIICALLBACK)
+STRING_TOKEN(STR_DBG_PRINT_HIINOTIFICATION)
+STRING_TOKEN(STR_DBG_PRINT_IFRFORM)
+STRING_TOKEN(STR_DBG_PRINT_VARIABLE_CACHE)
+STRING_TOKEN(STR_OVERRIDE_BOOTNEXT_OPTION_1)
+STRING_TOKEN(STR_OVERRIDE_BOOTNEXT_OPTION_2)
+STRING_TOKEN(STR_OVERRIDE_BOOTNEXT_OPTION_3)
+STRING_TOKEN(STR_OVERRIDE_OPTION_MENU_TITLE)
+STRING_TOKEN(STR_OVERRIDE_OPTION_MENU_LEGEND)
+STRING_TOKEN(STR_OLD_PSWD_LABEL)
+STRING_TOKEN(STR_NEW_PSWD_LABEL)
+STRING_TOKEN(STR_CONFIRM_NEW_PSWD_LABEL)
+STRING_TOKEN(STR_PSWD_CLR_LABEL)
+STRING_TOKEN(STR_FILE_SYSTEM_TO_SAVE_IMG)
+#endif
+
+
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 1985-2013, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
diff --git a/Core/EM/AMITSE/HookList.c b/Core/EM/AMITSE/HookList.c
new file mode 100644
index 0000000..ffb4bca
--- /dev/null
+++ b/Core/EM/AMITSE/HookList.c
@@ -0,0 +1,187 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2010, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+// $Archive: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/HookList.c $
+//
+// $Author: Premkumara $
+//
+// $Revision: 11 $
+//
+// $Date: 8/28/14 4:28a $
+//
+//*****************************************************************//
+//*****************************************************************//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/HookList.c $
+//
+// 11 8/28/14 4:28a Premkumara
+// EIP-135253 Updating file name proper in #include
+//
+// 10 3/06/13 12:24a Premkumara
+// [TAG] EIP111415
+// [Category] Improvement
+// [Description] Elink function for SETUP_TOGGLE_KEY_UNICODE function
+// [Files] HookAnchor.h, AMITSE.sdl, commonoem.c, Commonoem.h,
+// HookList.c, HookAnchor.c
+//
+// 9 10/18/12 5:31a Arunsb
+// Updated for 2.16.1235 QA submission
+//
+// 10 10/10/12 12:23p Arunsb
+// Synched the source for v2.16.1232 backup with Aptio
+//
+// 8 3/28/11 9:06p Madhans
+// [TAG] EIP41744
+// [Category] Improvement
+// [Description] SoftKeyBoard Support in TSE. and Support to Work with
+// new mouse driver(Label 07).
+// [Files] HookAnchor.h
+// AMITSE.sdl
+// CommonHelper.c
+// commonoem.c
+// commonoem.h
+// HookList.c
+// HookAnchor.c
+// Mouse.c
+// minisetupext.c
+// postmgmtext.c
+// minisetupext.h
+// PopupPassword.c
+// PopupString.c
+// TseLiteCommon.c
+//
+// 7 9/16/10 8:39p Madhans
+// Updated for TSE 2.10. Refer changelog.log for more deatils.
+//
+// 6 6/04/10 12:12p Blaines
+// Created new AMITSE hook, hook33
+//
+// 5 4/16/10 5:10p Madhans
+// Changes for Tse 2.02. Please see Changelog.log for more details.
+//
+// 4 2/19/10 12:58p Madhans
+// Updated for TSE 2.01. Refer Changelog.log for File change history.
+//
+// 5 2/19/10 7:59a Mallikarjunanv
+// updated the year in copyright message
+//
+// 4 1/09/10 2:32a Mallikarjunanv
+// Updated TSE2.01 Release sources with coding standards
+//
+// 3 9/15/09 9:20a Sudhirv
+// added entry number 31
+//
+// 2 6/24/09 6:33p Madhans
+// Coding Standards
+//
+// 2 6/24/09 11:52a Blaines
+// Coding standard update
+//
+// 1 6/09/09 9:52a Madhans
+// TSE 2.00.1201
+//
+// 1 6/04/09 7:49p Madhans
+// AMI TSE Advanced.
+//
+// 1 4/28/09 10:49p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+// 1 4/28/09 10:24p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+//
+//*****************************************************************//
+//*****************************************************************//
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: hooklist.c
+//
+// Description: AMITSE Hook definitions
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+
+#ifdef TSE_FOR_APTIO_4_50
+#include <Efi.h>
+#include "Token.h"
+#else
+#include "Tiano.h"
+#include "tokens.h"
+#endif
+
+#include "AMITSEElinks.h"
+
+UINTN gHookBase = TSE_HOOKBASE_VALUE;
+
+typedef VOID TSE_HOOK (VOID);
+
+extern TSE_HOOK HOOK_LIST_FROM_ELINKS;
+
+#define HOOK0 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE)
+#define HOOK1 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+1)
+#define HOOK2 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+2)
+#define HOOK3 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+3)
+#define HOOK4 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+4)
+#define HOOK5 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+5)
+#define HOOK6 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+6)
+#define HOOK7 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+7)
+#define HOOK8 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+8)
+#define HOOK9 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+9)
+#define HOOK10 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+10)
+#define HOOK11 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+11)
+#define HOOK12 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+12)
+#define HOOK13 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+13)
+#define HOOK14 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+14)
+#define HOOK15 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+15)
+#define HOOK16 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+16)
+#define HOOK17 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+17)
+#define HOOK18 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+18)
+#define HOOK19 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+19)
+#define HOOK20 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+20)
+#define HOOK21 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+21)
+#define HOOK22 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+22)
+#define HOOK23 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+23)
+#define HOOK24 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+24)
+#define HOOK25 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+25)
+#define HOOK26 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+26)
+#define HOOK27 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+27)
+#define HOOK28 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+28)
+#define HOOK29 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+29)
+#define HOOK30 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+30)
+#define HOOK31 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+31)
+#define HOOK32 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+32)
+#define HOOK33 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+33)
+#define HOOK34 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+34)
+#define HOOK35 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+35)
+#define HOOK36 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+36)
+#define HOOK37 (TSE_HOOK *)((UINTN)TSE_HOOKBASE_VALUE+37)//EIP-111415 SwitchToPostScreenHook
+
+TSE_HOOK * AMITSE_HookList [] = {HOOK_LIST_FROM_ELINKS, NULL};
+
+//**********************************************************************
+//**********************************************************************
+//** **
+//** (C)Copyright 1985-2010, American Megatrends, Inc. **
+//** **
+//** All Rights Reserved. **
+//** **
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **
+//** **
+//** Phone: (770)-246-8600 **
+//** **
+//**********************************************************************
+//**********************************************************************
diff --git a/Core/EM/AMITSE/HpkTool.exe b/Core/EM/AMITSE/HpkTool.exe
new file mode 100644
index 0000000..bfc0c3c
--- /dev/null
+++ b/Core/EM/AMITSE/HpkTool.exe
Binary files differ
diff --git a/Core/EM/AMITSE/Inc/HiiLib.h b/Core/EM/AMITSE/Inc/HiiLib.h
new file mode 100644
index 0000000..a0bc7ba
--- /dev/null
+++ b/Core/EM/AMITSE/Inc/HiiLib.h
@@ -0,0 +1,127 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2010, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+// $Archive: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Inc/HiiLib.h $
+//
+// $Author: Arunsb $
+//
+// $Revision: 6 $
+//
+// $Date: 10/18/12 5:31a $
+//
+//*****************************************************************//
+//*****************************************************************//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Inc/HiiLib.h $
+//
+// 6 10/18/12 5:31a Arunsb
+// Updated for 2.16.1235 QA submission
+//
+// 11 10/10/12 12:23p Arunsb
+// Synched the source for v2.16.1232 backup with Aptio
+//
+// 5 9/20/10 6:46p Madhans
+// [TAG] EIP44542
+// [Category] BUILD ISSUE FIX
+// [Symptom] Build issues with TSE label (INT)4.6.2_TSE_2_10_1207_TEST
+// when IdeSecurity and FastBoot modules added to the project
+// [RootCause] -
+// [Solution] Build issues resolved
+// [Files] CommonHelper.c, Tsecommon.h, Hiilib.h, Boot.h, minisetup.h,
+// bbs.c, special.c, Bds.c TseLitehelp
+//
+// 4 6/17/10 2:17p Madhans
+// Refer Changelog.log.
+//
+// 3 2/19/10 12:59p Madhans
+// Updated for TSE 2.01. Refer Changelog.log for File change history.
+//
+// 7 2/19/10 7:59a Mallikarjunanv
+// updated the year in copyright message
+//
+// 6 1/09/10 2:29a Mallikarjunanv
+// Updated TSE2.01 Release sources with coding standards
+//
+// 5 10/28/09 5:34p Madhans
+//
+// 4 8/13/09 7:33a Mallikarjunanv
+// changed after moving the hii ralated function to uefi module from
+// binary module
+//
+// 3 7/20/09 11:54a Mallikarjunanv
+// added external variable gHiiProtocol to use in tse binary
+//
+// 2 6/24/09 6:33p Madhans
+// Coding Standards.
+//
+// 1 6/09/09 9:53a Madhans
+// TSE 2.00.1201
+//
+// 1 6/04/09 7:49p Madhans
+// AMI TSE Advanced.
+//
+// 1 4/28/09 10:50p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+// 1 4/28/09 10:24p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+//
+//*****************************************************************//
+//*****************************************************************//
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: hiilib.h
+//
+// Description: Hii related functions
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+
+#ifndef _HIILIB_H_
+#define _HIILIB_H_
+
+EFI_STATUS HiiInitializeProtocol( VOID );
+CHAR16 *HiiGetString( VOID* handle, UINT16 token );
+UINT16 HiiAddString( VOID* handle, CHAR16 *string );
+UINTN TestPrintLength ( IN CHAR16 *String );
+
+extern VOID * gHiiHandle;
+
+#ifndef INVALID_HANDLE
+#define INVALID_HANDLE ((VOID*)(UINTN)-1)
+#endif
+
+#ifndef INVALID_TOKEN
+#define INVALID_TOKEN ((UINT16)-1)
+#endif
+
+#endif
+
+//**********************************************************************
+//**********************************************************************
+//** **
+//** (C)Copyright 2010, American Megatrends, Inc. **
+//** **
+//** All Rights Reserved. **
+//** **
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **
+//** **
+//** Phone: (770)-246-8600 **
+//** **
+//**********************************************************************
+//**********************************************************************
diff --git a/Core/EM/AMITSE/Inc/HookAnchor.h b/Core/EM/AMITSE/Inc/HookAnchor.h
new file mode 100644
index 0000000..106d722
--- /dev/null
+++ b/Core/EM/AMITSE/Inc/HookAnchor.h
@@ -0,0 +1,252 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2011, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+// $Archive: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Inc/HookAnchor.h $
+//
+// $Author: Premkumara $
+//
+// $Revision: 10 $
+//
+// $Date: 3/06/13 12:20a $
+//
+//*****************************************************************//
+//*****************************************************************//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Inc/HookAnchor.h $
+//
+// 10 3/06/13 12:20a Premkumara
+// [TAG] EIP111415
+// [Category] Improvement
+// [Description] Elink function for SETUP_TOGGLE_KEY_UNICODE function
+// [Files] HookAnchor.h, AMITSE.sdl, commonoem.c, Commonoem.h,
+// HookList.c, HookAnchor.c
+//
+// 9 10/18/12 5:31a Arunsb
+// Updated for 2.16.1235 QA submission
+//
+// 11 10/10/12 12:23p Arunsb
+// Synched the source for v2.16.1232 backup with Aptio
+//
+// 8 11/20/11 6:33a Rajashakerg
+// [TAG] EIP62763
+// [Category] Improvement
+// [Description] Utilize the Improvements done from mouse driver in
+// AMITSE
+// [Files] HookAnchor.h, TseCommon.h, AMITSE.sdl, CommonHelper.c,
+// commonoem.c, commonoem.h, buffer.c, globals.c, HookAnchor.c,
+// minisetup.h, notify.c, postmgmt.c, protocol.c, ezport.c, stylecommon.c,
+// Mouse.c, Action.c, Date.c, frame.c, MessageBox.c, minisetupext.c,
+// minisetupext.h, numeric.c, numeric.h, page.c, PopupEdit.c, PopupEdit.h,
+// PopupPassword.c, postmgmtext.c, time.c.
+//
+// 7 3/28/11 9:06p Madhans
+// [TAG] EIP41744
+// [Category] Improvement
+// [Description] SoftKeyBoard Support in TSE. and Support to Work with
+// new mouse driver(Label 07).
+// [Files] HookAnchor.h
+// AMITSE.sdl
+// CommonHelper.c
+// commonoem.c
+// commonoem.h
+// HookList.c
+// HookAnchor.c
+// Mouse.c
+// minisetupext.c
+// postmgmtext.c
+// minisetupext.h
+// PopupPassword.c
+// PopupString.c
+// TseLiteCommon.c
+//
+// 6 9/16/10 8:39p Madhans
+// Updated for TSE 2.10. Refer changelog.log for more deatils.
+//
+// 5 6/04/10 12:12p Blaines
+// Created new AMITSE hook, hook33
+//
+// 4 4/16/10 5:11p Madhans
+// Changes for Tse 2.02. Please see Changelog.log for more details.
+//
+// 3 2/19/10 12:59p Madhans
+// Updated for TSE 2.01. Refer Changelog.log for File change history.
+//
+// 5 2/19/10 7:59a Mallikarjunanv
+// updated the year in copyright message
+//
+// 4 2/04/10 11:08p Madhans
+// MapControlMouseAction hook added
+//
+// 3 9/15/09 9:03a Sudhirv
+// added two hooks one for LoadSetupDefaults and the other for
+// PreSystemReset
+//
+// 2 6/24/09 6:33p Madhans
+// Coding Standards.
+//
+// 1 6/09/09 9:53a Madhans
+// TSE 2.00.1201
+//
+// 1 6/04/09 7:49p Madhans
+// AMI TSE Advanced.
+//
+// 1 4/28/09 10:50p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+// 1 4/28/09 10:24p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+//
+//*****************************************************************//
+//*****************************************************************//
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: hookanchor.h
+//
+// Description: TSE hook functions
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+
+#ifndef _HOOKANCHOR_H_
+#define _HOOKANCHOR_H_
+
+#if TSE_USE_AMI_EFI_KEYCODE_PROTOCOL
+#include <Protocol/AmiKeyCode.h>
+#else
+#ifndef _AMI_EFI_KEY_DATA_
+#define _AMI_EFI_KEY_DATA_
+typedef struct {
+ EFI_INPUT_KEY Key;
+} AMI_EFI_KEY_DATA;
+#endif
+#endif
+
+VOID DrawQuietBootLogoHook(VOID);
+BOOLEAN ProcessConInAvailabilityHook(VOID);
+VOID ProcessEnterSetupHook(VOID);
+VOID ProcessProceedToBootHook(VOID);
+VOID MinisetupDriverEntryHookHook(VOID);
+VOID PostManagerHandShakeHookHook(VOID);
+CONTROL_ACTION MapControlKeysHook(AMI_EFI_KEY_DATA key);
+VOID CheckForKeyHook( EFI_EVENT Event, VOID *Context );
+VOID CheckForClickHook( EFI_EVENT Event, VOID *Context );//EIP 62763 : Utilize the Improvements done from mouse driver in AMITSE
+VOID BeforeLegacyBootLaunchHook(VOID);
+VOID AfterLegacyBootLaunchHook(VOID);
+VOID BeforeEfiBootLaunchHook(VOID);
+VOID AfterEfiBootLaunchHook(VOID);
+VOID SavedConfigChangesHook(VOID);
+VOID LoadedConfigDefaultsHook(VOID);
+VOID TimeOutLoopHookHook(VOID);
+EFI_STATUS OemKey1HookHook ( BOOT_FLOW *bootFlowPtr );
+EFI_STATUS OemKey2HookHook ( BOOT_FLOW *bootFlowPtr );
+EFI_STATUS OemKey3HookHook ( BOOT_FLOW *bootFlowPtr );
+EFI_STATUS OemKey4HookHook ( BOOT_FLOW *bootFlowPtr );
+VOID PasswordEncodeHook( CHAR16 *Password, UINTN MaxSize);
+EFI_STATUS SetControlColorsHook(UINT8 *BGColor, UINT8 *FGColor, UINT8 *SecBGColor, UINT8 *SecFGColor,
+ UINT8 *SelBGColor, UINT8 *SelFGColor, UINT8 *NSelBGColor, UINT8 *NSelFGColor,
+ UINT8 *LabelBGColor, UINT8 *LabelFGColor,UINT8 *NSelLabelFGColor, UINT8 *EditBGColor, UINT8 *EditFGColor,
+ UINT8 *PopupFGColor, UINT8 *PopupBGColor);
+VOID InvalidActionHookHook(VOID);
+VOID LoadedUserDefaultsHook(VOID);
+VOID LoadedBuildDefaultsHook(VOID);
+VOID LoadedPreviousValuesHook(VOID);
+VOID SetupConfigModifiedHook(VOID);
+VOID DrawPopupMenuHook();
+VOID BbsBootHook();
+VOID LoadSetupDefaultsHook( NVRAM_VARIABLE *defaults, UINTN data );
+VOID PreSystemResetHookHook(VOID);
+CONTROL_ACTION MapControlMouseActionHook(VOID *pMouseInfo);
+VOID ProcessProceedToBootNowHook(VOID);
+VOID ProcessConOutAvailableHook(VOID);
+VOID ProcessUIInitHookHook(VOID);
+VOID AfterInitPostScreenHook(VOID);
+VOID SwitchToPostScreenHook(VOID);//EIP-111415 SwitchToPostScreenHook
+
+VOID LastTSEHook(VOID);
+
+typedef VOID (TSE_HOOK) (VOID);
+typedef BOOLEAN (TSE_HOOK_T1) ();
+typedef CONTROL_ACTION (TSE_HOOK_T2) (AMI_EFI_KEY_DATA key);
+typedef VOID (TSE_HOOK_T3) (EFI_EVENT Event, VOID *Context);
+typedef EFI_STATUS (TSE_HOOK_T4) (BOOT_FLOW *bootFlowPtr);
+typedef VOID (TSE_HOOK_T5) (CHAR16 *Password, UINTN MaxSize);
+typedef EFI_STATUS (TSE_HOOK_T6) (UINT8 *BGColor, UINT8 *FGColor, UINT8 *SecBGColor, UINT8 *SecFGColor,
+ UINT8 *SelBGColor, UINT8 *SelFGColor, UINT8 *NSelBGColor, UINT8 *NSelFGColor,
+ UINT8 *LabelBGColor, UINT8 *LabelFGColor,UINT8 *NSelLabelFGColor, UINT8 *EditBGColor, UINT8 *EditFGColor,
+ UINT8 *PopupFGColor, UINT8 *PopupBGColor);
+typedef CONTROL_ACTION (TSE_HOOK_T7) (VOID *MouseInfo);
+
+extern TSE_HOOK * AMITSE_HookList [];
+
+extern UINTN gHookBase;
+
+#define HOOKID0 (gHookBase)
+#define HOOKID1 (gHookBase+1)
+#define HOOKID2 (gHookBase+2)
+#define HOOKID3 (gHookBase+3)
+#define HOOKID4 (gHookBase+4)
+#define HOOKID5 (gHookBase+5)
+#define HOOKID6 (gHookBase+6)
+#define HOOKID7 (gHookBase+7)
+#define HOOKID8 (gHookBase+8)
+#define HOOKID9 (gHookBase+9)
+#define HOOKID10 (gHookBase+10)
+#define HOOKID11 (gHookBase+11)
+#define HOOKID12 (gHookBase+12)
+#define HOOKID13 (gHookBase+13)
+#define HOOKID14 (gHookBase+14)
+#define HOOKID15 (gHookBase+15)
+#define HOOKID16 (gHookBase+16)
+#define HOOKID17 (gHookBase+17)
+#define HOOKID18 (gHookBase+18)
+#define HOOKID19 (gHookBase+19)
+#define HOOKID20 (gHookBase+20)
+#define HOOKID21 (gHookBase+21)
+#define HOOKID22 (gHookBase+22)
+#define HOOKID23 (gHookBase+23)
+#define HOOKID24 (gHookBase+24)
+#define HOOKID25 (gHookBase+25)
+#define HOOKID26 (gHookBase+26)
+#define HOOKID27 (gHookBase+27)
+#define HOOKID28 (gHookBase+28)
+#define HOOKID29 (gHookBase+29)
+#define HOOKID30 (gHookBase+30)
+#define HOOKID31 (gHookBase+31)
+#define HOOKID32 (gHookBase+32)
+#define HOOKID33 (gHookBase+33)
+#define HOOKID34 (gHookBase+34)
+#define HOOKID35 (gHookBase+35)
+#define HOOKID36 (gHookBase+36)
+#define HOOKID37 (gHookBase+37)//EIP-SwitchToPostScreenHook
+
+
+#endif /* _HOOKANCHOR_H_ */
+
+//**********************************************************************
+//**********************************************************************
+//** **
+//** (C)Copyright 2011, American Megatrends, Inc. **
+//** **
+//** All Rights Reserved. **
+//** **
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **
+//** **
+//** Phone: (770)-246-8600 **
+//** **
+//**********************************************************************
+//**********************************************************************
diff --git a/Core/EM/AMITSE/Inc/LogoLib.h b/Core/EM/AMITSE/Inc/LogoLib.h
new file mode 100644
index 0000000..7707268
--- /dev/null
+++ b/Core/EM/AMITSE/Inc/LogoLib.h
@@ -0,0 +1,241 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 1985-2012, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+// $Archive: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Inc/LogoLib.h $
+//
+// $Author: Arunsb $
+//
+// $Revision: 10 $
+//
+// $Date: 10/18/12 5:31a $
+//
+//*****************************************************************//
+//*****************************************************************//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Inc/LogoLib.h $
+//
+// 10 10/18/12 5:31a Arunsb
+// Updated for 2.16.1235 QA submission
+//
+// 8 10/10/12 12:23p Arunsb
+// Synched the source for v2.16.1232 backup with Aptio
+//
+// 9 2/02/12 12:40a Premkumara
+// [TAG] EIP75136
+// [Category] New Feature
+// [Description] Generic support for logos in RomHoles
+// [Files] CommomHelper.c, AMITSE.sdl, AMITSE.mak, LogoLib.h
+//
+// 8 1/31/12 1:18p Premkumara
+// [TAG] EIP75136
+// [Category] New Feature
+// [Description] Generic support for logos in RomHoles
+// [Files] CommomHelper.c, AMITSE.sdl, AMITSE.mak, LogoLib.h,
+// Postmgmt.c, AMILogo.h
+//
+// 7 9/29/11 7:00p Blaines
+// [TAG] - EIP 66860
+// [Category]- Function Request
+// [Synopsis]- AmiPostManager interface for text entry.
+// [Files] - LogoLib.h, AMIPostMgr.h, protocol.c, protocol.h,
+// TseAdvanced.c, TseLitehelper.c, TseUefiHii.h, Uefi21Wapper.c
+//
+// 6 6/22/11 9:17a Premkumara
+// [TAG] EIP60048
+// [Category] Improvement
+// [Description] TSE should Change the System Resolution according to
+// the Quite Logo Size
+// [Files] CommonHelper.c, AMITSE.sdl, Logo.c, LogoLib.h
+//
+// 5 6/13/11 12:29p Rajashakerg
+// [TAG] EIP60910
+// [Category] New Feature
+// [Description] PNG image support in TSE.
+// [Files] LogoLib.h, AMITSE.sdl, CommonHelper.c, logo.c, png.c, png.h,
+// pnguncmp.c, TseAdvanced.cif
+//
+// 4 4/16/10 5:11p Madhans
+// Changes for Tse 2.02. Please see Changelog.log for more details.
+//
+// 3 2/19/10 12:59p Madhans
+// Updated for TSE 2.01. Refer Changelog.log for File change history.
+//
+// 5 2/19/10 7:59a Mallikarjunanv
+// updated the year in copyright message
+//
+// 4 2/04/10 12:01p Blaines
+// EIP-28005
+//
+// Added PostManagerSetAttribute to support display of text in color.
+// Added support for handling string characters --- \n, \r.
+//
+// 3 8/13/09 12:09p Blaines
+// Move Image support to binary module
+//
+// 2 6/24/09 6:33p Madhans
+// Coding Standards.
+//
+// 1 6/09/09 9:53a Madhans
+// TSE 2.00.1201
+//
+// 1 6/04/09 7:49p Madhans
+// AMI TSE Advanced.
+//
+// 1 4/28/09 10:50p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+// 1 4/28/09 10:24p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+//
+//*****************************************************************//
+//*****************************************************************//
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: logolib.h
+//
+// Description: logo related header
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+
+#ifndef _LOGOLIB_H_
+#define _LOGOLIB_H_
+
+//OEM_POST Logo GUID. Don't change the GUID. ChangeLogo expects this GUID.
+#define AMI_OEM_LOGO_GUID \
+ { 0x294b1cef, 0x9beb, 0x42d5, 0x99, 0x71, 0x0c, 0x89, 0x63, 0xcd, 0xaf, 0x02}
+
+typedef enum {
+ BMP_Logo,
+ GIF_Logo,
+ JPEG_Logo,
+ PCX_Logo,
+ PNG_Logo,
+ OEM_Format_LOGO,
+ Unsupported_Logo
+} LOGO_TYPE;
+
+EFI_STATUS SetScreenResolution(UINTN ResX, UINTN ResY);
+EFI_STATUS GetScreenResolution(UINTN *ResX, UINTN *ResY);
+EFI_STATUS GOPSetScreenResolution(UINTN *Width, UINTN *Height);
+EFI_STATUS GOPSetScreenResolutionHook(UINTN *Width, UINTN *Height, UINT32 Index);
+
+EFI_STATUS
+GetGraphicsBitMapFromFV (
+IN EFI_GUID *FileNameGuid,
+IN OUT VOID **Image,
+IN OUT UINTN *ImageSize
+);
+
+EFI_STATUS
+DrawImage(
+IN UINT8 *ImageData,
+IN UINTN ImageSize,
+IN CO_ORD_ATTRIBUTE Attribute,
+IN INTN CoOrdX,
+IN INTN CoOrdY,
+IN BOOLEAN AdjustScreenResolution,
+OUT UINTN *Width,
+OUT UINTN *Height
+);
+
+EFI_STATUS PostManagerDisplayPostMessage( CHAR16 *message );
+EFI_STATUS PostManagerDisplayPostMessageEx( CHAR16 *message, UINTN Attribute );
+EFI_STATUS PostManagerSwitchToPostScreen( VOID );
+
+EFI_STATUS
+PostManagerDisplayMsgBox(
+ IN CHAR16 *MsgBoxTitle,
+ IN CHAR16 *Message,
+ IN UINT8 MsgBoxType,
+ OUT UINT8 *MsgBoxSel
+);
+
+EFI_STATUS
+PostManagerDisplayTextBox(
+ IN VOID *HiiHandle,
+ IN UINT16 TitleToken,
+ IN TEXT_INPUT_TEMPLATE *InputData,
+ IN UINT16 ItemCount,
+ IN DISPLAY_TEXT_KEY_VALIDATE DisplayTextKeyValidate
+);
+
+EFI_STATUS
+PostManagerDisplayProgress(
+IN UINT8 ProgressBoxState,
+IN CHAR16 *Title,
+IN CHAR16 *Message,
+IN CHAR16 *Legend,
+IN UINTN Percent, // 0 - 100
+IN OUT VOID **Handle, //Out HANDLE. Valid Handle for update and close
+OUT AMI_POST_MGR_KEY *OutKey //Out Key
+);
+
+EFI_STATUS
+PostManagerDisplayMsgBoxEx(
+ IN CHAR16 *Title,
+ IN CHAR16 *Message,
+ IN CHAR16 *Legend,
+ IN MSGBOX_EX_CATAGORY MsgBoxExCatagory,
+ IN UINT8 MsgBoxType,
+ IN UINT16 *OptionPtrTokens, // Valid only with MSGBOX_TYPE_CUSTOM
+ IN UINT16 OptionCount, // Valid only with MSGBOX_TYPE_CUSTOM
+ IN AMI_POST_MGR_KEY *HotKeyList, // NULL - AnyKeyPress closes
+ IN UINT16 HotKeyListCount,
+ OUT UINT8 *MsgBoxSel,
+ OUT AMI_POST_MGR_KEY *OutKey
+);
+
+EFI_STATUS
+PostManagerDisplayQuietBootMessage(
+ CHAR16 *Message,
+ INTN CoOrdX,
+ INTN CoOrdY,
+ CO_ORD_ATTRIBUTE Attribute,
+ EFI_UGA_PIXEL Foreground,
+ EFI_UGA_PIXEL Background
+);
+
+EFI_STATUS PostManagerDisplayInfoBox( CHAR16 *InfoBoxTitle,
+ CHAR16 *InfoString,
+ UINTN Timeout,
+ EFI_EVENT *Event
+ );
+
+EFI_STATUS PostManagerSetCursorPosition(UINTN X, UINTN Y);
+EFI_STATUS PostManagerGetCursorPosition(UINTN *pX, UINTN *pY);
+EFI_STATUS PostManagerSetAttribute(UINT8 ATTRIB);
+VOID CleanUpLogo( VOID );
+
+VOID InitPostScreen( VOID );
+
+#endif
+
+//**********************************************************************
+//**********************************************************************
+//** **
+//** (C)Copyright 2012, American Megatrends, Inc. **
+//** **
+//** All Rights Reserved. **
+//** **
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **
+//** **
+//** Phone: (770)-246-8600 **
+//** **
+//**********************************************************************
+//**********************************************************************
diff --git a/Core/EM/AMITSE/Inc/PwdLib.h b/Core/EM/AMITSE/Inc/PwdLib.h
new file mode 100644
index 0000000..a229378
--- /dev/null
+++ b/Core/EM/AMITSE/Inc/PwdLib.h
@@ -0,0 +1,148 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2010, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+// $Archive: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Inc/PwdLib.h $
+//
+// $Author: Arunsb $
+//
+// $Revision: 4 $
+//
+// $Date: 10/18/12 5:31a $
+//
+//*****************************************************************//
+//*****************************************************************//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Inc/PwdLib.h $
+//
+// 4 10/18/12 5:31a Arunsb
+// Updated for 2.16.1235 QA submission
+//
+// 5 10/10/12 12:23p Arunsb
+// Synched the source for v2.16.1232 backup with Aptio
+//
+// 3 2/19/10 12:59p Madhans
+// Updated for TSE 2.01. Refer Changelog.log for File change history.
+//
+// 3 2/19/10 7:59a Mallikarjunanv
+// updated the year in copyright message
+//
+// 2 10/28/09 5:34p Madhans
+//
+// 1 6/04/09 7:49p Madhans
+// AMI TSE Advanced.
+//
+// 1 4/28/09 10:50p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+// 1 4/28/09 10:24p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+//
+//*****************************************************************//
+//*****************************************************************//
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: pwdlib.h
+//
+// Description: password handling realted header
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+
+#ifndef _PWDLIB_H_
+#define _PWDLIB_H_
+
+#define AMI_PASSWORD_NONE 0
+#define AMI_PASSWORD_USER 1
+#define AMI_PASSWORD_ADMIN 2
+#define AMI_PASSWORD_ANY 3
+
+UINT32
+CheckSystemPassword(
+IN OUT UINT32 EmptyPasswordType,
+IN UINTN *NoOfRetries,
+IN OUT UINTN *TimeOut
+);
+
+BOOLEAN CheckSystemPasswordPolicy(UINT32 PasswordInstalled);
+
+UINT32 PasswordCheckInstalled( VOID );
+VOID SetPasswordType( UINT32 PasswordType );
+
+extern UINT32 gPasswordType; //Provides what is the current access level
+
+// Internal Helper functions
+// Used for HDD Security module.
+VOID _DrawPasswordWindow(UINT16 PromptToken, UINTN PasswordLength, UINTN *CurrXPos, UINTN *CurrYPos);
+
+VOID _ReportInBox(
+ UINTN PasswordLength,
+ UINT16 BoxToken,
+ UINTN CurrXPos,
+ UINTN CurrYPos,
+ BOOLEAN bWaitForReturn
+ );
+EFI_STATUS _GetPassword(
+ CHAR16 *PasswordEntered,
+ UINTN PasswordLength,
+ UINTN CurrXPos,
+ UINTN CurrYPos,
+ UINTN *TimeOut
+ );
+
+// Expected from IDE sec module.
+extern UINT16 IDEPasswordGetName(UINT16 Index);
+extern EFI_STATUS IDEPasswordAuthenticate(
+ CHAR16 *Password,
+ VOID* Ptr,
+ BOOLEAN bCheckUser
+);
+extern BOOLEAN IDEPasswordUpdate(
+ UINT32 Index,
+ CHAR16 *Password,
+ BOOLEAN bCheckUser
+);
+extern VOID* IDEPasswordGetDataPtr( UINTN Index);
+extern BOOLEAN IDEPasswordGetLocked(
+ UINTN Index
+);
+extern VOID IDEPasswordCheck();
+extern VOID IDEPasswordFreezeDevices();
+extern VOID UnlockHDD(VOID);
+extern VOID SetHDDPassword(VOID);
+extern VOID IDEUpdateConfig(
+ VOID *TempideSecConfig,
+ UINTN value
+);
+
+
+
+#endif
+
+//**********************************************************************
+//**********************************************************************
+//** **
+//** (C)Copyright 2010, American Megatrends, Inc. **
+//** **
+//** All Rights Reserved. **
+//** **
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **
+//** **
+//** Phone: (770)-246-8600 **
+//** **
+//**********************************************************************
+//**********************************************************************
diff --git a/Core/EM/AMITSE/Inc/TseCommon.h b/Core/EM/AMITSE/Inc/TseCommon.h
new file mode 100644
index 0000000..62e6030
--- /dev/null
+++ b/Core/EM/AMITSE/Inc/TseCommon.h
@@ -0,0 +1,147 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2011, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+// $Archive: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Inc/TseCommon.h $
+//
+// $Author: Arunsb $
+//
+// $Revision: 6 $
+//
+// $Date: 10/18/12 5:31a $
+//
+//*****************************************************************//
+//*****************************************************************//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Inc/TseCommon.h $
+//
+// 6 10/18/12 5:31a Arunsb
+// Updated for 2.16.1235 QA submission
+//
+// 7 10/10/12 12:23p Arunsb
+// Synched the source for v2.16.1232 backup with Aptio
+//
+// 5 11/20/11 6:38a Rajashakerg
+// [TAG] EIP62763
+// [Category] Improvement
+// [Description] Utilize the Improvements done from mouse driver in
+// AMITSE
+// [Files] HookAnchor.h, TseCommon.h, AMITSE.sdl, CommonHelper.c,
+// commonoem.c, commonoem.h, buffer.c, globals.c, HookAnchor.c,
+// minisetup.h, notify.c, postmgmt.c, protocol.c, ezport.c, stylecommon.c,
+// Mouse.c, Action.c, Date.c, frame.c, MessageBox.c, minisetupext.c,
+// minisetupext.h, numeric.c, numeric.h, page.c, PopupEdit.c, PopupEdit.h,
+// PopupPassword.c, postmgmtext.c, time.c.
+//
+// 4 9/20/10 6:46p Madhans
+// [TAG] EIP44542
+// [Category] BUILD ISSUE FIX
+// [Symptom] Build issues with TSE label (INT)4.6.2_TSE_2_10_1207_TEST
+// when IdeSecurity and FastBoot modules added to the project
+// [RootCause] -
+// [Solution] Build issues resolved
+// [Files] CommonHelper.c, Tsecommon.h, Hiilib.h, Boot.h, minisetup.h,
+// bbs.c, special.c, Bds.c TseLitehelp
+//
+// 3 9/16/10 8:39p Madhans
+// Updated for TSE 2.10. Refer changelog.log for more deatils.
+//
+// 2 8/04/10 12:11a Mallikarjunanv
+// EIP-29951 : Device Path Name support updates
+//
+// 1 2/19/10 12:58p Madhans
+// Uploaded for TSE 2.01. Refer Changelog.log for File change history.
+//
+// 2 2/19/10 7:59a Mallikarjunanv
+// updated the year in copyright message
+//
+// 1 10/28/09 5:32p Madhans
+//
+//
+//*****************************************************************//
+//*****************************************************************//
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: TseCommon.h
+//
+// Description: Tse Common Helper header file
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+
+#ifndef _TSECOMMON_H_
+#define _TSECOMMON_H_
+
+#include "HiiLib.h"
+#include "Mem.h"
+#include "Variable.h"
+#include "PwdLib.h"
+
+EFI_STATUS
+EfiLibReportStatusCode (
+ IN EFI_STATUS_CODE_TYPE Type,
+ IN EFI_STATUS_CODE_VALUE Value,
+ IN UINT32 Instance,
+ IN EFI_GUID *CallerId OPTIONAL,
+ IN EFI_STATUS_CODE_DATA *Data OPTIONAL
+ );
+
+VOID *
+EfiLibAllocateZeroPool (
+ IN UINTN AllocationSize
+ );
+
+extern INTN
+EfiCompareMem (
+ IN VOID *MemOne,
+ IN VOID *MemTwo,
+ IN UINTN Len
+ );
+
+UINTN
+SPrint (
+ OUT CHAR16 *Buffer,
+ IN UINTN BufferSize,
+ IN CONST CHAR16 *Format,
+ ...
+ );
+
+EFI_STATUS ShowPostMsgBox(IN CHAR16 *MsgBoxTitle,IN CHAR16 *Message,IN UINT8 MsgBoxType, UINT8 *pSelection);
+
+VOID CheckForKeyHook( EFI_EVENT Event, VOID *Context );
+VOID CheckForClickHook( EFI_EVENT Event, VOID *Context );
+VOID ClearScreen( UINT8 Attrib );
+VOID *SaveScreen( VOID );
+
+extern EFI_BOOT_SERVICES *gBS;
+extern EFI_SYSTEM_TABLE *gST;
+extern EFI_GUID gEfiDevicePathProtocolGuid;
+
+#endif
+
+//**********************************************************************
+//**********************************************************************
+//** **
+//** (C)Copyright 2011, American Megatrends, Inc. **
+//** **
+//** All Rights Reserved. **
+//** **
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **
+//** **
+//** Phone: (770)-246-8600 **
+//** **
+//**********************************************************************
+//**********************************************************************
diff --git a/Core/EM/AMITSE/Inc/TseElinks.h b/Core/EM/AMITSE/Inc/TseElinks.h
new file mode 100644
index 0000000..f64cbcd
--- /dev/null
+++ b/Core/EM/AMITSE/Inc/TseElinks.h
@@ -0,0 +1,159 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2013, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+// $Archive: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Inc/TseElinks.h $
+//
+// $Author: Premkumara $
+//
+// $Revision: 6 $
+//
+// $Date: 3/25/13 8:41a $
+//
+//*****************************************************************//
+//*****************************************************************//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Inc/TseElinks.h $
+//
+// 6 3/25/13 8:41a Premkumara
+// [TAG] EIP116315
+// [Category] Improvement
+// [Description] Display control prompt string for password control.
+// (for String on CHAP secret popup)
+// [Files] - AMITSE.sdl
+// - CommonHelper.c
+// - FakeToken.c
+// - AmiTSEStr.uni
+// - TseLite\PopupPassword.c
+// - uefi2.1\UefiWapper21.c
+// - uefi2.0\UefiWapper20.c
+// - uefi2.0\HiiCallback.c
+// - uefi2.0\hii.h
+// - uefi2.0\hii.c
+//
+// 5 10/18/12 5:31a Arunsb
+// Updated for 2.16.1235 QA submission
+//
+// 5 10/10/12 12:23p Arunsb
+// Synched the source for v2.16.1232 backup with Aptio
+//
+// 4 5/28/12 6:21a Rajashakerg
+// [TAG] EIP80873
+// [Category] Improvement
+// [Description] TSE Load/Save defaults without Messaaagebox.
+// [Files] TseElinks.h, Tseadvanced.c
+//
+// 3 11/13/11 12:22p Arunsb
+// [TAG] EIP70421
+// [Category] New Feature
+// [Description] Support for driver order in TSE
+// [Files] AMITSE.SDL, CommonHelper.c, setup.ini, uefisetup.ini,
+// boot.c,
+// minisetup.h, bbs.c, special.c, special.h, tseadvanced.c,
+// addbootoption.c,
+// callback.c, minisetupext.c, minisetupext.h, popupsel.c, popupsel.h,
+// TseLitehelper.c, variable.c, Uefi21Wapper.c, AMIVfr.h, boot.h,
+// TseElink.h, variable.h,
+// setup.h, Boot.vfr and Setup.uni
+//
+// 2 12/29/10 5:11a Mallikarjunanv
+// [TAG] EIP41615
+// [Category] New Feature
+// [Description] Added the file browser support for the Add boot option
+// reated controls
+//
+// [Files] AmiVfr.h, AmiTse.sdl, AmiTseStr.uni, CommonHelper.c,
+// Faketokens.c, TseElinks.h, EdkHelper.h, minisetup.h, TseAdvanced.c,
+// AddBootOption.c
+//
+// 1 2/19/10 12:58p Madhans
+// Uploaded for TSE 2.01. Refer Changelog.log for File change history.
+//
+// 2 2/19/10 7:59a Mallikarjunanv
+// updated the year in copyright message
+//
+// 1 7/30/09 7:32a Mallikarjunanv
+// New header file to handle the Elinks related inforamtion
+//
+// 1 7/30/09 7:27a Mallikarjunanv
+// New file to handle Elink related definitions
+//
+//
+//
+//*****************************************************************//
+//*****************************************************************//
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: TseElinks.h
+//
+// Description: Header file for Elink related customizations
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+
+#ifndef _TSEELINKS_H_
+#define _TSEELINKS_H_
+
+#define END_OF_EXIT_PAGE_OPTION_LIST 0xFF
+
+///Default fucntions to handle Exit page options...
+VOID HandleSaveAndExit(VOID);
+VOID HandleExitApplication(VOID);
+VOID HandleSaveAndReset(VOID);
+VOID HandleResetSys(VOID);
+VOID HandleSaveWithoutExit(VOID);
+VOID HandleLoadPreviousValues(VOID);
+VOID HandleLoadOptimalDefaults(VOID);
+VOID HandleSaveUserDefaults(VOID);
+VOID HandleRestoreUserDefaults(VOID);
+VOID HandleBootAddBootOption(VOID);
+VOID HandleLaunchFileSystem(VOID); //EIP_41615 related to file browser support in AddBootOption
+VOID HandleLaunchFileSystemDriver (VOID);
+VOID HandleDriverAddDriverOption (VOID);
+VOID SaveUserDefaultsSilently(VOID);
+VOID LoadUserDefaultsSilently(VOID);
+
+typedef VOID (*OPTION_CALLBACK)(VOID);
+
+typedef struct _EXIT_PAGE_OPTIONS
+{
+ UINT8 OptIdx;
+ OPTION_CALLBACK ExitPageCallBack;
+}
+EXIT_PAGE_OPTIONS;
+
+typedef struct
+{
+ EFI_GUID FormsetGuid;
+ UINT32 QuestionID;
+ BOOLEAN EncodingFlag;
+}PASSWORD_ENOCDE_LIST_TEMPLATE;
+
+#endif /* _TSEELINKS_H_ */
+
+//**********************************************************************
+//**********************************************************************
+//** **
+//** (C)Copyright 2013, American Megatrends, Inc. **
+//** **
+//** All Rights Reserved. **
+//** **
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **
+//** **
+//** Phone: (770)-246-8600 **
+//** **
+//**********************************************************************
+//**********************************************************************
diff --git a/Core/EM/AMITSE/Inc/boot.h b/Core/EM/AMITSE/Inc/boot.h
new file mode 100644
index 0000000..3172a07
--- /dev/null
+++ b/Core/EM/AMITSE/Inc/boot.h
@@ -0,0 +1,537 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2011, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+// $Archive: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Inc/boot.h $
+//
+// $Author: Arunsb $
+//
+// $Revision: 12 $
+//
+// $Date: 10/18/12 5:31a $
+//
+//*****************************************************************//
+//*****************************************************************//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Inc/boot.h $
+//
+// 12 10/18/12 5:31a Arunsb
+// Updated for 2.16.1235 QA submission
+//
+// 8 10/10/12 12:23p Arunsb
+// Synched the source for v2.16.1232 backup with Aptio
+//
+// 10 9/21/12 9:41a Premkumara
+// [TAG] EIP 97704
+// [Category] Improvement
+// [Description] Support BootFFFF variable
+// [Files] Boot.h, Boot.c, Special.c
+//
+// 9 5/29/12 2:55a Arunsb
+// [TAG] EIP91109
+// [Category] Improvement
+// [Description] Sync the Aptio IV source for AptioV
+// [Files] boot.h
+//
+// 8 11/13/11 12:21p Arunsb
+// [TAG] EIP70421
+// [Category] New Feature
+// [Description] Support for driver order in TSE
+// [Files] AMITSE.SDL, CommonHelper.c, setup.ini, uefisetup.ini,
+// boot.c,
+// minisetup.h, bbs.c, special.c, special.h, tseadvanced.c,
+// addbootoption.c,
+// callback.c, minisetupext.c, minisetupext.h, popupsel.c, popupsel.h,
+// TseLitehelper.c, variable.c, Uefi21Wapper.c, AMIVfr.h, boot.h,
+// TseElink.h, variable.h,
+// setup.h, Boot.vfr and Setup.uni
+//
+// 7 6/20/11 11:38a Rajashakerg
+// [TAG] EIP59417
+// [Category] New Feature
+// [Description] Spport LOAD_OPTION_HIDDEN option in TSE
+// [Files] boot.h, AMITSE.sdl, CommonHelper.c, bbs.c, boot.c,
+// minisetup.h, special.c, callback.c
+//
+// 6 3/15/11 5:11a Rajashakerg
+// [TAG] EIP51671
+// [Category] New Feature
+// [Description] Boot overide menu devices are not disable
+// [Files] boot.c, minisetup.h, special.c, minisetupext.c, AMITSE.sdl,
+// boot.h, CommonHelper.c
+//
+// 5 9/20/10 6:46p Madhans
+// [TAG] EIP44542
+// [Category] BUILD ISSUE FIX
+// [Symptom] Build issues with TSE label (INT)4.6.2_TSE_2_10_1207_TEST
+// when IdeSecurity and FastBoot modules added to the project
+// [RootCause] -
+// [Solution] Build issues resolved
+// [Files] CommonHelper.c, Tsecommon.h, Hiilib.h, Boot.h, minisetup.h,
+// bbs.c, special.c, Bds.c TseLitehelp
+//
+// 4 3/26/10 5:26p Madhans
+// EIP 35562: Support To create Boot option in Capital letters.
+//
+// 3 2/19/10 12:59p Madhans
+// Updated for TSE 2.01. Refer Changelog.log for File change history.
+//
+// 4 2/19/10 7:59a Mallikarjunanv
+// updated the year in copyright message
+//
+// 3 1/09/10 2:29a Mallikarjunanv
+// Updated TSE2.01 Release sources with coding standards
+//
+// 2 6/24/09 6:33p Madhans
+// Coding Standards.
+//
+// 1 6/09/09 9:53a Madhans
+// TSE 2.00.1201
+//
+// 1 6/04/09 7:49p Madhans
+// AMI TSE Advanced.
+//
+// 1 4/28/09 10:50p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+// 1 4/28/09 10:24p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+//
+//*****************************************************************//
+//*****************************************************************//
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: boot.h
+//
+// Description: UEFI Boot related header
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+
+#ifndef _BOOT_H_
+#define _BOOT_H_
+
+#if !TSE_USE_EDK_LIBRARY
+//EIP:39334 - START
+#if TSE_CSM_SUPPORT
+#include <Protocol/LegacyBios.h>
+#else //If CSM support is not available, then TSE need the following info to build.
+
+#define EFI_LEGACY_BIOS_PROTOCOL_GUID \
+ { 0xdb9a1e3d, 0x45cb, 0x4abb, 0x85, 0x3b, 0xe5, 0x38, 0x7f, 0xdb, 0x2e, 0x2d}
+
+GUID_VARIABLE_DECLARATION(gEfiLegacyBiosProtocolGuid,EFI_LEGACY_BIOS_PROTOCOL_GUID);
+
+#ifndef GUID_VARIABLE_DEFINITION
+#include <Protocol/DevicePath.h>
+
+typedef struct _EFI_LEGACY_BIOS_PROTOCOL EFI_LEGACY_BIOS_PROTOCOL;
+
+//<AMI_SHDR_START>
+//----------------------------------------------------------------------------
+// Name: HDD_INFO
+//
+// Fields:
+// Status UINT16 Status of IDE device. See Notes for details.
+// Bus UINT32 PCI bus of IDE controller.
+// Device UINT32 PCI device of IDE controller.
+// Function UINT32 PCI function of IDE controller.
+// CommandBaseAddress UINT16 Command ports base address.
+// ControlBaseAddress UINT16 Control ports base address.
+// BusMasterAddress UINT16 Bus master address.
+// IdentifyDrive ATAPI_IDENTIFY Data that identifies the drive data.
+//
+// Notes:
+// The values for the Status field are the following:
+// HDD_PRIMARY 0x01
+// HDD_SECONDARY 0x02
+// HDD_MASTER_ATAPI 0x04
+// HDD_SLAVE_ATAPI 0x08
+// HDD_MASTER_IDE 0x20
+// HDD_SLAVE_IDE 0x40
+// HDD_SATA_PATA 0x80
+// There is one HDD_INFO structure per IDE controller. The IdentifyDrive is
+// one per drive. Index 0 is master and index 1 is slave.
+//----------------------------------------------------------------------------
+//<AMI_SHDR_END>
+
+typedef struct _ATAPI_IDENTIFY {
+ UINT16 Raw[256];
+} ATAPI_IDENTIFY;
+
+//*************************************************
+// IDE device status values
+//*************************************************
+
+#define HDD_PRIMARY 0x01
+#define HDD_SECONDARY 0x02
+#define HDD_MASTER_ATAPI 0x04
+#define HDD_SLAVE_ATAPI 0x08
+#define HDD_MASTER_IDE 0x20
+#define HDD_SLAVE_IDE 0x40
+#define HDD_SATA_PATA 0x80
+
+typedef struct _HDD_INFO {
+ UINT16 Status;
+ UINT32 Bus;
+ UINT32 Device;
+ UINT32 Function;
+ UINT16 CommandBaseAddress;
+ UINT16 ControlBaseAddress;
+ UINT16 BusMasterAddress;
+ UINT8 HddIrq;
+ ATAPI_IDENTIFY IdentifyDrive[2];
+} HDD_INFO;
+
+
+//****************************************************
+// BBS related definitions
+//****************************************************
+
+//
+// BootPriority values
+//
+#define BBS_DO_NOT_BOOT_FROM 0xFFFC
+#define BBS_LOWEST_PRIORITY 0xFFFD
+#define BBS_UNPRIORITIZED_ENTRY 0xFFFE
+#define BBS_IGNORE_ENTRY 0xFFFF
+//
+// Following is a description of the above fields.
+//
+// BBS_DO_NOT_BOOT_FROM - Removes a device from the boot list but still
+// allows it to be enumerated as a valid device
+// under MS-DOS*.
+// BBS_LOWEST_PRIORITY - Forces the device to be the last boot device.
+// BBS_UNPRIORITIZED_ENTRY - Value that is placed in the BBS_TABLE.BootPriority
+// field before priority has been assigned but that
+// indicates it is valid entry. Other values indicate
+// the priority, with 0x0000 being the highest priority.
+// BBS_IGNORE_ENTRY - When placed in the BBS_TABLE.BootPriority field,
+// indicates that the entry is to be skipped.
+//
+
+//<AMI_SHDR_START>
+//----------------------------------------------------------------------------
+// Name: BBS_STATUS_FLAGS
+//
+// Fields:
+// OldPosition UINT16:4 Prior priority.
+// Reserved1 UINT16:4 Reserved for future use.
+// Enabled UINT16:1 If 0, ignore this entry.
+// Failed UINT16:1 0-Not known if boot failure occurred; 1-Boot attempt failed.
+// MediaPresent UINT16:2 State of media present, see notes.
+// Reserved2 UINT16:4 Reserved for future use.
+//
+// Notes:
+// MediaPresent field details:
+// 00 = No bootable media is present in the device.
+// 01 = Unknown if a bootable media present.
+// 10 = Media is present and appears bootable.
+// 11 = Reserved.
+//----------------------------------------------------------------------------
+//<AMI_SHDR_END>
+
+typedef struct {
+ UINT16 OldPosition : 4;
+ UINT16 Reserved1 : 4;
+ UINT16 Enabled : 1;
+ UINT16 Failed : 1;
+ UINT16 MediaPresent: 2;
+ UINT16 Reserved2 : 4;
+} BBS_STATUS_FLAGS;
+
+
+
+//****************************************************
+// DeviceType values
+//****************************************************
+#define BBS_FLOPPY 0x01
+#define BBS_HARDDISK 0x02
+#define BBS_CDROM 0x03
+#define BBS_PCMCIA 0x04
+#define BBS_USB 0x05
+#define BBS_EMBED_NETWORK 0x06
+#define BBS_BEV_DEVICE 0x80
+#define BBS_UNKNOWN 0xff
+
+
+
+//<AMI_SHDR_START>
+//----------------------------------------------------------------------------
+// Name: BBS_TABLE
+//
+// Fields:
+// BootPriority UINT16 The boot priority for this boot device.
+// Bus UINT32 The PCI bus for this boot device.
+// Device UINT32 The PCI device for this boot device.
+// Function UINT32 The PCI function for the boot device.
+// Class UINT8 The PCI class for this boot device..
+// SubClass UINT8 The PCI Subclass for this boot device.
+// MfgString UINT32 Segment:offset address of an ASCIIZ description.
+// DeviceType UINT16 BBS device type.
+// StatusFlags BBS_STATUS_FLAGS Status of this boot device.
+// BootHandler UINT32 Segment:Offset address of boot loader for IPL devices.
+// DescString UINT32 Segment:offset address of an ASCIIZ description string.
+// InitPerReserved UINT32 Reserved.
+// AdditionalIrq??Handler UINT32 See notes for details.
+// AssignedDriveNumber UINT8 The drive number(0x80 -0x8?) assigned by the 16-bit code.
+// IBV1 UINT32 IBV specific field.
+// IBV2 UINT32 IBV specific field.
+//
+// Notes:
+// The use of AdditionalIrq??Handler fields is IBV dependent. They can be
+// used to flag that an OpROM has hooked the specified IRQ. The OpROM
+// may be BBS compliant as some SCSI BBS-compliant OpROMs also hook IRQ
+// vectors in order to run their BIOS Setup.
+//----------------------------------------------------------------------------
+//<AMI_SHDR_END>
+
+typedef struct _BBS_TABLE {
+ UINT16 BootPriority;
+ UINT32 Bus;
+ UINT32 Device;
+ UINT32 Function;
+ UINT8 Class;
+ UINT8 SubClass;
+ UINT16 MfgStringOffset;
+ UINT16 MfgStringSegment;
+ UINT16 DeviceType;
+ BBS_STATUS_FLAGS StatusFlags;
+ UINT16 BootHandlerOffset;
+ UINT16 BootHandlerSegment;
+ UINT16 DescStringOffset;
+ UINT16 DescStringSegment;
+ UINT32 InitPerReserved;
+ UINT32 AdditionalIrq13Handler;
+ UINT32 AdditionalIrq18Handler;
+ UINT32 AdditionalIrq19Handler;
+ UINT32 AdditionalIrq40Handler;
+ UINT8 AssignedDriveNumber;
+ UINT32 AdditionalIrq41Handler;
+ UINT32 AdditionalIrq46Handler;
+ UINT32 IBV1;
+ UINT32 IBV2;
+} BBS_TABLE;
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Name: EFI_LEGACY_BIOS_BOOT
+//
+// Description: Boots a traditional OS
+//
+// Input:
+// This Indicates the EFI_LEGACY_BIOS_PROTOCOL instance.
+// BootOption The EFI device path from BootXXXX variable.
+// LoadOptionSize Size of LoadOption.
+// LoadOption The load option from BootXXXX variable.
+//
+// Output:
+// EFI_DEVICE_ERROR Failed to boot from any boot device and
+// memory is uncorrupted.
+//
+// Notes: This function normally never returns. It will either boot the OS
+// or reset the system if memory has been "corrupted" by loading a
+// boot sector and passing control to it.
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_LEGACY_BIOS_BOOT) (
+ IN EFI_LEGACY_BIOS_PROTOCOL *This,
+ IN BBS_BBS_DEVICE_PATH *BootOption,
+ IN UINT32 LoadOptionsSize,
+ IN VOID *LoadOptions
+ );
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Name: EFI_LEGACY_BIOS_GET_BBS_INFO
+//
+// Description: Presents BBS information to external agents.
+//
+// Input:
+// This Indicates the EFI_LEGACY_BIOS_PROTOCOL instance.
+// HddCount Number of HDD_INFO structures.
+// HddInfo Onboard IDE controller information.
+// BbsCount Number of BBS_TABLE structures.
+// BbsTable BBS entry.
+//
+// Output: EFI_SUCCESS
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_LEGACY_BIOS_GET_BBS_INFO) (
+ IN EFI_LEGACY_BIOS_PROTOCOL *This,
+ OUT UINT16 *HddCount,
+ OUT struct _HDD_INFO **HddInfo,
+ OUT UINT16 *BbsCount,
+ IN OUT struct _BBS_TABLE **BbsTable
+ );
+
+//<AMI_SHDR_START>
+//----------------------------------------------------------------------------
+// Name: EFI_LEGACY_BIOS_PROTOCOL
+//
+// Description: Abstracts the traditional BIOS from the rest of EFI. The
+// LegacyBoot() member function allows the BDS to support booting
+// a traditional OS. EFI thunks drivers that make EFI bindings for
+// BIOS INT services use all the other member functions.
+//----------------------------------------------------------------------------
+//<AMI_SHDR_END>
+
+typedef struct _EFI_LEGACY_BIOS_PROTOCOL {
+ EFI_LEGACY_BIOS_BOOT LegacyBoot;
+ EFI_LEGACY_BIOS_GET_BBS_INFO GetBbsInfo;
+} EFI_LEGACY_BIOS_PROTOCOL;
+
+#endif //#ifndef GUID_VARIABLE_DEFINITION
+#endif //#if !TSE_CSM_SUPPORT
+#endif
+//EIP:39334 - END
+
+
+#define MAX_BOOT_OPTIONS 0xFFFF
+
+#ifndef LOAD_OPTION_ACTIVE
+#define LOAD_OPTION_ACTIVE 0x00000001
+#endif
+//EIP:59417 - Checking for LOAD_OPTION_HIDDEN attribute declearaton
+#define LOAD_OPTION_HIDDEN 0x00000008
+
+#ifndef LOAD_OPTION_FORCE_RECONNECT
+#define LOAD_OPTION_FORCE_RECONNECT 0x00000002
+#endif
+//EIP-97704 changed macro to global variable
+//#define DISABLED_BOOT_OPTION 0xFFFF
+//#define DISABLED_DRIVER_OPTION 0xFFFF
+extern UINT16 DISABLED_BOOT_OPTION;
+extern UINT16 DISABLED_DRIVER_OPTION;
+
+#define BOOT_ORDER_OPTION 0
+#define DRIVER_ORDER_OPTION 1
+
+typedef struct _BOOT_OPTION
+{
+ UINT32 Active;
+ UINT16 PathLength;
+ CHAR16 Name[1];
+}
+BOOT_OPTION;
+
+typedef struct _BBS_ORDER_LIST BBS_ORDER_LIST;
+
+typedef struct _BOOT_DATA
+{
+ UINT16 Option;
+ UINT32 Active;
+ CHAR16 *Name;
+ EFI_DEVICE_PATH_PROTOCOL *DevicePath;
+ VOID *LoadOptions;
+ UINTN LoadOptionSize;
+ BOOLEAN bNewOption;
+ UINTN LegacyEntryOffset;
+ UINT16 LegacyDevCount;
+ BBS_ORDER_LIST *OrderList;
+}
+BOOT_DATA;
+
+typedef struct _LANGUAGE_DATA
+{
+//#if SETUP_SUPPORT_PLATFORM_LANG_VAR
+ CHAR8 *LangCode;
+ CHAR16 *Unicode;
+//#else
+// CHAR8 LangCode[4];
+// CHAR16 Unicode[4];
+//#endif
+ CHAR16 *LangString;
+ UINT16 Token;
+}
+LANGUAGE_DATA;
+
+//#if SETUP_SUPPORT_ADD_BOOT_OPTION
+typedef struct _FS_DATA
+{
+ CHAR16 *FsId;
+ EFI_DEVICE_PATH_PROTOCOL *FsPath;
+}
+FS_DATA;
+//#endif
+
+//exported variables
+extern UINTN gBootOptionCount;
+extern CHAR16 gBootFileName[];
+extern BOOLEAN gShowAllBbsDev,gPopupMenuShowAllBbsDev;
+extern BOOLEAN gSetupHideDisableBootOptions,gPopupMenuHideDisableBootOptions;// EIP:51671 extern decleration of the global varibales to use in soruces.
+extern BOOLEAN gLoadOptionHidden; //EIP:59417 - extern decleration of the global varibales to use in soruces.
+extern CHAR16 gBootFormarSpecifier[];
+
+extern UINT16 *gBBSDisabled;
+//#if SETUP_SUPPORT_ADD_BOOT_OPTION
+extern UINTN gFsCount;
+extern FS_DATA *gFsList;
+//#endif
+
+//exported functions
+EFI_STATUS BootGetBootOptions( VOID );
+EFI_STATUS BootLaunchBootOption(UINT16 u16Option, UINT16 *pOrder, UINTN u16OrderCount);
+BOOT_DATA *BootGetBootData( UINT16 Option );
+CHAR16 *BootGetOptionName( BOOT_DATA *bootData);
+
+CHAR16 *BootGetBootNowName( UINT16 value, BOOLEAN ShowAllBBSDev, BOOLEAN TseBootNowInBootOrde);
+
+VOID BootGetLanguages( VOID );
+//EFI_STATUS BootLaunchBootNow( UINT16 Index );
+EFI_STATUS BootLaunchBootNow( UINT16 index, BOOLEAN ShowAllBbsDev );
+EFI_STATUS BootLaunchGuid( EFI_GUID *guid );
+EFI_STATUS BootLaunchFilename( CHAR16 *fileName );
+//#if SETUP_SUPPORT_ADD_BOOT_OPTION
+VOID BootAddBootOption( VOID );
+VOID BootDelBootOption( UINT16 index );
+VOID DiscardAddDelBootOptions(VOID);
+VOID SaveAddDelBootOptions(VOID);
+
+//EIP70421 & 70422 Support for driver order starts
+extern UINTN gDriverOptionCount;
+extern CHAR16 gDriverFormarSpecifier [];
+BOOT_DATA *DriverGetDriverData (UINT16);
+CHAR16 *DriverGetOptionName (BOOT_DATA *);
+VOID DriverDelDriverOption (UINT16);
+VOID DriverAddDriverOption ();
+VOID DiscardAddDelDriverOptions (VOID);
+VOID SaveAddDelDriverOptions (VOID);
+//EIP70421 & 70422 Support for driver order ends
+//#endif
+
+#endif /* _BOOT_H_ */
+
+//**********************************************************************
+//**********************************************************************
+//** **
+//** (C)Copyright 2011, American Megatrends, Inc. **
+//** **
+//** All Rights Reserved. **
+//** **
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **
+//** **
+//** Phone: (770)-246-8600 **
+//** **
+//**********************************************************************
+//**********************************************************************
diff --git a/Core/EM/AMITSE/Inc/mem.h b/Core/EM/AMITSE/Inc/mem.h
new file mode 100644
index 0000000..f4b93d9
--- /dev/null
+++ b/Core/EM/AMITSE/Inc/mem.h
@@ -0,0 +1,100 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2011, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+// $Archive: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Inc/mem.h $
+//
+// $Author: Arunsb $
+//
+// $Revision: 5 $
+//
+// $Date: 10/18/12 5:31a $
+//
+//*****************************************************************//
+//*****************************************************************//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Inc/mem.h $
+//
+// 5 10/18/12 5:31a Arunsb
+// Updated for 2.16.1235 QA submission
+//
+// 5 10/10/12 12:23p Arunsb
+// Synched the source for v2.16.1232 backup with Aptio
+//
+// 4 11/10/11 12:46a Arunsb
+// [TAG] EIP67735
+// [Category] Improvement
+// [Description] Zeroing password buffers before freeing
+// [Files] mem.c, mem.h, popupedit.c, popuppassword.c and tseadvanced.c
+//
+// 3 2/19/10 12:59p Madhans
+// Updated for TSE 2.01. Refer Changelog.log for File change history.
+//
+// 3 2/19/10 7:59a Mallikarjunanv
+// updated the year in copyright message
+//
+// 2 6/24/09 6:12p Madhans
+// Made TSE_USE_EDK_LIBRARY=OFF to not to refer EDK module.
+//
+// 1 6/04/09 7:49p Madhans
+// AMI TSE Advanced.
+//
+// 1 4/28/09 10:50p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+// 1 4/28/09 10:24p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+//
+//*****************************************************************//
+//*****************************************************************//
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: mem.h
+//
+// Description: memory utility functions
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+
+#ifndef _MEM_H_
+#define _MEM_H_
+
+VOID MemFreePointer (VOID **ptr);
+VOID StringZeroFreeMemory (VOID **ptr);
+VOID MemCopy( VOID *dest, VOID *src, UINTN size );
+VOID MemSet( VOID *buffer, UINTN size, UINT8 value );
+#if !TSE_USE_EDK_LIBRARY
+INTN MemCmp( VOID *dest, VOID *src, UINTN size );
+#endif
+VOID *MemReallocateZeroPool( VOID *oldBuffer, UINTN oldSize, UINTN newSize );
+VOID MemFillUINT16Buffer( VOID *buffer, UINTN bufferSize, UINT16 value );
+
+#endif /* _MEM_H_ */
+
+//**********************************************************************
+//**********************************************************************
+//** **
+//** (C)Copyright 2011, American Megatrends, Inc. **
+//** **
+//** All Rights Reserved. **
+//** **
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **
+//** **
+//** Phone: (770)-246-8600 **
+//** **
+//**********************************************************************
+//**********************************************************************
diff --git a/Core/EM/AMITSE/Inc/setupdata.h b/Core/EM/AMITSE/Inc/setupdata.h
new file mode 100644
index 0000000..b92052f
--- /dev/null
+++ b/Core/EM/AMITSE/Inc/setupdata.h
@@ -0,0 +1,421 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2013, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+// $Archive: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Inc/setupdata.h $
+//
+// $Author: Arunsb $
+//
+// $Revision: 10 $
+//
+// $Date: 4/02/13 8:01a $
+//
+//*****************************************************************//
+//*****************************************************************//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Inc/setupdata.h $
+//
+// 10 4/02/13 8:01a Arunsb
+// [TAG] EIP113919
+// [Category] Improvement
+// [Description] Provide support for EFI_IFR_WRITE, EFI_IFR_READ,
+// EFI_IFR_GET, EFI_IFR_SET and EFI_IFR_MAP_OP.
+// [Files] Setupdata.h, ctrlcond.c, expression.c, hii.c and parse.c
+//
+// 9 3/25/13 8:08a Premkumara
+// [TAG] EIP105468
+// [Category] New Feature
+// [Description] Support for EFI_IFR_REFRESH_ID opcode for Offline
+// Parsing
+// [Files] Parse.c, Hii.c, Setupdata.h
+//
+// 8 10/18/12 5:31a Arunsb
+// Updated for 2.16.1235 QA submission
+//
+// 9 10/10/12 12:23p Arunsb
+// Synched the source for v2.16.1232 backup with Aptio
+//
+// 7 1/20/12 12:46a Rajashakerg
+// [TAG] EIP80426
+// [Category] Improvement
+// [Description] When restoring settings, avoid accessing the varstore
+// for text controls
+// [Files] uefi21wapper.c, Setupdata.h.
+//
+// 6 6/23/11 3:38p Rajashakerg
+// [TAG] EIP55762, 58925, 59971
+// [Category] New Feature
+// [Description] Support REF2,REF3 and REF4 in AMITSE
+// Support direct form navigation path
+// Improper layout of controls in the root page when Dynamic pages are
+// added using the Legacy Setup Style
+// [Files] setupdata.h, CommonHelper.c, AMITSE.sdl, Legacy\Legacy.c,
+// Legacy\style.h, Legacy\style.h, frame.c, minisetupext.c,
+// minisetupext.h, numeric.c, page.c Popupstring.c, Hii.c,
+// Uefi21Wrapper.c, Parse.c Hii.c
+//
+// 5 4/29/11 4:28p Arunsb
+// For 2.13 public patch release IFR RefX feature is omitted
+//
+// 3 2/10/11 12:31p Blaines
+// [TAG] - EIP 53146
+// [Category]- New Feature
+// [Description] -Add the support to Move the Dynamic IFR Pages under
+// subpages. It should be customizable to move around.
+//
+// 2 6/17/10 2:17p Madhans
+// Refer Changelog.log.
+//
+// 1 2/19/10 12:58p Madhans
+// Uploaded for TSE 2.01. Refer Changelog.log for File change history.
+//
+// 4 2/19/10 7:59a Mallikarjunanv
+// updated the year in copyright message
+//
+// 3 2/18/10 7:56p Madhans
+// AMI Special Var Attribute
+//
+// 2 1/09/10 2:34a Mallikarjunanv
+// Updated TSE2.01 Release sources with coding standards
+//
+// 1 10/28/09 5:32p Madhans
+//
+// 3 6/16/09 2:16p Presannar
+// Added File Headers for Header Files
+//
+// 2 6/12/09 7:44p Presannar
+// Initial implementation of coding standards for AMITSE2.0
+//
+// 1 6/04/09 8:05p Madhans
+//
+// 1 4/28/09 11:06p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+// 4 4/28/09 9:40p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+// 3 3/31/09 4:12p Madhans
+//
+// 2 1/30/09 6:06p Madhans
+// Function headers added.
+//
+// 1 12/18/08 7:59p Madhans
+// Intial version of TSE Lite sources
+//*****************************************************************//
+//*****************************************************************//
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: setupdata.h
+//
+// Description: Header file for setup data
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+
+#ifndef _SETUPDATA_H_
+#define _SETUPDATA_H_
+
+
+
+// forward declarations
+typedef struct _SETUP_PKG SETUP_PKG;
+typedef struct _SCREEN_INFO SCREEN_INFO;
+typedef struct _PAGE_LIST PAGE_LIST;
+typedef struct _PAGE_INFO PAGE_INFO;
+typedef struct _PAGE_FLAGS PAGE_FLAGS;
+typedef struct _CONTROL_LIST CONTROL_LIST;
+typedef struct _CONTROL_INFO CONTROL_INFO;
+typedef struct _CONTROL_FLAGS CONTROL_FLAGS;
+typedef struct _VARIABLE_LIST VARIABLE_LIST;
+typedef struct _VARIABLE_INFO VARIABLE_INFO;
+typedef struct _HPK_INFO HPK_INFO;
+typedef struct _GUID_LIST GUID_LIST;
+typedef struct _GUID_FLAGS GUID_FLAGS;
+typedef struct _GUID_INFO GUID_INFO;
+typedef struct _PAGE_ID_LIST PAGE_ID_LIST;
+typedef struct _PAGE_ID_INFO PAGE_ID_INFO;
+
+#define VARIABLE_NAME_LENGTH 40
+// Control types
+#define CONTROL_TYPE_NULL 0x0000
+#define CONTROL_TYPE_SUBMENU 0x0001
+#define CONTROL_TYPE_LABEL 0x0002
+#define CONTROL_TYPE_TEXT 0x0003
+#define CONTROL_TYPE_DATE 0x0004
+#define CONTROL_TYPE_TIME 0x0005
+#define CONTROL_TYPE_POPUPSEL 0x0006
+#define CONTROL_TYPE_MEMO 0x0008
+#define CONTROL_TYPE_MSGBOX 0x0009
+#define CONTROL_TYPE_CHECKBOX 0x000A
+#define CONTROL_TYPE_NUMERIC 0x000B
+#define CONTROL_TYPE_EDIT 0x000C
+#define CONTROL_TYPE_PASSWORD 0x000D
+#define CONTROL_TYPE_MENU 0x000E
+#define CONTROL_TYPE_ORDERED_LIST 0x000F
+#define CONTROL_TYPE_POPUPEDIT 0x0010
+#define CONTROL_TYPE_VARSTORE_SELECT 0x0011
+#define CONTROL_TYPE_VARSTORE_SELECT_PAIR 0x0012
+#define CONTROL_TYPE_POPUP_STRING 0x0013
+#define CONTROL_TYPE_VARSTORE 0x0014
+#define INCONSISTENT_IF 0x0015
+
+// UEFI 2.1 Defines
+#define NO_SUBMIT_IF 0x0016
+#define DISABLE_IF 0x0017
+#define CONTROL_TYPE_VARSTORE_NAME_VALUE 0x0018
+#define CONTROL_TYPE_VARSTORE_EFI 0x0019
+#define CONTROL_TYPE_VARSTORE_DEVICE 0x001A
+#define CONTROL_TYPE_ACTION 0x001B
+#define CONTROL_TYPE_RESET 0x001C
+#define CONTROL_TYPE_RULE 0x001D
+#define CONTROL_TYPE_REF2 0x001E // EIP 80426:When restoring settings, avoid accessing the varstore for text controls
+
+// Used in Edit.c
+#ifndef IFR_PASSWORD_OP
+#define IFR_PASSWORD_OP 0x08
+#endif
+
+#pragma warning( disable : 4201 )
+
+#pragma pack(8)
+struct _SETUP_PKG
+{
+ CHAR8 PackageSignature[4]; //'$SPF' Signature to identify the package file
+ UINT16 StructureRevision; //0x0100 Revision of this structure
+ UINT32 PackageVersion; //0x00000100 Version number of the structure data
+ UINT8 Reserved[6]; //0 Reserved for future expansion
+ EFI_GUID PackageGuid; //Varies EFI_GUID for the entire setup package
+ UINT32 PackageVariable; //0x00000001 ID of the default GUID-Name variable store for this package
+ UINT32 PackageScreen; //Varies Offset to start of SCREEN_INFO structure
+ UINT32 PackagePageList; //Varies Offset to start of PAGE_LIST structure
+ UINT32 PackageControlOffset; //Varies Offset to start of controls
+ UINT32 PackageVariableList; //Varies Offset to start of VARIABLE_LIST structure
+ UINT32 PackageHpkData; //Varies Offset to source HPK info that we need
+ UINT32 PackageGuidList; //Varies List of OEM GUIDs requiring application launch
+ UINT32 PackagePageIdList; //Varies Offset to list of Page ID triplets guid class subclass
+ UINT32 PackageIfrData; //Varies IFR data that is used to build our 'static' pages
+};
+
+struct _SCREEN_INFO //Structure containing global information used by all pages
+{
+ union {
+ /*EFI_HII_HANDLE*/VOID * MainHandle; //Varies HII Handle to the formset that contains the global screen info
+ UINT8 res[8];
+ };
+ UINT16 MainTitle; //Varies Token for title string
+ UINT16 MainCopyright; //Varies Token for copyright string
+ UINT16 MainHelpTitle; //Varies Token for help 'window' title
+ UINT16 MainMenuCount; //Varies Number of entries in main menu (0 = no main menu)
+ UINT16 MainNavCount; //Varies Number of nav help strings on the page
+ //UINT16 MenuEntries[]; //Varies Tokens for menu strings
+ //UINT16 MainNavToken[]; //Varies Tokens for all navigational help strings
+};
+
+struct _PAGE_LIST //This is the listing of all the pages in setup
+{
+ UINT32 PageCount; //Varies Number of pages in Setup
+ UINT32 PageList[1]; //Varies Offsets to each of the page structures
+};
+
+struct _PAGE_FLAGS //Structure containing the attributes global to a page
+{
+ UINT32 PageVisible : 1; //TRUE Controls whether or not this page is visible
+ UINT32 PageHelpVisible : 1; //TRUE Controls whether or not help is visible on this page
+ UINT32 PageDisableHotKeys : 1; //FALSE Controls whether globals hot keys are enabled for this page
+ UINT32 PageRefresh : 1; //TRUE Controls whether the page is refreshable
+ UINT32 PageModal : 1; //TRUE Controls whether the page is Modal
+ UINT32 PageDynamic : 1; //TRUE Controls whether the page is Dynamic
+ UINT32 PageStdMap : 1; // set 0 if Form map is not found otherwise set 1
+ UINT32 Reserved : 25; //0 Reserved for future use
+};
+
+struct _CONTROL_LIST //Structure containing the offsets of all the control data
+{
+ UINT32 ControlCount; //Varies Number of controls in this list
+ UINT32 ControlList[1]; //Varies Offsets to each of the control structures
+};
+
+struct _PAGE_INFO //Structure containing the layout of the page
+{
+ union {
+ /*EFI_HII_HANDLE*/VOID * PageHandle; //Varies HII Handle to the formset that contains this control
+ UINT8 res[8];
+ };
+ UINT16 PageIdIndex; //varies Index in to PageIdList triplets
+ UINT16 PageFormID; //Varies Form ID within the formset for this page
+ UINT16 PageTitle; //Varies Allows a page to override the main title bar
+ UINT16 PageSubTitle; //Varies Token for the subtitle string for this page
+ UINT16 PageID; //Varies unique ID for this page
+ UINT16 PageParentID; //Varies Identify this page's parent page
+ PAGE_FLAGS PageFlags; //3 Various attributes for a specific page
+ UINT32 PageVariable; //Varies Overrides the variable ID for this page (0 = use default)
+ CONTROL_LIST PageControls; //Varies Listing of controls for this page
+};
+
+
+struct _CONTROL_FLAGS //Structure containing the attributes for a specific control
+{
+ UINT32 ControlVisible : 1; //TRUE Whether or not a control is shown to the user
+#define CONTROL_ACCESS_DEFAULT 0 //Do not override VFR
+#define CONTROL_ACCESS_EXT_USER 1 //Admin - Editable; User - Editable;
+#define CONTROL_ACCESS_USER 2 //Admin - Editable; User - Visible but not editable;
+#define CONTROL_ACCESS_ADMIN 3 //Admin - Editable; User - Invisible;
+ UINT32 ControlAccess : 2; //0 User access to control
+ UINT32 ControlReset : 1; //FALSE Whether or not changing a value requires a system reset
+ UINT32 ControlReadOnly : 1; //FALSE Weather or not the control is read only.
+ UINT32 ControlInteractive : 1; //FALSE Weather the Control is interactive or not
+ UINT32 ControlEvaluateDefault : 1; // FALSE If set Default is obtained by expression evaluation
+ UINT32 Reserved1 : 1; //0 Reserved for future use
+ UINT32 ControlRefresh : 8; //0 Refresh timer (in 0.1s intervals) (0 = refresh disabled)
+ UINT32 RefreshID : 1; //TRUE or FALSE to denote RefreshID status
+ UINT32 ControlRWEvaluate : 1; // set 0 if read/write expression is not found otherwise set 1
+ UINT32 Reserved2 : 14; //0 Reserved for future use
+};
+
+struct _CONTROL_INFO //Structure containing control data
+{
+ union {
+ /*EFI_HII_HANDLE*/VOID * ControlHandle; //Varies HII Handle to the formset that contains this control
+ UINT8 res[8];
+ };
+ UINT32 ControlVariable; //Varies Overrides the variable ID for this control (0 = use default)
+ union
+ {
+ UINT32 ControlConditionalVariable[2]; //Varies Overrides the condition variable ID for this control (0 = use default)
+ struct
+ {
+ UINT16 ControlKey; // Varies Variable unique identifier same as QuestionID in UEFI2.1
+ UINT16 DevicePathId; // Device Path as specified by VarStoreDevicePath nested within the scope of this question.
+ UINT8 DefaultStoreCount; // Constant No of Defaults (n) values other than Optimal and Failsafe for that control.
+//EIP# 55762
+ UINT8 Reserved[1]; // Reserved space for use in future.
+ UINT16 DestQuestionID; // This is for EFI_IFR_REFX support
+//EIP# 55762
+ };
+ };
+ UINT16 ControlType; //Varies Type of the control on the page
+ UINT16 ControlPageID; //Varies Page ID that contains this control
+ UINT16 ControlDestPageID; //FFFFh Only needed for controls of type CONTROL_TYPE_SUBMENU
+ CONTROL_FLAGS ControlFlags; //1 Various attributes for a specific control
+ UINT16 ControlHelp; //Varies Token for help string for this control
+ UINT16 ControlLabel; //Varies One-based label number that this control is 'linked to'
+ UINT16 ControlIndex; //Varies Zero-based control number from the label, not formset
+ UINT16 ControlLabelCount; //Varies number of opcodes associated with this control's label
+ union {
+ VOID * ControlPtr; //Varies Pointer to control data in HII
+ UINT64 res1;
+ };
+ union {
+ VOID * ControlConditionalPtr; //Varies Pointer to control condition data in HII
+ UINT64 res2;
+ };
+ UINT16 ControlDataLength; //Varies Length of HII data for control
+ UINT16 ControlDataWidth; //Varies Width of data (in bytes) for this control
+ UINT16 QuestionId; //Varies Offset for data of this control in the Variable
+ //UINT8 ControlFailsafeValue; //Varies Used when user selects load failsafe value
+ //UINT8 ControlOptimalValue; //Varies Used when user selects load optimal value
+};
+
+struct _VARIABLE_LIST
+{
+ UINT32 VariableCount; //Varies Number of GUID-Name pairs in this list
+ UINT32 VariableList[1]; //Varies Offsets to each of the variable structures
+};
+
+struct _VARIABLE_INFO //Structure containing GUID-Name pairs for variable access
+{
+ EFI_GUID VariableGuid; //Varies EFI_GUID for the NVRAM variable store for this data
+ CHAR16 VariableName[VARIABLE_NAME_LENGTH]; //Varies Variable store name
+ UINT32 VariableAttributes; //Varies Attributes of the variable
+ UINT32 VariableID; //Varies unique variable number, 0x0FFFF for our own variables.
+#define VARIABLE_ATTRIBUTE_VARSTORE 0x0000 // Buffer varstore accessed via Config. Access protocol exposed by the driver.
+#define VARIABLE_ATTRIBUTE_EFI_VARSTORE 0x1000 // EFI Variable, GetVeriable and SetVariable Can be used.
+#define VARIABLE_ATTRIBUTE_NAMEVALUE 0x2000 // Namevalue varstore accessed via Config. Access protocol exposed by the driver.
+#define AMI_SPECIAL_NO_DEFAULTS 0x00000001
+#define AMI_SPECIAL_VARIABLE_NO_SET 0x00000002
+#define AMI_SPECIAL_VARIABLE_NO_GET 0x00000004
+ UINT32 ExtendedAttibutes; //Varies Extended Attributes to identify type of Variable.
+ UINT16 VariableNameId; //Varies Id for the Variable Name
+ UINT8 Reserved[2]; // Reserved space for use in future.
+ union
+ {
+ /*EFI_HII_HANDLE*/VOID* VariableHandle; //Varies HII Handle to the formset that contains this VarStore
+ UINT64 res;
+ };
+ UINT16 VariableSize; //Varies The size of Buffer Varstore
+};
+
+struct _HPK_INFO
+{
+ UINT32 Length;
+ UINT16 Class;
+ UINT16 SubClass;
+};
+
+struct _GUID_LIST
+{
+ UINT32 GuidCount; //Varies Number of GUID-Name pairs in this list
+ UINT32 GuidList[1]; //Varies Offsets to each of the variable structures
+};
+
+struct _GUID_FLAGS
+{
+ UINT32 GuidLaunchCallback : 1;
+ UINT32 GuidLaunchGuid : 1;
+ UINT32 GuidLaunchFilename : 1;
+ UINT32 GuidLaunchCallbackUpdateTemplate : 1;
+ UINT32 Reserved : 28;
+};
+
+struct _GUID_INFO
+{
+ EFI_GUID GuidValue;
+ CHAR16 GuidName[VARIABLE_NAME_LENGTH];
+ GUID_FLAGS GuidFlags;
+ UINT32 GuidKey;
+};
+
+struct _PAGE_ID_LIST
+{
+ UINT32 PageIdCount; //Varies Number of guid class subclass triplets
+ UINT32 PageIdList[1]; //Varies Offsets to each of the PageId structures
+};
+
+struct _PAGE_ID_INFO //Structure containing page id triplets guid class and subclass
+{
+ EFI_GUID PageGuid; //Varies EFI_GUID for the pages
+ UINT16 PageClass; //Varies Class for the pages
+ UINT16 PageSubClass; //Varies SubClass for the pages
+};
+
+#pragma pack()
+
+#endif /* _SETUPDATA_H_ */
+
+
+//**********************************************************************
+//**********************************************************************
+//** **
+//** (C)Copyright 1985-2013, American Megatrends, Inc. **
+//** **
+//** All Rights Reserved. **
+//** **
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **
+//** **
+//** Phone: (770)-246-8600 **
+//** **
+//**********************************************************************
+//**********************************************************************
diff --git a/Core/EM/AMITSE/Inc/variable.h b/Core/EM/AMITSE/Inc/variable.h
new file mode 100644
index 0000000..18a8a08
--- /dev/null
+++ b/Core/EM/AMITSE/Inc/variable.h
@@ -0,0 +1,251 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2011, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+// $Archive: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Inc/variable.h $
+//
+// $Author: Arunsb $
+//
+// $Revision: 13 $
+//
+// $Date: 5/03/14 6:37p $
+//
+//*****************************************************************//
+//*****************************************************************//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Inc/variable.h $
+//
+// 13 5/03/14 6:37p Arunsb
+// [TAG] EIP130198
+// [Category] Improvement
+// [Description] Increase the variable ID range from 25 to 54
+// [Files] Variable.h, Setup.ini, UefiSetup.ini
+//
+// 12 2/11/14 7:37p Arunsb
+// Changes reverted for 2.16.1243 label
+//
+// 11 8/19/13 2:49a Premkumara
+// [TAG] EIP130198
+// [Category] Improvement
+// [Description] Increase the variable ID range from 25 to 54
+// [Files] Variable.h, Setup.ini, UefiSetup.ini
+//
+// 10 10/18/12 5:31a Arunsb
+// Updated for 2.16.1235 QA submission
+//
+// 6 10/10/12 12:23p Arunsb
+// Synched the source for v2.16.1232 backup with Aptio
+//
+// 9 1/30/12 1:33a Arunsb
+// [TAG] EIP74676
+// [Category] Improvement
+// [Description] Setup.ini and Upfisetup.ini to reserve 3~5 variable and
+// GUID for porting purpose
+// [Files] Amivfr.h, special.h, variable.h, Uefisetup.ini and setup.ini
+//
+// 8 12/05/11 5:46a Rajashakerg
+// [TAG] EIP76381
+// [Category] Improvement
+// [Description] Performance: Improving variable data load and usage
+// [Files] callback.c, minisetupext.c, variable.c, variable.h,
+// minisetup.h, Hii.c, FormBrowser2.c
+//
+// 7 11/23/11 5:08a Rajashakerg
+// [TAG] EIP75473
+// [Category] Improvement
+// [Description] System Time is not updated every second
+// [Files] variable.h, variable.c, FormBrowser2.c, TseUefiHii.h,
+// Uefi21Wapper.c, hii.h, uefi20Wapper.c
+//
+// 6 11/13/11 12:23p Arunsb
+// [TAG] EIP70421
+// [Category] New Feature
+// [Description] Support for driver order in TSE
+// [Files] AMITSE.SDL, CommonHelper.c, setup.ini, uefisetup.ini,
+// boot.c,
+// minisetup.h, bbs.c, special.c, special.h, tseadvanced.c,
+// addbootoption.c,
+// callback.c, minisetupext.c, minisetupext.h, popupsel.c, popupsel.h,
+// TseLitehelper.c, variable.c, Uefi21Wapper.c, AMIVfr.h, boot.h,
+// TseElink.h, variable.h,
+// setup.h, Boot.vfr and Setup.uni
+//
+// 5 7/19/11 3:06p Arunsb
+// [TAG] EIP57661
+// [Category] New Feature
+// [Description] Drv health related variable declarations added to
+// update the cache.
+// [Files] notify.c, Uefi21Wapper.c and variable.h
+//
+// 4 7/19/11 10:47a Blaines
+// [TAG] - EIP 63262
+// [Category]- Defect
+// [Symptom]- Setup page display problem on rose city.
+// When SETUP_GROUP_DYNAMIC_PAGES is enabled and Network Stack is enabled,
+// the "iSCSI" menu is listed as a dynamic page in advanced menu but only
+// 3 of 4 "Port Configuration" pages shows up. The TSE dynamic page count
+// is incorrect.
+//
+// [Solution]- In the functions (RTIfrProcessRunTimeForms,
+// HandleNewIFRPack, HandleRemoveIFRPack, HandleAddIFRPack), make sure the
+// nvram cache is updated by calling
+// VarUpdateVariable(VARIABLE_ID_DYNAMIC_PAGE_COUNT) when updating
+// "DynamicPageCount" variable name.
+// .
+// [Files] - Hii.c, Minisetup.h, Variable.h
+//
+// 3 2/19/10 12:59p Madhans
+// Updated for TSE 2.01. Refer Changelog.log for File change history.
+//
+// 4 2/19/10 7:59a Mallikarjunanv
+// updated the year in copyright message
+//
+// 3 1/09/10 2:31a Mallikarjunanv
+// Updated TSE2.01 Release sources with coding standards
+//
+// 2 10/28/09 5:34p Madhans
+//
+// 1 6/04/09 7:49p Madhans
+// AMI TSE Advanced.
+//
+// 1 4/28/09 10:50p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+// 1 4/28/09 10:24p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+//
+//*****************************************************************//
+//*****************************************************************//
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: variable.h
+//
+// Description: Variable handling header
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+
+#ifndef _VARIABLE_H_
+#define _VARIABLE_H_
+
+typedef struct _NVRAM_VARIABLE
+{
+ UINT8 *Buffer;
+ UINTN Size;
+}
+NVRAM_VARIABLE;
+
+#define VAR_ZERO_OFFSET 0
+
+#define VAR_COMMAND_GET_VALUE 0
+#define VAR_COMMAND_SET_VALUE 1
+
+#define VAR_COMMAND_GET_NVRAM 0
+#define VAR_COMMAND_SET_NVRAM 1
+
+// Variable IDs
+#define VARIABLE_ID_SETUP 0
+#define VARIABLE_ID_LANGUAGE 1
+#define VARIABLE_ID_BOOT_TIMEOUT 2
+#define VARIABLE_ID_USER_DEFAULTS 3
+#define VARIABLE_ID_ERROR_MANAGER 4
+#define VARIABLE_ID_AMITSESETUP 5
+#define VARIABLE_ID_IDE_SECURITY 6
+#define VARIABLE_ID_BOOT_ORDER 7
+#define VARIABLE_ID_BBS_ORDER 8
+#define VARIABLE_ID_DEL_BOOT_OPTION 9
+#define VARIABLE_ID_ADD_BOOT_OPTION 10
+#define VARIABLE_ID_BOOT_MANAGER 11
+#define VARIABLE_ID_BOOT_NOW 12
+#define VARIABLE_ID_LEGACY_DEV_INFO 13
+#define VARIABLE_ID_AMI_CALLBACK 14
+#define VARIABLE_ID_LEGACY_GROUP_INFO 15
+#define VARIABLE_ID_OEM_TSE_VAR 17
+#define VARIABLE_ID_DYNAMIC_PAGE_COUNT 18
+#define VARIABLE_ID_DRV_HLTH_ENB 19
+#define VARIABLE_ID_DRV_HLTH_COUNT 20
+#define VARIABLE_ID_DRIVER_MANAGER 22 //EIP70421 & 70422 Support for driver order
+#define VARIABLE_ID_DRIVER_ORDER 23
+#define VARIABLE_ID_ADD_DRIVER_OPTION 24
+#define VARIABLE_ID_DEL_DRIVER_OPTION 25
+#define VARIABLE_ID_PORT_OEM1 26 //EIP74676 variables for porting purpose
+#define VARIABLE_ID_PORT_OEM2 27
+#define VARIABLE_ID_PORT_OEM3 28
+#define VARIABLE_ID_PORT_OEM4 29
+#define VARIABLE_ID_PORT_OEM5 30
+#define VARIABLE_ID_PORT_OEM6 31
+#define VARIABLE_ID_PORT_OEM7 32
+#define VARIABLE_ID_PORT_OEM8 33
+#define VARIABLE_ID_PORT_OEM9 34
+#define VARIABLE_ID_PORT_OEM10 35
+#define VARIABLE_ID_PORT_OEM11 36
+#define VARIABLE_ID_PORT_OEM12 37
+#define VARIABLE_ID_PORT_OEM13 38
+#define VARIABLE_ID_PORT_OEM14 39
+#define VARIABLE_ID_PORT_OEM15 40
+#define VARIABLE_ID_PORT_OEM16 41
+#define VARIABLE_ID_PORT_OEM17 42
+#define VARIABLE_ID_PORT_OEM18 43
+#define VARIABLE_ID_PORT_OEM19 44
+#define VARIABLE_ID_PORT_OEM20 45
+#define VARIABLE_ID_PORT_OEM21 46
+#define VARIABLE_ID_PORT_OEM22 47
+#define VARIABLE_ID_PORT_OEM23 48
+#define VARIABLE_ID_PORT_OEM24 49
+#define VARIABLE_ID_PORT_OEM25 50
+#define VARIABLE_ID_PORT_OEM26 51
+#define VARIABLE_ID_PORT_OEM27 52
+#define VARIABLE_ID_PORT_OEM28 53
+#define VARIABLE_ID_PORT_OEM29 54
+
+//EIP 76381 : Performance Improving of variable data load and usage
+EFI_STATUS GetNvramVariableList(NVRAM_VARIABLE **RetNvramVarList);
+VOID CleanTempNvramVariableList();
+EFI_STATUS CopyNvramVariableList(NVRAM_VARIABLE *SrcVarList, NVRAM_VARIABLE **DestVarList);
+
+EFI_STATUS VarLoadVariables( VOID **list, NVRAM_VARIABLE *defaultList );
+EFI_STATUS VarBuildDefaults( VOID );
+VOID *VarGetNvramName( CHAR16 *name, EFI_GUID *guid, UINT32 *attributes, UINTN *size );
+EFI_STATUS VarSetNvramName( CHAR16 *name, EFI_GUID *guid, UINT32 attributes, VOID *buffer, UINTN size );
+VOID *VarGetNvram( UINT32 variable, UINTN *size );
+VOID *VarGetNvramQuestionValue(UINT32 variable, UINTN Offset, UINTN Size);
+EFI_STATUS VarSetNvram( UINT32 variable, VOID *buffer, UINTN size );
+EFI_STATUS VarGetDefaults( UINT32 variable, UINT32 offset, UINTN size, VOID *buffer );
+EFI_STATUS VarGetValue( UINT32 variable, UINT32 offset, UINTN size, VOID *buffer );
+EFI_STATUS VarSetValue( UINT32 variable, UINT32 offset, UINTN size, VOID *buffer );
+VOID VarUpdateVariable(UINT32 variable);
+VOID VarUpdateDefaults(UINT32 variable);
+VOID *VarGetVariable( UINT32 variable, UINTN *size );
+
+EFI_STATUS _VarGetData( UINT32 variable, UINT32 offset, UINTN size, VOID *buffer, BOOLEAN useDefaults );
+EFI_STATUS _VarGetSetValue( UINTN command, NVRAM_VARIABLE *list, UINT32 variable, UINT32 offset, UINTN size, VOID *buffer );
+
+#endif /* _VARIABLE_H_ */
+
+//**********************************************************************
+//**********************************************************************
+//** **
+//** (C)Copyright 2011, American Megatrends, Inc. **
+//** **
+//** All Rights Reserved. **
+//** **
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **
+//** **
+//** Phone: (770)-246-8600 **
+//** **
+//**********************************************************************
+//**********************************************************************
diff --git a/Core/EM/AMITSE/Keymon.c b/Core/EM/AMITSE/Keymon.c
new file mode 100644
index 0000000..94904a0
--- /dev/null
+++ b/Core/EM/AMITSE/Keymon.c
@@ -0,0 +1,302 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2010, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+// $Archive: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Keymon.c $
+//
+// $Author: Premkumara $
+//
+// $Revision: 7 $
+//
+// $Date: 8/28/14 4:29a $
+//
+//*****************************************************************//
+//*****************************************************************//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Keymon.c $
+//
+// 7 8/28/14 4:29a Premkumara
+// EIP-135253 Updating file name proper in #include
+//
+// 6 10/18/12 5:31a Arunsb
+// Updated for 2.16.1235 QA submission
+//
+// 6 10/10/12 12:23p Arunsb
+// Synched the source for v2.16.1232 backup with Aptio
+//
+// 5 11/04/11 4:37a Arunsb
+// [TAG] EIP67615
+// [Category] Bug Fix
+// [Severity] Normal
+// [Symptom] Keyattribute support doesn't work in AMITSE Keymon support
+// [RootCause] {SETUP_ENTRY_LEGACY_CODE,0} - This initilization code
+// initilize only ScanCode and ShiftKey.
+// It doesn't initilize the AltKey, CtrlKey etc ( Other fields in the
+// KEY_ATTRIBUTE structure).
+// [Solution] Modified the initilization like
+// {SETUP_ENTRY_LEGACY_CODE,{0,0,0,0}}
+// [Files] keymon.c
+//
+// 4 2/19/10 12:58p Madhans
+// Updated for TSE 2.01. Refer Changelog.log for File change history.
+//
+// 4 2/19/10 7:59a Mallikarjunanv
+// updated the year in copyright message
+//
+// 3 7/14/09 6:32p Blaines
+// For GTSE first Release.,
+//
+// 2 6/24/09 6:33p Madhans
+// Coding Standards
+//
+// 1 6/04/09 7:49p Madhans
+// AMI TSE Advanced.
+//
+// 1 4/28/09 10:49p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+// 1 4/28/09 10:24p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+// 3 10/03/08 12:40p Madhans
+// Update the changes provided by the core team
+//
+// 2 7/18/07 7:58a Arunkumars
+// clean up
+//
+// 1 7/09/07 1:18p Arunkumars
+// - Added elink hooks for Logo, Password management and Control Keys
+// customizations
+//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//<AMI_FHDR_START>
+//
+// Name: Keymon.c
+//
+// Description: Contains key monitoring functions.
+//
+//<AMI_FHDR_END>
+//**********************************************************************
+
+#ifdef TSE_FOR_APTIO_4_50
+
+#include "Token.h"
+#include <Efi.h>
+
+#else //#ifdef TSE_FOR_APTIO_4_50
+
+#include "minisetup.h"
+
+#endif //#ifdef TSE_FOR_APTIO_4_50
+
+#if SETUP_SUPPORT_KEY_MONITORING
+
+#include <Protocol\KeyMonPlatform.h>
+#include <Protocol\MonitorKeyFilter.h>
+
+#include "KeyMon.h"
+
+
+EFI_STATUS
+GetPlatformMonitorKeyOptions(
+ IN EFI_KEYMON_PLATFORM_PROTOCOL *This,
+ OUT KEY_ELEMENT **KeyList,
+ OUT UINTN *KeyListSize
+ );
+
+static EFI_GUID EfiKeyMonPlatformProtocolGuid = EFI_KEYMON_PLATFORM_PROTOCOL_GUID;
+
+static EFI_KEYMON_PLATFORM_PROTOCOL gKeyMonPlatformProtocol =
+{
+ GetPlatformMonitorKeyOptions
+};
+
+enum SETUP_KEYS
+{
+ SK_EntryKey
+#if SETUP_ALT_ENTRY_ENABLE
+ ,SK_AltEntryKey
+#endif
+#if SETUP_BBS_POPUP_ENABLE
+ ,SK_PopupBootEntryKey
+#endif
+#if SETUP_OEM_KEY1_ENABLE
+ ,SK_OemKey1
+#endif
+#if SETUP_OEM_KEY2_ENABLE
+ ,SK_OemKey2
+#endif
+#if SETUP_OEM_KEY3_ENABLE
+ ,SK_OemKey3
+#endif
+#if SETUP_OEM_KEY4_ENABLE
+ ,SK_OemKey4
+#endif
+};
+
+KEY_ELEMENT gLegacyKeyTable[]=
+{
+ {SETUP_ENTRY_LEGACY_CODE,{0,0,0,0}}
+#if SETUP_ALT_ENTRY_ENABLE
+ ,{SETUP_ALT_ENTRY_LEGACY_CODE,{0,0,0,0}}
+#endif
+#if SETUP_BBS_POPUP_ENABLE
+ ,{POPUP_MENU_ENTRY_LEGACY_CODE,{0,0,0,0}}
+#endif
+#if SETUP_OEM_KEY1_ENABLE
+ ,{SETUP_OEM_KEY1_LEGACY_CODE,{0,0,0,0}}
+#endif
+#if SETUP_OEM_KEY2_ENABLE
+ ,{SETUP_OEM_KEY2_LEGACY_CODE,{0,0,0,0}}
+#endif
+#if SETUP_OEM_KEY3_ENABLE
+ ,{SETUP_OEM_KEY3_LEGACY_CODE,{0,0,0,0}}
+#endif
+#if SETUP_OEM_KEY4_ENABLE
+ ,{SETUP_OEM_KEY4_LEGACY_CODE,{0,0,0,0}}
+#endif
+};
+
+UINT32 gLegacyKeys;
+EFI_HANDLE KeyMonProtocolHandle;
+
+extern EFI_BOOT_SERVICES *gBS;
+
+VOID InstallKeyMonProtocol(VOID)
+{
+ gBS->InstallProtocolInterface(
+ &KeyMonProtocolHandle,
+ &EfiKeyMonPlatformProtocolGuid,
+ EFI_NATIVE_INTERFACE,
+ &gKeyMonPlatformProtocol
+ );
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: GetPlatformMonitorKeyOptions
+//
+// Description: This function registers keys with key monitor driver
+// for monitoring in the legacy mode.
+//
+// Input: EFI_USB_LEGACY_PLATFORM_PROTOCOL *This
+// KEY_ELEMENT **KeyList: List of keys to be monitored.
+// UINTN *KeyListSize: Size of data returned in KeyList.
+//
+// Output: Return Status based on errors that occurred in library
+// functions.
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS
+GetPlatformMonitorKeyOptions(
+ IN EFI_KEYMON_PLATFORM_PROTOCOL *This,
+ OUT KEY_ELEMENT **KeyList,
+ OUT UINTN *KeyListSize
+ )
+{
+ *KeyList = gLegacyKeyTable;
+ *KeyListSize = sizeof(gLegacyKeyTable);
+
+ return EFI_SUCCESS;
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: GetKeysFromKeyMonFilter
+//
+// Description: This function receives keys from key monitor filter
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID GetKeysFromKeyMonFilter(VOID)
+{
+ UINT32 KeyDetected;
+ EFI_MONITOR_KEY_FILTER_PROTOCOL *MonKey;
+ EFI_STATUS Status;
+ EFI_GUID EfiMonitorKeyFilterProtocolGuid = EFI_MONITOR_KEY_FILTER_PROTOCOL_GUID;
+
+ // Locate protocols
+ Status = gBS->LocateProtocol (
+ &EfiMonitorKeyFilterProtocolGuid,
+ NULL, &MonKey);
+ if ( !(EFI_ERROR(Status)) )
+ {
+ MonKey->GetMonitoredKeys(MonKey, &KeyDetected);
+
+ if(KeyDetected & (1 << SK_EntryKey))
+ {
+ gLegacyKeys|=SETUP_ENTRY_KEY_BIT;
+ }
+#if SETUP_ALT_ENTRY_ENABLE
+ if(KeyDetected & (1 << SK_AltEntryKey))
+ {
+ gLegacyKeys|=SETUP_ENTRY_KEY_BIT;
+ }
+#endif
+#if SETUP_BBS_POPUP_ENABLE
+ if(KeyDetected & (1 << SK_PopupBootEntryKey))
+ {
+ gLegacyKeys|=POPUP_ENTRY_KEY_BIT;
+ }
+#endif
+#if SETUP_OEM_KEY1_ENABLE
+ if(KeyDetected & (1 << SK_OemKey1))
+ {
+ gLegacyKeys|=OEM_KEY1_BIT;
+ }
+#endif
+#if SETUP_OEM_KEY2_ENABLE
+ if(KeyDetected & (1 << SK_OemKey2))
+ {
+ gLegacyKeys|=OEM_KEY2_BIT;
+ }
+#endif
+#if SETUP_OEM_KEY3_ENABLE
+ if(KeyDetected & (1 << SK_OemKey3))
+ {
+ gLegacyKeys|=OEM_KEY3_BIT;
+ }
+#endif
+#if SETUP_OEM_KEY4_ENABLE
+ if(KeyDetected & (1 << SK_OemKey4))
+ {
+ gLegacyKeys|=OEM_KEY4_BIT;
+ }
+#endif
+
+ }
+}
+
+#endif
+//**********************************************************************
+//**********************************************************************
+//** **
+//** (C)Copyright 1985-2010, American Megatrends, Inc. **
+//** **
+//** All Rights Reserved. **
+//** **
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **
+//** **
+//** Phone: (770)-246-8600 **
+//** **
+//**********************************************************************
+//**********************************************************************
diff --git a/Core/EM/AMITSE/Keymon.h b/Core/EM/AMITSE/Keymon.h
new file mode 100644
index 0000000..ac8ecf5
--- /dev/null
+++ b/Core/EM/AMITSE/Keymon.h
@@ -0,0 +1,106 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2010, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+// $Archive: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Keymon.h $
+//
+// $Author: Arunsb $
+//
+// $Revision: 4 $
+//
+// $Date: 10/18/12 5:31a $
+//
+//*****************************************************************//
+//*****************************************************************//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Keymon.h $
+//
+// 4 10/18/12 5:31a Arunsb
+// Updated for 2.16.1235 QA submission
+//
+// 5 10/10/12 12:23p Arunsb
+// Synched the source for v2.16.1232 backup with Aptio
+//
+// 3 2/19/10 12:58p Madhans
+// Updated for TSE 2.01. Refer Changelog.log for File change history.
+//
+// 3 2/19/10 7:59a Mallikarjunanv
+// updated the year in copyright message
+//
+// 2 6/24/09 6:33p Madhans
+// Coding Standards
+//
+// 1 6/04/09 7:49p Madhans
+// AMI TSE Advanced.
+//
+// 1 4/28/09 10:49p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+// 1 4/28/09 10:24p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+// 1 7/09/07 1:18p Arunkumars
+// - Added elink hooks for Logo, Password management and Control Keys
+// customizations
+//
+//*****************************************************************//
+//*****************************************************************//
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: keymon.h
+//
+// Description: header of keymon.c
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+#if SETUP_SUPPORT_KEY_MONITORING
+
+#define SETUP_ENTRY_KEY_BIT 0x00000001
+#if SETUP_BBS_POPUP_ENABLE
+#define POPUP_ENTRY_KEY_BIT 0x00000002
+#endif
+#if SETUP_OEM_KEY1_ENABLE
+#define OEM_KEY1_BIT 0x00000004
+#endif
+#if SETUP_OEM_KEY2_ENABLE
+#define OEM_KEY2_BIT 0x00000008
+#endif
+#if SETUP_OEM_KEY3_ENABLE
+#define OEM_KEY3_BIT 0x00000100
+#endif
+#if SETUP_OEM_KEY4_ENABLE
+#define OEM_KEY4_BIT 0x00000200
+#endif
+
+VOID InstallKeyMonProtocol(VOID);
+VOID GetKeysFromKeyMonFilter(VOID);
+
+extern UINT32 gLegacyKeys;
+
+#endif
+//**********************************************************************
+//**********************************************************************
+//** **
+//** (C)Copyright 1985-2010, American Megatrends, Inc. **
+//** **
+//** All Rights Reserved. **
+//** **
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **
+//** **
+//** Phone: (770)-246-8600 **
+//** **
+//**********************************************************************
+//**********************************************************************
diff --git a/Core/EM/AMITSE/OEMLogo.bmp b/Core/EM/AMITSE/OEMLogo.bmp
new file mode 100644
index 0000000..8015098
--- /dev/null
+++ b/Core/EM/AMITSE/OEMLogo.bmp
Binary files differ
diff --git a/Core/EM/AMITSE/SmLogo.bmp b/Core/EM/AMITSE/SmLogo.bmp
new file mode 100644
index 0000000..cad458e
--- /dev/null
+++ b/Core/EM/AMITSE/SmLogo.bmp
Binary files differ
diff --git a/Core/EM/AMITSE/TseDrvHealth.h b/Core/EM/AMITSE/TseDrvHealth.h
new file mode 100644
index 0000000..804285f
--- /dev/null
+++ b/Core/EM/AMITSE/TseDrvHealth.h
@@ -0,0 +1,188 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2012, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+// $Archive: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/TseDrvHealth.h $
+//
+// $Author: Arunsb $
+//
+// $Revision: 5 $
+//
+// $Date: 10/18/12 5:31a $
+//
+//*****************************************************************//
+//*****************************************************************//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/TseDrvHealth.h $
+//
+// 5 10/18/12 5:31a Arunsb
+// Updated for 2.16.1235 QA submission
+//
+// 2 10/10/12 12:23p Arunsb
+// Synched the source for v2.16.1232 backup with Aptio
+//
+// 4 5/29/12 3:19a Arunsb
+// [TAG] EIP91109
+// [Category] Improvement
+// [Description] Sync the Aptio IV source for AptioV
+//
+// 3 5/28/12 11:09a Premkumara
+// [TAG] EIP83080
+// [Category] Improvement
+// [Description] Support REF4 type control.
+// [Files] TseDrvHealth.h, Hii.c
+//
+// 2 7/01/11 5:13a Arunsb
+// Build error suppressed when building with binaries alone.
+//
+// 1 6/30/11 4:04a Arunsb
+// Contains TSE specific driver health declarations.
+//
+//*****************************************************************//
+//*****************************************************************//
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: TseDrvHealth.h
+//
+// Description: Header file for driver health only contains TSE specific.
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+#if EFI_SPECIFICATION_VERSION>=0x20014
+#include "Protocol/DriverHealth.h"
+#include "Protocol/DevicePathToText.h"
+#else
+
+#ifndef __DRIVER_HEALTH_PROTOCOL__H__
+#define __DRIVER_HEALTH_PROTOCOL__H__
+
+#define EFI_DRIVER_HEALTH_PROTOCOL_GUID \
+ { 0x2a534210, 0x9280, 0x41d8, 0xae, 0x79, 0xca, 0xda, 0x1, 0xa2, 0xb1, 0x27 }
+typedef struct _EFI_DRIVER_HEALTH_PROTOCOL EFI_DRIVER_HEALTH_PROTOCOL;
+
+typedef enum {
+ EfiDriverHealthStatusHealthy,
+ EfiDriverHealthStatusRepairRequired,
+ EfiDriverHealthStatusConfigurationRequired,
+ EfiDriverHealthStatusFailed,
+ EfiDriverHealthStatusReconnectRequired,
+ EfiDriverHealthStatusRebootRequired
+} EFI_DRIVER_HEALTH_STATUS;
+
+typedef UINT16 EFI_STRING_ID;
+typedef struct {
+ EFI_HII_HANDLE HiiHandle;
+ EFI_STRING_ID StringId;
+ UINT64 Reserved;
+} EFI_DRIVER_HEALTH_HII_MESSAGE;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DRIVER_HEALTH_REPAIR_NOTIFY) (
+ IN UINTN Value,
+ IN UINTN Limit
+);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DRIVER_HEALTH_GET_HEALTH_STATUS) (
+ IN EFI_DRIVER_HEALTH_PROTOCOL *This,
+ IN EFI_HANDLE ControllerHandle, OPTIONAL
+ IN EFI_HANDLE ChildHandle, OPTIONAL
+ OUT EFI_DRIVER_HEALTH_STATUS *HealthStatus,
+ OUT EFI_DRIVER_HEALTH_HII_MESSAGE **MessageList, OPTIONAL
+ OUT EFI_HII_HANDLE *FormHiiHandle OPTIONAL
+);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DRIVER_HEALTH_REPAIR) (
+ IN EFI_DRIVER_HEALTH_PROTOCOL *This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE ChildHandle, OPTIONAL
+ IN EFI_DRIVER_HEALTH_REPAIR_NOTIFY RepairNotify OPTIONAL
+);
+
+struct _EFI_DRIVER_HEALTH_PROTOCOL {
+ EFI_DRIVER_HEALTH_GET_HEALTH_STATUS GetHealthStatus;
+ EFI_DRIVER_HEALTH_REPAIR Repair;
+};
+
+#endif /* __DRIVER_HEALTH_PROTOCOL__H__ */
+
+#ifndef __DEVICE_PATH_TO_TEXT_PROTOCOL__H__
+#define __DEVICE_PATH_TO_TEXT_PROTOCOL__H__
+
+
+#define EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \
+ { 0x8b843e20, 0x8132, 0x4852, 0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c }
+
+GUID_VARIABLE_DECLARATION(gEfiDevicePathToTextProtocolGuid, EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID);
+
+
+typedef struct _EFI_DEVICE_PATH_TO_TEXT_PROTOCOL EFI_DEVICE_PATH_TO_TEXT_PROTOCOL;
+
+typedef
+CHAR16*
+(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_NODE) (
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode,
+ IN BOOLEAN DisplayOnly,
+ IN BOOLEAN AllowShortcuts
+);
+
+typedef
+CHAR16*
+(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_PATH) (
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
+ IN BOOLEAN DisplayOnly,
+ IN BOOLEAN AllowShortcuts
+);
+
+struct _EFI_DEVICE_PATH_TO_TEXT_PROTOCOL {
+ EFI_DEVICE_PATH_TO_TEXT_NODE ConvertDeviceNodeToText;
+ EFI_DEVICE_PATH_TO_TEXT_PATH ConvertDevicePathToText;
+};
+
+#endif /* __DEVICE_PATH_TO_TEXT_PROTOCOL__H__ */
+#endif /* EFI_SPECIFICATION_VERSION */
+
+typedef struct DRV_HEALTH_HNDLS{
+ EFI_HANDLE ControllerHandle;
+ EFI_HANDLE ChildHandle;
+ EFI_DRIVER_HEALTH_STATUS HealthStatus;
+ struct DRV_HEALTH_HNDLS *Next;
+}DRV_HEALTH_HNDLS;
+
+CHAR16 *GetDrvHlthCtrlName (DRV_HEALTH_HNDLS *);
+VOID AddHandleIntoList (EFI_HANDLE, EFI_HANDLE, EFI_DRIVER_HEALTH_STATUS);
+VOID DisplayMsgListMessageBox (EFI_DRIVER_HEALTH_HII_MESSAGE *MessageList);
+BOOLEAN AdvancedRepairSupported (VOID);
+
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2012, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************// \ No newline at end of file
diff --git a/Core/EM/AMITSE/UefiHpkTool.exe b/Core/EM/AMITSE/UefiHpkTool.exe
new file mode 100644
index 0000000..eb880b7
--- /dev/null
+++ b/Core/EM/AMITSE/UefiHpkTool.exe
Binary files differ
diff --git a/Core/EM/AMITSE/Uefisetup.ini b/Core/EM/AMITSE/Uefisetup.ini
new file mode 100644
index 0000000..1ab7b37
--- /dev/null
+++ b/Core/EM/AMITSE/Uefisetup.ini
@@ -0,0 +1,533 @@
+[section]
+variablecount = 55 ; number of variables to parse
+guidCount = 19 ; this is the number of GUID's to parse
+refreshrate = 2 ; rate of refresh in 0.1 second intervals
+fakeVarKey = 64254 ; 0xfafe is the key for fake var
+;VariableAttrib = 7 ; default attribute for variables found in VFR's
+;DefultsCount = 1 ; default data that to set from this ini file.
+guid = EC87D643-EBA4-4BB5-A1E5-3F3E36B20DA9
+scrtoken1 = 0
+scrtoken2 = 2
+scrtoken3 = 3
+scrtoken4 = 4
+scrtoken5 = 0
+scrtoken6 = 0
+scrtoken7 = 0
+
+[files]
+filecount = 6
+file1 = Main.hpk
+file2 = Advanced.hpk
+file3 = Chipset.hpk
+file4 = Boot.hpk
+file5 = Security.hpk
+file6 = Exit.hpk
+
+[variable0]
+guid = EC87D643-EBA4-4BB5-A1E5-3F3E36B20DA9
+name = Setup
+flags = 7
+extFlags = 0
+key = 0 ; 0x0 id is for setup variable
+
+[variable1]
+guid = 8BE4DF61-93CA-11D2-AA0D-00E098032B8C
+name = PlatformLang
+flags = 7
+extFlags = 1 ; no defaults
+key = 65535 ; 0xffff id is for minisetup variables use
+
+[variable2]
+guid = 8BE4DF61-93CA-11D2-AA0D-00E098032B8C
+name = Timeout
+flags = 7
+extFlags = 0
+key = 65535 ; 0xffff id is for minisetup variables use
+
+[variable3]
+guid = C4CC0DE8-0687-4422-99C1-65351A5D5F95
+name = UserDefaults
+flags = 7
+extFlags = 0
+key = 65535 ; 0xffff id is for minisetup variables use
+
+[Variable4]
+guid = ADDEBF82-A560-46B9-A280-78C6AB61AEDA
+name = ErrorManager
+flags = 0
+extFlags = 0
+key = 65535
+
+[Variable5]
+guid = c811fa38-42c8-4579-a9bb-60e94eddfb34
+name = AMITSESetup
+flags = 7
+extFlags = 0
+key = 65535
+
+[Variable6]
+guid = 3DD0DE67-02D7-4129-914A-9F377CC34B0D
+name = IDESecDev
+flags = 7
+extFlags = 0
+key = 65535
+
+[variable7]
+guid = 8BE4DF61-93CA-11D2-AA0D-00E098032B8C
+name = BootOrder
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535 ; 0xffff id is for minisetup variables use
+
+[variable8]
+guid = A56074DB-65FE-45F7-BD21-2D2BDD8E9652
+name = LegacyDevOrder
+flags = 3
+extFlags = 1 ; no defults
+key = 65535 ; 0xffff id is for minisetup variables use
+
+[Variable9]
+guid = F6C73719-F34C-479C-B32F-277FCBBCFE4F
+name = DelBootOption
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable10]
+guid = 19d96d3f-6a6a-47d2-b195-7b2432da3be2
+name = AddBootOption
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable11]
+guid = B4909CF3-7B93-4751-9BD8-5BA8220B9BB2
+name = BootManager
+flags = 7
+extFlags = 0
+key = 65535
+
+[Variable12]
+guid = 052E6EB0-F240-42C5-8309-45874545C6B4
+name = BootNowCount
+flags = 7
+extFlags = 0
+key = 65535
+
+[Variable13]
+guid = A56074DB-65FE-45F7-BD21-2D2BDD8E9652
+name = LegacyDev
+flags = 1
+extFlags = 0
+key = 65535
+
+[Variable14]
+guid = 9CF0F18E-7C7D-49DE-B5AA-BBBAD6B21007
+name = AMICallback
+flags = 1
+extFlags = 0
+key = 65535
+
+[Variable15]
+guid = A56074DB-65FE-45F7-BD21-2D2BDD8E9652
+name = LegacyGroup
+flags = 1
+extFlags = 0
+key = 65535
+
+[Variable16]
+guid = 052E6EB0-F240-42C5-8309-45874545C6B4
+name = SetupSaveState
+flags = 2
+extFlags = 0
+key = 65535
+
+[Variable17]
+guid = F4B2C007-94A1-4cd5-A710-F4141FCEBCA0
+name = OemTSEVar
+flags = 7
+key = 65535
+
+[Variable18]
+guid = B63BF800-F267-4f55-9217-E97FB3B69846
+name = DynamicPageCount
+flags = 2
+extFlags = 0
+key = 65535
+
+[Variable19]
+guid = 0885F288-418C-4be1-A6AF-8BAD61DA08FE
+name = DriverHlthEnable
+flags = 2
+extFlags = 0
+key = 65535
+
+[Variable20]
+guid = 7459A7D4-6533-4480-BBA7-79E25A4443C9
+name = DriverHealthCount
+flags = 2
+extFlags = 0
+key = 65535
+
+[Variable21]
+guid = 58279C2D-FB19-466e-B42E-CD437016DC25
+name = DrvHealthCtrlCnt
+flags = 2
+extFlags = 0
+key = 65535
+
+[variable22]
+guid = C0B4FB05-15E5-4588-9FE9-B3D39C067715
+name = DriverManager
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535 ; 0xffff id is for minisetup variables use
+
+[variable23]
+guid = 8BE4DF61-93CA-11D2-AA0D-00E098032B8C
+name = DriverOrder
+flags = 3 ;variable attributes
+extFlags = 1 ; no defaults ;Extended attributes
+key = 65535 ; 0xffff id is for minisetup variables use
+
+[variable24]
+guid = 7DF66C0F-D40A-4748-AC5A-6C0BEA786A1A
+name = AddDriverOption
+flags = 3 ;variable attributes
+extFlags = 1 ; no defaults ;Extended attributes
+key = 65535 ; 0xffff id is for minisetup variables use
+
+[Variable25]
+guid = 17A3C5DA-F51F-437c-91B6-002B6F262593
+name = DelDriverOption
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable26]
+guid = EDA2B104-7A10-4519-B0A1-EBA5C52ACFCE
+name = OemPortVar1
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable27]
+guid = EF402953-B819-4cc2-A44C-4C9B4CFBC889
+name = OemPortVar2
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable28]
+guid = 1D6F853E-0006-40d8-9B4B-79618A5733B0
+name = OemPortVar3
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable29]
+guid = 47E87E67-FBC0-4c01-9002-4A0A6ECB92FF
+name = OemPortVar4
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable30]
+guid = 2799A453-FC10-4334-9E66-D3D6EF09D0EE
+name = OemPortVar5
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable31]
+guid = D77A3FE1-51FE-4613-A81D-82AE24464CFD
+name = OemPortVar6
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable32]
+guid = B5CEC017-74CB-4e10-BAC3-924A4CC629C8
+name = OemPortVar7
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable33]
+guid = 78A6FB37-8F27-40a4-9C4E-9FC9E438D5E2
+name = OemPortVar8
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable34]
+guid = 8DAC5195-3FD5-4e32-9C2A-1A65BD699932
+name = OemPortVar9
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable35]
+guid = A6DB3378-CFD7-4bfd-A1C4-2709FEC52F8B
+name = OemPortVar10
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable36]
+guid = EA629472-D7C6-4c0e-8820-2B811C7EE3AF
+name = OemPortVar11
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable37]
+guid = 4CD97B67-12BB-4fc5-8B2A-580ADB6A6368
+name = OemPortVar12
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable38]
+guid = C03DDD47-DC0A-4319-9FEC-44B078C242E6
+name = OemPortVar13
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable39]
+guid = 2AAEC318-E84B-4e0b-BF41-AC65F17E9E2F
+name = OemPortVar14
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable40]
+guid = 1967167B-A13D-4e45-801B-A605D11946D5
+name = OemPortVar15
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable41]
+guid = 466A7291-50DF-4b40-A2EB-CEE67D5428C9
+name = OemPortVar16
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable42]
+guid = 4639A701-74F9-4635-B126-9FF048D6B0D0
+name = OemPortVar17
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable43]
+guid = EF02529C-A283-48cd-8D08-6A1E9C3C03D3
+name = OemPortVar18
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable44]
+guid = 4CD28F5E-4BBB-4602-ACB8-741BAA7EB313
+name = OemPortVar19
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable45]
+guid = 83C233EB-D01A-45d8-9FA1-AF40206FCC9B
+name = OemPortVar20
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable46]
+guid = 6169D4F6-0659-4fb5-B03C-3645D8C80DC8
+name = OemPortVar21
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable47]
+guid = 1C1EAB81-9229-42ac-B940-757C498A09ED
+name = OemPortVar22
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable48]
+guid = 0ECEDD30-67EC-4570-9EFB-308DE53EE93D
+name = OemPortVar23
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable49]
+guid = 913FA238-7B16-4b72-A5F0-815E7D2C8C1F
+name = OemPortVar24
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable50]
+guid = FE075D44-D9F1-4da1-AE6A-8250553CDE66
+name = OemPortVar25
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable51]
+guid = 471F5144-6037-4952-8B01-CFF586FDE6B3
+name = OemPortVar26
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable52]
+guid = 1318FED0-2765-42b5-803E-3215A3C093C5
+name = OemPortVar27
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable53]
+guid = FF5A0DC3-DFAC-434a-B3DF-FFD4C1EA7E41
+name = OemPortVar28
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable54]
+guid = 3F8DC333-CCD5-4e58-B8CF-7B9A8F31EA96
+name = OemPortVar29
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+;
+;These are samples of how to add GUID information into this file
+;
+[GUID0]
+guid = B4909CF3-7B93-4751-9BD8-5BA8220B9BB2
+name = BootManager
+flags = 1
+key = 1
+
+[GUID1]
+guid = 052E6EB0-F240-42C5-8309-45874545C6B4
+name = BootNowCount
+flags = 1
+key = 1
+
+[GUID2]
+guid = A56074DB-65FE-45F7-BD21-2D2BDD8E9652 ;GUID for LegacyDevOrder & LegacyDev are same
+name = LegacyDevOrder
+flags = 1
+key = 7
+
+[GUID3]
+guid = 9CF0F18E-7C7D-49DE-B5AA-BBBAD6B21007
+name = AMICallback
+flags = 1
+key = 2
+
+[GUID4]
+guid = ADDEBF82-A560-46B9-A280-78C6AB61AEDA
+name = ErrorManager
+flags = 9
+key = 3
+
+[GUID5]
+guid = 8BE4DF61-93CA-11D2-AA0D-00E098032B8C
+name = PlatformLangCodes
+flags = 7
+key = 5
+
+[GUID6]
+guid = c57ad6b7-0515-40a8-9d21-551652854e37
+name = shell.efi|shellx64.efi|shellia64.efi
+flags = 6
+key = 0
+
+[GUID7]
+guid = 50064C83-F3D9-4270-B97B-BAC47B61E8DB
+name = shellpbm.efi
+flags = 6
+key = 0
+
+[GUID8]
+guid = 3DD0DE67-02D7-4129-914A-9F377CC34B0D
+name = IDESecDev
+flags = 1
+key = 8
+
+[GUID9]
+guid = 19d96d3f-6a6a-47d2-b195-7b2432da3be2
+name = AddBootOption
+flags = 0
+key = 9
+
+[GUID10]
+guid = F4B2C007-94A1-4cd5-A710-F4141FCEBCA0
+name = OemTSEVar
+flags = 1
+key = 10
+
+[GUID11]
+guid = B63BF800-F267-4f55-9217-E97FB3B69846
+name = DynamicPageCount
+flags = 0
+key = 14
+
+[GUID12]
+guid = 0885F288-418C-4be1-A6AF-8BAD61DA08FE
+name = DriverHlthEnable
+flags = 1
+key = 15
+
+[GUID13]
+guid = 7459A7D4-6533-4480-BBA7-79E25A4443C9
+name = DriverHealthCount
+flags = 1
+key = 16
+
+[GUID14]
+guid = 58279C2D-FB19-466e-B42E-CD437016DC25
+name = DrvHealthCtrlCnt
+flags = 1
+key = 17
+
+[GUID15]
+guid = C0B4FB05-15E5-4588-9FE9-B3D39C067715
+name = DriverManager
+flags = 0
+key = 18
+
+[GUID16]
+guid = ECFD4BCE-4279-40f8-BAF2-DCB79638D41E
+name = OemPortGuid1
+flags = 0
+key = 19
+
+[GUID17]
+guid = 23F69CD0-FF46-4db6-B982-63EDF1A901FF
+name = OemPortGuid2
+flags = 0
+key = 20
+
+[GUID18]
+guid = 8BDDF24B-2C8A-4360-A3BB-AEF094983BEA
+name = AMIDiag
+flags = 2
+key = 21
+
+;;syntax to set a default variable initial value from this ini file
+;[defaults0]
+;variable = 5 ;; variable number
+;mode = 0 ;; Standard (0) or Manufacturer (1)
+;offset = 80 ;; offset of the variable data
+;size = 1 ;; size of data to replace
+;data = 1 ;; Data to replace Format (Hex Bytes delimted by space)
diff --git a/Core/EM/AMITSE/bootflow.c b/Core/EM/AMITSE/bootflow.c
new file mode 100644
index 0000000..6d1b548
--- /dev/null
+++ b/Core/EM/AMITSE/bootflow.c
@@ -0,0 +1,445 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2011, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+// $Archive: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/bootflow.c $
+//
+// $Author: Premkumara $
+//
+// $Revision: 21 $
+//
+// $Date: 8/28/14 4:27a $
+//
+//*****************************************************************//
+//*****************************************************************//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/bootflow.c $
+//
+// 21 8/28/14 4:27a Premkumara
+// EIP-135253 Updating file name proper in #include section
+//
+// 20 12/04/13 2:43p Arunsb
+// [TAG] EIP125219
+// [Category] Improvement
+// [Description] Add event at end of BootFlowManageExit() after second
+// boot path
+// [Files] bootflow.c, AMIVfr.h
+//
+// 19 10/18/12 5:31a Arunsb
+// Updated for 2.16.1235 QA submission
+//
+// 10 10/10/12 12:23p Arunsb
+// Synched the source for v2.16.1232 backup with Aptio
+//
+// 17 9/17/12 5:59a Rajashakerg
+// Updated EIP changes for 2.16 release.
+//
+// 15 8/29/12 12:31p Arunsb
+// [TAG] EIP93521
+// [Category] New Feature
+// [Description] Support of ESRT
+// [Files] amitse.sdl, bootflow.c, bootflow.h, commonhelper.c and
+// dobmpmgr.c
+//
+// 14 8/23/12 6:25p Arunsb
+//
+// 13 8/21/12 7:53p Arunsb
+// [TAG] EIP93521
+// [Category] New Feature
+// [Description] Support of ESRT
+// [Files] amitse.sdl, bootflow.c, bootflow.h, commonhelper.c and
+// dobmpmgr.c
+//
+// 12 5/28/12 2:50a Arunsb
+// [TAG] EIP88447
+// [Category] New Feature
+// [Description] Disable UEFI boot option in BIOS setup should not load
+// the default image \EFI\BOOT\BOOT{machine type short-name}.EFI
+// [Files] Amitse.sdl, commonhelper.c and bootflow.c
+//
+// 11 6/29/11 5:37a Arunsb
+// [TAG] EIP 62631
+// [Category] New Feature
+// [Description] Hot key boot option support in TSE as per UEFI spec.
+// section 3.1.6.
+// Added BOOT_FLOW_HOTKEY_BOOT bootflow option in
+// BOOT_FLOW.
+// [Files] AMITSE.sdl, bootflow.c, bootflow.h, CommonHelper.c,
+// commonoem.c, commonoem.h, boot.c,
+// hiistring20.c, hiistring21.c and notify.c.
+//
+// 10 6/23/11 7:41p Arunsb
+// [TAG] EIP57660
+// [Category] New Feature
+// [Description] Non-removable media boot behavior as described in UEFI
+// specification v 2.3.1, p. 3.4.1.
+// Checks for the setup key if no boot options avail
+// or not succedded to boot. If setup key pressed launches
+// the setup.
+// If no boot option avail then inserting thumb drive with
+// image efi\boot\bootxxxx.efi TSE will launch that image.
+// [Files] amitse.sdl, bootflow.c and protocol.c
+//
+// 9 6/20/11 3:43p Arunsb
+// [TAG] EIP57660
+// [Category] New Feature
+// [Description] Non-removable media boot behavior as described in UEFI
+// specification v 2.3.1, p. 3.4.1.
+// If BOOT_FLOW's LaunchShell param sets to
+// BOOTFLOW_EXIT_LAUNCH_DEFAULT_BOOTIMAGE then TSE tries to load the
+// efi/boot/bootxxxx.efi from any of the file system.
+// If BOOT_FLOW's InfiniteLoop param sets to
+// BOOTFLOW_EXIT_INFINITE_LOOP_LAUNCH_SETUP then TSE tried to enter the
+// setup
+// if no boot option present or succeeded to boot. Enters
+// to setup only when setup key detected after boot options failure
+// occurs.
+// [Files] amitse.sdl, bootflow.c, bootflow.h, commonoem.c, boot.c
+// and protocol.c
+//
+// 8 6/10/11 2:38p Arunsb
+// [TAG] EIP57660
+// [Category] New Feature
+// [Description] Non-removable media boot behavior as described in UEFI
+// specification v 2.3.1, p. 3.4.1.2
+// [Files] boot.c, bootflow.c and bootflow.h
+//
+// 7 6/08/11 11:38p Arunsb
+// [TAG] EIP57650
+// [Category] New Feature
+// [Description] Support in TSE Out of resources boot flow option.
+// [Files] bootflow.c and bootflow.h
+//
+// 6 3/15/11 2:39a Pugazhendhip
+// [TAG] EIP54858
+// [Category] Bug Fix
+// [Severity] Normal
+// [Symptom] When developing projects with a custom Bootflow and custom
+// Setup, this PageFormID may not exist and will therefore cause a build
+// error
+// [RootCause] The MAIN_MAIN and MAIN_FORM_SET_CLASS are defined inside
+// the ifdef condition. Hence, when the condition macro is defined in the
+// project, the MAIN_MAIN and MAIN_FORM_SET_CLASS macros are not
+// available which causes the build error in the _gBootFlowTable array
+// declaration.
+// [Solution] Moved the following code fragment outside of else
+// condition compiler case (TSE_FOR_APTIO_4_50)
+//
+// #ifndef MAIN_FORM_SET_CLASS
+// #define MAIN_FORM_SET_CLASS 1
+// #endif
+//
+// #ifndef MAIN_MAIN
+// #define MAIN_MAIN 1
+// #endif
+//
+// [Files] bootflow.c
+//
+// 5 9/16/10 8:39p Madhans
+// Updated for TSE 2.10. Refer changelog.log for more deatils.
+//
+// 6 9/08/10 6:57a Mallikarjunanv
+// EIP-42080: TSE updates with respect to Fast Boot Support
+//
+// 5 4/13/10 5:12p Madhans
+// EIP: 37439 To support extended OEM Key support.
+//
+// 4 2/19/10 7:59a Mallikarjunanv
+// updated the year in copyright message
+//
+// 3 1/29/10 5:17p Madhans
+// changes to support UEFI 2.1 build also.
+//
+// 2 1/09/10 2:24a Mallikarjunanv
+// Updated TSE2.01 Release sources with coding standards
+//
+// 1 6/04/09 7:49p Madhans
+// AMI TSE Advanced.
+//
+// 2 5/07/09 10:31a Madhans
+// Changes After Bin module.
+//
+// 3 5/05/09 3:10p Madhans
+// gBootFlowTable points to the Bootflow. OEM may update this Pointer with
+// OEM bootflow table.
+//
+// 2 5/01/09 8:25p Mallikarjunanv
+//
+// 1 4/28/09 10:24p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+// 2 1/30/09 6:06p Madhans
+// Function headers added.
+//
+//*****************************************************************//
+//*****************************************************************//
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: bootflow.c
+//
+// Description: This file bootflow related functions and tables
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+
+#ifdef TSE_FOR_APTIO_4_50
+
+#include "Token.h"
+#include <Efi.h>
+#include <Protocol/SimpleTextIn.h>
+
+#include "setup.h" // for MAIN_FORM_SET_CLASS
+#include "AutoId.h" // for MAIN_MAIN
+
+#else //#ifdef TSE_FOR_APTIO_4_50
+
+#include "minisetup.h"
+
+#endif //#ifdef TSE_FOR_APTIO_4_50
+
+#include "AmiVfr.h"
+#include "Variable.h"
+#include "boot.h"
+#include "bootflow.h"
+#include "mem.h"
+#include "commonoem.h"
+#include "HookAnchor.h"
+
+#ifndef MAIN_FORM_SET_CLASS
+#define MAIN_FORM_SET_CLASS 1
+#endif
+
+#ifndef MAIN_MAIN
+#define MAIN_MAIN 1
+#endif
+
+extern BOOLEAN gEnterSetup;
+extern EFI_GUID gEfiShellFileGuid;
+
+EFI_GUID _gBootFlowGuid = BOOT_FLOW_VARIABLE_GUID;
+static EFI_GUID _gTPMBootFlowGuid = TPM_BOOT_FLOW_VARIABLE_GUID;
+
+VOID SetupDebugPrint(IN CONST CHAR8 *Format, ...) ;
+#if SUPPRESS_PRINT
+ #define SETUP_DEBUG_TSE(format,...)
+#else //Else of SUPPRESS_PRINT
+ #define SETUP_DEBUG_TSE(format,...) SetupDebugPrint(format, __VA_ARGS__)
+#endif
+
+static BOOT_FLOW _gBootFlowTable[] =
+{
+// { Condition, PageClass, PageSubClass, PageFormID, ControlNumber, MessageBoxToken, MessageBoxTimeout, GotoPageOnEntry, ProceedBooting, InfiniteLoop, LaunchShell, DoNotEnterSetup, CallbackFunction },
+ { BOOT_FLOW_CONDITION_NORMAL, 0, 0, 0, 0, 0, 0, FALSE, TRUE, BOOT_FLOW_NORMAL_INFINITE_LOOP, BOOT_FLOW_NORMAL_LAUNCH_DEFAULT_BOOTIMAGE, FALSE, NULL },
+ { BOOT_FLOW_CONDITION_ERROR, ERROR_MANAGER_KEY_ID, 0, 1, 0, 0, 0, TRUE, FALSE, FALSE, TRUE, FALSE, NULL },
+ { BOOT_FLOW_CONDITION_RECOVERY, 0x40, 0, 1, 0, 0, 0, TRUE, TRUE, FALSE, TRUE, FALSE, NULL },
+ { BOOT_FLOW_CONDITION_PCI_OUT_OF_RESOURCE, 0x79, 0, 1, 0, 0, 0, TRUE, TRUE, FALSE, TRUE, FALSE, NULL },
+ { BOOT_FLOW_CONDITION_FIRST_BOOT, MAIN_FORM_SET_CLASS, 0, MAIN_MAIN, 0, 0, 0, TRUE, TRUE, FALSE, TRUE, FALSE, NULL },
+ { BOOT_FLOW_CONDITION_OS_UPD_CAP, 0, 0, 0, 0, 0, 0, FALSE, TRUE, FALSE, FALSE, FALSE, &OsUpdateCapsuleWrap }, //EIP93521
+ { BOOT_FLOW_HOTKEY_BOOT, 0, 0, 0, 0, 0, 0, FALSE, TRUE, FALSE, FALSE, FALSE, &LaunchHotKeyBootOption },
+#if SETUP_OEM_KEY1_ENABLE
+ { BOOT_FLOW_CONDITION_OEM_KEY1, 0, 0, 0, 0, 0, 0, FALSE, TRUE, FALSE, FALSE, FALSE, &OemKey1HookHook },
+#endif
+#if SETUP_OEM_KEY2_ENABLE
+ { BOOT_FLOW_CONDITION_OEM_KEY2, 0, 0, 0, 0, 0, 0, FALSE, TRUE, FALSE, FALSE, FALSE, &OemKey2HookHook },
+#endif
+#if SETUP_OEM_KEY3_ENABLE
+ { BOOT_FLOW_CONDITION_OEM_KEY3, 0, 0, 0, 0, 0, 0, FALSE, TRUE, FALSE, FALSE, FALSE, &OemKey3HookHook },
+#endif
+#if SETUP_OEM_KEY4_ENABLE
+ { BOOT_FLOW_CONDITION_OEM_KEY4, 0, 0, 0, 0, 0, 0, FALSE, TRUE, FALSE, FALSE, FALSE, &OemKey4HookHook },
+#endif
+#if SETUP_BBS_POPUP_ENABLE
+ { BOOT_FLOW_CONDITION_BBS_POPUP, 0, 0, 0, 0, 0, 0, FALSE, TRUE, FALSE, FALSE, FALSE, &DoPopup },
+#endif
+ { BOOT_FLOW_CONDITION_OEM_KEY_CALLBACK, 0, 0, 0, 0, 0, 0, FALSE, TRUE, FALSE, FALSE, FALSE, NULL }, // Callback is null and on OEMkey press it will updated.
+ { BOOT_FLOW_CONDITION_NO_SETUP, 0, 0, 0, 0, 0, 0, FALSE, TRUE, TRUE, FALSE, TRUE, NULL },
+#if FAST_BOOT_SUPPORT
+ { BOOT_FLOW_CONDITION_FAST_BOOT, 0, 0, 0, 0, 0, 0, FALSE, TRUE, FALSE, TRUE, TRUE, &FBBootFlow },
+#endif
+ // this MUST be the last entry in the boot flow table
+ { BOOT_FLOW_CONDITION_NULL, 0, 0, 0, 0, 0, 0, FALSE, TRUE, FALSE, TRUE, FALSE, NULL }
+};
+
+// Set the initial Bootflow table.
+// OEM may have thier own Bottflow table and update the gBootFlowTable with that in the Entry hooks.
+BOOT_FLOW *gBootFlowTable = _gBootFlowTable;
+EFI_STATUS LaunchSecondaryBootPath (CHAR16 *); //EIP 88447
+EFI_STATUS EfiLibNamedEventSignal (IN EFI_GUID *Name ); //EIP125219
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: BootFlowManageEntry
+//
+// Description: Determines boot flow entry path based on the boot
+// flow variable.
+//
+// Input: VOID
+//
+// Output: EFI_SUCCESS: Normal boot
+// EFI_UNSUPPORTED: do not proceed to boot
+// EFI_NOT_STARTED: Do not enter setup
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS BootFlowManageEntry( VOID )
+{
+ EFI_STATUS Status = EFI_SUCCESS;
+ UINT32 condition = BOOT_FLOW_CONDITION_NORMAL;
+ UINT32 *conditionPtr;
+ UINTN size = 0;
+
+ BOOT_FLOW *bootFlowPtr;
+
+ SETUP_DEBUG_TSE ("\n[TSE] Entering BootFlowManageEntry");
+ conditionPtr = VarGetNvramName( L"BootFlow", &_gBootFlowGuid, NULL, &size );
+ if ( conditionPtr != NULL )
+ condition = *conditionPtr;
+
+ MemFreePointer( (VOID **)&conditionPtr );
+
+ size = 0;
+ conditionPtr = VarGetNvramName( L"TPMBootFlow", &_gTPMBootFlowGuid, NULL, &size );
+
+ if ( conditionPtr != NULL )
+ {
+ if(*conditionPtr != BOOT_FLOW_CONDITION_NORMAL)
+ condition = *conditionPtr;
+ }
+
+ MemFreePointer( (VOID **)&conditionPtr );
+ bootFlowPtr = gBootFlowTable;
+ for ( bootFlowPtr = gBootFlowTable;
+ bootFlowPtr->Condition != BOOT_FLOW_CONDITION_NULL; bootFlowPtr++ )
+ {
+ if ( condition != bootFlowPtr->Condition )
+ continue;
+ SETUP_DEBUG_TSE ("\n[TSE] BootFlow condition is %d", condition);
+ if ( bootFlowPtr->CallbackFunction != NULL )
+ Status = bootFlowPtr->CallbackFunction( bootFlowPtr );
+ if ( ! bootFlowPtr->ProceedBooting )
+ Status = EFI_UNSUPPORTED;
+
+ if ( bootFlowPtr->MessageBoxToken != 0 )
+ _BootFlowShowMessageBox( bootFlowPtr );
+ if ( ( bootFlowPtr->GotoPageOnEntry ) && ( bootFlowPtr->PageClass != 0 ) )
+ {
+ _BootFlowSetActivePage( bootFlowPtr );
+ _BootFlowSetActiveControl( bootFlowPtr );
+ }
+
+ if(bootFlowPtr->DoNotEnterSetup)
+ {
+ gEnterSetup = FALSE;
+ Status = EFI_NOT_STARTED;
+ }
+
+ break;
+ }
+ SETUP_DEBUG_TSE ("\n[TSE] Exiting BootFlowManageEntry");
+ return Status;
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: BootFlowManageExit
+//
+// Description: Determines boot flow exit path based on the boot
+// flow variable.
+//
+// Input: VOID
+//
+// Output: EFI_UNSUPPORTED: enter setup if all the boot options
+// fail
+// EFI_NOT_STARTED: try again and again if all boot
+// options fail
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS BootFlowManageExit (VOID)
+{
+ EFI_STATUS Status = EFI_SUCCESS;
+ UINT32 condition = BOOT_FLOW_CONDITION_NORMAL;
+ UINT32 *conditionPtr;
+ UINTN size = 0;
+ BOOT_FLOW *bootFlowPtr;
+ EFI_GUID AfterLastBootGuid = AMITSE_AFTER_LAST_BOOT_OPTION_GUID;
+
+ SETUP_DEBUG_TSE ("\n[TSE] Entering BootFlowManageExit");
+ conditionPtr = VarGetNvramName( L"BootFlow", &_gBootFlowGuid, NULL, &size );
+ if ( conditionPtr != NULL )
+ condition = *conditionPtr;
+
+ MemFreePointer( (VOID **)&conditionPtr );
+
+ size =0;
+ conditionPtr = VarGetNvramName( L"TPMBootFlow", &_gTPMBootFlowGuid, NULL, &size );
+
+ if ( conditionPtr != NULL )
+ {
+ if(*conditionPtr != BOOT_FLOW_CONDITION_NORMAL)
+ condition = *conditionPtr;
+ }
+
+ MemFreePointer( (VOID **)&conditionPtr );
+
+ bootFlowPtr = gBootFlowTable;
+ for ( bootFlowPtr = gBootFlowTable;
+ bootFlowPtr->Condition != BOOT_FLOW_CONDITION_NULL; bootFlowPtr++ )
+ {
+ if ( condition != bootFlowPtr->Condition )
+ continue;
+ SETUP_DEBUG_TSE ("\n[TSE] BootFlow condition is %d", condition);
+
+ if ( bootFlowPtr->PageClass != 0 )
+ {
+ _BootFlowSetActivePage( bootFlowPtr );
+ _BootFlowSetActiveControl( bootFlowPtr );
+ Status = EFI_NOT_STARTED;
+ break;
+ }
+
+ if ( ! bootFlowPtr->InfiniteLoop )
+ Status = EFI_UNSUPPORTED;
+ else
+ Status = EFI_NOT_STARTED;
+
+ if (bootFlowPtr->LaunchShell)
+ {
+ LaunchSecondaryBootPath (gBootFileName); //EIP 88447
+ EfiLibNamedEventSignal (&AfterLastBootGuid); //EIP125219 notifying last boot
+ BootLaunchGuid (&gEfiShellFileGuid);
+ }
+ break;
+ }
+ SETUP_DEBUG_TSE ("\n[TSE] Exiting BootFlowManageExit");
+ return Status;
+}
+
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2011, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
diff --git a/Core/EM/AMITSE/bootflow.h b/Core/EM/AMITSE/bootflow.h
new file mode 100644
index 0000000..9a91189
--- /dev/null
+++ b/Core/EM/AMITSE/bootflow.h
@@ -0,0 +1,207 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2011, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+// $Archive: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/bootflow.h $
+//
+// $Author: Arunsb $
+//
+// $Revision: 15 $
+//
+// $Date: 10/18/12 5:31a $
+//
+//*****************************************************************//
+//*****************************************************************//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/bootflow.h $
+//
+// 15 10/18/12 5:31a Arunsb
+// Updated for 2.16.1235 QA submission
+//
+// 6 10/10/12 12:23p Arunsb
+// Synched the source for v2.16.1232 backup with Aptio
+//
+// 13 9/17/12 5:59a Rajashakerg
+// Updated EIP changes for 2.16 release.
+//
+// 11 8/29/12 12:32p Arunsb
+// [TAG] EIP93521
+// [Category] New Feature
+// [Description] Support of ESRT
+// [Files] amitse.sdl, bootflow.c, bootflow.h, commonhelper.c and
+// dobmpmgr.c
+//
+// 10 8/23/12 6:26p Arunsb
+// Reverted back 2.15.1229 for making GTSE, TSELite and BootOnly labels
+//
+// 9 8/21/12 7:54p Arunsb
+// [TAG] EIP93521
+// [Category] New Feature
+// [Description] Support of ESRT
+// [Files] amitse.sdl, bootflow.c, bootflow.h, commonhelper.c and
+// dobmpmgr.c
+//
+// 8 6/29/11 5:25a Arunsb
+// [TAG] EIP 62631
+// [Category] New Feature
+// [Description] Hot key boot option support in TSE as per UEFI spec.
+// section 3.1.6.
+// Added BOOT_FLOW_HOTKEY_BOOT bootflow option for
+// honoring the hot key boot.
+// [Files] AMITSE.sdl, bootflow.c, bootflow.h, CommonHelper.c,
+// commonoem.c, commonoem.h, boot.c,
+// hiistring20.c, hiistring21.c and notify.c.
+//
+// 7 6/20/11 3:45p Arunsb
+// [TAG] EIP57660
+// [Category] New Feature
+// [Description] Non-removable media boot behavior as described in UEFI
+// specification v 2.3.1, p. 3.4.1.
+// [Files] amitse.sdl, bootflow.c, bootflow.h, commonoem.c, boot.c
+// and protocol.c
+//
+// 6 6/10/11 2:39p Arunsb
+// [TAG] EIP57660
+// [Category] New Feature
+// [Description] Non-removable media boot behavior as described in UEFI
+// specification v 2.3.1, p. 3.4.1.2
+// [Files] boot.c, bootflow.c and bootflow.h
+//
+// 5 6/08/11 11:38p Arunsb
+// [TAG] EIP57650
+// [Category] New Feature
+// [Description] Support in TSE Out of resources boot flow option.
+// [Files] bootflow.c and bootflow.h
+//
+// 4 9/16/10 8:39p Madhans
+// Updated for TSE 2.10. Refer changelog.log for more deatils.
+//
+// 4 9/08/10 6:57a Mallikarjunanv
+// EIP-42080: TSE updates with respect to Fast Boot Support
+//
+// 3 4/13/10 5:12p Madhans
+// EIP: 37439 To support extended OEM Key support.
+//
+// 2 2/19/10 7:59a Mallikarjunanv
+// updated the year in copyright message
+//
+// 1 6/04/09 7:49p Madhans
+// AMI TSE Advanced.
+//
+// 1 4/28/09 10:49p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+// 1 4/28/09 10:24p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+// 2 1/30/09 6:06p Madhans
+// Function headers added.
+//
+//
+//*****************************************************************//
+//*****************************************************************//
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: bootflow.h
+//
+// Description: bootflow header
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+
+#ifndef _BOOTFLOW_H_
+#define _BOOTFLOW_H_
+
+/* EF152FB4-7B2F-427D-BDB4-7E0A05826E64 */
+#define BOOT_FLOW_VARIABLE_GUID \
+ { 0xEF152FB4, 0x7B2F, 0x427D, 0xBD, 0xB4, 0x7E, 0x0A, 0x05, 0x82, 0x6E, 0x64 }
+
+#define TPM_BOOT_FLOW_VARIABLE_GUID \
+ { 0xb6460a49, 0x0ac1, 0x484f, 0xae, 0x58, 0xf1, 0x6e, 0xb2, 0x39, 0xdb, 0x3d }
+
+#define BOOT_FLOW_CONDITION_NORMAL 0
+#define BOOT_FLOW_CONDITION_ERROR 1
+#define BOOT_FLOW_CONDITION_RECOVERY 2
+#define BOOT_FLOW_CONDITION_FIRST_BOOT 4
+
+#define BOOT_FLOW_CONDITION_OEM_KEY1 0x00001001
+#define BOOT_FLOW_CONDITION_OEM_KEY2 0x00001002
+#define BOOT_FLOW_CONDITION_OEM_KEY3 0x00001003
+#define BOOT_FLOW_CONDITION_OEM_KEY4 0x00001004
+#define BOOT_FLOW_CONDITION_OEM_KEY_CALLBACK 0x00001005
+#define BOOT_FLOW_CONDITION_NO_SETUP 5
+#define BOOT_FLOW_CONDITION_BBS_POPUP 6
+#define BOOT_FLOW_CONDITION_FAST_BOOT 7
+#define BOOT_FLOW_CONDITION_PCI_OUT_OF_RESOURCE 9
+#define BOOT_FLOW_HOTKEY_BOOT 0xA
+#define BOOT_FLOW_CONDITION_OS_UPD_CAP 0xB //EIP93521
+#define BOOT_FLOW_CONDITION_NULL 0xFFFFFFFF
+
+typedef struct _BOOT_FLOW BOOT_FLOW;
+
+typedef EFI_STATUS (*BOOT_FLOW_CALLBACK)( BOOT_FLOW * );
+
+struct _BOOT_FLOW
+{
+ UINT32 Condition;
+ UINT16 PageClass;
+ UINT16 PageSubClass;
+ UINT16 PageFormID;
+ UINT32 ControlNumber;
+ UINT16 MessageBoxToken;
+ UINT16 MessageBoxTimeout;
+ BOOLEAN GotoPageOnEntry;
+ BOOLEAN ProceedBooting;
+ BOOLEAN InfiniteLoop;
+ BOOLEAN LaunchShell;
+ BOOLEAN DoNotEnterSetup;
+ BOOT_FLOW_CALLBACK CallbackFunction;
+};
+
+EFI_STATUS BootFlowManageEntry( VOID );
+EFI_STATUS BootFlowManageExit( VOID );
+VOID _BootFlowShowMessageBox( BOOT_FLOW *bootFlowPtr );
+VOID _BootFlowSetActivePage( BOOT_FLOW *bootFlowPtr );
+VOID _BootFlowSetActiveControl( BOOT_FLOW *bootFlowPtr );
+
+EFI_STATUS OemKey1Hook ( BOOT_FLOW * );
+EFI_STATUS OemKey2Hook ( BOOT_FLOW * );
+EFI_STATUS OemKey3Hook ( BOOT_FLOW * );
+EFI_STATUS OemKey4Hook ( BOOT_FLOW * );
+EFI_STATUS DoPopup( BOOT_FLOW * );
+//EFI_STATUS DoPopupMenu( BOOT_FLOW * );
+//EFI_STATUS DoBootOnlyPopupMenu( BOOT_FLOW * );
+EFI_STATUS FBBootFlow (BOOT_FLOW *);
+EFI_STATUS LaunchHotKeyBootOption (BOOT_FLOW *);
+EFI_STATUS OsUpdateCapsuleWrap (BOOT_FLOW *BootFlow);
+
+#endif /* _BOOTFLOW_H_ */
+
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2011, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
diff --git a/Core/EM/AMITSE/changelog.log b/Core/EM/AMITSE/changelog.log
new file mode 100644
index 0000000..b4ce53f
--- /dev/null
+++ b/Core/EM/AMITSE/changelog.log
@@ -0,0 +1,1269 @@
+$/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+
+[TAG] EIP65320
+[Category] Improvement
+[Description] Board module hook for LoadImage failure.
+ OVERRIDE_UefiBootFailHook token added.
+[Files] amitse.sdl, commonhelper.c and boot.c
+
+[Files] AMITSE.sdl
+Minor version incremented for 2.14.1219 QA build
+
+[Files] AMITSE.sdl
+[TAG] EIP60910
+[Category] New Feature
+[Description] PNG image support in TSE.
+[Files] LogoLib.h, AMITSE.sdl, CommonHelper.c, logo.c, png.c, png.h, pnguncmp.c, TseAdvanced.cif
+
+[Files] AMITSE.mak
+Copyright version updated to 2011
+
+[Files] AMITSE.mak
+Updated for 2.14.1219 internal release.
+
+[Files] AMITSE.chm
+[TAG] EIP47086
+[Category] New Feature
+[Description] Right clicking from the Main page is not exiting from BIOS setup.
+[Files] minisetup.h, Ezport\style.h,Ezport\EzportBin.sdl, Ezport\EzportBin.mak, Ezport\ezport.c, Ezport\EzportBin.cif, EzportPlus\style.h, EzportPlus\EzportPlusBin.sdl, EzportPlusBin.mak, EzportPlus\EzportPlusBin.cif, EzportPlus\ezportplus.c, Legacy\style.h, Legacy\EzportPlusBin.sdl, Legacy\LegacyBin.mak, Legacy\LegacyBin.cif, Legacy\legacy.c, TseLiteBin.sdl, TseLite.cif, Memo.c, frame.c, application.h, application.c, commonoem.h, CommonHelper.c
+
+[Files] commonoem.h
+Removed the unwanted code for mouse hot click operation
+
+[TAG] EIP 63262
+[Category] Defect
+[Symptom] Setup page display problem on rose city.When SETUP_GROUP_DYNAMIC_PAGES is enabled and Network Stack is enabled, the "iSCSI" menu is listed as a dynamic page in advanced menu but only 3 of 4 "Port Configuration" pages shows up. The TSE dynamic page count is incorrect.
+[Solution] In the functions (RTIfrProcessRunTimeForms, HandleNewIFRPack, HandleRemoveIFRPack, HandleAddIFRPack), make sure the nvram cache is updated by callingVarUpdateVariable(VARIABLE_ID_DYNAMIC_PAGE_COUNT) when updating "DynamicPageCount" variable name. .
+[Files] Hii.c, Minisetup.h, Variable.h
+
+[TAG] EIP57661
+[Category] New Feature
+[Description] Drv health related variable declarations added to update the cache.
+[Files] notify.c, Uefi21Wapper.c and variable.h
+
+[TAG] EIP65320
+[Category] Improvement
+[Description] Board module hook for LoadImage failure
+[Files] amitse.sdl, commonhelper.c and boot.c
+
+[Files] CommonHelper.c
+Removed the unwanted function for mouse hot click operation
+
+[TAG] EIP62098
+[Description] HOTCLICK_FULLSCREEN_SUPPORT token added to disable the mouse hot click operations.
+[Files] Ezport\EzportBin.sdl
+
+[TAG] EIP62098
+[Description] NULL entry added in gHotClickInfo array in hotclickbin.c file so removed the NULL entry here.
+[Files] Ezport\EzportBin.sdl
+
+[Files] Ezport\EzportBin.sdl
+Updated with correct co-ordinates for helpframe hotclick with mouse
+
+[TAG] EIP62098
+[Description] NULL entry added in gHotClickInfo array for handling HOTCLICK_FULLSCREEN_SUPPORT=0.
+[Files] Ezport\HotclickBin.c and Legacy\HotclickBin.c
+
+[TAG] EIP62098
+[Description] HOTCLICK_FULLSCREEN_SUPPORT token added to disable the mouse hot click operations.
+[Files] Legacy\LegacyBin.sdl
+
+[TAG] EIP62098
+[Description] HOTCLICK_FULLSCREEN_SUPPORT token added for disabling mouse hot click operations.
+[Files] EzportPlus\EzportPlusBin.sdl
+
+[TAG] EIP62098
+[Description] NULL entry added in gHotClickInfo array for handling HOTCLICK_FULLSCREEN_SUPPORT=0
+[Files] EzportPlus\HotclickBin.c
+
+
+***************** TSEStyleLegacyx64.lib *****************
+User: Arunsb Date: 6/30/11 Time: 7:48p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/Legacy
+Comment:
+ Updated for 2.14.1218 internal release.
+
+***************** TSEStyleLegacy.lib *****************
+User: Arunsb Date: 6/30/11 Time: 7:47p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/Legacy
+Comment:
+ Updated for 2.14.1218 internal release.
+
+***************** Uefi20Localx64.lib *****************
+User: Arunsb Date: 6/30/11 Time: 7:47p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/uefi2.0
+Comment:
+ Updated for 2.14.1218 internal release.
+
+***************** Uefi20Local.lib *****************
+User: Arunsb Date: 6/30/11 Time: 7:47p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/uefi2.0
+Comment:
+ Updated for 2.14.1218 internal release.
+
+***************** TseStyleEzportPlusx64.lib *****************
+User: Arunsb Date: 6/30/11 Time: 6:59p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/EzportPlus
+Comment:
+ Updated for 2.14.1218 internal release.
+
+***************** TseStyleEzportPlus.lib *****************
+User: Arunsb Date: 6/30/11 Time: 6:58p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/EzportPlus
+Comment:
+ Updated for 2.14.1218 internal release.
+
+***************** TseStylex64.lib *****************
+User: Arunsb Date: 6/30/11 Time: 6:58p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/Ezport
+Comment:
+ Updated for 2.14.1218 internal release.
+
+***************** TseStyle.lib *****************
+User: Arunsb Date: 6/30/11 Time: 6:57p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/Ezport
+Comment:
+ Updated for 2.14.1218 internal release.
+
+***************** Uefi21Localx64.lib *****************
+User: Arunsb Date: 6/30/11 Time: 6:57p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/Uefi2.1
+Comment:
+ Updated for 2.14.1218 internal release.
+
+***************** Uefi21Local.lib *****************
+User: Arunsb Date: 6/30/11 Time: 6:56p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/Uefi2.1
+Comment:
+ Updated for 2.14.1218 internal release.
+
+***************** TseLiteLocalx64.lib *****************
+User: Arunsb Date: 6/30/11 Time: 6:56p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/TseLite
+Comment:
+ Updated for 2.14.1218 internal release.
+
+***************** TseLiteLocal.lib *****************
+User: Arunsb Date: 6/30/11 Time: 6:55p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/TseLite
+Comment:
+ Updated for 2.14.1218 internal release.
+
+***************** MiniSetupLocalx64.lib *****************
+User: Arunsb Date: 6/30/11 Time: 6:54p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/BootOnly
+Comment:
+ Updated for 2.14.1218 internal release.
+
+***************** MiniSetupLocal.lib *****************
+User: Arunsb Date: 6/30/11 Time: 6:54p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/BootOnly
+Comment:
+ Updated for 2.14.1218 internal release.
+
+***************** TseAdvancedx64.lib *****************
+User: Arunsb Date: 6/30/11 Time: 6:53p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/TseAdvanced
+Comment:
+ Updated for 2.14.1218 internal release.
+
+***************** TseAdvanced.lib *****************
+User: Arunsb Date: 6/30/11 Time: 6:53p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/TseAdvanced
+Comment:
+ Updated for 2.14.1218 internal release.
+
+***************** AMITSE.sdl *****************
+User: Arunsb Date: 6/30/11 Time: 1:01p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ HONOR_DRVHLTH_CONFIGREQD_ON_BOOTFAIL token defaultly disabled.
+
+***************** CommonHelper.c *****************
+User: Arunsb Date: 6/30/11 Time: 11:52a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ EDKVersion_1_05_RetrieveData wrapper function added to return the
+EDK_1_05_RETRIEVE_DATA token value.
+
+***************** AMITSE.sdl *****************
+User: Arunsb Date: 6/30/11 Time: 11:51a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ EDK_1_05_RETRIEVE_DATA token added and it is removed from
+uefi21.sdl.
+Minor version and build version incremented for 2.14.1218 release
+
+***************** EzportPlusBin.sdl *****************
+User: Rajashakerg Date: 6/30/11 Time: 5:09a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/EzportPlus
+Comment:
+ Removed extra TABs
+
+***************** AMITSE.cif *****************
+User: Arunsb Date: 6/30/11 Time: 4:10a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP57661
+[Category] New Feature
+[Description] Boot manager algorithm for interaction with Driver Health
+protocol.
+ TseDrvHealth.h file added.
+[Files] amitse.cif, amitse.sdl, faketokens.c, amitsestr.uni,
+ commonhelper.c, uefisetup.ini, tsedrvhealth.h, amivfr.h,
+minisetupbin.mak,
+ hiistring21.c, hiistring20.c, tseadvanced.c, special.c,
+special.h, boot.h, minisetup.h,
+ uefi20wapper.c, formbrowser2.c, hii.c, parse.c and
+uefi21wapper.c.
+
+***************** hiistring20.c *****************
+User: Arunsb Date: 6/30/11 Time: 4:09a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/BootOnly
+Comment:
+
+
+***************** hiistring21.c *****************
+User: Arunsb Date: 6/30/11 Time: 4:08a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/BootOnly
+Comment:
+ [TAG] EIP57661
+[Category] New Feature
+[Description] Boot manager algorithm for interaction with Driver Health
+protocol.
+ Boot device repair operation related functions added.
+[Files] amitse.cif, amitse.sdl, faketokens.c, amitsestr.uni,
+ commonhelper.c, uefisetup.ini, tsedrvhealth.h, amivfr.h,
+minisetupbin.mak,
+ hiistring21.c, hiistring20.c, tseadvanced.c, special.c,
+special.h, boot.h, minisetup.h,
+ uefi20wapper.c, formbrowser2.c, hii.c, parse.c and
+uefi21wapper.c.
+
+***************** MiniSetupBin.mak *****************
+User: Arunsb Date: 6/30/11 Time: 4:07a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/BootOnly
+Comment:
+ [TAG] EIP57661
+[Category] New Feature
+[Description] Boot manager algorithm for interaction with Driver Health
+protocol.
+ Include directories added.
+[Files] amitse.cif, amitse.sdl, faketokens.c, amitsestr.uni,
+ commonhelper.c, uefisetup.ini, tsedrvhealth.h, amivfr.h,
+minisetupbin.mak,
+ hiistring21.c, hiistring20.c, tseadvanced.c, special.c,
+special.h, boot.h, minisetup.h,
+ uefi20wapper.c, formbrowser2.c, hii.c, parse.c and
+uefi21wapper.c.
+
+***************** AMIVfr.h *****************
+User: Arunsb Date: 6/30/11 Time: 4:06a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/Include
+Comment:
+ [TAG] EIP57661
+[Category] New Feature
+[Description] Boot manager algorithm for interaction with Driver Health
+protocol.
+ Added driver health structures for vfr.
+[Files] amitse.cif, amitse.sdl, faketokens.c, amitsestr.uni,
+ commonhelper.c, uefisetup.ini, tsedrvhealth.h, amivfr.h,
+minisetupbin.mak,
+ hiistring21.c, hiistring20.c, tseadvanced.c, special.c,
+special.h, boot.h, minisetup.h,
+ uefi20wapper.c, formbrowser2.c, hii.c, parse.c and
+uefi21wapper.c.
+
+***************** Version 64 *****************
+User: Arunsb Date: 6/30/11 Time: 4:04a
+Added TseDrvHealth.h
+
+***************** Uefisetup.ini *****************
+User: Arunsb Date: 6/30/11 Time: 4:01a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP57661
+[Category] New Feature
+[Description] Boot manager algorithm for interaction with Driver Health
+protocol.
+ Driver health related variables and guids added.
+[Files] amitse.cif, amitse.sdl, faketokens.c, amitsestr.uni,
+ commonhelper.c, uefisetup.ini, tsedrvhealth.h, amivfr.h,
+minisetupbin.mak,
+ hiistring21.c, hiistring20.c, tseadvanced.c, special.c,
+special.h, boot.h, minisetup.h,
+ uefi20wapper.c, formbrowser2.c, hii.c, parse.c and
+uefi21wapper.c.
+
+***************** CommonHelper.c *****************
+User: Arunsb Date: 6/30/11 Time: 4:00a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP57661
+[Category] New Feature
+[Description] Boot manager algorithm for interaction with Driver Health
+protocol.
+ Wrapper functions added.
+ Added board module hook to perform rebooting the system.
+[Files] amitse.cif, amitse.sdl, faketokens.c, amitsestr.uni,
+ commonhelper.c, uefisetup.ini, tsedrvhealth.h, amivfr.h,
+minisetupbin.mak,
+ hiistring21.c, hiistring20.c, tseadvanced.c, special.c,
+special.h, boot.h, minisetup.h,
+ uefi20wapper.c, formbrowser2.c, hii.c, parse.c and
+uefi21wapper.c.
+
+***************** AmiTSEStr.uni *****************
+User: Arunsb Date: 6/30/11 Time: 3:58a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP57661
+[Category] New Feature
+[Description] Boot manager algorithm for interaction with Driver Health
+protocol.
+ Driver health related strings added.
+[Files] amitse.cif, amitse.sdl, faketokens.c, amitsestr.uni,
+ commonhelper.c, uefisetup.ini, tsedrvhealth.h, amivfr.h,
+minisetupbin.mak,
+ hiistring21.c, hiistring20.c, tseadvanced.c, special.c,
+special.h, boot.h, minisetup.h,
+ uefi20wapper.c, formbrowser2.c, hii.c, parse.c and
+uefi21wapper.c.
+
+***************** FakeTokens.c *****************
+User: Arunsb Date: 6/30/11 Time: 3:57a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP57661
+[Category] New Feature
+[Description] Boot manager algorithm for interaction with Driver Health
+protocol.
+ Driver health related string tokens added.
+[Files] amitse.cif, amitse.sdl, faketokens.c, amitsestr.uni,
+ commonhelper.c, uefisetup.ini, tsedrvhealth.h, amivfr.h,
+minisetupbin.mak,
+ hiistring21.c, hiistring20.c, tseadvanced.c, special.c,
+special.h, boot.h, minisetup.h,
+ uefi20wapper.c, formbrowser2.c, hii.c, parse.c and
+uefi21wapper.c.
+
+***************** commonoem.c *****************
+User: Arunsb Date: 6/30/11 Time: 3:55a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ Unused BootOption variable removed.
+
+***************** AMITSE.sdl *****************
+User: Arunsb Date: 6/30/11 Time: 3:54a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP57661
+[Category] New Feature
+[Description] Boot manager algorithm for interaction with Driver Health
+protocol.
+The following tokens added
+DRIVER_HEALTH_SUPPORT
+HONOR_DRVHLTH_CONFIGREQD_ON_BOOTFAIL
+OVERRIDE_DriverHealthSystemReset
+[Files] amitse.cif, amitse.sdl, commonoem.c, faketokens.c, amitsestr.uni,
+commonhelper.c, uefisetup.ini, tsedrvhealth.h, amivfr.h, minisetupbin.mak,
+hiistring21.c, hiistring20.c, tseadvanced.c, special.c, special.h, boot.h,
+minisetup.h, uefi20wapper.c, formbrowser2.c,
+hii.c, parse.c and uefi21wapper.c.
+
+***************** CommonHelper.c *****************
+User: Rajashakerg Date: 6/29/11 Time: 4:35p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ Updated for Help frame scroll changes
+
+***************** commonoem.c *****************
+User: Arunsb Date: 6/29/11 Time: 2:06p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ EIP 62631 gHotKeyBootOption declaration moved to commonhelper.c
+
+***************** CommonHelper.c *****************
+User: Arunsb Date: 6/29/11 Time: 2:01p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ gHotKeyBootOption declaration added and the same is removed in
+commonoem.c file.
+
+***************** CommonHelper.c *****************
+User: Rajashakerg Date: 6/29/11 Time: 1:32p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP47086
+[Category] New Feature
+[Description] Right clicking from the Main page is not exiting from BIOS
+setup.
+
+[Files] minisetup.h, Ezport\style.h,Ezport\EzportBin.sdl,
+Ezport\EzportBin.mak, Ezport\ezport.c, Ezport\EzportBin.cif, EzportPlus\style.h,
+EzportPlus\EzportPlusBin.sdl, EzportPlusBin.mak, EzportPlus\EzportPlusBin.cif,
+EzportPlus\ezportplus.c, Legacy\style.h, Legacy\EzportPlusBin.sdl,
+Legacy\LegacyBin.mak, Legacy\LegacyBin.cif, Legacy\legacy.c, TseLiteBin.sdl,
+TseLite.cif, Memo.c, frame.c, application.h, application.c, commonoem.h,
+CommonHelper.c
+
+***************** commonoem.h *****************
+User: Rajashakerg Date: 6/29/11 Time: 1:03p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP47086
+[Category] New Feature
+[Description] Right clicking from the Main page is not exiting from BIOS
+setup.
+
+[Files] minisetup.h, Ezport\style.h,Ezport\EzportBin.sdl,
+Ezport\EzportBin.mak, Ezport\ezport.c, Ezport\EzportBin.cif, EzportPlus\style.h,
+EzportPlus\EzportPlusBin.sdl, EzportPlusBin.mak, EzportPlus\EzportPlusBin.cif,
+EzportPlus\ezportplus.c, Legacy\style.h, Legacy\EzportPlusBin.sdl,
+Legacy\LegacyBin.mak, Legacy\LegacyBin.cif, Legacy\legacy.c, TseLiteBin.sdl,
+TseLite.cif, Memo.c, frame.c, application.h, application.c, commonoem.h,
+CommonHelper.c
+
+***************** TseLiteBin.sdl *****************
+User: Rajashakerg Date: 6/29/11 Time: 12:59p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/TseLite
+Comment:
+ [TAG] EIP47086
+[Category] New Feature
+[Description] Right clicking from the Main page is not exiting from BIOS
+setup.
+
+[Files] minisetup.h, Ezport\style.h,Ezport\EzportBin.sdl,
+Ezport\EzportBin.mak, Ezport\ezport.c, Ezport\EzportBin.cif, EzportPlus\style.h,
+EzportPlus\EzportPlusBin.sdl, EzportPlusBin.mak, EzportPlus\EzportPlusBin.cif,
+EzportPlus\ezportplus.c, Legacy\style.h, Legacy\EzportPlusBin.sdl,
+Legacy\LegacyBin.mak, Legacy\LegacyBin.cif, Legacy\legacy.c, TseLiteBin.sdl,
+TseLite.cif, Memo.c, frame.c, application.h, application.c, commonoem.h,
+CommonHelper.c
+
+***************** LegacyBin.mak *****************
+User: Rajashakerg Date: 6/29/11 Time: 12:46p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/Legacy
+Comment:
+ [TAG] EIP47086
+[Category] New Feature
+[Description] Right clicking from the Main page is not exiting from BIOS
+setup.
+
+[Files] minisetup.h, Ezport\style.h,Ezport\EzportBin.sdl,
+Ezport\EzportBin.mak, Ezport\ezport.c, Ezport\EzportBin.cif, EzportPlus\style.h,
+EzportPlus\EzportPlusBin.sdl, EzportPlusBin.mak, EzportPlus\EzportPlusBin.cif,
+EzportPlus\ezportplus.c, Legacy\style.h, Legacy\EzportPlusBin.sdl,
+Legacy\LegacyBin.mak, Legacy\LegacyBin.cif, Legacy\legacy.c, TseLiteBin.sdl,
+TseLite.cif, Memo.c, frame.c, application.h, application.c, commonoem.h,
+CommonHelper.c
+
+***************** LegacyBin.sdl *****************
+User: Rajashakerg Date: 6/29/11 Time: 12:45p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/Legacy
+Comment:
+ [TAG] EIP47086
+[Category] New Feature
+[Description] Right clicking from the Main page is not exiting from BIOS
+setup.
+
+[Files] minisetup.h, Ezport\style.h,Ezport\EzportBin.sdl,
+Ezport\EzportBin.mak, Ezport\ezport.c, Ezport\EzportBin.cif, EzportPlus\style.h,
+EzportPlus\EzportPlusBin.sdl, EzportPlusBin.mak, EzportPlus\EzportPlusBin.cif,
+EzportPlus\ezportplus.c, Legacy\style.h, Legacy\EzportPlusBin.sdl,
+Legacy\LegacyBin.mak, Legacy\LegacyBin.cif, Legacy\legacy.c, TseLiteBin.sdl,
+TseLite.cif, Memo.c, frame.c, application.h, application.c, commonoem.h,
+CommonHelper.c
+
+***************** EzportPlusBin.mak *****************
+User: Rajashakerg Date: 6/29/11 Time: 12:39p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/EzportPlus
+Comment:
+ [TAG] EIP47086
+[Category] New Feature
+[Description] Right clicking from the Main page is not exiting from BIOS
+setup.
+
+[Files] minisetup.h, Ezport\style.h,Ezport\EzportBin.sdl,
+Ezport\EzportBin.mak, Ezport\ezport.c, Ezport\EzportBin.cif, EzportPlus\style.h,
+EzportPlus\EzportPlusBin.sdl, EzportPlusBin.mak, EzportPlus\EzportPlusBin.cif,
+EzportPlus\ezportplus.c, Legacy\style.h, Legacy\EzportPlusBin.sdl,
+Legacy\LegacyBin.mak, Legacy\LegacyBin.cif, Legacy\legacy.c, TseLiteBin.sdl,
+TseLite.cif, Memo.c, frame.c, application.h, application.c, commonoem.h,
+CommonHelper.c
+
+***************** EzportPlusBin.sdl *****************
+User: Rajashakerg Date: 6/29/11 Time: 12:38p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/EzportPlus
+Comment:
+ [TAG] EIP47086
+[Category] New Feature
+[Description] Right clicking from the Main page is not exiting from BIOS
+setup.
+
+[Files] minisetup.h, Ezport\style.h,Ezport\EzportBin.sdl,
+Ezport\EzportBin.mak, Ezport\ezport.c, Ezport\EzportBin.cif, EzportPlus\style.h,
+EzportPlus\EzportPlusBin.sdl, EzportPlusBin.mak, EzportPlus\EzportPlusBin.cif,
+EzportPlus\ezportplus.c, Legacy\style.h, Legacy\EzportPlusBin.sdl,
+Legacy\LegacyBin.mak, Legacy\LegacyBin.cif, Legacy\legacy.c, TseLiteBin.sdl,
+TseLite.cif, Memo.c, frame.c, application.h, application.c, commonoem.h,
+CommonHelper.c
+
+***************** EzportBin.mak *****************
+User: Rajashakerg Date: 6/29/11 Time: 12:30p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/Ezport
+Comment:
+ [TAG] EIP47086
+[Category] New Feature
+[Description] Right clicking from the Main page is not exiting from BIOS
+setup.
+
+[Files] minisetup.h, Ezport\style.h,Ezport\EzportBin.sdl,
+Ezport\EzportBin.mak, Ezport\ezport.c, Ezport\EzportBin.cif, EzportPlus\style.h,
+EzportPlus\EzportPlusBin.sdl, EzportPlusBin.mak, EzportPlus\EzportPlusBin.cif,
+EzportPlus\ezportplus.c, Legacy\style.h, Legacy\EzportPlusBin.sdl,
+Legacy\LegacyBin.mak, Legacy\LegacyBin.cif, Legacy\legacy.c, TseLiteBin.sdl,
+TseLite.cif, Memo.c, frame.c, application.h, application.c, commonoem.h,
+CommonHelper.c
+
+***************** EzportBin.sdl *****************
+User: Rajashakerg Date: 6/29/11 Time: 12:29p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/Ezport
+Comment:
+ [TAG] EIP47086
+[Category] New Feature
+[Description] Right clicking from the Main page is not exiting from BIOS
+setup.
+
+[Files] minisetup.h, Ezport\style.h,Ezport\EzportBin.sdl,
+Ezport\EzportBin.mak, Ezport\ezport.c, Ezport\EzportBin.cif, EzportPlus\style.h,
+EzportPlus\EzportPlusBin.sdl, EzportPlusBin.mak, EzportPlus\EzportPlusBin.cif,
+EzportPlus\ezportplus.c, Legacy\style.h, Legacy\EzportPlusBin.sdl,
+Legacy\LegacyBin.mak, Legacy\LegacyBin.cif, Legacy\legacy.c, TseLiteBin.sdl,
+TseLite.cif, Memo.c, frame.c, application.h, application.c, commonoem.h,
+CommonHelper.c
+
+***************** LegacyBin.cif *****************
+User: Rajashakerg Date: 6/29/11 Time: 12:00p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/Legacy
+Comment:
+
+
+***************** Legacy *****************
+User: Rajashakerg Date: 6/29/11 Time: 11:58a
+Added HotclickBin.c
+
+***************** Legacy *****************
+User: Rajashakerg Date: 6/29/11 Time: 11:58a
+Added HotclickBin.h
+
+***************** EzportPlusBin.cif *****************
+User: Rajashakerg Date: 6/29/11 Time: 11:54a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/EzportPlus
+Comment:
+
+
+***************** EzportPlus *****************
+User: Rajashakerg Date: 6/29/11 Time: 11:52a
+Added HotclickBin.c
+
+***************** EzportPlus *****************
+User: Rajashakerg Date: 6/29/11 Time: 11:52a
+Added HotclickBin.h
+
+***************** EzportBin.cif *****************
+User: Rajashakerg Date: 6/29/11 Time: 11:47a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/Ezport
+Comment:
+
+
+***************** hiistring21.c *****************
+User: Arunsb Date: 6/29/11 Time: 6:24a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/BootOnly
+Comment:
+ [TAG] EIP 62631
+[Category] New Feature
+[Description] Hot key boot option support in TSE as per UEFI spec. section
+3.1.6.
+[Files] AMITSE.sdl, bootflow.c, bootflow.h, CommonHelper.c, commonoem.c,
+commonoem.h, boot.c,
+ hiistring20.c, hiistring21.c and notify.c.
+
+***************** hiistring20.c *****************
+User: Arunsb Date: 6/29/11 Time: 6:17a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/BootOnly
+Comment:
+ [TAG] EIP 62631
+[Category] New Feature
+[Description] Hot key boot option support in TSE as per UEFI spec. section
+3.1.6.
+ Dummy functions added.
+[Files] AMITSE.sdl, bootflow.c, bootflow.h, CommonHelper.c, commonoem.c,
+commonoem.h, boot.c,
+ hiistring20.c, hiistring21.c and notify.c.
+
+***************** commonoem.c *****************
+User: Arunsb Date: 6/29/11 Time: 6:03a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP 62631
+[Category] New Feature
+[Description] Hot key boot option support in TSE as per UEFI spec. section
+3.1.6.
+ CheckAdvShiftState function moved from commonoem.c to here.
+ BootLaunchBootOption removed in checkforkey function to avoid
+TPL problem.
+[Files] AMITSE.sdl, bootflow.c, bootflow.h, CommonHelper.c, commonoem.c,
+commonoem.h, boot.c,
+ hiistring20.c, hiistring21.c and notify.c.
+
+***************** CommonHelper.c *****************
+User: Arunsb Date: 6/29/11 Time: 5:50a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP 62631
+[Category] New Feature
+[Description] Hot key boot option support in TSE as per UEFI spec. section
+3.1.6.
+ CheckAdvShiftState function moved from commonoem.c to here.
+ LaunchHotKeyBootOption function added to launch hot key boot
+device.
+[Files] AMITSE.sdl, bootflow.c, bootflow.h, CommonHelper.c, commonoem.c,
+commonoem.h, boot.c,
+ hiistring20.c, hiistring21.c and notify.c.
+
+***************** bootflow.c *****************
+User: Arunsb Date: 6/29/11 Time: 5:37a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP 62631
+[Category] New Feature
+[Description] Hot key boot option support in TSE as per UEFI spec. section
+3.1.6.
+ Added BOOT_FLOW_HOTKEY_BOOT bootflow option in BOOT_FLOW.
+[Files] AMITSE.sdl, bootflow.c, bootflow.h, CommonHelper.c, commonoem.c,
+commonoem.h, boot.c,
+ hiistring20.c, hiistring21.c and notify.c.
+
+***************** bootflow.h *****************
+User: Arunsb Date: 6/29/11 Time: 5:25a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP 62631
+[Category] New Feature
+[Description] Hot key boot option support in TSE as per UEFI spec. section
+3.1.6.
+ Added BOOT_FLOW_HOTKEY_BOOT bootflow option for honoring the hot
+key boot.
+[Files] AMITSE.sdl, bootflow.c, bootflow.h, CommonHelper.c, commonoem.c,
+commonoem.h, boot.c,
+ hiistring20.c, hiistring21.c and notify.c.
+
+***************** Ezport *****************
+User: Rajashakerg Date: 6/29/11 Time: 5:18a
+Added HotclickBin.c
+
+***************** Ezport *****************
+User: Rajashakerg Date: 6/29/11 Time: 5:18a
+Added HotclickBin.h
+
+***************** AMITSE.sdl *****************
+User: Arunsb Date: 6/28/11 Time: 8:19p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP 62631
+[Category] New Feature
+[Description] Hot key boot option in TSE as per UEFI spec. section 3.1.6.
+ OVERRIDE_LaunchHotKeyBootOption function added for hot key boot
+option.
+[Files] AMITSE.sdl, bootflow.c, bootflow.h, CommonHelper.c, commonoem.c,
+commonoem.h, boot.c,
+ hiistring20.c, hiistring21.c and notify.c
+
+***************** commonoem.c *****************
+User: Arunsb Date: 6/23/11 Time: 8:29p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP62466
+[Category] Improvement
+[Description] Trace message support in commonoem.c.
+Included amidxelib.h file.
+[Files] commonoem.c
+
+***************** AMITSE.sdl *****************
+User: Arunsb Date: 6/23/11 Time: 8:02p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ Removed the unwanted tokens
+
+***************** bootflow.c *****************
+User: Arunsb Date: 6/23/11 Time: 7:41p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP57660
+[Category] New Feature
+[Description] Non-removable media boot behavior as described in UEFI
+ specification v 2.3.1, p. 3.4.1.
+ Checks for the setup key if no boot options avail
+ or not succedded to boot. If setup key pressed launches the
+setup.
+ If no boot option avail then inserting thumb drive with image
+efi\boot\bootxxxx.efi TSE will launch that image.
+[Files] amitse.sdl, bootflow.c and protocol.c
+
+***************** AMITSE.sdl *****************
+User: Arunsb Date: 6/23/11 Time: 7:40p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+
+
+***************** AMITSE.sdl *****************
+User: Rajashakerg Date: 6/23/11 Time: 3:40p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP55762, 58925, 59971
+[Category] New Feature
+[Description] Support REF2,REF3 and REF4 in AMITSE
+Support direct form navigation path
+Improper layout of controls in the root page when Dynamic pages are added using
+the Legacy Setup Style
+
+[Files] setupdata.h, CommonHelper.c, AMITSE.sdl, Legacy\Legacy.c,
+Legacy\style.h, Legacy\style.h, frame.c, minisetupext.c, minisetupext.h,
+numeric.c, page.c Popupstring.c, Hii.c, Uefi21Wrapper.c, Parse.c Hii.c
+
+***************** CommonHelper.c *****************
+User: Rajashakerg Date: 6/23/11 Time: 3:39p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP55762, 58925, 59971
+[Category] New Feature
+[Description] Support REF2,REF3 and REF4 in AMITSE
+Support direct form navigation path
+Improper layout of controls in the root page when Dynamic pages are added using
+the Legacy Setup Style
+[Files] setupdata.h, CommonHelper.c, AMITSE.sdl, Legacy\Legacy.c,
+Legacy\style.h, Legacy\style.h, frame.c, minisetupext.c, minisetupext.h,
+numeric.c, page.c Popupstring.c, Hii.c, Uefi21Wrapper.c, Parse.c Hii.c
+
+***************** setupdata.h *****************
+User: Rajashakerg Date: 6/23/11 Time: 3:38p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/Inc
+Comment:
+ [TAG] EIP55762, 58925, 59971
+[Category] New Feature
+[Description] Support REF2,REF3 and REF4 in AMITSE
+Support direct form navigation path
+Improper layout of controls in the root page when Dynamic pages are added using
+the Legacy Setup Style
+[Files] setupdata.h, CommonHelper.c, AMITSE.sdl, Legacy\Legacy.c,
+Legacy\style.h, Legacy\style.h, frame.c, minisetupext.c, minisetupext.h,
+numeric.c, page.c Popupstring.c, Hii.c, Uefi21Wrapper.c, Parse.c Hii.c
+
+***************** CommonHelper.c *****************
+User: Rajashakerg Date: 6/23/11 Time: 5:30a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP63073
+[Category] New Feature
+[Description] Source modules in TSE should get the version details from binary
+in run time not at build time
+[Files] CommonHelper.c, minisetupext.c, notify.c, Ezport\style.c,
+EzportPlus\style.c, Legacy\style.c
+
+***************** hiistring21.c *****************
+User: Arunsb Date: 6/22/11 Time: 2:45p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/BootOnly
+Comment:
+ [TAG] EIP 62631
+[Category] New Feature
+[Description] Support for Hot key boot option in TSE as per UEFI spec. section
+3.1.6.
+[Files] AMITSE.sdl, CommonHelper.c, commonoem.c, commonoem.h, boot.c,
+hiistring20.c and hiistring21.c.
+
+***************** hiistring20.c *****************
+User: Arunsb Date: 6/22/11 Time: 2:21p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/BootOnly
+Comment:
+ [TAG] EIP 62631
+[Category] New Feature
+[Description] Hot key boot option in TSE as per UEFI spec. section 3.1.6.
+ Dummy FormHotBootKeys function added
+[Files] AMITSE.sdl, CommonHelper.c, commonoem.c, commonoem.h, boot.c,
+hiistring20.c and hiistring21.c.
+
+***************** LogoLib.h *****************
+User: Premkumara Date: 6/22/11 Time: 9:17a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/Inc
+Comment:
+ [TAG] EIP60048
+[Category] Improvement
+[Description] TSE should Change the System Resolution according to the Quite
+Logo Size
+[Files] CommonHelper.c, AMITSE.sdl, Logo.c, LogoLib.h
+
+***************** AMITSE.sdl *****************
+User: Premkumara Date: 6/22/11 Time: 9:13a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP60048
+[Category] Improvement
+[Description] TSE should Change the System Resolution according to the Quite
+Logo Size
+[Files] CommonHelper.c, AMITSE.sdl, Logo.c, LogoLib.h
+
+***************** CommonHelper.c *****************
+User: Premkumara Date: 6/22/11 Time: 9:08a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP60048
+[Category] Improvement
+[Description] TSE should Change the System Resolution according to the Quite
+Logo Size
+[Files] CommonHelper.c, AMITSE.sdl, Logo.c, LogoLib.h
+
+***************** commonoem.h *****************
+User: Arunsb Date: 6/22/11 Time: 7:18a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP 62631, 60128
+[Category] New Feature
+[Description] Hot key boot option in TSE as per UEFI spec. section 3.1.6.
+ TSE_CHECK_SHIFTSTATE macro redefined to CheckAdvShiftState
+[Files] AMITSE.sdl, CommonHelper.c, commonoem.c, commonoem.h, boot.c,
+hiistring20.c and hiistring21.c.
+
+***************** commonoem.c *****************
+User: Arunsb Date: 6/22/11 Time: 7:10a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP 62631, 60128
+[Category] New Feature
+[Description] Hot key boot option in TSE as per UEFI spec. section 3.1.6.
+ Hot key checked.
+ CheckAdvShiftState function added to handle special case like
+Ctrl+Alt+F6.
+ TSE_CHECK_SHIFTSTATE added for checking special key to launch
+setup.
+[Files] AMITSE.sdl, CommonHelper.c, commonoem.c, commonoem.h, boot.c,
+hiistring20.c and hiistring21.c.
+
+***************** CommonHelper.c *****************
+User: Arunsb Date: 6/22/11 Time: 6:54a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP62631
+[Category] New Feature
+[Description] Hot key boot option in TSE as per UEFI spec. section 3.1.6
+[Files] AMITSE.sdl, CommonHelper.c, commonoem.c, commonoem.h,
+boot.c, hiistring20.c and hiistring21.c.
+
+***************** AMITSE.sdl *****************
+User: Arunsb Date: 6/22/11 Time: 6:49a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP62631
+[Category] New Feature
+[Description] Hot key boot option in TSE as per UEFI spec. section 3.1.6
+[Files] AMITSE.sdl, CommonHelper.c, commonoem.c, commonoem.h, boot.c,
+hiistring20.c and hiistring21.c.
+
+***************** commonoem.c *****************
+User: Arunsb Date: 6/20/11 Time: 3:50p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP57660
+[Category] New Feature
+[Description] Non-removable media boot behavior as described in UEFI
+specification v 2.3.1, p. 3.4.1.
+ Added CheckForSetupKey function to check setup key
+pressed.
+[Files] amitse.sdl, bootflow.c, bootflow.h, commonoem.c, boot.c and
+protocol.c
+
+***************** bootflow.h *****************
+User: Arunsb Date: 6/20/11 Time: 3:45p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP57660
+[Category] New Feature
+[Description] Non-removable media boot behavior as described in UEFI
+specification v 2.3.1, p. 3.4.1.
+[Files] amitse.sdl, bootflow.c, bootflow.h, commonoem.c, boot.c and
+protocol.c
+
+***************** bootflow.c *****************
+User: Arunsb Date: 6/20/11 Time: 3:43p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP57660
+[Category] New Feature
+[Description] Non-removable media boot behavior as described in UEFI
+specification v 2.3.1, p. 3.4.1.
+ If BOOT_FLOW's LaunchShell param sets to
+BOOTFLOW_EXIT_LAUNCH_DEFAULT_BOOTIMAGE then TSE tries to load the
+ efi/boot/bootxxxx.efi from any of the file system.
+ If BOOT_FLOW's InfiniteLoop param sets to
+BOOTFLOW_EXIT_INFINITE_LOOP_LAUNCH_SETUP then TSE tried to enter the setup
+ if no boot option present or succeeded to boot. Enters to setup
+only when setup key detected after boot options failure occurs.
+[Files] amitse.sdl, bootflow.c, bootflow.h, commonoem.c, boot.c and
+protocol.c
+
+***************** AMITSE.sdl *****************
+User: Arunsb Date: 6/20/11 Time: 3:37p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP57660
+[Category] New Feature
+[Description] Non-removable media boot behavior as described in UEFI
+specification v 2.3.1, p. 3.4.1
+[Files] amitse.sdl, bootflow.c, bootflow.h, commonoem.c, boot.c and
+protocol.c
+
+***************** CommonHelper.c *****************
+User: Rajashakerg Date: 6/20/11 Time: 11:41a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP59417
+[Category] New Feature
+[Description] Spport LOAD_OPTION_HIDDEN option in TSE
+[Files] boot.h, AMITSE.sdl, CommonHelper.c, bbs.c, boot.c, minisetup.h,
+special.c, callback.c
+
+***************** AMITSE.sdl *****************
+User: Rajashakerg Date: 6/20/11 Time: 11:39a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP59417
+[Category] New Feature
+[Description] Spport LOAD_OPTION_HIDDEN option in TSE
+[Files] boot.h, AMITSE.sdl, CommonHelper.c, bbs.c, boot.c, minisetup.h,
+special.c, callback.c
+
+***************** boot.h *****************
+User: Rajashakerg Date: 6/20/11 Time: 11:38a
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/Inc
+Comment:
+ [TAG] EIP59417
+[Category] New Feature
+[Description] Spport LOAD_OPTION_HIDDEN option in TSE
+[Files] boot.h, AMITSE.sdl, CommonHelper.c, bbs.c, boot.c, minisetup.h,
+special.c, callback.c
+
+***************** CommonHelper.c *****************
+User: Arunsb Date: 6/19/11 Time: 4:13p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP58712
+[Category] New Feature
+[Description] To disable the BIOS Signon Message and TSE copyright version in
+post screen.
+[Files] amitse.sdl, amitse.mak, commonhelper.c and notify.c
+
+***************** AMITSE.sdl *****************
+User: Arunsb Date: 6/19/11 Time: 4:10p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP58712
+[Category] New Feature
+[Description] To disable the BIOS Signon Message and TSE copyright version in
+post screen.
+[Files] amitse.sdl, amitse.mak, commonhelper.c and notify.c
+
+***************** AMITSE.mak *****************
+User: Arunsb Date: 6/19/11 Time: 4:07p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP58712
+[Category] New Feature
+[Description] To disable the BIOS Signon Message and TSE copyright version in
+post screen.
+[Files] amitse.sdl, amitse.mak, commonhelper.c and notify.c
+
+***************** UefiHpkTool.exe *****************
+User: Arunsb Date: 6/15/11 Time: 4:49p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP61650
+[Category] Bug Fix
+[Severity] Minor
+[Symptom] Cannot edit time field when using new "time" format
+[RootCause] Default refresh interval set to all the time variables
+[Solution] Default refresh interval provided only for RTC time variable
+[Files] time.c, date.c, parse.c and uefihpktool.exe
+
+***************** CommonHelper.c *****************
+User: Rajashakerg Date: 6/13/11 Time: 12:37p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP60910
+[Category] New Feature
+[Description] PNG image support in TSE.
+[Files] LogoLib.h, AMITSE.sdl, CommonHelper.c, logo.c, png.c, png.h,
+pnguncmp.c, TseAdvanced.cif
+
+***************** AMITSE.sdl *****************
+User: Rajashakerg Date: 6/13/11 Time: 12:36p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP60910
+[Category] New Feature
+[Description] PNG image support in TSE.
+[Files] LogoLib.h, AMITSE.sdl, CommonHelper.c, logo.c, png.c, png.h,
+pnguncmp.c, TseAdvanced.cif
+
+***************** LogoLib.h *****************
+User: Rajashakerg Date: 6/13/11 Time: 12:29p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/Inc
+Comment:
+ [TAG] EIP60910
+[Category] New Feature
+[Description] PNG image support in TSE.
+[Files] LogoLib.h, AMITSE.sdl, CommonHelper.c, logo.c, png.c, png.h,
+pnguncmp.c, TseAdvanced.cif
+
+***************** AMITSE.sdl *****************
+User: Arunsb Date: 6/10/11 Time: 2:40p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP57660
+[Category] New Feature
+[Description] Non-removable media boot behavior as described in UEFI
+specification v 2.3.1, p. 3.4.1.2
+[Files] boot.c, bootflow.c and bootflow.h
+
+***************** bootflow.h *****************
+User: Arunsb Date: 6/10/11 Time: 2:39p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP57660
+[Category] New Feature
+[Description] Non-removable media boot behavior as described in UEFI
+specification v 2.3.1, p. 3.4.1.2
+[Files] boot.c, bootflow.c and bootflow.h
+
+***************** bootflow.c *****************
+User: Arunsb Date: 6/10/11 Time: 2:38p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP57660
+[Category] New Feature
+[Description] Non-removable media boot behavior as described in UEFI
+specification v 2.3.1, p. 3.4.1.2
+[Files] boot.c, bootflow.c and bootflow.h
+
+***************** bootflow.h *****************
+User: Arunsb Date: 6/08/11 Time: 11:38p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP57650
+[Category] New Feature
+[Description] Support in TSE Out of resources boot flow option.
+[Files] bootflow.c and bootflow.h
+
+***************** bootflow.c *****************
+User: Arunsb Date: 6/08/11 Time: 11:38p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP57650
+[Category] New Feature
+[Description] Support in TSE Out of resources boot flow option.
+[Files] bootflow.c and bootflow.h
+
+***************** Version 63 *****************
+Label: (INT)4.6.2_TSE_2_13_1217
+User: Arunsb Date: 6/04/11 Time: 6:00p
+Labeled '(INT)4.6.2_TSE_2_13_1217'
+Label comment:
+ [SS Server] alaska
+[SS Path] $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+[Label] (INT)4.6.2_TSE_2_13_1217
+[Module Name] TSE Binary
+[Description]
+Release to QA cycle 2.
+*) Fix for dynamic update for the goto control to same target page.
+*) Fix for boot override hangs with exception 0x0d.
+*) BGRT table will be formed only for quiet boot logos. BGRT status field will
+be cleared when some changes happened in screen other than displaying the image.
+
+[Entries]
+New Features:
+=============
+
+[TAG] EIP58954
+[Category] New Feature
+[Description] Quiet boot logos only added for BGRT. BGRT status field cleared
+if any changes happened in screen other than displaying the images. BltBuffer
+freed in ConvertBlt2Bmp function.
+[Files] Postmgmt.c, boot.c, logo.c commonoem.c and commonhelper.c
+
+
+General Bug Fixes:
+===================
+
+[TAG] EIP61588
+[Category] Bug Fix
+[Severity] Important
+[Symptom] Advanced -> ISCSI -> Add an attempt-> Mac Address -> Save
+changes causes the system to hang.
+[RootCause] Dynamic update for the goto control to same target page was not
+updated correctly.
+[Solution] Fixed to update the control destination page correctly.
+[Files] parse.c and special.c
+
+[TAG] EIP48930
+[Description] Boot override hangs with exception 0x0d
+[Files] Parse.c and hii.c
+
+***************** TseStyleEzportPlusx64.lib *****************
+User: Arunsb Date: 6/04/11 Time: 4:46p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/EzportPlus
+Comment:
+ Updated for 2.13.1217 internal release
+
+***************** TseStyleEzportPlus.lib *****************
+User: Arunsb Date: 6/04/11 Time: 4:46p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/EzportPlus
+Comment:
+ Updated for 2.13.1217 internal release
+
+***************** TSEStyleLegacyx64.lib *****************
+User: Arunsb Date: 6/04/11 Time: 4:45p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/Legacy
+Comment:
+ Updated for 2.13.1217 internal release
+
+***************** TSEStyleLegacy.lib *****************
+User: Arunsb Date: 6/04/11 Time: 4:45p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/Legacy
+Comment:
+ Updated for 2.13.1217 internal release
+
+***************** TseStylex64.lib *****************
+User: Arunsb Date: 6/04/11 Time: 4:45p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/Ezport
+Comment:
+ Updated for 2.13.1217 internal release
+
+***************** TseStyle.lib *****************
+User: Arunsb Date: 6/04/11 Time: 4:45p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/Ezport
+Comment:
+ Updated for 2.13.1217 internal release
+
+***************** Uefi21Localx64.lib *****************
+User: Arunsb Date: 6/04/11 Time: 4:44p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/Uefi2.1
+Comment:
+ Updated for 2.13.1217 internal release
+
+***************** Uefi21Local.lib *****************
+User: Arunsb Date: 6/04/11 Time: 4:44p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/Uefi2.1
+Comment:
+ Updated for 2.13.1217 internal release
+
+***************** Uefi20Localx64.lib *****************
+User: Arunsb Date: 6/04/11 Time: 4:44p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/uefi2.0
+Comment:
+ Updated for 2.13.1217 internal release
+
+***************** Uefi20Local.lib *****************
+User: Arunsb Date: 6/04/11 Time: 4:43p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/uefi2.0
+Comment:
+ Updated for 2.13.1217 internal release
+
+***************** TseLiteLocalx64.lib *****************
+User: Arunsb Date: 6/04/11 Time: 4:42p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/TseLite
+Comment:
+ Updated for 2.13.1217 internal release
+
+***************** TseLiteLocal.lib *****************
+User: Arunsb Date: 6/04/11 Time: 4:42p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/TseLite
+Comment:
+ Updated for 2.13.1217 internal release
+
+***************** MiniSetupLocalx64.lib *****************
+User: Arunsb Date: 6/04/11 Time: 4:42p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/BootOnly
+Comment:
+ Updated for 2.13.1217 internal release
+
+***************** MiniSetupLocal.lib *****************
+User: Arunsb Date: 6/04/11 Time: 4:41p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/BootOnly
+Comment:
+ Updated for 2.13.1217 internal release
+
+***************** TseAdvancedx64.lib *****************
+User: Arunsb Date: 6/04/11 Time: 4:41p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/TseAdvanced
+Comment:
+ Updated for 2.13.1217 internal release
+
+***************** TseAdvanced.lib *****************
+User: Arunsb Date: 6/04/11 Time: 4:40p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE/TseAdvanced
+Comment:
+ Updated for 2.13.1217 internal release
+
+***************** AMITSE.chm *****************
+User: Arunsb Date: 6/04/11 Time: 4:06p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ 2.13.1217 release notes updated
+
+***************** AMITSE.sdl *****************
+User: Arunsb Date: 6/04/11 Time: 1:55p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ Build version incremented for 2.13.1217 internal release
+
+***************** CommonHelper.c *****************
+User: Arunsb Date: 6/04/11 Time: 1:54p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP58954
+[Category] New Feature
+[Description] Wrapper function added for InvalidateStatusInBgrt function.
+[Files] Postmgmt.c, boot.c, logo.c commonoem.c and
+ commonhelper.c
+
+***************** CommonHelper.c *****************
+User: Arunsb Date: 5/29/11 Time: 12:02p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP58954
+[Category] New Feature
+[Description] Quiet boot logo's only added for BGRT. BGRT status field cleared
+if any changes happened in screen other than displaying the image.
+[Files] Postmgmt.c, boot.c, logo.c commonoem.c and commonhelper.c
+
+***************** commonoem.c *****************
+User: Arunsb Date: 5/29/11 Time: 12:01p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMITSE
+Comment:
+ [TAG] EIP58954
+[Category] New Feature
+[Description] Quiet boot logo's only added for BGRT. BGRT status field cleared
+if any changes happened in screen other than displaying the image.
+[Files] Postmgmt.c, boot.c, logo.c commonoem.c and commonhelper.c
+
+***************** TseLiteLocalx64.lib *****************
+User: Arunsb Date: 5/17/11 Time: 7:18p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMIGTSE/TseLite
+Comment:
+ Updated for GTSE 2.13.1216 release.
+
+***************** TseLiteLocal.lib *****************
+User: Arunsb Date: 5/17/11 Time: 7:16p
+Checked in $/Alaska/BIN/Modules/AMITSE2_0/AMIGTSE/TseLite
+Comment:
+ Updated for GTSE 2.13.1216 release.
+
diff --git a/Core/EM/AMITSE/commonoem.c b/Core/EM/AMITSE/commonoem.c
new file mode 100644
index 0000000..cdc4d35
--- /dev/null
+++ b/Core/EM/AMITSE/commonoem.c
@@ -0,0 +1,2654 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2014, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+// $Archive: /Alaska/Projects/Intel/Haswell/LynxPoint_SharkBay-DT_Crb_1AQQW/Core/em/AMITSE/commonoem.c $
+//
+// $Author: Chienhsieh $
+//
+// $Revision: 1 $
+//
+// $Date: 7/08/15 4:29a $
+//
+//*****************************************************************//
+//*****************************************************************//
+// Revision History
+// ----------------
+// $Log: /Alaska/Projects/Intel/Haswell/LynxPoint_SharkBay-DT_Crb_1AQQW/Core/em/AMITSE/commonoem.c $
+//
+// 1 7/08/15 4:29a Chienhsieh
+// Update rev66
+//
+// 66 4/22/15 8:22a Omkark
+// [TAG] EIP201836
+// [Category] Bug Fix
+// [Severity:] Normal
+// [Symptom:] ARM systems generate exception after 3 invalid password
+// tries in the POST
+// [Root Cause] Parameters are not used properly for WaitForEvent function
+// during POST password.
+// [Solution] Handled parameters for WaitForEvent() function.
+// [Files] commonoem.c
+//
+// 62 8/28/14 12:02p Premkumara
+// [TAG] EIP174154
+// [Category] Bug Fix
+// [Severity:] Normal
+// [Symptom:] TMM Settings page is moved to wrong position
+// [Solution] If root page ordering is not present for some of the boot
+// flows then menu ordering will not present.
+// So for the boot flows which doesn't has ordering now
+// BOOT_FLOW_CONDITION_NORMAL ordering will be applied.
+// [Files] commonoem.c
+//
+// 61 8/28/14 10:09a Premkumara
+// [TAG] EIP174031
+// [Category] Improvement
+// [Description] Removed TODO comments and added proper comments in those
+// places
+// [Files] commonoem.c, commonhelper.c, special.c, submenu.c,
+// minisetupext.c, uefi21wapper.c and legacy.c
+//
+// 60 5/21/14 6:23p Arunsb
+// [TAG] EIPEIP169096,168632
+// [Description] Changed global variable guid usage for tse debug messages
+// [Files] commonoem.c, setupdbg.h and print.c
+//
+// 59 5/08/14 4:25p Arunsb
+// [TAG] EIP162197
+// [Category] Improvement
+// [Description] Password encode feature modify to encode using Hashing
+// based on token.
+// PasswordEncode function moved to PasswordEncode module.
+//
+// 58 5/02/14 2:10p Premkumara
+// [TAG] EIP140123
+// [Category] Bug Fix
+// [Severity] Critical
+// [Symptom] While showing secureboot error msg mouse is not move and
+// get hang. Softkbd is displaying
+// [RootCause] MouseClickEvent is not stopped while boot to any option.
+// So clicking outside msg box causes displaying
+// softkbd and mouse is not init at this phase.
+// [Solution] Initialized mouse and deactivating any softkbd activated
+// before showing secureboot error msg box.
+// [Files] CommonHelper.c, CommonOem.c, MessageBox.c
+//
+// 57 5/02/14 5:44a Arunsb
+// [TAG] EIP156258
+// [Category] Improvement
+// [Description] Providing ELINK option to suppress the handle
+// comparison on dynamic parsing
+// [Files] AMITSE.mak, AMITSE.sdl, commonoem.c, commonoem.h and Parse.c
+//
+// 56 5/02/14 4:41a Premkumara
+// [TAG] EIP95647
+// [Category] Improvement
+// [Description] Dynamic Forms need to hide.
+// [Files] AMITSE.mak, AMITSE.sdl, CommonOem.c, Parse.c
+//
+// 55 2/11/14 10:52p Arunsb
+// Build error rectified for EFI_STRING_ID
+//
+// 54 12/04/13 5:17a Premkumara
+// [TAG] EIP123535
+// [Category] Improvement
+// [Description] Moved saving quietboot resolution to DrawQuietBootLogo()
+// to avoid setting resolution of initPostScreenthis while booting.
+// [Files] commonoem.c, Boot.c, Logo.c, MinisetupExt.c
+//
+// 53 12/04/13 2:58a Premkumara
+// [TAG] EIP139099
+// [Category] New Feature
+// [Description] Supress formset other than
+// EFI_HII_PLATFORM_SETUP_FORMSET_GUID and
+// EFI_HII_DRIVER_HEALTH_FORMSET_GUID through elink based on token
+// [Files] AMITSE.sdl, AMITSE.mak, CommonOem.c, Hii.c, Parse.c,
+// TseUefiHii.h
+//
+// 52 5/22/13 10:13a Arunsb
+// Moving password encoding to source
+//
+// 51 4/18/13 1:47a Arunsb
+// [TAG] EIP81490
+// [Category] New Feature
+// [Description] Post message support for BBS popup menu
+// [Files] AMITSE.sdl, AmiTSEStr.uni, commonoem.c, FakeTokens.c and
+// globals.c
+//
+// 50 3/18/13 2:04p Blaines
+// [TAG] - EIP 118410
+// [Category] - Defect
+// [Symptom] - Hidden tabs when dynamic pages are present in setup.
+// [Description] - Setup is missing tabs (i.e. Security, Boot, Exit), when
+// pages are dynamically added to Advanced menu.
+// This has been seen with both SAS and Network UEFI drivers that
+// dynamically publish setup pages.
+//
+// [Root cause]
+// The functions FixSubPageAsRootPageList and FixHiddenPageList will
+// typecast gPages->PageCount to UINT8 in the for-loop to search the page
+// data.
+// The masking of this count value will affect the parsing of
+// AMITSE_SUBPAGE_AS_ROOT_PAGE_LIST, and AMITSE_ROOT_PAGE_ORDER.
+//
+// [Solution]- Use UINTN to typecast gPages->PageCount in the for-loop
+// used to search the page data.
+//
+// [Files]
+// - commonoem.c
+//
+// [Functions]
+// - FixSubPageAsRootPageList
+// - FixHiddenPageList
+//
+// 49 3/06/13 12:23a Premkumara
+// [TAG] EIP111415
+// [Category] Improvement
+// [Description] Elink function for SETUP_TOGGLE_KEY_UNICODE function
+// [Files] HookAnchor.h, AMITSE.sdl, commonoem.c, Commonoem.h,
+// HookList.c, HookAnchor.c
+//
+// 48 10/18/12 5:31a Arunsb
+// Updated for 2.16.1235 QA submission
+//
+// 30 10/10/12 12:23p Arunsb
+// Synched the source for v2.16.1232 backup with Aptio
+//
+// 46 9/25/12 12:26p Rajashakerg
+// [TAG] EIP92053
+// [Category] Improvement
+// [Description] Need support define Root page order using elinks
+// [Files] AMITSE.sdl, Menu.c, AMIVfr.h, AMITSE.mak, commonoem.c
+//
+// 45 9/25/12 9:27a Rajashakerg
+// [TAG] EIP92053
+// [Category] Improvement
+// [Description] Need support define Root page order using elinks
+// [Files] AMITSE.sdl, Menu.c, AMIVfr.h, AMITSE.mak, commonoem.c
+//
+// 44 9/21/12 7:27a Premkumara
+// [TAG] EIP 90647
+// [Category] Improvement
+// [Description] Implement new token to launch Boot Menu using shift
+// state key such as CTRL+F7
+// [Files] AMITSE.sdl, Commonoem.c
+//
+// 43 9/17/12 5:59a Rajashakerg
+// Updated EIP changes for 2.16 release.
+//
+// 41 8/29/12 4:11p Arunsb
+// [TAG] EIP94702
+// [Description] Support for Native Resolution in POST/BOOT
+// [Files] amitse.sdl, commonhelper.c, commonoem.c, boot.c, logo.c,
+// notify.c, postmgmt.c, tselite\minisetupext.c, ezport/stylecommon.c,
+// ezportplus/stylecommon.c andlegacy/stylecommon.c
+//
+// 40 5/29/12 3:18a Arunsb
+// [TAG] EIP91109
+// [Category] Improvement
+// [Description] Sync the Aptio IV source for AptioV
+//
+// 39 5/09/12 5:25p Arunsb
+// [TAG] EIP85768
+// [Category] Improvement
+// [Description] Combination key does not work properly for checkoemkey
+// functionality
+// [Files] commonoem.c
+//
+// 38 4/27/12 2:05p Arunsb
+// Build error rectified
+//
+// 37 4/27/12 11:18a Arunsb
+// [TAG] EIP85904
+// [Category] New Feature
+// [Description] OS indication support
+// [Files] Amitse.sdl and commonoem.c
+//
+// 36 4/27/12 9:44a Arunsb
+// [TAG] EIP84199
+// [Category] Bug Fix
+// [Severity] Normal
+// [Symptom] ProcessConInAvailability displays "Press <F2> or <DEL> to
+// enter Setup." message on the POST screen as many times as it is hooked.
+// [RootCause] ProcessConInAvailability called twice
+// [Solution] Messages displayed only once regardless of number of times
+// ProcessConInAvailability hook get called
+// [Files] commonoem.c
+//
+// 35 4/04/12 12:24a Rajashakerg
+// [TAG] EIP86253
+// [Category] Bug Fix
+// [Severity] Normal
+// [Symptom] Mouse and SoftKbd does not work after displaying "No option
+// to boot to" in POST
+// [RootCause] Mouse timer cleared once after displaying the "No option
+// to boot to" in POST
+// [Solution] Mouse timer cleared only when its going to boot.
+// [Files] CommonHelper.c, commonoem.c, minisetupext.c, protocol.c
+//
+// 34 2/03/12 9:29p Madhans
+// [TAG] EIP82552
+// [Category] Bug Fix
+// [Severity] Normal
+// [Symptom] Soft Keyboard is On after booted to BIOS setup from POST
+// [RootCause] Soft Keyboard is not deactivated for time out in post
+// [Solution] Soft keyboard deactivated for time out too
+// [Files] commonoem.c
+//
+// 33 2/02/12 1:21a Arunsb
+// [TAG] EIP81959
+// [Category] Bug Fix
+// [Severity] Normal
+// [Symptom] Stop at LOGO if continue to press one of Shift / Alt / Ctrl
+// keys
+// [RootCause] Partial keys not handled
+// [Solution] Partial keys handled properly
+// [Files] commonoem.c
+//
+// 32 2/01/12 1:55a Arunsb
+// [TAG] EIP74968
+// [Category] Improvement
+// [Description] Support for mouse drag and drop to rearrange the items
+// in the Orderlist.
+// [Files] Ordlistbox.c, commonoem.c and commonoem.h
+//
+// 31 1/25/12 8:31a Rajashakerg
+// [TAG] EIP62763
+// [Category] Improvement
+// [Description] Utilize the Improvements done from mouse driver in
+// AMITSE
+// [Files] commonoem.c
+//
+// 30 12/28/11 4:10a Arunsb
+// [TAG] EIP75021
+// [Category] Bug Fix
+// [Severity] Important
+// [Symptom] [TSE] In Date and Time item Press Shift+Tab key can't move
+// previous field.
+// [RootCause] Shift states not checked properly
+// [Solution] Shift state bits are cleared for every combinations and
+// compared at last
+// [Files] commonoem.c and commonhelper.c
+//
+// 29 11/20/11 6:54a Rajashakerg
+// [TAG] EIP62763
+// [Category] Improvement
+// [Description] Utilize the Improvements done from mouse driver in
+// AMITSE
+// [Files] HookAnchor.h, TseCommon.h, AMITSE.sdl, CommonHelper.c,
+// commonoem.c, commonoem.h, buffer.c, globals.c, HookAnchor.c,
+// minisetup.h, notify.c, postmgmt.c, protocol.c, ezport.c, stylecommon.c,
+// Mouse.c, Action.c, Date.c, frame.c, MessageBox.c, minisetupext.c,
+// minisetupext.h, numeric.c, numeric.h, page.c, PopupEdit.c, PopupEdit.h,
+// PopupPassword.c, postmgmtext.c, time.c.
+//
+// 28 11/14/11 2:40p Blaines
+// [TAG] - EIP 75481
+// [Category]- Function Request
+// [Synopsis]- TSE debug print infrastructure.
+// [Description]- Add TSE debug print info for basic functions such as
+// Hiiparsing, HiiNotifications, HiiCallbacks. Variables, and Ifrforms
+// data.
+// [Files]
+// AMITSE.sdl, AmiTSEStr.uni, CommonHelper.c, commonoem.c, FakeTokens.c
+// Globals.c, Minisetup.cif, Minisetup.h, print.c, FormBrowser2.c, Hii.c,
+// HiiCallback.c, HiiNotificationHandler.c, Parse.c, TseUefiHii.h,
+// Uefi21Wrapper.c, setupdbg.h
+//
+// 27 11/01/11 4:21a Arunsb
+// [Category] Improvement
+// [Description] To change the single click behaviour as like double
+// click
+// [Files] amitse.sdl, commonhelper.c, commonoem.c and listbox.c
+//
+// 26 9/22/11 2:45a Arunsb
+// [TAG] EIP64402
+// [Category] Spec Update
+// [Severity] Normal
+// [Description] If logo.ffs not present in TSE then BGRT table not
+// formed for badging images.
+// This one is fixed.
+// [Files] commonoem.c
+//
+// 25 9/21/11 1:56p Arunsb
+// [TAG] EIP66443
+// [Category] Bug Fix
+// [Severity] Important
+// [Symptom] Build fails when SETUP_BBS_POPUP_ENABLE is enabled and
+// SETUP_ALT_ENTRY_ENABLE is disabled.
+// [RootCause] By default, SETUP_BBS_POPUP_ENABLE is set to disabled and
+// SETUP_ALT_ENTRY_ENABLE is enabled.
+// If the customer sets SETUP_BBS_POPUP_ENABLE to enabled, and
+// SETUP_ALT_ENTRY_ENABLE to disabled, then the
+// SETUP_ALT_ENTRY_SHIFT_STATE SDL token is not defined and thus the build
+// error arose.
+// [Solution] SETUP_ALT_ENTRY_SHIFT_STATE SDL token is validated before
+// its usage.
+// [Files] commonoem.c
+//
+// 24 6/30/11 3:55a Arunsb
+// Unused BootOption variable removed.
+//
+// 23 6/29/11 2:06p Arunsb
+// EIP 62631 gHotKeyBootOption declaration moved to commonhelper.c
+//
+// 22 6/29/11 6:03a Arunsb
+// [TAG] EIP 62631
+// [Category] New Feature
+// [Description] Hot key boot option support in TSE as per UEFI spec.
+// section 3.1.6.
+// CheckAdvShiftState function moved from commonoem.c to
+// here.
+// BootLaunchBootOption removed in checkforkey function to
+// avoid TPL problem.
+// [Files] AMITSE.sdl, bootflow.c, bootflow.h, CommonHelper.c,
+// commonoem.c, commonoem.h, boot.c,
+// hiistring20.c, hiistring21.c and notify.c.
+//
+// 21 6/23/11 8:29p Arunsb
+// [TAG] EIP62466
+// [Category] Improvement
+// [Description] Trace message support in commonoem.c.
+// Included amidxelib.h file.
+// [Files] commonoem.c
+//
+// 20 6/22/11 7:10a Arunsb
+// [TAG] EIP 62631, 60128
+// [Category] New Feature
+// [Description] Hot key boot option in TSE as per UEFI spec. section
+// 3.1.6.
+// Hot key checked.
+// CheckAdvShiftState function added to handle special
+// case like Ctrl+Alt+F6.
+// TSE_CHECK_SHIFTSTATE added for checking special key to
+// launch setup.
+// [Files] AMITSE.sdl, CommonHelper.c, commonoem.c, commonoem.h,
+// boot.c, hiistring20.c and hiistring21.c.
+//
+// 19 6/20/11 3:50p Arunsb
+// [TAG] EIP57660
+// [Category] New Feature
+// [Description] Non-removable media boot behavior as described in UEFI
+// specification v 2.3.1, p. 3.4.1.
+// Added CheckForSetupKey function to check setup
+// key pressed.
+// [Files] amitse.sdl, bootflow.c, bootflow.h, commonoem.c,
+// boot.c and protocol.c
+//
+// 18 5/29/11 12:01p Arunsb
+// [TAG] EIP58954
+// [Category] New Feature
+// [Description] Quiet boot logo's only added for BGRT. BGRT status
+// field cleared if any changes happened in screen other than displaying
+// the image.
+// [Files] Postmgmt.c, boot.c, logo.c commonoem.c and
+// commonhelper.c
+//
+// 17 5/03/11 9:55p Arunsb
+// [TAG] EIP58954
+// [Category] New Feature
+// [Description] Contributing BGRT table to ACPI table.
+// CONTRIB_BGRT_TABLE_TO_ACPI token added. EDK Build support added. Code
+// moved to drawimage function.
+// [Files] Postmgmt.c, commonoem.c and commonhelper.c
+//
+// 16 4/23/11 3:10p Arunsb
+// [TAG] EIP58954
+// [Category] New Feature
+// [Description] Contributing BGRT table to ACPI table.
+// CONTRIB_BGRT_TABLE_TO_ACPI token added.
+// [Files] Postmgmt.c and commonoem.c
+//
+// 15 3/28/11 9:06p Madhans
+// [TAG] EIP41744
+// [Category] Improvement
+// [Description] SoftKeyBoard Support in TSE. and Support to Work with
+// new mouse driver(Label 07).
+// [Files] HookAnchor.h
+// AMITSE.sdl
+// CommonHelper.c
+// commonoem.c
+// commonoem.h
+// HookList.c
+// HookAnchor.c
+// Mouse.c
+// minisetupext.c
+// postmgmtext.c
+// minisetupext.h
+// PopupPassword.c
+// PopupString.c
+// TseLiteCommon.c
+//
+// 14 12/28/10 4:15p Mallikarjunanv
+// [TAG] EIP 47837
+// [Category] Bug Fix
+// [Severity] Important
+// [Symptom] Shift key combinations are not working properly.
+// [RootCause] Issues with handling shiftstate in case of AMI Keycode
+// protocol
+// [Solution] udpated the sources to verify the key with and without
+// shiftstate value in case of TSE_USE_AMI_KEYCODE_PROTOCOL enabled.
+//
+// [Files] Commonoem.c
+//
+// 13 12/27/10 3:07a Mallikarjunanv
+//
+// 12 12/26/10 5:15p Mallikarjunanv
+// [TAG] EIP47387
+// [Category] Bug Fix
+// [Severity] Important
+// [Symptom] Shift key combinations are not working properly.
+// [RootCause] Issues with handling shiftstate in case of AMI Keycode
+// protocol
+// [Solution] udpated the sources to verify the key with and without
+// shiftstate value in case of TSE_USE_AMI_KEYCODE_PROTOCOL enabled.
+// [Files] commonoem.c
+//
+// 11 12/02/10 2:31p Madhans
+// [TAG] - EIP 48169
+// [Category]- Enhancement
+// [Severity]- Mordarate
+// [Symptom]- Code Cleanup and Compiler Warning need to resolved.
+// [Rootcause] Warnings reported when we build AMI higher Warning level.
+// [Solution]- 1. Fix the warnings and do the code cleanup.
+// 2. Introduce proper checks.
+// 3. change the popupSel.c to not change the Option/variable
+// cache to default or first option
+// when the variable cache is not matching with any of
+// option.
+// [Files] - commonoem.c bbs.c boot.c hiistring.c resource.c
+// popuppassword.c popupsel.c
+// expression.c hii.c parse.c
+//
+// 10 9/16/10 8:39p Madhans
+// Updated for TSE 2.10. Refer changelog.log for more deatils.
+//
+// 25 8/18/10 6:15p Mallikarjunanv
+// EIP-38089: Hook after pressing F2 key and before showing setup menu.
+//
+// 24 8/13/10 10:21a Mallikarjunanv
+// EIP-40772: Created a token to control enter setup string in POST during
+//
+// 23 7/07/10 7:36p Madhans
+// To fix the issue of Not booting from BBS if SetupEntry and BBS Keys
+// pressed togather multiple time.
+//
+// 22 6/14/10 7:03p Madhans
+// To avoid warning
+//
+// 21 6/08/10 5:06p Blaines
+// Created new AMITSE hook (hook33), called when TSE determines that
+// console out is available.
+//
+// 20 5/14/10 4:08p Madhans
+// EIp 38626 : to include the OEM header files in commonoem.h
+//
+// 19 4/21/10 11:09a Mallikarjunanv
+// EIP-36596: Logo ImageData buffer freeing issue fixed
+//
+// 18 4/13/10 6:01p Madhans
+// Eip: 33100 To create new hook for BootNowLaunching. (From bbsPopoup and
+// Boot override menu).
+//
+// 17 4/13/10 5:12p Madhans
+// EIP: 37439 To support extended OEM Key support.
+//
+// 16 4/07/10 6:23p Madhans
+// Post Screen Scroll Area Support.TSE_POSTSCREEN_SCROLL_AREA Sdl token
+// Controls it.
+//
+// 15 2/19/10 7:59a Mallikarjunanv
+// updated the year in copyright message
+//
+// 14 2/15/10 10:02p Madhans
+//
+// 13 2/04/10 11:06p Madhans
+// MapControlActionMouse hook added.
+//
+// 12 1/18/10 2:05a Mallikarjunanv
+// EIP-28501: Updated for Keyboard scancode as password. Added a new Token
+// SETUP_STORE_KEYCODE_PASSWORD to support the EFI key or Scan code as
+// password
+//
+// 11 1/09/10 2:26a Mallikarjunanv
+// Updated TSE2.01 Release sources with coding standards
+//
+// 10 12/04/09 7:13a Mallikarjunanv
+// Fix for EIP:30263 - Gif Logo Issue
+//
+// 9 11/05/09 12:38p Mallikarjunanv
+// deleted the function HiiGetEfiKey, which is moved to uefi module
+//
+// 8 10/30/09 9:46a Mallikarjunanv
+// EIP-28551 : Fixed TSE 2.0 Build error releated to
+// SETUP_STORE_EFI_KEY_PASSWORD and TSE_USE_AMI_EFI_KEYCODE_PROTOCOL
+//
+// 7 10/28/09 5:34p Madhans
+// 1. Support to Add the String from other modules to TSE.
+// 2. Clean of GIF and Image code Control them with minimal code from TSE
+// binary.
+//
+//
+// 6 9/15/09 9:16a Sudhirv
+// added new hooks for LoadSetupDefaults and PreSystemReset
+//
+// 5 8/13/09 7:31a Mallikarjunanv
+// eips: 25075, 24971 and hii functions miving from binary to uefi module
+//
+// 4 7/31/09 11:45a Blaines
+// Add support for non-case sensitive password.
+//
+// 3 7/30/09 7:51a Mallikarjunanv
+// updated the code to move the exit page option elinks to Tse Binary
+//
+// 2 7/20/09 1:07p Mallikarjunanv
+// fixed syntax errors
+//
+// 1 6/04/09 7:49p Madhans
+// AMI TSE Advanced.
+//
+// 2 4/29/09 9:01p Madhans
+// Bug Fixes after unit Testing..
+//
+// 1 4/28/09 10:49p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+// 1 4/28/09 10:24p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+// 2 1/30/09 6:06p Madhans
+// Function headers added.
+//
+//
+//*****************************************************************//
+//*****************************************************************//
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: Commonoem.c
+//
+// Description: contains default implementation of TSE hooks
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+
+#ifdef TSE_FOR_APTIO_4_50
+
+#include "Token.h"
+#include <Efi.h>
+#include <Protocol/SimpleTextIn.h>
+#include <Protocol/EfiOemBadging.h>
+#include <Protocol/AMIPostMgr.h>
+#include "AMITSEStrTokens.h"
+#include "AMITSEElinks.h"
+#include <AmiDxeLib.h>
+
+#if TSE_USE_AMI_EFI_KEYCODE_PROTOCOL
+#include "Protocol/AmiKeyCode.h"
+#else
+#ifndef _AMI_EFI_KEY_DATA_
+#define _AMI_EFI_KEY_DATA_
+typedef struct {
+ EFI_INPUT_KEY Key;
+} AMI_EFI_KEY_DATA;
+#endif
+#endif
+
+#pragma pack (1)
+#ifndef _TSE_EFI_IFR_FORM_SET
+#define _TSE_EFI_IFR_FORM_SET
+typedef UINT16 EFI_STRING_ID; //For avoiding build error in EFI 2.0
+typedef struct _TSE_EFI_IFR_FORM_SET {
+ EFI_IFR_OP_HEADER Header;
+ EFI_GUID Guid;
+ EFI_STRING_ID FormSetTitle;
+ EFI_STRING_ID Help;
+ UINT8 Flags;
+ EFI_GUID ClassGuid[1];
+} TSE_EFI_IFR_FORM_SET;
+#endif
+#pragma pack ()
+
+#if TSE_USE_AMI_EFI_KEYCODE_PROTOCOL
+EFI_GUID gAmiEfiKeycodeProtocolGuid = AMI_EFIKEYCODE_PROTOCOL_GUID;
+#endif
+
+VOID *
+EfiLibAllocateZeroPool (
+ IN UINTN AllocationSize
+ );
+
+#else //#ifdef TSE_FOR_APTIO_4_50
+
+#include "minisetup.h"
+#include "AMITSEElinks.h"
+#endif //#ifdef TSE_FOR_APTIO_4_50
+
+#ifdef TSE_FOR_APTIO_4_50
+// Definitions of keys are different in Alaska and Tiano. So for
+// Alaska define Tiano key definitions.
+
+#define CharIsUpper(c) ((c >= L'A') && (c <= L'Z'))
+#define CharIsLower(c) ((c >= L'a') && (c <= L'z'))
+#define CharIsAlpha(c) (CharIsUpper(c) || CharIsLower(c))
+#define CharIsNumeric(c) ((c >= L'0') && (c <= L'9'))
+
+#define CHAR_NULL 0x0000
+#define CHAR_BACKSPACE 0x0008
+#define CHAR_TAB 0x0009
+#define CHAR_LINEFEED 0x000A
+#define CHAR_CARRIAGE_RETURN 0x000D
+
+#ifndef SCAN_NULL
+#define SCAN_NULL EFI_SCAN_NULL
+#endif
+
+#ifndef SCAN_UP
+#define SCAN_UP EFI_SCAN_UP
+#endif
+
+#ifndef SCAN_DOWN
+#define SCAN_DOWN EFI_SCAN_DN
+#endif
+
+#ifndef SCAN_RIGHT
+#define SCAN_RIGHT EFI_SCAN_RIGHT
+#endif
+
+#ifndef SCAN_LEFT
+#define SCAN_LEFT EFI_SCAN_LEFT
+#endif
+
+#ifndef SCAN_HOME
+#define SCAN_HOME EFI_SCAN_HOME
+#endif
+
+#ifndef SCAN_END
+#define SCAN_END EFI_SCAN_END
+#endif
+
+#ifndef SCAN_INSERT
+#define SCAN_INSERT EFI_SCAN_INS
+#endif
+
+#ifndef SCAN_DELETE
+#define SCAN_DELETE EFI_SCAN_DEL
+#endif
+
+#ifndef SCAN_PAGE_UP
+#define SCAN_PAGE_UP EFI_SCAN_PGUP
+#endif
+
+#ifndef SCAN_PAGE_DOWN
+#define SCAN_PAGE_DOWN EFI_SCAN_PGDN
+#endif
+
+#ifndef SCAN_F1
+#define SCAN_F1 EFI_SCAN_F1
+#endif
+
+#ifndef SCAN_F2
+#define SCAN_F2 EFI_SCAN_F2
+#endif
+
+#ifndef SCAN_F3
+#define SCAN_F3 EFI_SCAN_F3
+#endif
+
+#ifndef SCAN_F4
+#define SCAN_F4 EFI_SCAN_F4
+#endif
+
+#ifndef SCAN_F5
+#define SCAN_F5 EFI_SCAN_F5
+#endif
+
+#ifndef SCAN_F6
+#define SCAN_F6 EFI_SCAN_F6
+#endif
+
+#ifndef SCAN_F7
+#define SCAN_F7 EFI_SCAN_F7
+#endif
+
+#ifndef SCAN_F8
+#define SCAN_F8 EFI_SCAN_F8
+#endif
+
+#ifndef SCAN_F9
+#define SCAN_F9 EFI_SCAN_F9
+#endif
+
+#ifndef SCAN_F10
+#define SCAN_F10 EFI_SCAN_F10
+#endif
+
+#ifndef SCAN_F11
+#define SCAN_F11 EFI_SCAN_F11
+#endif
+
+#ifndef SCAN_F12
+#define SCAN_F12 EFI_SCAN_F12
+#endif
+
+#ifndef SCAN_ESC
+#define SCAN_ESC EFI_SCAN_ESC
+#endif
+
+
+#endif //#ifdef TSE_FOR_APTIO_4_50
+#include "commonoem.h"
+#include "LogoLib.h"
+#include "Mem.h"
+#include "HiiLib.h"
+#include "PwdLib.h"
+#include "KeyMon.h"
+#include "bootflow.h"
+#include "variable.h"
+#include "TseElinks.h"
+#include "AmiVfr.h"
+#if MINISETUP_MOUSE_SUPPORT
+#include "Include\Protocol\MouseProtocol.h"
+extern DXE_MOUSE_PROTOCOL *TSEMouse;
+#endif
+#include <setupdata.h>
+#include <AutoId.h> // for MAIN_MAIN
+
+// Build time file generated from AMITSE_OEM_HEADER_LIST elink.
+#include "AmiTseOem.h"
+
+#ifndef EFI_DEFAULT_BMP_LOGO_GUID
+#define EFI_DEFAULT_BMP_LOGO_GUID \
+ {0x7BB28B99,0x61BB,0x11d5,0x9A,0x5D,0x00,0x90,0x27,0x3F,0xC1,0x4D}
+#endif
+
+typedef struct {
+ UINT8 CtrlAction;
+ CHAR16 UnicodeChar;
+ UINT16 ScanCode;
+ UINT32 KeyShiftState;
+} USER_CONTROL_KEY_DATA;
+
+extern PAGE_LIST *gPages;
+extern UINT8 *gApplicationData;
+extern PAGE_ID_LIST *gPageIdList;
+
+typedef struct _HII_FORM_ADDRESS
+{
+ EFI_GUID formsetGuid; // Required
+ UINT16 formId; // Required
+ VOID * Handle; // Optional
+}HII_FORM_ADDRESS;
+#define NULL_GUID \
+ { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }
+HII_FORM_ADDRESS RootPageList[] = { AMITSE_SUBPAGE_AS_ROOT_PAGE_LIST { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 0, NULL}, };
+HII_FORM_ADDRESS HiddenPageList[] = { AMITSE_HIDDEN_PAGE_LIST { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 0, NULL}, };
+HII_FORM_ADDRESS RootPageOrder[] = { AMITSE_ROOT_PAGE_ORDER { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 0, NULL}, };
+
+EFI_GUID gFormSetClassGuidList[] = {AMITSE_FILTER_CLASSGUID_FORMSETS, NULL_GUID};
+EFI_GUID gSuppressDynamicFormsetList[] = { AMITSE_SUPPRESS_DYNAMIC_FORMSET_LIST NULL_GUID };
+VAR_DYNAMICPARSING_HANDLESUPPRESS gHandleSuppressVarList [] = {AMITSE_DYNAMICPARSING_HANDLE_SUPPRESS_LIST {NULL_GUID, ""}};
+
+extern BOOLEAN
+EfiCompareGuid (
+ IN EFI_GUID *Guid1,
+ IN EFI_GUID *Guid2
+ );
+
+
+extern EFI_BOOT_SERVICES *gBS;
+extern EFI_SYSTEM_TABLE *gST;
+extern EFI_RUNTIME_SERVICES *gRT;
+extern BOOLEAN gEnterSetup;
+extern BOOLEAN gEnterBoot;
+extern BOOLEAN gQuietBoot;
+extern STYLECOLORS Colors;
+extern VOID StyleOverRideComponent(VOID);
+VOID ConfigPostScrollArea(VOID);
+extern UINT32 gBootFlow;
+extern EFI_GUID _gBootFlowGuid;
+extern UINT16 gDbgPrint ;
+///Assign the Exit Page options info. from Elink...
+EXIT_PAGE_OPTIONS gExitPageOptions[] = {
+ EXIT_PAGE_OPTIONS_LIST
+};
+extern BOOLEAN GifImageFlag; //flag to denote the gif animation
+VOID ContribBGRTTableToAcpi (BOOLEAN);
+extern UINT8 gAddBgrtResolutions;
+BOOLEAN CheckforHotKey (AMI_EFI_KEY_DATA);
+VOID TSEStringReadLoopEntryHook(VOID);
+BOOLEAN TSEMouseIgnoreMouseActionHook(VOID);
+VOID StopClickEvent(VOID);
+VOID TSEStringReadLoopExitHook(VOID);
+VOID MouseStop(VOID);
+VOID MouseRefresh(VOID);
+VOID SwitchToPostScreenHook(VOID);//EIP-111415 SwitchToPostScreenHook
+
+//EIP81959
+#ifndef KEY_STATE_EXPOSED
+#define KEY_STATE_EXPOSED 0x40
+#endif
+static BOOLEAN gPostScreenMsg = FALSE; //EIP 84199 ProcessConInAvailability needs protection against getting called twice
+
+BOOLEAN gIsRootPageOrderPresent = FALSE;
+//UINT16 *gRootPageOrder;
+HII_FORM_ADDRESS *gRootPageOrder;
+UINT16 gRootPageOrderIndex = 0;
+UINTN CurrentScreenresolutionX, CurrentScreenresolutionY;
+extern UINTN gPostStatus; //EIP-140123
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: DrawQuietBootLogo
+//
+// Description: This function is the generic implementation of
+// drawing quiet boot logo. This function is available
+// as an ELINK.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS SetNativeResFromEdid (VOID);
+VOID DrawQuietBootLogo(VOID)
+{
+ EFI_STATUS Status;
+ BOOLEAN LogoToDo = TRUE;
+ EFI_OEM_BADGING_PROTOCOL *Badging = NULL;
+ UINT32 Instance = 0;
+ EFI_BADGING_FORMAT Format;
+ UINT8 *ImageData = NULL;
+ UINTN ImageSize = 0;
+ EFI_BADGING_DISPLAY_ATTRIBUTE Attribute;
+ INTN CoordinateX = 0;
+ INTN CoordinateY = 0;
+ EFI_GUID LogoFile = EFI_DEFAULT_BMP_LOGO_GUID;
+ UINTN Width, Height;
+ BOOLEAN AdjustSize = TRUE;
+ UINTN NoOfHandles = 0;
+ EFI_HANDLE *Handles;
+ UINTN HandleIndex = 0;
+ BOOLEAN AddBgrtToAcpi = TRUE;
+
+ // Draw the Logo
+#if TSE_SUPPORT_NATIVE_RESOLUTION
+ SetNativeResFromEdid (); //EIP94702
+#endif
+ Status = GetGraphicsBitMapFromFV( &LogoFile, &ImageData, &ImageSize );
+ MouseStop ();//EIP 62763 : Stopping the mouse before drawing the Quiet boot logo.
+ if (!EFI_ERROR (Status))
+ {
+ //No need for initializing CoordinateX and CoordinateY
+ //because image will be cenetered and they will be ignored
+ //anyways
+ Attribute = EfiBadgingDisplayAttributeCenter;
+ gAddBgrtResolutions = 1;
+ Status = DrawImage(
+ ImageData,
+ ImageSize,
+ (CO_ORD_ATTRIBUTE)Attribute,
+ CoordinateX,
+ CoordinateY,
+ AdjustSize,
+ &Width,
+ &Height
+ );
+ AdjustSize = FALSE;
+ if (EFI_SUCCESS != Status)
+ {
+ AddBgrtToAcpi = FALSE; //EIP 58954 Not Adding BGRT table to ACPI
+ }
+ //In case of gif animation not to clear the image data
+ if (!GifImageFlag)
+ MemFreePointer((VOID **)&ImageData);
+ }
+
+ //Locate Badging protocol Handles
+ Status = gBS->LocateHandleBuffer(ByProtocol,&gEfiOEMBadgingProtocolGuid,NULL,&NoOfHandles,&Handles);
+
+ if (!EFI_ERROR (Status))
+ {
+ if (!gAddBgrtResolutions) //EIP64402 to support oem logo module. If logo.ffs not present from TSE then this wiil set the gAddBgrtResolutions.
+ {
+ gAddBgrtResolutions = 1;
+ }
+
+ // for each badging protocol
+ for(HandleIndex=0; HandleIndex<NoOfHandles;HandleIndex++)
+ {
+ Badging = NULL;
+ Instance = 0;
+ gBS->HandleProtocol(Handles[HandleIndex],&gEfiOEMBadgingProtocolGuid,&Badging);
+ if(Badging != NULL)
+ LogoToDo = TRUE;
+
+ //Draw all Logo obtained from Badging protocol or FV
+ while ( LogoToDo )
+ {
+ Status = Badging->GetImage (
+ Badging,
+ &Instance,
+ &Format,
+ &ImageData,
+ &ImageSize,
+ &Attribute,
+ &CoordinateX,
+ &CoordinateY
+ );
+ if(EFI_ERROR (Status))
+ {
+ LogoToDo = FALSE;
+ break;
+ }
+ Status = DrawImage(
+ ImageData,
+ ImageSize,
+ (CO_ORD_ATTRIBUTE)Attribute,
+ CoordinateX,
+ CoordinateY,
+ AdjustSize,
+ &Width,
+ &Height
+ );
+ if (EFI_SUCCESS != Status) //EIP 58954 Not Adding BGRT table to ACPI
+ {
+ AddBgrtToAcpi = FALSE;
+ }
+ AdjustSize = FALSE;
+
+ //In case of gif animation not to clear the image data
+ if(!GifImageFlag)
+ MemFreePointer((VOID **)&ImageData);
+ }
+ }
+ if(NoOfHandles)
+ gBS->FreePool(Handles);
+ }
+ gAddBgrtResolutions = 0;
+ if (TRUE == AddBgrtToAcpi)
+ {
+ ContribBGRTTableToAcpi (GifImageFlag);
+ }
+ MouseRefresh();//EIP 62763 : Refreshing the mouse after drawing the Quiet boot logo.
+ GetScreenResolution(&CurrentScreenresolutionX, &CurrentScreenresolutionY); //EIP-123535 Getting QuietBoot resolution
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: ProcessConInAvailability
+//
+// Description: This function is a hook called when TSE determines
+// that console is available. This function is available
+// as ELINK. In the generic implementation boot password
+// is prompted in this function.
+//
+// Input: VOID
+//
+// Output: BOOLEAN. Should return TRUE if the screen was used to
+// ask password; FALSE if the screen was not used to ask
+// password.
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN ProcessConInAvailability(VOID)
+{
+ UINTN NoOfRetries;
+ UINT32 PasswordInstalled = AMI_PASSWORD_NONE;
+ UINTN Index;
+ EFI_INPUT_KEY Key;
+ BOOLEAN bScreenUsed = FALSE;
+#if SETUP_PRINT_EVAL_MSG || SETUP_PRINT_ENTER_SETUP_MSG
+ CHAR16 *text = NULL;
+#endif
+ if (!gPostScreenMsg) //EIP 84199 ProcessConInAvailability needs protection against getting called twice
+ {
+#if SETUP_PRINT_EVAL_MSG
+ //Print evaluation message here
+ text = HiiGetString( gHiiHandle, STRING_TOKEN(STR_EVAL_MSG));
+ if ( text != NULL )
+ PostManagerDisplayPostMessage(text);
+ MemFreePointer( (VOID **)&text );
+#endif
+#if SETUP_PRINT_ENTER_SETUP_MSG //EIP:40772 - new token to control Setup enter message display
+ text = HiiGetString( gHiiHandle, STRING_TOKEN(STR_DEL_ENTER_SETUP) );
+ if ( text != NULL )
+ PostManagerDisplayPostMessage(text);
+ MemFreePointer( (VOID **)&text );
+#endif
+ gPostScreenMsg = TRUE;
+ }
+ // if gPasswordType is not AMI_PASSWORD_NONE, Already got the Password.
+ // Don't Ask for Password if it is already entered.
+ if ( gPasswordType == AMI_PASSWORD_NONE )
+ {
+ PasswordInstalled = PasswordCheckInstalled();
+ NoOfRetries = 3;
+
+ if(CheckSystemPasswordPolicy(PasswordInstalled))
+ {
+ bScreenUsed = TRUE;
+ if(AMI_PASSWORD_NONE == CheckSystemPassword( AMI_PASSWORD_NONE, &NoOfRetries, NULL))
+ {
+ while(1)
+ {
+ //Patch
+ //Ctl-Alt-Del is not recognized by core unless a
+ //ReadKeyStroke is issued
+ gBS->WaitForEvent( 1, &(gST->ConIn->WaitForKey), &Index );
+ gST->ConIn->ReadKeyStroke( gST->ConIn, &Key );
+ }
+ }
+ }
+ }
+ return bScreenUsed;
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: ProcessEnterSetup
+//
+// Description: This function is a hook called when TSE determines
+// that SETUP utility has to be displayed. This function
+// is available as ELINK. In the generic implementation
+// setup password is prompted in this function.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID ProcessEnterSetup(VOID)
+{
+ UINTN NoOfRetries;
+ UINT32 PasswordInstalled = AMI_PASSWORD_NONE;
+ UINTN Index;
+ EFI_INPUT_KEY Key;
+
+ if ( gPasswordType == AMI_PASSWORD_NONE )
+ {
+
+ PasswordInstalled = PasswordCheckInstalled();
+
+ if ( !( PasswordInstalled & AMI_PASSWORD_ADMIN ) )
+ {
+ SetPasswordType( AMI_PASSWORD_ADMIN );
+ }
+ else
+ {
+ NoOfRetries = 3;
+
+ if(AMI_PASSWORD_NONE == CheckSystemPassword( AMI_PASSWORD_USER, &NoOfRetries, NULL))
+ {
+ while(1)
+ {
+ //Patch
+ //Ctl-Alt-Del is not recognized by core unless a
+ //ReadKeyStroke is issued
+ gBS->WaitForEvent( 1, &(gST->ConIn->WaitForKey), &Index );
+ gST->ConIn->ReadKeyStroke( gST->ConIn, &Key );
+ }
+ }
+ }
+ }
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: ProcessEnterSetup
+//
+// Description: This function is a hook called when TSE determines
+// that it has to load the boot options in the boot
+// order. This function is available as ELINK. In the
+// generic implementation this function is empty. OEM
+// may decide to prompt for boot password in this
+// function.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID ProcessProceedToBoot(VOID)
+{
+}
+
+///Control key handling using Elinks...
+
+USER_CONTROL_KEY_DATA gUserCtrlKeyData[]= { CONTROL_KEY_MAP_LIST };
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: GetKeySelection
+//
+// Description: Function to validate the selected key based the key data.
+//
+// Input: UserCtrlKeyData: User initialized data for the key
+// Key: Key provided by SimpleTextIn protocol
+// KeyCodeProtocolSupport: flag to verify KeyShiftState.
+//
+// Output: TRUE/FALSE
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN GetKeySelection(USER_CONTROL_KEY_DATA UserCtrlKeyData, AMI_EFI_KEY_DATA AmiKey, BOOLEAN KeyCodeProtocolSupport)
+{
+ ///EIP-47387: Start
+ if (KeyCodeProtocolSupport)
+ {
+#if TSE_USE_AMI_EFI_KEYCODE_PROTOCOL
+ /// validate the key including KeyShiftState.
+ if ((TSE_CHECK_SHIFTSTATE(AmiKey.KeyState.KeyShiftState, UserCtrlKeyData.KeyShiftState) )&&
+ (AmiKey.Key.UnicodeChar == UserCtrlKeyData.UnicodeChar ) &&
+ (AmiKey.Key.ScanCode == UserCtrlKeyData.ScanCode ) )
+ {
+ return 1;
+ }
+#endif
+ }
+ /// validate the key without KeyShiftState
+ else if( (AmiKey.Key.UnicodeChar == UserCtrlKeyData.UnicodeChar ) &&
+ (AmiKey.Key.ScanCode == UserCtrlKeyData.ScanCode ) )
+ {
+ return 1;
+ }
+ return 0;
+ ///EIP-47387: End
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: MapControlKeys
+//
+// Description: This function is a hook called inside setup utility
+// to determine the action to be taken for a particular
+// key press. This function is available as ELINK. OEMs
+// may choose to have a different action or a different
+// key. With this function OEMs can change key mappings
+// for the controls in the setup utility. Post hot keys
+// and Setup utility hot keys are out of this functions
+// scope.
+//
+// Input: Key: Key provided by SimpleTextIn protocol
+//
+// Output: CONTROL_ACTION: enumeration defined in commonoem.h.
+// Input EFI_INPUT_KEY has to mapped to one of the
+// enumerations in CONTROL_ACTION.
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+CONTROL_ACTION MapControlKeys(AMI_EFI_KEY_DATA key)
+{
+ UINT8 CtrlCnt=0;
+ UINT32 UserCtrlKeyCount=0;
+ UserCtrlKeyCount = ( sizeof(gUserCtrlKeyData) / sizeof(USER_CONTROL_KEY_DATA));
+
+///EIP-47387: Start
+#if TSE_USE_AMI_EFI_KEYCODE_PROTOCOL
+ ///To get the selected key data with shiftstate using Keycode protocol.
+ for( CtrlCnt=0; CtrlCnt<UserCtrlKeyCount; CtrlCnt++ )
+ {
+ if( GetKeySelection (gUserCtrlKeyData[CtrlCnt], key, 1) )
+ {
+ return gUserCtrlKeyData[CtrlCnt].CtrlAction;
+ }
+ }
+#else
+ ///To get the selected key data without shiftstate
+ for( CtrlCnt=0; CtrlCnt<UserCtrlKeyCount; CtrlCnt++ )
+ {
+ if( GetKeySelection (gUserCtrlKeyData[CtrlCnt], key, 0) )
+ {
+ return gUserCtrlKeyData[CtrlCnt].CtrlAction;
+ }
+ }
+#endif
+///EIP-47387: End
+
+ if( CharIsAlpha(key.Key.UnicodeChar) )
+ return ControlActionAlpha;
+ if( CharIsNumeric(key.Key.UnicodeChar) )
+ return ControlActionNumeric;
+
+ return ControlActionUnknown;
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: SupportOSIndication
+//
+// Description: Adds OSIndication support
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+#define EFI_OS_INDICATIONS_BOOT_TO_FW_UI 0x0000000000000001
+VOID SupportOSIndication (VOID)
+{
+ EFI_STATUS Status = EFI_SUCCESS;
+ EFI_GUID EfiGlobalVariableGuid = EFI_GLOBAL_VARIABLE;
+ UINT64 OsIndicationsSupported = EFI_OS_INDICATIONS_BOOT_TO_FW_UI;
+ UINT64 OsIndications = 0;
+ UINTN DataSize = sizeof (UINT64);
+ UINT32 Attributes = 0;
+ UINT32 BootFlow = BOOT_FLOW_CONDITION_FIRST_BOOT;
+ EFI_GUID BootFlowGuid = BOOT_FLOW_VARIABLE_GUID;
+
+ Status = pRS->SetVariable (L"OsIndicationsSupported", &EfiGlobalVariableGuid, (EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS), DataSize, (VOID *)&OsIndicationsSupported);
+ if (!EFI_ERROR (Status))
+ {
+ DataSize = sizeof (UINT64);
+ Status = pRS->GetVariable (L"OsIndications", &EfiGlobalVariableGuid, &Attributes, &DataSize, (VOID *)&OsIndications);
+ if (!EFI_ERROR (Status))
+ {
+ if (OsIndications & EFI_OS_INDICATIONS_BOOT_TO_FW_UI)
+ {
+ Status = pRS->SetVariable (L"BootFlow",
+ &BootFlowGuid,
+ EFI_VARIABLE_BOOTSERVICE_ACCESS,
+ sizeof (BootFlow),
+ &BootFlow);
+ OsIndications = OsIndications & (~EFI_OS_INDICATIONS_BOOT_TO_FW_UI);
+ Status = pRS->SetVariable (L"OsIndications", &EfiGlobalVariableGuid, Attributes, DataSize, (VOID *)&OsIndications);
+ }
+ }
+ }
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: MinisetupDriverEntryHook
+//
+// Description: This function is a hook called at the end of TSE
+// driver entry. This function is available as ELINK.
+// In the generic implementation TSE installs Key
+// monitoring protocol. OEMs may choose to do additional
+// logic here.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID MinisetupDriverEntryHook(VOID)
+{
+#if TSE_DEBUG_MESSAGES
+ EFI_STATUS Status;
+ EFI_GUID guidDbgPrint = TSE_DEBUG_MESSAGES_GUID;
+ UINTN dbgVarSize = sizeof(gDbgPrint);
+ UINT16 FeatureBit ;
+
+#endif
+
+#if SETUP_SUPPORT_KEY_MONITORING
+ InstallKeyMonProtocol();
+#endif
+ StyleOverRideComponent();
+ ConfigPostScrollArea();
+
+#if TSE_DEBUG_MESSAGES
+
+ Status = pRS->GetVariable(
+ L"TseDebugPrint",
+ &guidDbgPrint,
+ NULL,
+ &dbgVarSize,
+ &FeatureBit) ;
+
+ if(!EFI_ERROR( Status ) )
+ gDbgPrint = FeatureBit ;
+#endif
+#if OSIndication_SUPPORT
+ SupportOSIndication ();
+#endif
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: PostManagerHandShakeHook
+//
+// Description: This function is a hook called at the begining of the
+// PostManagerHandShake protocol function. This function
+// is available as ELINK. In the generic implementation
+// TSE gets keys from key monitor filter. OEMs may choose
+// to do additional logic here.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID PostManagerHandShakeHook(VOID)
+{
+#if SETUP_SUPPORT_KEY_MONITORING
+ GetKeysFromKeyMonFilter();
+#endif
+}
+
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: PrintEnterBBSPopupMessage
+//
+// Description: Displays STR_ACK_BBS_POPUP message in screen
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID PrintEnterBBSPopupMessage ()
+{
+ if(gEnterBoot != TRUE) // Print the "Entering Boot" message only once
+ {
+#if SETUP_PRINT_ENTER_BBSPOPUP_MSG
+ CHAR16 *text = NULL;
+
+ //Print Entering Boot Menu here
+ text = HiiGetString( gHiiHandle, STRING_TOKEN(STR_ACK_BBS_POPUP) );
+ if ( text != NULL )
+ PostManagerDisplayPostMessage(text);
+ MemFreePointer( (VOID **)&text );
+#endif
+ gEnterBoot = TRUE;
+ }
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: PrintEnterSetupMessage
+//
+// Description: Displays STR_ACK_ENTER_SETUP message in screen
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+void PrintEnterSetupMessage()
+{
+ if(gEnterSetup != TRUE) // To print the "Entering setup" message only once
+ {
+#if SETUP_PRINT_ENTER_SETUP_MSG //EIP:40772 - new token to control Setup enter message display
+ CHAR16 *text = NULL;
+
+ //Print Entering setup here
+ text = HiiGetString( gHiiHandle, STRING_TOKEN(STR_ACK_ENTER_SETUP) );
+ if ( text != NULL )
+ PostManagerDisplayPostMessage(text);
+ MemFreePointer( (VOID **)&text );
+#endif
+ gEnterSetup = TRUE;
+ }
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: CheckandDeactivateSoftkbd
+//
+// Description: This function is called to check and Deactivate the Softkbd
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+void CheckandDeactivateSoftkbd()
+{
+ if(TSEMouseIgnoreMouseActionHook() == TRUE)
+ TSEStringReadLoopExitHook();
+}
+
+#if TSE_USE_AMI_EFI_KEYCODE_PROTOCOL
+BOOLEAN CheckOEMKey(AMI_EFI_KEY_DATA* AmiKey, UINT16 UnicodeCharSDL, UINT16 ScanCodeSDL,
+ EFI_KEY EfiKeySDL, UINT32 ShiftStateSDL, EFI_KEY_TOGGLE_STATE ToggleStateSDL)
+{
+ BOOLEAN bRet = FALSE;
+ BOOLEAN bKeyMatch = FALSE;
+ BOOLEAN bShiftStateMatch = FALSE;
+ BOOLEAN bToggleStateMatch = FALSE;
+
+ if ( ( ((AmiKey->Key.UnicodeChar == UnicodeCharSDL)&&(UnicodeCharSDL != 0))
+ || ((AmiKey->Key.ScanCode == ScanCodeSDL)&&(ScanCodeSDL!=0)) )
+ ^((AmiKey->EfiKey == EfiKeySDL)&&(EfiKeySDL != 0)) )
+ bKeyMatch = TRUE;
+
+ //find if the shift key is valid and matching
+ /*if (!(ShiftStateSDL & SHIFT_STATE_VALID))//we don't have to check
+ bShiftStateMatch = TRUE;*/
+ if (AmiKey->KeyState.KeyShiftState & SHIFT_STATE_VALID)
+ {
+ bShiftStateMatch = CheckAdvShiftState(AmiKey->KeyState.KeyShiftState, ShiftStateSDL); // EIP85768
+ /* if( ((AmiKey->KeyState.KeyShiftState &(~SHIFT_STATE_VALID)) & ShiftStateSDL)
+ || ((AmiKey->KeyState.KeyShiftState == SHIFT_STATE_VALID)
+ && (ShiftStateSDL == SHIFT_STATE_VALID)) )
+ bShiftStateMatch = TRUE;*/
+ }
+ //find if the toggle key is valid and matching
+ if (!(ToggleStateSDL & TOGGLE_STATE_VALID))//we don't have to check
+ bToggleStateMatch = TRUE;
+ else if (AmiKey->KeyState.KeyToggleState & TOGGLE_STATE_VALID)
+ {
+ if( ((AmiKey->KeyState.KeyToggleState &(~TOGGLE_STATE_VALID)) & ToggleStateSDL)
+ || ((AmiKey->KeyState.KeyToggleState == TOGGLE_STATE_VALID)
+ && (ToggleStateSDL == TOGGLE_STATE_VALID)) )
+ bToggleStateMatch = TRUE;
+ }
+
+ bRet = (bKeyMatch && bShiftStateMatch && bToggleStateMatch) ? TRUE : FALSE;
+
+ return bRet;
+}
+#else
+BOOLEAN CheckOEMKey(AMI_EFI_KEY_DATA* AmiKey, UINT16 UnicodeCharSDL, UINT16 ScanCodeSDL)
+{
+ if ( ( AmiKey->Key.UnicodeChar == UnicodeCharSDL )
+ && ( AmiKey->Key.ScanCode == ScanCodeSDL ) )
+ return TRUE;
+ else
+ return FALSE;
+}
+#endif
+typedef BOOLEAN (OEM_KEY_CALLBACK_CHECK_FN) ( CHAR16 UnicodeChar, UINT16 ScanCode, UINT32 ShiftState, OUT VOID **OemKeyCallbackFn );
+
+extern OEM_KEY_CALLBACK_CHECK_FN OEM_KEY_CALLBACK_FN EndOfOemCallbackList;
+OEM_KEY_CALLBACK_CHECK_FN * OemKeyCheckFnList[] = { OEM_KEY_CALLBACK_FN NULL };
+extern BOOT_FLOW *gBootFlowTable;
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: CheckOEMKeyCallback
+//
+// Description: This function to check OEMKey is consumed by any of the modules that
+// has child elink to OEM_KEY_CALLBACK_LIST. If it wants to handle the key
+// It can return success and callback funciton. The callback function will be
+// called in Bootflowentry.
+//
+// Input: AMI_EFI_KEY_DATA
+//
+// Output: BOOLEAN
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN CheckOEMKeyCallback(AMI_EFI_KEY_DATA* AmiKey)
+{
+ UINT32 ShiftState = 0;
+ VOID *CallbackFunction=NULL;
+ UINTN i;
+ BOOT_FLOW *bootFlowPtr;
+
+#if TSE_USE_AMI_EFI_KEYCODE_PROTOCOL
+ ShiftState = AmiKey->KeyState.KeyShiftState;
+#endif
+ for( i=0;OemKeyCheckFnList[i];i++)
+ {
+ if(OemKeyCheckFnList[i](AmiKey->Key.UnicodeChar, AmiKey->Key.ScanCode, ShiftState, &CallbackFunction))
+ {
+ // OEMKey Claimed
+ if(CallbackFunction != NULL)
+ {
+ bootFlowPtr = gBootFlowTable;
+ for ( bootFlowPtr = gBootFlowTable;
+ bootFlowPtr->Condition != BOOT_FLOW_CONDITION_NULL; bootFlowPtr++ )
+ {
+ if(bootFlowPtr->Condition == BOOT_FLOW_CONDITION_OEM_KEY_CALLBACK)
+ {
+ // Update the OEM Key Callback function.
+ bootFlowPtr->CallbackFunction = (BOOT_FLOW_CALLBACK)(UINTN)CallbackFunction;
+ return TRUE;
+ }
+ }
+ }
+ }
+ }
+
+ return FALSE;
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: CheckForKey
+//
+// Description: This function is a hook called to perform specific
+// action for a POST hot key. This function is called
+// periodically. This function is available as ELINK.
+//
+// Input: Event: Timer event.
+// Context: Event context; always NULL
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID CheckForKey (EFI_EVENT Event, VOID *Context)
+{
+ EFI_STATUS Status;
+ AMI_EFI_KEY_DATA AmiKey;
+
+#if TSE_USE_AMI_EFI_KEYCODE_PROTOCOL
+ AMI_EFI_KEY_DATA KeyFlush;
+ EFI_STATUS StatusFlush;
+ AMI_EFIKEYCODE_PROTOCOL *pKeyCodeProtocol;
+
+ Status = gBS->HandleProtocol(gST->ConsoleInHandle, &gAmiEfiKeycodeProtocolGuid, (void*)&pKeyCodeProtocol);
+ if (EFI_ERROR(Status)) return;
+#endif
+
+ if ( gST->ConIn == NULL )
+ return;
+
+ if ( gEnterSetup || gBootFlow )
+ return;
+ do
+ {
+#if SETUP_SUPPORT_KEY_MONITORING
+ if(gLegacyKeys)
+ {
+ if(gLegacyKeys & SETUP_ENTRY_KEY_BIT)
+ PrintEnterSetupMessage();
+#if SETUP_BBS_POPUP_ENABLE
+ else if (gLegacyKeys & POPUP_ENTRY_KEY_BIT) {
+ PrintEnterBBSPopupMessage ();
+ gBootFlow = BOOT_FLOW_CONDITION_BBS_POPUP;
+ }
+#endif
+#if SETUP_OEM_KEY1_ENABLE
+ else if (gLegacyKeys & OEM_KEY1_BIT)
+ gBootFlow = BOOT_FLOW_CONDITION_OEM_KEY1;
+#endif
+#if SETUP_OEM_KEY2_ENABLE
+ else if (gLegacyKeys & OEM_KEY2_BIT)
+ gBootFlow = BOOT_FLOW_CONDITION_OEM_KEY2;
+#endif
+#if SETUP_OEM_KEY3_ENABLE
+ else if (gLegacyKeys & OEM_KEY3_BIT)
+ gBootFlow = BOOT_FLOW_CONDITION_OEM_KEY3;
+#endif
+#if SETUP_OEM_KEY4_ENABLE
+ else if (gLegacyKeys & OEM_KEY4_BIT)
+ gBootFlow = BOOT_FLOW_CONDITION_OEM_KEY4;
+#endif
+ }
+#endif
+#if TSE_USE_AMI_EFI_KEYCODE_PROTOCOL
+ Status = pKeyCodeProtocol->ReadEfikey( pKeyCodeProtocol, &AmiKey );
+
+ // If it Partial Key make the Status as Error to ignore
+ // the Partial Key.
+ if((AmiKey.KeyState.KeyToggleState & KEY_STATE_EXPOSED) == KEY_STATE_EXPOSED) //EIP81959 - Ignoring Partial keys
+ if( (!EFI_ERROR( Status )) && (AmiKey.Key.ScanCode==0) && (AmiKey.Key.UnicodeChar==0))
+ Status = EFI_NOT_READY;
+
+ if ( ! EFI_ERROR( Status ) )
+ {
+ do
+ {
+ StatusFlush = pKeyCodeProtocol->ReadEfikey( pKeyCodeProtocol, &KeyFlush );
+ // If it Partial Key make the Status as Error to ignore
+ // the Partial Key.
+ if((KeyFlush.KeyState.KeyToggleState & KEY_STATE_EXPOSED) == KEY_STATE_EXPOSED) //EIP81959 - Ignoring Partial keys
+ if( (!EFI_ERROR( Status )) && (KeyFlush.Key.ScanCode==0) && (KeyFlush.Key.UnicodeChar==0))
+ break;
+ } while ( ! EFI_ERROR( StatusFlush ) );
+ }
+
+#else
+ Status = gST->ConIn->ReadKeyStroke( gST->ConIn, &AmiKey.Key );
+#endif
+
+ if ( ! EFI_ERROR( Status ))
+ {
+ if(
+ ( (SETUP_ENTRY_UNICODE == AmiKey.Key.UnicodeChar)
+ &&(SETUP_ENTRY_SCAN == AmiKey.Key.ScanCode)
+#if TSE_USE_AMI_EFI_KEYCODE_PROTOCOL
+ && (TSE_CHECK_SHIFTSTATE(AmiKey.KeyState.KeyShiftState, SETUP_ENTRY_SHIFT_STATE))
+#endif
+ )
+#if SETUP_ALT_ENTRY_ENABLE
+ || ( (SETUP_ALT_ENTRY_UNICODE == AmiKey.Key.UnicodeChar)
+ && (SETUP_ALT_ENTRY_SCAN == AmiKey.Key.ScanCode)
+#if TSE_USE_AMI_EFI_KEYCODE_PROTOCOL
+ && (TSE_CHECK_SHIFTSTATE(AmiKey.KeyState.KeyShiftState, SETUP_ALT_ENTRY_SHIFT_STATE))
+#endif
+ )
+#endif
+ )
+
+ {
+ CheckandDeactivateSoftkbd();// EIP62763 : Check and Deactivate if softkbd present
+ PrintEnterSetupMessage();
+ }
+#if SETUP_BBS_POPUP_ENABLE
+ else if ( (AmiKey.Key.UnicodeChar == POPUP_MENU_ENTRY_UNICODE)
+ && (AmiKey.Key.ScanCode == POPUP_MENU_ENTRY_SCAN)
+#if TSE_USE_AMI_EFI_KEYCODE_PROTOCOL
+#ifdef POPUP_MENU_ENTRY_SHIFT_STATE
+ && (TSE_CHECK_SHIFTSTATE (AmiKey.KeyState.KeyShiftState, POPUP_MENU_ENTRY_SHIFT_STATE))
+#endif
+#endif
+ )
+ {
+ CheckandDeactivateSoftkbd();// EIP62763 : Check and Deactivate if softkbd present
+ PrintEnterBBSPopupMessage ();
+ gBootFlow = BOOT_FLOW_CONDITION_BBS_POPUP;
+ }
+#endif
+#if EFI_SPECIFICATION_VERSION>0x20000
+ else if (CheckforHotKey (AmiKey)) //EIP: 62631 checking for hot boot keys
+ {
+ gBootFlow = BOOT_FLOW_HOTKEY_BOOT;
+ }
+#endif
+
+#if TSE_USE_AMI_EFI_KEYCODE_PROTOCOL
+#if SETUP_OEM_KEY1_ENABLE
+ else if (CheckOEMKey(&AmiKey, SETUP_OEM_KEY1_UNICODE, SETUP_OEM_KEY1_SCAN,
+ SETUP_OEM_KEY1_EFIKEY, SETUP_OEM_KEY1_SHIFT, SETUP_OEM_KEY1_TOGGLE))
+ gBootFlow = BOOT_FLOW_CONDITION_OEM_KEY1;
+#endif
+
+#if SETUP_OEM_KEY2_ENABLE
+ else if (CheckOEMKey(&AmiKey, SETUP_OEM_KEY2_UNICODE, SETUP_OEM_KEY2_SCAN,
+ SETUP_OEM_KEY2_EFIKEY, SETUP_OEM_KEY2_SHIFT, SETUP_OEM_KEY2_TOGGLE))
+ gBootFlow = BOOT_FLOW_CONDITION_OEM_KEY2;
+#endif
+
+#if SETUP_OEM_KEY3_ENABLE
+ else if (CheckOEMKey(&AmiKey, SETUP_OEM_KEY3_UNICODE, SETUP_OEM_KEY3_SCAN,
+ SETUP_OEM_KEY3_EFIKEY, SETUP_OEM_KEY3_SHIFT, SETUP_OEM_KEY3_TOGGLE))
+ gBootFlow = BOOT_FLOW_CONDITION_OEM_KEY3;
+#endif
+
+#if SETUP_OEM_KEY4_ENABLE
+ else if (CheckOEMKey(&AmiKey, SETUP_OEM_KEY4_UNICODE, SETUP_OEM_KEY4_SCAN,
+ SETUP_OEM_KEY4_EFIKEY, SETUP_OEM_KEY4_SHIFT, SETUP_OEM_KEY4_TOGGLE))
+ gBootFlow = BOOT_FLOW_CONDITION_OEM_KEY4;
+#endif
+
+#else // if no TSE_USE_AMI_EFI_KEYCODE_PROTOCOL
+#if SETUP_OEM_KEY1_ENABLE
+ else if (CheckOEMKey(&AmiKey, SETUP_OEM_KEY1_UNICODE, SETUP_OEM_KEY1_SCAN))
+ gBootFlow = BOOT_FLOW_CONDITION_OEM_KEY1;
+#endif
+
+#if SETUP_OEM_KEY2_ENABLE
+ else if (CheckOEMKey(&AmiKey, SETUP_OEM_KEY2_UNICODE, SETUP_OEM_KEY2_SCAN))
+ gBootFlow = BOOT_FLOW_CONDITION_OEM_KEY2;
+#endif
+
+#if SETUP_OEM_KEY3_ENABLE
+ else if (CheckOEMKey(&AmiKey, SETUP_OEM_KEY3_UNICODE, SETUP_OEM_KEY3_SCAN))
+ gBootFlow = BOOT_FLOW_CONDITION_OEM_KEY3;
+#endif
+
+#if SETUP_OEM_KEY4_ENABLE
+ else if (CheckOEMKey(&AmiKey, SETUP_OEM_KEY4_UNICODE, SETUP_OEM_KEY4_SCAN))
+ gBootFlow = BOOT_FLOW_CONDITION_OEM_KEY4;
+#endif
+#endif
+ else if (CheckOEMKeyCallback(&AmiKey) )
+ gBootFlow = BOOT_FLOW_CONDITION_OEM_KEY_CALLBACK;
+#ifndef STANDALONE_APPLICATION
+ else if ( ( AmiKey.Key.UnicodeChar == SETUP_TOGGLE_KEY_UNICODE )
+ && ( AmiKey.Key.ScanCode == SETUP_TOGGLE_KEY_SCANCODE) )
+ {
+ if ( gQuietBoot )
+ {
+ gQuietBoot = FALSE;
+ MouseStop();//EIP 62763 : Stopping the mouse before cleanuplogo when TAB key pressed
+ CleanUpLogo();
+ SwitchToPostScreenHook();//EIP-111415 SwitchToPostScreenHook
+ InitPostScreen();
+ }
+ }
+#endif
+ }
+ } while ( ! EFI_ERROR( Status ) );
+
+
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: CheckForClick
+//
+// Description: This function is a hook called to perform specific
+// action for a POST hot key. This function is called
+// periodically. This function is available as ELINK.
+//
+// Input: Event: Timer event.
+// Context: Event context; always NULL
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID CheckForClick (EFI_EVENT Event, VOID *Context)
+{
+#if MINISETUP_MOUSE_SUPPORT
+ INT32 Button_Status=0;
+
+ if(TSEMouseIgnoreMouseActionHook())
+ {
+ return;// EIP62763 : Check for softkbd, if present return
+ }
+ if(TSEMouse!=NULL)
+ {
+ TSEMouse->MousePoll(TSEMouse);
+ TSEMouse->GetButtonStatus(TSEMouse,&Button_Status);
+
+ if (TSE_POST_STATUS_PROCEED_TO_BOOT == gPostStatus) ////EIP-140123 To StopclickEvent andd avoid displaying softkbd when Proceed_To_Boot
+ StopClickEvent();
+
+ if(((Button_Status == TSEMOUSE_RIGHT_CLICK)||(Button_Status == TSEMOUSE_LEFT_DCLICK)||(Button_Status == TSEMOUSE_LEFT_CLICK))&&(!TSEMouseIgnoreMouseActionHook()))
+ {
+ TSEStringReadLoopEntryHook();
+ StopClickEvent();
+ }
+
+ }
+#endif
+
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: BeforeLegacyBootLaunch
+//
+// Description: This function is a hook called before launching
+// legacy boot option. This function is available as
+// ELINK. In the generic implementation this function is
+// empty. OEMs may choose to do additional logic here.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID BeforeLegacyBootLaunch(VOID)
+{
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: AfterLegacyBootLaunch
+//
+// Description: This function is a hook called after launching
+// legacy boot option. This function is available as
+// ELINK. In the generic implementation this function is
+// empty. OEMs may choose to do additional logic here.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID AfterLegacyBootLaunch(VOID)
+{
+}
+VOID MouseDestroy(VOID);
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: BeforeEfiBootLaunch
+//
+// Description: This function is a hook called before launching EFI
+// boot option. This function is available as ELINK. In
+// the generic implementation this function is empty.
+// OEMs may choose to do additional logic here.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID BeforeEfiBootLaunch(VOID)
+{
+ StopClickEvent();//EIP 86253 : Mouse and SoftKbd does not work after displaying "No option to boot to" in POST
+ MouseDestroy();
+
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: AfterEfiBootLaunch
+//
+// Description: This function is a hook called after launching EFI
+// boot option. This function is available as ELINK. In
+// the generic implementation this function is empty.
+// OEMs may choose to do additional logic here.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID AfterEfiBootLaunch(VOID)
+{
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: SavedConfigChanges
+//
+// Description: This function is a hook called after setup utility
+// saves changes based on user input. This function is
+// available as ELINK. In the generic implementation
+// this function is empty. OEMs may choose to do
+// additional logic here.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID SavedConfigChanges(VOID)
+{
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: LoadedConfigDefaults
+//
+// Description: This function is a hook called after setup utility
+// loaded config defaults based on user input. This
+// function is available as ELINK. In the generic
+// implementation this function is empty. OEMs may
+// choose to do additional logic here.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID LoadedConfigDefaults(VOID)
+{
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TimeOutLoopHook
+//
+// Description: This function is a hook called in every iteration
+// (not every second) while TSE is waiting for POST time
+// out. This function is available as ELINK. In the generic
+// implementation this function is empty. OEMs may
+// choose to do additional logic here.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID TimeOutLoopHook(VOID)
+{
+}
+
+VOID HiiGetEfiKey(CHAR16 *PwKey);
+///////////////////////////////////////////////////////////////////
+////////PasswordEncode moved to PasswordEncode module//////////////
+///////////////////////////////////////////////////////////////////
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: SetControlColors
+//
+// Description: This function is a hook called when colour of a
+// control has to be decided. This function is available
+// as ELINK. OEMs may choose to use different colour
+// combination.
+//
+// Input: BGColor: Back ground colour
+// FGColor: Fore ground colour
+// SecBGColor: Secondary back ground colour used for
+// time, date and menu
+// SecFGColor: Secondary fore ground colour used for
+// time, date and menu
+// SelBGColor: Selected back ground colour
+// SelFGColor: Selected fore ground colour
+// NSelBGColor: Not selected back ground colour
+// NSelFGColor: Not selected fore ground colour
+// LabelBGColor: Label back ground colour
+// LabelFGColor: Label fore ground colour
+// NSelLabelFGColor: Not selected label fore ground
+// EditBGColor: Edit box back ground
+// EditFGColor: Edit box fore ground
+// PopupFGColor: Popup fore ground
+// PopupBGColor: Popup back ground
+//
+// Output: EFI_STATUS: always EFI_SUCCESS
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS SetControlColors(UINT8 *BGColor, UINT8 *FGColor, UINT8 *SecBGColor, UINT8 *SecFGColor,
+ UINT8 *SelBGColor, UINT8 *SelFGColor, UINT8 *NSelBGColor, UINT8 *NSelFGColor,
+ UINT8 *LabelBGColor, UINT8 *LabelFGColor,UINT8 *NSelLabelFGColor, UINT8 *EditBGColor, UINT8 *EditFGColor,
+ UINT8 *PopupFGColor, UINT8 *PopupBGColor)
+{
+ if(FGColor !=NULL) *FGColor = Colors.FGColor ;
+ if(BGColor !=NULL) *BGColor = Colors.BGColor ;
+
+ if(SecFGColor !=NULL) *SecFGColor = Colors.SecFGColor ;
+ if(SecBGColor !=NULL) *SecBGColor = Colors.SecBGColor ;
+
+ if(SelFGColor !=NULL) *SelFGColor = Colors.SelFGColor ;
+ if(SelBGColor !=NULL) *SelBGColor = Colors.SelBGColor ;
+
+ if(NSelFGColor !=NULL) *NSelFGColor = Colors.NSelFGColor ;
+ if(NSelBGColor !=NULL) *NSelBGColor = Colors.NSelBGColor ;
+
+ if(LabelFGColor !=NULL) *LabelFGColor = Colors.LabelFGColor ;
+ if(LabelBGColor !=NULL) *LabelBGColor = Colors.LabelBGColor ;
+
+ if(NSelLabelFGColor !=NULL) *NSelLabelFGColor = Colors.NSelLabelFGColor ;
+
+ if(EditFGColor !=NULL) *EditFGColor = Colors.EditFGColor ;
+ if(EditBGColor !=NULL) *EditBGColor = Colors.EditBGColor ;
+
+ if(PopupFGColor !=NULL) *PopupFGColor = Colors.PopupFGColor ;
+ if(PopupBGColor !=NULL) *PopupBGColor = Colors.PopupBGColor ;
+
+ return EFI_SUCCESS;
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: InvalidActionHook
+//
+// Description: This function is the hook call the appropriate InvalidActions function.
+// OEMs may choose to do additional logic here.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID InvalidActionHook(VOID)
+{
+ /// Call the Invalid action function (Ex: Beep )
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: LoadedUserDefaults
+//
+// Description: This function is a hook called after setup utility
+// loaded user defaults based on user input. This
+// function is available as ELINK. In the generic
+// implementation this function is empty. OEMs may
+// choose to do additional logic here.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID LoadedUserDefaults(VOID)
+{
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: LoadedBuildDefaults
+//
+// Description: This function is a hook called after setup utility
+// loaded Oem defaults based on user input. This
+// function is available as ELINK. In the generic
+// implementation this function is empty. OEMs may
+// choose to do additional logic here.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID LoadedBuildDefaults(VOID)
+{
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: LoadedPreviousValues
+//
+// Description: This function is a hook called after setup utility
+// loaded previously saved values based on user input. This
+// function is available as ELINK. In the generic
+// implementation this function is empty. OEMs may
+// choose to do additional logic here.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID LoadedPreviousValues(VOID)
+{
+ //UpdateControlStatus(TRUE);
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: SetupConfigModified
+//
+// Description: This function is a hook called after some control
+// modified in the setup utility by user. This
+// function is available as ELINK. In the generic
+// implementation this function is empty. OEMs may
+// choose to do additional logic here.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID SetupConfigModified(VOID)
+{
+ //UpdateControlStatus(TRUE);
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: LoadSetupDefaults
+//
+// Description: This function is a hook called when user loads the manufacturing
+// or optimal defaults. This function is
+// available as ELINK. OEMs may override the function and
+// decide the policy.
+//
+// Input: defaults : (NVRAM_VARIABLE *)optimal or manufacturing
+// data : Messagebox
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID _LoadDefaults( NVRAM_VARIABLE *defaults, UINTN data );
+VOID LoadSetupDefaults (VOID *defaults, UINTN data )
+{
+
+ _LoadDefaults((NVRAM_VARIABLE *)defaults, data );
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: SetupConfigModified
+//
+// Description: This function is a hook called after some control
+// modified in the setup utility by user. This
+// function is available as ELINK. In the generic
+// implementation this function is empty. OEMs may
+// choose to do additional logic here.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID PreSystemResetHook(VOID)
+{
+ ///to have the oem customizations just before resetting
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: OemKey1Hook
+//
+// Description: This function is a hook called when user activates
+// configurable post hot key 1. This function is
+// available as ELINK. Generic implementation is empty.
+// OEMs may choose to use different logic here.
+//
+// Input: bootFlowPtr: Boot flow entry that triggered this call
+//
+// Output: always EFI_SUCCESS
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS OemKey1Hook ( BOOT_FLOW *bootFlowPtr )
+{
+ EFI_STATUS Status = EFI_SUCCESS;
+ //
+ // Add code here on enabling SETUP_OEM_KEY1_ENABLE for callback
+
+ return Status;
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: OemKey2Hook
+//
+// Description: This function is a hook called when user activates
+// configurable post hot key 2. This function is
+// available as ELINK. Generic implementation is empty.
+// OEMs may choose to use different logic here.
+//
+// Input: bootFlowPtr: Boot flow entry that triggered this call
+//
+// Output: always EFI_SUCCESS
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS OemKey2Hook ( BOOT_FLOW *bootFlowPtr )
+{
+ EFI_STATUS Status = EFI_SUCCESS;
+ //
+ // Add code here on enabling SETUP_OEM_KEY2_ENABLE for callback
+
+ return Status;
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: OemKey3Hook
+//
+// Description: This function is a hook called when user activates
+// configurable post hot key 3. This function is
+// available as ELINK. Generic implementation is empty.
+// OEMs may choose to use different logic here.
+//
+// Input: bootFlowPtr: Boot flow entry that triggered this call
+//
+// Output: always EFI_SUCCESS
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS OemKey3Hook ( BOOT_FLOW *bootFlowPtr )
+{
+ EFI_STATUS Status = EFI_SUCCESS;
+ //
+ // Add code here on enabling SETUP_OEM_KEY3_ENABLE for callback
+
+ return Status;
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: OemKey4Hook
+//
+// Description: This function is a hook called when user activates
+// configurable post hot key 4. This function is
+// available as ELINK. Generic implementation is empty.
+// OEMs may choose to use different logic here.
+//
+// Input: bootFlowPtr: Boot flow entry that triggered this call
+//
+// Output: always EFI_SUCCESS
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS OemKey4Hook ( BOOT_FLOW *bootFlowPtr )
+{
+ EFI_STATUS Status = EFI_SUCCESS;
+ //
+ // Add code here on enabling SETUP_OEM_KEY4_ENABLE for callback
+
+ return Status;
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: MapControlMouseAction
+//
+// Description: This function is a hook called inside setup utility
+// to determine the action to be taken for a particular
+// Mouse Click. This function is available as ELINK. OEMs
+// may choose to have a different action or a different
+// mouse click.
+//
+// Input: MOUSE_INFO *pMouseInfo
+//
+// Output: CONTROL_ACTION: enumeration defined in commonoem.h.
+// Input EFI_INPUT_KEY has to mapped to one of the
+// enumerations in CONTROL_ACTION.
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+CONTROL_ACTION MapControlMouseAction(MOUSE_INFO *pMouseInfo)
+{
+ if(pMouseInfo!=NULL)
+ {
+ if(TSEMOUSE_RIGHT_CLICK == pMouseInfo->ButtonStatus)
+ return ControlActionAbort;
+#if SINGLE_CLICK_ACTIVATION //EIP74141 providing select option for single click too
+ if(TSEMOUSE_LEFT_DCLICK == pMouseInfo->ButtonStatus || TSEMOUSE_LEFT_CLICK == pMouseInfo->ButtonStatus)
+ return ControlActionSelect;
+#else
+ if(TSEMOUSE_LEFT_CLICK == pMouseInfo->ButtonStatus)
+ return ControlActionChoose;
+
+ if(TSEMOUSE_LEFT_DCLICK == pMouseInfo->ButtonStatus)
+ return ControlActionSelect;
+#endif
+ if(TSEMOUSE_LEFT_DOWN == pMouseInfo->ButtonStatus) //EIP74968
+ return ControlMouseActionLeftDown;
+
+ if(TSEMOUSE_LEFT_UP == pMouseInfo->ButtonStatus) //EIP74968
+ return ControlMouseActionLeftUp;
+
+ }
+ return ControlActionUnknown;
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: ProcessProceedToBootNow
+//
+// Description: This function is a hook called when Boots from
+// BBS popup or Bootoverride page.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID ProcessProceedToBootNow(VOID)
+{
+}
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: ProcessConOutAvailable
+//
+// Description: This function is a hook called when TSE determines
+// that console out is available. This function is available
+// as ELINK.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID ProcessConOutAvailable(VOID)
+{
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: FixSubPageAsRootPageList
+//
+// Description: This function Fixes the SubPage as root pages from
+// AMITSE_SUBPAGE_AS_ROOT_PAGE_LIST
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID FixSubPageAsRootPageList()
+{
+ UINTN RootPageListCount = sizeof(RootPageList) / sizeof (HII_FORM_ADDRESS);
+ UINTN i,j;
+ PAGE_INFO *info;
+ PAGE_ID_INFO *pageIdInfo;
+ // Support to Handle some child pages as root pages.
+ for(j=0; j<RootPageListCount;j++)
+ {
+ for ( i = 0; i < (UINTN)gPages->PageCount; i++ ) // EIP118410
+ {
+ info = (PAGE_INFO*)((UINTN)gApplicationData + gPages->PageList[i]);
+
+ // To Make Page as root
+ if( info->PageFormID == RootPageList[j].formId)
+ {
+ // If Handle is not null compare. If it null Ignore
+ if(RootPageList[j].Handle != NULL)
+ {
+ if(info->PageHandle != RootPageList[j].Handle)
+ continue;
+ }
+ pageIdInfo = (PAGE_ID_INFO *)(((UINT8 *) gPageIdList) + gPageIdList->PageIdList[info->PageIdIndex]);
+
+ if( EfiCompareGuid(&pageIdInfo->PageGuid,&RootPageList[j].formsetGuid) )//Compare Guid
+ info->PageParentID =0;
+ }
+ }
+ }
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: FixSubPageAsRootPageList
+//
+// Description: This function Fixes the Hides pages from
+// AMITSE_HIDDEN_PAGE_LIST
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID FixHiddenPageList(VOID)
+{
+ UINTN HiddenPageListCount = sizeof(HiddenPageList) / sizeof (HII_FORM_ADDRESS);
+ UINTN i,j;
+ PAGE_INFO *info;
+ PAGE_ID_INFO *pageIdInfo;
+ // To Hide Pages
+ for(j=0; j<HiddenPageListCount;j++)
+ {
+ for ( i = 0; i < (UINTN)gPages->PageCount; i++ ) // EIP118410
+ {
+ info = (PAGE_INFO*)((UINTN)gApplicationData + gPages->PageList[i]);
+
+ if( info->PageFormID == HiddenPageList[j].formId)
+ {
+ // If Handle is not null compare. If it null Ignore
+ if(RootPageList[j].Handle != NULL)
+ {
+ if(info->PageHandle != HiddenPageList[j].Handle)
+ continue;
+ }
+ pageIdInfo = (PAGE_ID_INFO *)(((UINT8 *) gPageIdList) + gPageIdList->PageIdList[info->PageIdIndex]);
+
+ if( EfiCompareGuid(&pageIdInfo->PageGuid,&HiddenPageList[j].formsetGuid) )//Compare Guid
+ {
+ info->PageFlags.PageVisible = TRUE;
+ /* This is needed as the PageDynamic is true if the IFR page is added dynamically. Then it will be shown under Dynamic pages. By making PageDynamic as FALSE we can make sure it is not shown anywere. */
+ info->PageFlags.PageDynamic = FALSE;
+ }
+ }
+ }
+ }
+}
+
+VOID TseUpdateRootPageOrder(VOID);
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: ProcessUIInitHook
+//
+// Description: This function is a hook called just before creating
+// the setup application for oem customizations. This function is
+// available as ELINK. OEMs may choose to do additional logic here.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID ProcessUIInitHook(VOID)
+{
+ CheckandDeactivateSoftkbd (); //EIP82552 Deactivating softkbd when time out occurs in post and enters into setup
+#if AMITSE_SUBPAGE_AS_ROOT_PAGE_LIST_SUPPORT
+ FixSubPageAsRootPageList ();
+#endif
+#if AMITSE_HIDE_ROOT_PAGE
+ FixHiddenPageList ();
+#endif
+ TseUpdateRootPageOrder();
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: AfterInitPostScreen
+//
+// Description: This function is a hook called After post screen is initilzed.
+// This function is available as ELINK. In the generic implementation this function
+// is empty. OEMs may choose to do additional logic here.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID AfterInitPostScreen(VOID)
+{
+
+}
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: TseUpdateRootPageOrder
+//
+// Description: This function is to update the Root page order from the specified elink.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID TseUpdateRootPageOrder(VOID)
+{
+
+#if AMITSE_ROOT_PAGE_ORDER_SUPPORT
+
+ UINTN RootPageOrderCount = sizeof(RootPageOrder) / sizeof (HII_FORM_ADDRESS);
+ UINTN j,k;
+ EFI_GUID gSetupPageOrderGuid = SETUP_ROOT_PAGE_ORDER_GUID, NullGuid = NULL_GUID;
+ UINT32 *currentBootFlow;
+ UINTN size = 0;
+ UINT32 BootFlow = BOOT_FLOW_CONDITION_NORMAL;
+
+ //EIP166682 gBootFlow is changing constantly so better get it from NVRAM and proceed
+ currentBootFlow = VarGetNvramName( L"BootFlow", &_gBootFlowGuid, NULL, &size );
+ if (NULL != currentBootFlow)
+ {
+ BootFlow = *currentBootFlow;
+ MemFreePointer ((VOID **)&currentBootFlow);
+ }
+
+ if((1 == RootPageOrderCount)&&(EfiCompareGuid(&NullGuid,&RootPageOrder[0].formsetGuid)))
+ return;
+
+ if(gRootPageOrder!=NULL)
+ return;
+
+ gRootPageOrder = EfiLibAllocateZeroPool (RootPageOrderCount * sizeof (HII_FORM_ADDRESS));
+ if (NULL == gRootPageOrder)
+ return;
+ // To Hide Pages
+ for(j=0; j<RootPageOrderCount;j++)
+ {
+ if((EfiCompareGuid(&gSetupPageOrderGuid,&RootPageOrder[j].formsetGuid))&&(RootPageOrder[j].formId == BootFlow))
+ {
+ k = j + 1;
+ while(!((EfiCompareGuid(&gSetupPageOrderGuid,&RootPageOrder[k].formsetGuid)) || (EfiCompareGuid(&NullGuid,&RootPageOrder[k].formsetGuid))))
+ {
+ gBS->CopyMem (&gRootPageOrder[gRootPageOrderIndex], &RootPageOrder[k], sizeof (HII_FORM_ADDRESS));
+ gRootPageOrderIndex ++;
+ gIsRootPageOrderPresent = TRUE;
+ k ++;
+ }
+ break;
+ }
+ }
+
+ //EIP166682 If root page ordering is not found for any bootflow then trying for BOOT_FLOW_CONDITION_NORMAL bootflow. Helpful for BOOT_FLOW_CONDITION_OEM_KEY1 etc.,,
+ if ( (FALSE == gIsRootPageOrderPresent) && (BOOT_FLOW_CONDITION_NORMAL != BootFlow) )
+ {
+ for(j=0; j<RootPageOrderCount;j++)
+ {
+ if ( (EfiCompareGuid (&gSetupPageOrderGuid,&RootPageOrder[j].formsetGuid)) && (RootPageOrder[j].formId == BOOT_FLOW_CONDITION_NORMAL) )
+ {
+ k=++j;
+ while (!( (EfiCompareGuid (&gSetupPageOrderGuid,&RootPageOrder[k].formsetGuid)) || (EfiCompareGuid(&NullGuid,&RootPageOrder[k].formsetGuid)) ) )
+ {
+ gBS->CopyMem (&gRootPageOrder[gRootPageOrderIndex], &RootPageOrder[k], sizeof (HII_FORM_ADDRESS));
+ gRootPageOrderIndex ++;
+ gIsRootPageOrderPresent = TRUE;
+ k ++;
+ }
+ break;
+ }
+ }
+ }
+#endif
+}
+//EIP-111415 SwitchToPostScreenHook Start
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: SwitchToPostScreen
+//
+// Description: This function is a hook called during SwitchToPostScreen post.
+// This function is available as ELINK. In the generic implementation this function
+// is empty. OEMs may choose to do additional logic here.
+//
+// Input: VOID
+//
+// Output: VOID
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID SwitchToPostScreen(VOID)
+{
+
+}
+//EIP-111415 SwitchToPostScreenHook Ends
+
+//EIP-139099 Start
+//<AMI_PHDR_START>
+//---------------------------------------------------------------------------------------------
+// Procedure: IsHideFormsetsWithClassGuid
+//
+// Description: This function filter formset and display formset based on ClassGUID mentioned in elink AMITSE_FILTER_CLASSGUID_FORMSETS
+//
+// Input: EFI_IFR_FORMSET. Formset to compare with elink classGuid.
+//
+// Output: BOOLEAN. Return TRUE formset matches with elink ClassGuid else FALSE
+//
+//---------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN ShowClassGuidFormsets (TSE_EFI_IFR_FORM_SET *FormSet )
+{
+#if SHOW_FORMSETS_WITH_CLASSGUID
+ UINT16 FilterListcount = sizeof(gFormSetClassGuidList) / sizeof (EFI_GUID);
+ UINT16 index = 0;
+
+ if (FormSet->ClassGuid)
+ {
+ for (index = 0; index < (FilterListcount-1); index++)//(FilterListcount-1) To avoid check with NULL guid
+ {
+ if ( EfiCompareGuid ( FormSet->ClassGuid, &gFormSetClassGuidList[index]) )
+ return TRUE;
+ }
+ return FALSE;
+ }
+#endif
+ return TRUE;//if token is disable
+}
+//EIP-139099 End
+
+//EIP-95647 Start
+//<AMI_PHDR_START>
+//---------------------------------------------------------------------------------------------
+// Procedure: HideDynamicFormsets
+//
+// Description: This function suppress dynamic formset mentioned in the elink AMITSE_SUPPRESS_DYNAMIC_FORMSET_LIST
+//
+// Input: GUID. Formset guid to compare with gSuppressDynamicFormsetList elink guids.
+//
+// Output: BOOLEAN. Return TRUE if any guid matches with gSuppressDynamicFormsetList elink else FALSE
+//
+//---------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+BOOLEAN HideDynamicFormsets (EFI_GUID *FormSetGuid )
+{
+#if AMITSE_SUPPRESS_DYNAMIC_FORMSET
+ UINTN suppressDynamicFormsetListCount = sizeof(gSuppressDynamicFormsetList) / sizeof (EFI_GUID);
+ UINT16 index = 0;
+
+ if (FormSetGuid)
+ {
+ for (index = 0; index < (suppressDynamicFormsetListCount-1); index++)
+ {
+ if ( EfiCompareGuid ( FormSetGuid, &gSuppressDynamicFormsetList[index]) )
+ return TRUE;
+ }
+ }
+#endif
+ return FALSE;
+}
+//EIP-95647 End
+
+//<AMI_PHDR_START>
+//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+// Procedure: VariableHandleSuppressed
+//
+// Description: This function informs to match the handle or not for creating new variable using VAR_DYNAMICPARSING_HANDLESUPPRESS_LIST ELink
+//
+// Input: EFI_GUID *, CHAR16 *
+//
+// Output: BOOLEAN. Return TRUE handle matches with elink else FALSE
+//
+//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+//<AMI_PHDR_END>
+CHAR8* StrDup16to8(CHAR16 *String);
+INTN EfiStrCmp (IN CHAR16 *String, IN CHAR16 *String2);
+BOOLEAN VariableHandleSuppressed (EFI_GUID *VariableGuid, CHAR16 *VariableName)
+{
+#if SUPPRESS_HANDLE_FOR_VAR_CREATION
+ UINTN HandleSuppressListCount = sizeof (gHandleSuppressVarList)/sizeof (VAR_DYNAMICPARSING_HANDLESUPPRESS);
+ UINTN i = 0;
+ CHAR8 *VariableNameStr8 = (CHAR8 *)NULL;
+
+ VariableNameStr8 = StrDup16to8 (VariableName);
+ if (NULL == VariableNameStr8)
+ {
+ return FALSE;
+ }
+ for(i=0; i < HandleSuppressListCount; i++)
+ {
+ if ( (EfiCompareGuid(VariableGuid, &(gHandleSuppressVarList [i].VariableGuid))) && (Strcmp (VariableNameStr8, gHandleSuppressVarList [i].VariableName) ==0) )
+ {
+ return TRUE;
+ }
+ }
+#endif
+ return FALSE;
+}
+
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2014, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
diff --git a/Core/EM/AMITSE/commonoem.h b/Core/EM/AMITSE/commonoem.h
new file mode 100644
index 0000000..ec1cd37
--- /dev/null
+++ b/Core/EM/AMITSE/commonoem.h
@@ -0,0 +1,354 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2011, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+// $Archive: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/commonoem.h $
+//
+// $Author: Arunsb $
+//
+// $Revision: 18 $
+//
+// $Date: 5/02/14 5:45a $
+//
+//*****************************************************************//
+//*****************************************************************//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/commonoem.h $
+//
+// 18 5/02/14 5:45a Arunsb
+// [TAG] EIP156258
+// [Category] Improvement
+// [Description] Providing ELINK option to suppress the handle
+// comparison on dynamic parsing
+// [Files] AMITSE.mak, AMITSE.sdl, commonoem.c, commonoem.h and Parse.c
+//
+// 17 3/06/13 12:24a Premkumara
+// [TAG] EIP111415
+// [Category] Improvement
+// [Description] Elink function for SETUP_TOGGLE_KEY_UNICODE function
+// [Files] HookAnchor.h, AMITSE.sdl, commonoem.c, Commonoem.h,
+// HookList.c, HookAnchor.c
+//
+// 16 10/18/12 5:31a Arunsb
+// Updated for 2.16.1235 QA submission
+//
+// 13 10/10/12 12:23p Arunsb
+// Synched the source for v2.16.1232 backup with Aptio
+//
+// 15 2/01/12 1:53a Arunsb
+// [TAG] EIP74968
+// [Category] Improvement
+// [Description] Support for mouse drag and drop to rearrange the items
+// in the Orderlist.
+// [Files] Ordlistbox.c, commonoem.c and commonoem.h
+//
+// 14 11/20/11 6:56a Rajashakerg
+// [TAG] EIP62763
+// [Category] Improvement
+// [Description] Utilize the Improvements done from mouse driver in
+// AMITSE
+// [Files] HookAnchor.h, TseCommon.h, AMITSE.sdl, CommonHelper.c,
+// commonoem.c, commonoem.h, buffer.c, globals.c, HookAnchor.c,
+// minisetup.h, notify.c, postmgmt.c, protocol.c, ezport.c, stylecommon.c,
+// Mouse.c, Action.c, Date.c, frame.c, MessageBox.c, minisetupext.c,
+// minisetupext.h, numeric.c, numeric.h, page.c, PopupEdit.c, PopupEdit.h,
+// PopupPassword.c, postmgmtext.c, time.c.
+//
+// 13 7/20/11 3:25p Rajashakerg
+// Removed the unwanted code for mouse hot click operation
+//
+// 11 6/29/11 1:03p Rajashakerg
+// [TAG] EIP47086
+// [Category] New Feature
+// [Description] Right clicking from the Main page is not exiting from
+// BIOS setup.
+//
+// [Files] minisetup.h, Ezport\style.h,Ezport\EzportBin.sdl,
+// Ezport\EzportBin.mak, Ezport\ezport.c, Ezport\EzportBin.cif,
+// EzportPlus\style.h, EzportPlus\EzportPlusBin.sdl, EzportPlusBin.mak,
+// EzportPlus\EzportPlusBin.cif, EzportPlus\ezportplus.c, Legacy\style.h,
+// Legacy\EzportPlusBin.sdl, Legacy\LegacyBin.mak, Legacy\LegacyBin.cif,
+// Legacy\legacy.c, TseLiteBin.sdl, TseLite.cif, Memo.c, frame.c,
+// application.h, application.c, commonoem.h, CommonHelper.c
+//
+// 10 6/22/11 7:18a Arunsb
+// [TAG] EIP 62631, 60128
+// [Category] New Feature
+// [Description] Hot key boot option in TSE as per UEFI spec. section
+// 3.1.6.
+// TSE_CHECK_SHIFTSTATE macro redefined to
+// CheckAdvShiftState
+// [Files] AMITSE.sdl, CommonHelper.c, commonoem.c, commonoem.h,
+// boot.c, hiistring20.c and hiistring21.c.
+//
+// 9 3/28/11 9:06p Madhans
+// [TAG] EIP41744
+// [Category] Improvement
+// [Description] SoftKeyBoard Support in TSE. and Support to Work with
+// new mouse driver(Label 07).
+// [Files] HookAnchor.h
+// AMITSE.sdl
+// CommonHelper.c
+// commonoem.c
+// commonoem.h
+// HookList.c
+// HookAnchor.c
+// Mouse.c
+// minisetupext.c
+// postmgmtext.c
+// minisetupext.h
+// PopupPassword.c
+// PopupString.c
+// TseLiteCommon.c
+//
+// 8 9/16/10 8:39p Madhans
+// Updated for TSE 2.10. Refer changelog.log for more deatils.
+//
+// 11 8/18/10 6:15p Mallikarjunanv
+// EIP-38089: Hook after pressing F2 key and before showing setup menu.
+//
+// 10 6/08/10 5:06p Blaines
+// Created new AMITSE hook (hook33), called when TSE determines that
+// console out is available.
+//
+// 9 4/13/10 6:01p Madhans
+// Eip: 33100 To create new hook for BootNowLaunching. (From bbsPopoup and
+// Boot override menu).
+//
+// 8 2/19/10 7:59a Mallikarjunanv
+// updated the year in copyright message
+//
+// 7 2/04/10 11:06p Madhans
+// Map Control Mouse Action Hook Added.
+//
+// 6 1/09/10 2:26a Mallikarjunanv
+// Updated TSE2.01 Release sources with coding standards
+//
+// 5 9/15/09 9:19a Sudhirv
+// added new hook entries for LoadSetupDefaults and PreResetSystem
+//
+// 4 7/30/09 4:16p Blaines
+// Fix for EIP #23127
+//
+// Item #8 : Shift + Tab handling.
+//
+// MapControlKeys() does not handle correctly because of
+// TSE_CHECK_SHIFTSTATE macro has problem.
+// ControlActionNextSelection is always became true so never checks
+// ControlActionPrevSelection.
+//
+// 3 6/24/09 6:33p Madhans
+// Coding Standards
+//
+// 2 6/24/09 11:52a Blaines
+// Coding standard update
+//
+// 1 6/09/09 9:52a Madhans
+// TSE 2.00.1201
+//
+// 1 6/04/09 7:49p Madhans
+// AMI TSE Advanced.
+//
+// 2 4/29/09 9:01p Madhans
+// Bug Fixes after unit Testing..
+//
+// 1 4/28/09 10:49p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+// 1 4/28/09 10:24p Madhans
+// Tse 2.0 Code complete Checkin.
+//
+// 2 1/30/09 6:06p Madhans
+// Function headers added.
+//
+//
+//*****************************************************************//
+//*****************************************************************//
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: commonoem.h
+//
+// Description: header of commonoem.h
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+
+#ifndef _COMMONOEM_H_
+#define _COMMONOEM_H_
+
+typedef enum
+{
+ ControlActionUnknown,
+ ControlActionNextLeft,
+ ControlActionNextRight,
+ ControlActionNextUp,
+ ControlActionNextDown,
+ ControlActionPageUp,
+ ControlActionPageDown,
+ ControlActionNextSelection,
+ ControlActionPrevSelection,
+ ControlActionSelect,
+ ControlActionIncreament,
+ ControlActionDecreament,
+ ControlActionBackSpace,
+ ControlActionAbort,
+ ControlActionAlpha,
+ ControlActionNumeric,
+ ControlActionHelpPageUp,
+ ControlActionHelpPageDown,
+
+ ControlActionHome,
+ ControlActionEnd,
+ ControlActionChoose,
+ ControlMouseActionLeftDown,
+ ControlMouseActionLeftUp
+}CONTROL_ACTION;
+
+typedef struct _STYLECOLORS
+{
+ UINT8 FGColor;
+ UINT8 BGColor;
+ UINT8 SecFGColor;
+ UINT8 SecBGColor;
+ UINT8 SelFGColor;
+ UINT8 SelBGColor;
+ UINT8 NSelFGColor;
+ UINT8 NSelBGColor;
+ UINT8 LabelBGColor;
+ UINT8 LabelFGColor;
+ UINT8 NSelLabelFGColor;
+ UINT8 EditBGColor;
+ UINT8 EditFGColor;
+ UINT8 PopupFGColor;
+ UINT8 PopupBGColor;
+}STYLECOLORS;
+
+
+//For CLICK Event
+#define TSEMOUSE_NULL_CLICK 0
+#define TSEMOUSE_RIGHT_CLICK 1
+#define TSEMOUSE_LEFT_CLICK 2
+//#define TSEMOUSE_MIDDLE_CLICK 3
+#define TSEMOUSE_LEFT_DCLICK 4
+#define TSEMOUSE_RIGHT_DOWN 5
+#define TSEMOUSE_LEFT_DOWN 6
+//#define TSEMOUSE_MIDDLE_DOWN 7
+#define TSEMOUSE_RIGHT_UP 8
+#define TSEMOUSE_LEFT_UP 9
+//#define TSEMOUSE_MIDDLE_UP 10
+
+//Data Structure for Storing Mouse action
+typedef struct _MOUSE_INFO
+{
+ UINT32 Top;
+ UINT32 Left;
+ UINT32 ButtonStatus;
+}MOUSE_INFO;
+
+#if TSE_USE_AMI_EFI_KEYCODE_PROTOCOL
+#include <Protocol/AmiKeyCode.h>
+
+
+//Start EIP #23127 Item #8
+//EIP 60128 Ctrl+Alt+F6 also working as Ctrl+F6 or Alt+F6
+BOOLEAN CheckAdvShiftState (UINT32 AmiKeyShiftState, UINT32 CondShiftState);
+#define TSE_CHECK_SHIFTSTATE CheckAdvShiftState
+
+/*( (!(AmiKeyShiftSate &(~SHIFT_STATE_VALID)) && (!CondShiftState)) || \
+(((AmiKeyShiftSate &(~SHIFT_STATE_VALID)) & CondShiftState) == (CondShiftState & (~SHIFT_STATE_VALID))) || \
+((AmiKeyShiftSate == SHIFT_STATE_VALID) && (CondShiftState == SHIFT_STATE_VALID)) )*/
+//End EIP #23127 Item #8
+
+#else
+#ifndef _AMI_EFI_KEY_DATA_
+#define _AMI_EFI_KEY_DATA_
+typedef struct {
+ EFI_INPUT_KEY Key;
+} AMI_EFI_KEY_DATA;
+#endif
+#endif
+
+VOID DrawQuietBootLogo(VOID);
+BOOLEAN ProcessConInAvailability(VOID);
+VOID ProcessEnterSetup(VOID);
+VOID ProcessProceedToBoot(VOID);
+VOID MinisetupDriverEntryHook(VOID);
+VOID PostManagerHandShakeHook(VOID);
+CONTROL_ACTION MapControlKeys(AMI_EFI_KEY_DATA key);
+VOID CheckForKey( EFI_EVENT Event, VOID *Context );
+VOID CheckForClick( EFI_EVENT Event, VOID *Context );
+VOID BeforeLegacyBootLaunch(VOID);
+VOID AfterLegacyBootLaunch(VOID);
+VOID BeforeEfiBootLaunch(VOID);
+VOID AfterEfiBootLaunch(VOID);
+VOID SavedConfigChanges(VOID);
+VOID LoadedConfigDefaults(VOID);
+VOID TimeOutLoopHook(VOID);
+VOID PasswordEncode( CHAR16 *Password, UINTN MaxSize);
+EFI_STATUS SetControlColors(UINT8 *BGColor, UINT8 *FGColor, UINT8 *SecBGColor, UINT8 *SecFGColor,
+ UINT8 *SelBGColor, UINT8 *SelFGColor, UINT8 *NSelBGColor, UINT8 *NSelFGColor,
+ UINT8 *LabelBGColor, UINT8 *LabelFGColor,UINT8 *NSelLabelFGColor, UINT8 *EditBGColor, UINT8 *EditFGColor,
+ UINT8 *PopupFGColor, UINT8 *PopupBGColor);
+
+VOID InvalidActionHook(VOID);
+VOID LoadedUserDefaults(VOID);
+VOID LoadedBuildDefaults(VOID);
+VOID LoadedPreviousValues(VOID);
+VOID SetupConfigModified(VOID);
+VOID LoadSetupDefaults (VOID *defaults, UINTN data );
+VOID PreSystemResetHook(VOID);
+CONTROL_ACTION MapControlMouseAction(VOID *pMouseInfo);
+VOID ProcessProceedToBootNow(VOID);
+VOID ProcessConOutAvailable(VOID);
+VOID ProcessUIInitHook(VOID);
+VOID AfterInitPostScreen(VOID);
+VOID SwitchToPostScreen(VOID);//EIP-111415 SwitchToPostScreenHook
+
+
+
+#define MODIFIER_DUAL_KEYS 0x000000FF //For handling any oTf the two dual(ctrl, alt, shift and logo) keys pressed
+#define RIGHT_LEFT_SHIFT_PRESSED 0x00000003
+#define RIGHT_LEFT_CONTROL_PRESSED 0x0000000C
+#define RIGHT_LEFT_ALT_PRESSED 0x00000030
+#define RIGHT_LEFT_LOGO_PRESSED 0x000000C0
+
+
+#define EFI_MOUSE_DRIVER_PROTOCOL_GUID \
+{0xc7a7030c, 0xc3d8, 0x45ee, 0xbe, 0xd9, 0x5d, 0x9e, 0x76, 0x76, 0x29, 0x53}
+
+typedef struct
+{
+ EFI_GUID VariableGuid;
+ CHAR8 VariableName [50];
+}VAR_DYNAMICPARSING_HANDLESUPPRESS;
+
+#endif
+
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2011, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************// \ No newline at end of file
diff --git a/Core/EM/AMITSE/setup.ini b/Core/EM/AMITSE/setup.ini
new file mode 100644
index 0000000..e903f1c
--- /dev/null
+++ b/Core/EM/AMITSE/setup.ini
@@ -0,0 +1,533 @@
+[section]
+variablecount = 55 ; number of variables to parse
+guidCount = 19 ; this is the number of GUID's to parse
+refreshrate = 2 ; rate of refresh in 0.1 second intervals
+fakeVarKey = 64254 ; 0xfafe is the key for fake var
+;VariableAttrib = 7 ; default attribute for variables found in VFR's
+;DefultsCount = 1 ; default data that to set from this ini file.
+guid = EC87D643-EBA4-4BB5-A1E5-3F3E36B20DA9
+scrtoken1 = 0
+scrtoken2 = 2
+scrtoken3 = 3
+scrtoken4 = 4
+scrtoken5 = 0
+scrtoken6 = 0
+scrtoken7 = 0
+
+[files]
+filecount = 6
+file1 = Main.hpk
+file2 = Advanced.hpk
+file3 = Chipset.hpk
+file4 = Boot.hpk
+file5 = Security.hpk
+file6 = Exit.hpk
+
+[variable0]
+guid = EC87D643-EBA4-4BB5-A1E5-3F3E36B20DA9
+name = Setup
+flags = 7
+extFlags = 0
+key = 0 ; 0x0 id is for setup variable
+
+[variable1]
+guid = 8BE4DF61-93CA-11D2-AA0D-00E098032B8C
+name = Lang
+flags = 7
+extFlags = 1 ; no defaults
+key = 65535 ; 0xffff id is for minisetup variables use
+
+[variable2]
+guid = 8BE4DF61-93CA-11D2-AA0D-00E098032B8C
+name = Timeout
+flags = 7
+extFlags = 0
+key = 65535 ; 0xffff id is for minisetup variables use
+
+[variable3]
+guid = C4CC0DE8-0687-4422-99C1-65351A5D5F95
+name = UserDefaults
+flags = 7
+extFlags = 0
+key = 65535 ; 0xffff id is for minisetup variables use
+
+[Variable4]
+guid = ADDEBF82-A560-46B9-A280-78C6AB61AEDA
+name = ErrorManager
+flags = 0
+extFlags = 0
+key = 65535
+
+[Variable5]
+guid = c811fa38-42c8-4579-a9bb-60e94eddfb34
+name = AMITSESetup
+flags = 7
+extFlags = 0
+key = 65535
+
+[Variable6]
+guid = 3DD0DE67-02D7-4129-914A-9F377CC34B0D
+name = IDESecDev
+flags = 7
+extFlags = 0
+key = 65535
+
+[variable7]
+guid = 8BE4DF61-93CA-11D2-AA0D-00E098032B8C
+name = BootOrder
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535 ; 0xffff id is for minisetup variables use
+
+[variable8]
+guid = A56074DB-65FE-45F7-BD21-2D2BDD8E9652
+name = LegacyDevOrder
+flags = 3
+extFlags = 1 ; no defults
+key = 65535 ; 0xffff id is for minisetup variables use
+
+[Variable9]
+guid = F6C73719-F34C-479C-B32F-277FCBBCFE4F
+name = DelBootOption
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable10]
+guid = 19d96d3f-6a6a-47d2-b195-7b2432da3be2
+name = AddBootOption
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable11]
+guid = B4909CF3-7B93-4751-9BD8-5BA8220B9BB2
+name = BootManager
+flags = 7
+extFlags = 0
+key = 65535
+
+[Variable12]
+guid = 052E6EB0-F240-42C5-8309-45874545C6B4
+name = BootNowCount
+flags = 7
+extFlags = 0
+key = 65535
+
+[Variable13]
+guid = A56074DB-65FE-45F7-BD21-2D2BDD8E9652
+name = LegacyDev
+flags = 1
+extFlags = 0
+key = 65535
+
+[Variable14]
+guid = 9CF0F18E-7C7D-49DE-B5AA-BBBAD6B21007
+name = AMICallback
+flags = 1
+extFlags = 0
+key = 65535
+
+[Variable15]
+guid = A56074DB-65FE-45F7-BD21-2D2BDD8E9652
+name = LegacyGroup
+flags = 1
+extFlags = 0
+key = 65535
+
+[Variable16]
+guid = 052E6EB0-F240-42C5-8309-45874545C6B4
+name = SetupSaveState
+flags = 2
+extFlags = 0
+key = 65535
+
+[Variable17]
+guid = F4B2C007-94A1-4cd5-A710-F4141FCEBCA0
+name = OemTSEVar
+flags = 7
+key = 65535
+
+[Variable18]
+guid = B63BF800-F267-4f55-9217-E97FB3B69846
+name = DynamicPageCount
+flags = 2
+extFlags = 0
+key = 65535
+
+[Variable19]
+guid = 0885F288-418C-4be1-A6AF-8BAD61DA08FE
+name = DriverHlthEnable
+flags = 2
+extFlags = 0
+key = 65535
+
+[Variable20]
+guid = 7459A7D4-6533-4480-BBA7-79E25A4443C9
+name = DriverHealthCount
+flags = 2
+extFlags = 0
+key = 65535
+
+[Variable21]
+guid = 58279C2D-FB19-466e-B42E-CD437016DC25
+name = DrvHealthCtrlCnt
+flags = 2
+extFlags = 0
+key = 65535
+
+[variable22]
+guid = C0B4FB05-15E5-4588-9FE9-B3D39C067715
+name = DriverManager
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535 ; 0xffff id is for minisetup variables use
+
+[variable23]
+guid = 8BE4DF61-93CA-11D2-AA0D-00E098032B8C
+name = DriverOrder
+flags = 3 ;variable attributes
+extFlags = 1 ; no defaults ;Extended attributes
+key = 65535 ; 0xffff id is for minisetup variables use
+
+[variable24]
+guid = 7DF66C0F-D40A-4748-AC5A-6C0BEA786A1A
+name = AddDriverOption
+flags = 3 ;variable attributes
+extFlags = 1 ; no defaults ;Extended attributes
+key = 65535 ; 0xffff id is for minisetup variables use
+
+[Variable25]
+guid = 17A3C5DA-F51F-437c-91B6-002B6F262593
+name = DelDriverOption
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable26]
+guid = EDA2B104-7A10-4519-B0A1-EBA5C52ACFCE
+name = OemPortVar1
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable27]
+guid = EF402953-B819-4cc2-A44C-4C9B4CFBC889
+name = OemPortVar2
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable28]
+guid = 1D6F853E-0006-40d8-9B4B-79618A5733B0
+name = OemPortVar3
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable29]
+guid = 47E87E67-FBC0-4c01-9002-4A0A6ECB92FF
+name = OemPortVar4
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable30]
+guid = 2799A453-FC10-4334-9E66-D3D6EF09D0EE
+name = OemPortVar5
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable31]
+guid = D77A3FE1-51FE-4613-A81D-82AE24464CFD
+name = OemPortVar6
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable32]
+guid = B5CEC017-74CB-4e10-BAC3-924A4CC629C8
+name = OemPortVar7
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable33]
+guid = 78A6FB37-8F27-40a4-9C4E-9FC9E438D5E2
+name = OemPortVar8
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable34]
+guid = 8DAC5195-3FD5-4e32-9C2A-1A65BD699932
+name = OemPortVar9
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable35]
+guid = A6DB3378-CFD7-4bfd-A1C4-2709FEC52F8B
+name = OemPortVar10
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable36]
+guid = EA629472-D7C6-4c0e-8820-2B811C7EE3AF
+name = OemPortVar11
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable37]
+guid = 4CD97B67-12BB-4fc5-8B2A-580ADB6A6368
+name = OemPortVar12
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable38]
+guid = C03DDD47-DC0A-4319-9FEC-44B078C242E6
+name = OemPortVar13
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable39]
+guid = 2AAEC318-E84B-4e0b-BF41-AC65F17E9E2F
+name = OemPortVar14
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable40]
+guid = 1967167B-A13D-4e45-801B-A605D11946D5
+name = OemPortVar15
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable41]
+guid = 466A7291-50DF-4b40-A2EB-CEE67D5428C9
+name = OemPortVar16
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable42]
+guid = 4639A701-74F9-4635-B126-9FF048D6B0D0
+name = OemPortVar17
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable43]
+guid = EF02529C-A283-48cd-8D08-6A1E9C3C03D3
+name = OemPortVar18
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable44]
+guid = 4CD28F5E-4BBB-4602-ACB8-741BAA7EB313
+name = OemPortVar19
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable45]
+guid = 83C233EB-D01A-45d8-9FA1-AF40206FCC9B
+name = OemPortVar20
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable46]
+guid = 6169D4F6-0659-4fb5-B03C-3645D8C80DC8
+name = OemPortVar21
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable47]
+guid = 1C1EAB81-9229-42ac-B940-757C498A09ED
+name = OemPortVar22
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable48]
+guid = 0ECEDD30-67EC-4570-9EFB-308DE53EE93D
+name = OemPortVar23
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable49]
+guid = 913FA238-7B16-4b72-A5F0-815E7D2C8C1F
+name = OemPortVar24
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable50]
+guid = FE075D44-D9F1-4da1-AE6A-8250553CDE66
+name = OemPortVar25
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable51]
+guid = 471F5144-6037-4952-8B01-CFF586FDE6B3
+name = OemPortVar26
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable52]
+guid = 1318FED0-2765-42b5-803E-3215A3C093C5
+name = OemPortVar27
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable53]
+guid = FF5A0DC3-DFAC-434a-B3DF-FFD4C1EA7E41
+name = OemPortVar28
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+[Variable54]
+guid = 3F8DC333-CCD5-4e58-B8CF-7B9A8F31EA96
+name = OemPortVar29
+flags = 3
+extFlags = 1 ; no defaults
+key = 65535
+
+;
+;These are samples of how to add GUID information into this file
+;
+[GUID0]
+guid = B4909CF3-7B93-4751-9BD8-5BA8220B9BB2
+name = BootManager
+flags = 1
+key = 1
+
+[GUID1]
+guid = 052E6EB0-F240-42C5-8309-45874545C6B4
+name = BootNowCount
+flags = 1
+key = 1
+
+[GUID2]
+guid = A56074DB-65FE-45F7-BD21-2D2BDD8E9652 ;GUID for LegacyDevOrder & LegacyDev are same
+name = LegacyDevOrder
+flags = 1
+key = 7
+
+[GUID3]
+guid = 9CF0F18E-7C7D-49DE-B5AA-BBBAD6B21007
+name = AMICallback
+flags = 1
+key = 2
+
+[GUID4]
+guid = ADDEBF82-A560-46B9-A280-78C6AB61AEDA
+name = ErrorManager
+flags = 9
+key = 3
+
+[GUID5]
+guid = 8BE4DF61-93CA-11D2-AA0D-00E098032B8C
+name = LangCodes
+flags = 7
+key = 5
+
+[GUID6]
+guid = c57ad6b7-0515-40a8-9d21-551652854e37
+name = shell.efi|shellx64.efi|shellia64.efi
+flags = 6
+key = 0
+
+[GUID7]
+guid = 50064C83-F3D9-4270-B97B-BAC47B61E8DB
+name = shellpbm.efi
+flags = 6
+key = 0
+
+[GUID8]
+guid = 3DD0DE67-02D7-4129-914A-9F377CC34B0D
+name = IDESecDev
+flags = 1
+key = 8
+
+[GUID9]
+guid = 19d96d3f-6a6a-47d2-b195-7b2432da3be2
+name = AddBootOption
+flags = 0
+key = 9
+
+[GUID10]
+guid = F4B2C007-94A1-4cd5-A710-F4141FCEBCA0
+name = OemTSEVar
+flags = 1
+key = 10
+
+[GUID11]
+guid = B63BF800-F267-4f55-9217-E97FB3B69846
+name = DynamicPageCount
+flags = 0
+key = 14
+
+[GUID12]
+guid = 0885F288-418C-4be1-A6AF-8BAD61DA08FE
+name = DriverHlthEnable
+flags = 1
+key = 15
+
+[GUID13]
+guid = 7459A7D4-6533-4480-BBA7-79E25A4443C9
+name = DriverHealthCount
+flags = 1
+key = 16
+
+[GUID14]
+guid = 58279C2D-FB19-466e-B42E-CD437016DC25
+name = DrvHealthCtrlCnt
+flags = 1
+key = 17
+
+[GUID15]
+guid = C0B4FB05-15E5-4588-9FE9-B3D39C067715
+name = DriverManager
+flags = 0
+key = 18
+
+[GUID16]
+guid = ECFD4BCE-4279-40f8-BAF2-DCB79638D41E
+name = OemPortGuid1
+flags = 0
+key = 19
+
+[GUID17]
+guid = 23F69CD0-FF46-4db6-B982-63EDF1A901FF
+name = OemPortGuid2
+flags = 0
+key = 20
+
+[GUID18]
+guid = 8BDDF24B-2C8A-4360-A3BB-AEF094983BEA
+name = AMIDiag
+flags = 2
+key = 21
+
+;;syntax to set a default variable initial value from this ini file
+;[defaults0]
+;variable = 5 ;; variable number
+;mode = 0 ;; Standard (0) or Manufacturer (1)
+;offset = 80 ;; offset of the variable data
+;size = 1 ;; size of data to replace
+;data = 1 ;; Data to replace Format (Hex Bytes delimted by space)
diff --git a/Core/EM/AMITSE/setupdbg.h b/Core/EM/AMITSE/setupdbg.h
new file mode 100644
index 0000000..2927593
--- /dev/null
+++ b/Core/EM/AMITSE/setupdbg.h
@@ -0,0 +1,51 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2011, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: setupdbg.h
+//
+// Description: Header file for string functionalities.
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+
+#ifndef _SETUPDBG_H_
+#define _SETUPDBG_H_
+
+VOID SetupShowDebugScreen(VOID *app, VOID *hotkey, VOID *cookie );
+
+#define TSE_DEBUG_MESSAGES_GUID \
+ {0x408acdd4, 0xe088, 0x4bac, 0xa2, 0x53, 0x6c, 0x27, 0xcf, 0xd3, 0xd6, 0x1f }
+
+#endif /* _SETUPDBG_H_ */
+
+
+//**********************************************************************
+//**********************************************************************
+//** **
+//** (C)Copyright 1985-2011, American Megatrends, Inc. **
+//** **
+//** All Rights Reserved. **
+//** **
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **
+//** **
+//** Phone: (770)-246-8600 **
+//** **
+//**********************************************************************
+//**********************************************************************