From b7c51c9cf4864df6aabb99a1ae843becd577237c Mon Sep 17 00:00:00 2001 From: raywu Date: Fri, 15 Jun 2018 00:00:50 +0800 Subject: init. 1AQQW051 --- EDK/MiniSetup/BootOnly/MiniSetupBin.cif | 13 + EDK/MiniSetup/BootOnly/MiniSetupBin.mak | 104 ++ EDK/MiniSetup/BootOnly/MiniSetupBin.sdl | 45 + EDK/MiniSetup/BootOnly/MiniSetupLocal.lib | Bin 0 -> 197754 bytes EDK/MiniSetup/BootOnly/MiniSetupLocalx64.lib | Bin 0 -> 258680 bytes EDK/MiniSetup/BootOnly/hiistring20.c | 636 +++++++++ EDK/MiniSetup/BootOnly/hiistring21.c | 1462 ++++++++++++++++++++ EDK/MiniSetup/Ezport/EzportBin.cif | 17 + EDK/MiniSetup/Ezport/EzportBin.mak | 156 +++ EDK/MiniSetup/Ezport/EzportBin.sdl | 162 +++ EDK/MiniSetup/Ezport/HotclickBin.c | 58 + EDK/MiniSetup/Ezport/HotclickBin.h | 49 + EDK/MiniSetup/Ezport/HotkeyBin.c | 106 ++ EDK/MiniSetup/Ezport/HotkeyBin.h | 54 + EDK/MiniSetup/Ezport/StyleStr.uni | Bin 0 -> 8856 bytes EDK/MiniSetup/Ezport/StyleTokens.c | 106 ++ EDK/MiniSetup/Ezport/TseStyle.lib | Bin 0 -> 30762 bytes EDK/MiniSetup/Ezport/TseStylex64.lib | Bin 0 -> 32750 bytes EDK/MiniSetup/EzportPlus/EzportPlusBin.cif | 17 + EDK/MiniSetup/EzportPlus/EzportPlusBin.mak | 155 +++ EDK/MiniSetup/EzportPlus/EzportPlusBin.sdl | 185 +++ EDK/MiniSetup/EzportPlus/HotclickBin.c | 58 + EDK/MiniSetup/EzportPlus/HotclickBin.h | 49 + EDK/MiniSetup/EzportPlus/HotkeyBin.c | 106 ++ EDK/MiniSetup/EzportPlus/HotkeyBin.h | 54 + EDK/MiniSetup/EzportPlus/StyleStr.uni | Bin 0 -> 11614 bytes EDK/MiniSetup/EzportPlus/StyleTokens.c | 137 ++ EDK/MiniSetup/EzportPlus/TseStyleEzportPlus.lib | Bin 0 -> 31426 bytes EDK/MiniSetup/EzportPlus/TseStyleEzportPlusx64.lib | Bin 0 -> 33196 bytes EDK/MiniSetup/Legacy/HotclickBin.c | 58 + EDK/MiniSetup/Legacy/HotclickBin.h | 49 + EDK/MiniSetup/Legacy/HotkeyBin.c | 106 ++ EDK/MiniSetup/Legacy/HotkeyBin.h | 54 + EDK/MiniSetup/Legacy/LegacyBin.cif | 17 + EDK/MiniSetup/Legacy/LegacyBin.mak | 156 +++ EDK/MiniSetup/Legacy/LegacyBin.sdl | 162 +++ EDK/MiniSetup/Legacy/StyleStr.uni | Bin 0 -> 8924 bytes EDK/MiniSetup/Legacy/StyleTokens.c | 114 ++ EDK/MiniSetup/Legacy/TseStyleLegacy.lib | Bin 0 -> 41110 bytes EDK/MiniSetup/Legacy/TseStyleLegacyx64.lib | Bin 0 -> 45562 bytes EDK/MiniSetup/PasswordEncode/PasswordEncode.c | 217 +++ EDK/MiniSetup/PasswordEncode/PasswordEncode.h | 71 + EDK/MiniSetup/PasswordEncode/PasswordEncodeBin.cif | 13 + EDK/MiniSetup/PasswordEncode/PasswordEncodeBin.mak | 98 ++ EDK/MiniSetup/PasswordEncode/PasswordEncodeBin.sdl | 34 + EDK/MiniSetup/PasswordEncode/TsePasswordEncode.lib | Bin 0 -> 1568 bytes .../PasswordEncode/TsePasswordEncodex64.lib | Bin 0 -> 1776 bytes EDK/MiniSetup/TseAdvanced/AddDelBootDrvOpts.sd | 286 ++++ EDK/MiniSetup/TseAdvanced/AddDelBootDrvOpts.uni | Bin 0 -> 10104 bytes EDK/MiniSetup/TseAdvanced/Mouse.c | 1029 ++++++++++++++ EDK/MiniSetup/TseAdvanced/TseAdvanced.lib | Bin 0 -> 175476 bytes EDK/MiniSetup/TseAdvanced/TseAdvancedBin.cif | 14 + EDK/MiniSetup/TseAdvanced/TseAdvancedBin.mak | 141 ++ EDK/MiniSetup/TseAdvanced/TseAdvancedBin.sdl | 45 + EDK/MiniSetup/TseAdvanced/TseAdvancedx64.lib | Bin 0 -> 242620 bytes EDK/MiniSetup/TseLite/StyleHook/StyleHook.lib | Bin 0 -> 39322 bytes EDK/MiniSetup/TseLite/StyleHook/StyleHookx64.lib | Bin 0 -> 34414 bytes EDK/MiniSetup/TseLite/TseLiteBin.cif | 12 + EDK/MiniSetup/TseLite/TseLiteBin.sdl | 36 + EDK/MiniSetup/TseLite/TseLiteLocal.lib | Bin 0 -> 346794 bytes EDK/MiniSetup/TseLite/TseLiteLocalx64.lib | Bin 0 -> 440666 bytes EDK/MiniSetup/TseOEM/TseOEM.C | 96 ++ EDK/MiniSetup/TseOEM/TseOEM.cif | 10 + EDK/MiniSetup/TseOEM/TseOEM.mak | 113 ++ EDK/MiniSetup/TseOEM/TseOEM.sdl | 26 + EDK/MiniSetup/uefi2.0/Uefi20Bin.cif | 10 + EDK/MiniSetup/uefi2.0/Uefi20Local.lib | Bin 0 -> 72604 bytes EDK/MiniSetup/uefi2.0/Uefi20Localx64.lib | Bin 0 -> 82948 bytes EDK/MiniSetup/uefi2.0/uefi20Bin.sdl | 21 + EDK/MiniSetup/uefi2.1/Uefi21Bin.cif | 10 + EDK/MiniSetup/uefi2.1/Uefi21Local.lib | Bin 0 -> 178858 bytes EDK/MiniSetup/uefi2.1/Uefi21Localx64.lib | Bin 0 -> 244026 bytes EDK/MiniSetup/uefi2.1/uefi21Bin.sdl | 38 + 73 files changed, 6765 insertions(+) create mode 100644 EDK/MiniSetup/BootOnly/MiniSetupBin.cif create mode 100644 EDK/MiniSetup/BootOnly/MiniSetupBin.mak create mode 100644 EDK/MiniSetup/BootOnly/MiniSetupBin.sdl create mode 100644 EDK/MiniSetup/BootOnly/MiniSetupLocal.lib create mode 100644 EDK/MiniSetup/BootOnly/MiniSetupLocalx64.lib create mode 100644 EDK/MiniSetup/BootOnly/hiistring20.c create mode 100644 EDK/MiniSetup/BootOnly/hiistring21.c create mode 100644 EDK/MiniSetup/Ezport/EzportBin.cif create mode 100644 EDK/MiniSetup/Ezport/EzportBin.mak create mode 100644 EDK/MiniSetup/Ezport/EzportBin.sdl create mode 100644 EDK/MiniSetup/Ezport/HotclickBin.c create mode 100644 EDK/MiniSetup/Ezport/HotclickBin.h create mode 100644 EDK/MiniSetup/Ezport/HotkeyBin.c create mode 100644 EDK/MiniSetup/Ezport/HotkeyBin.h create mode 100644 EDK/MiniSetup/Ezport/StyleStr.uni create mode 100644 EDK/MiniSetup/Ezport/StyleTokens.c create mode 100644 EDK/MiniSetup/Ezport/TseStyle.lib create mode 100644 EDK/MiniSetup/Ezport/TseStylex64.lib create mode 100644 EDK/MiniSetup/EzportPlus/EzportPlusBin.cif create mode 100644 EDK/MiniSetup/EzportPlus/EzportPlusBin.mak create mode 100644 EDK/MiniSetup/EzportPlus/EzportPlusBin.sdl create mode 100644 EDK/MiniSetup/EzportPlus/HotclickBin.c create mode 100644 EDK/MiniSetup/EzportPlus/HotclickBin.h create mode 100644 EDK/MiniSetup/EzportPlus/HotkeyBin.c create mode 100644 EDK/MiniSetup/EzportPlus/HotkeyBin.h create mode 100644 EDK/MiniSetup/EzportPlus/StyleStr.uni create mode 100644 EDK/MiniSetup/EzportPlus/StyleTokens.c create mode 100644 EDK/MiniSetup/EzportPlus/TseStyleEzportPlus.lib create mode 100644 EDK/MiniSetup/EzportPlus/TseStyleEzportPlusx64.lib create mode 100644 EDK/MiniSetup/Legacy/HotclickBin.c create mode 100644 EDK/MiniSetup/Legacy/HotclickBin.h create mode 100644 EDK/MiniSetup/Legacy/HotkeyBin.c create mode 100644 EDK/MiniSetup/Legacy/HotkeyBin.h create mode 100644 EDK/MiniSetup/Legacy/LegacyBin.cif create mode 100644 EDK/MiniSetup/Legacy/LegacyBin.mak create mode 100644 EDK/MiniSetup/Legacy/LegacyBin.sdl create mode 100644 EDK/MiniSetup/Legacy/StyleStr.uni create mode 100644 EDK/MiniSetup/Legacy/StyleTokens.c create mode 100644 EDK/MiniSetup/Legacy/TseStyleLegacy.lib create mode 100644 EDK/MiniSetup/Legacy/TseStyleLegacyx64.lib create mode 100644 EDK/MiniSetup/PasswordEncode/PasswordEncode.c create mode 100644 EDK/MiniSetup/PasswordEncode/PasswordEncode.h create mode 100644 EDK/MiniSetup/PasswordEncode/PasswordEncodeBin.cif create mode 100644 EDK/MiniSetup/PasswordEncode/PasswordEncodeBin.mak create mode 100644 EDK/MiniSetup/PasswordEncode/PasswordEncodeBin.sdl create mode 100644 EDK/MiniSetup/PasswordEncode/TsePasswordEncode.lib create mode 100644 EDK/MiniSetup/PasswordEncode/TsePasswordEncodex64.lib create mode 100644 EDK/MiniSetup/TseAdvanced/AddDelBootDrvOpts.sd create mode 100644 EDK/MiniSetup/TseAdvanced/AddDelBootDrvOpts.uni create mode 100644 EDK/MiniSetup/TseAdvanced/Mouse.c create mode 100644 EDK/MiniSetup/TseAdvanced/TseAdvanced.lib create mode 100644 EDK/MiniSetup/TseAdvanced/TseAdvancedBin.cif create mode 100644 EDK/MiniSetup/TseAdvanced/TseAdvancedBin.mak create mode 100644 EDK/MiniSetup/TseAdvanced/TseAdvancedBin.sdl create mode 100644 EDK/MiniSetup/TseAdvanced/TseAdvancedx64.lib create mode 100644 EDK/MiniSetup/TseLite/StyleHook/StyleHook.lib create mode 100644 EDK/MiniSetup/TseLite/StyleHook/StyleHookx64.lib create mode 100644 EDK/MiniSetup/TseLite/TseLiteBin.cif create mode 100644 EDK/MiniSetup/TseLite/TseLiteBin.sdl create mode 100644 EDK/MiniSetup/TseLite/TseLiteLocal.lib create mode 100644 EDK/MiniSetup/TseLite/TseLiteLocalx64.lib create mode 100644 EDK/MiniSetup/TseOEM/TseOEM.C create mode 100644 EDK/MiniSetup/TseOEM/TseOEM.cif create mode 100644 EDK/MiniSetup/TseOEM/TseOEM.mak create mode 100644 EDK/MiniSetup/TseOEM/TseOEM.sdl create mode 100644 EDK/MiniSetup/uefi2.0/Uefi20Bin.cif create mode 100644 EDK/MiniSetup/uefi2.0/Uefi20Local.lib create mode 100644 EDK/MiniSetup/uefi2.0/Uefi20Localx64.lib create mode 100644 EDK/MiniSetup/uefi2.0/uefi20Bin.sdl create mode 100644 EDK/MiniSetup/uefi2.1/Uefi21Bin.cif create mode 100644 EDK/MiniSetup/uefi2.1/Uefi21Local.lib create mode 100644 EDK/MiniSetup/uefi2.1/Uefi21Localx64.lib create mode 100644 EDK/MiniSetup/uefi2.1/uefi21Bin.sdl (limited to 'EDK/MiniSetup') diff --git a/EDK/MiniSetup/BootOnly/MiniSetupBin.cif b/EDK/MiniSetup/BootOnly/MiniSetupBin.cif new file mode 100644 index 0000000..c3c164a --- /dev/null +++ b/EDK/MiniSetup/BootOnly/MiniSetupBin.cif @@ -0,0 +1,13 @@ + + name = "TSE Binary - BootOnly" + category = ModulePart + LocalRoot = "EDK\MiniSetup\BootOnly" + RefName = "MinisetupBin" +[files] +"MiniSetupBin.sdl" +"MiniSetupBin.mak" +"hiistring21.c" +"hiistring20.c" +"MiniSetupLocal.lib" +"MiniSetupLocalx64.lib" + diff --git a/EDK/MiniSetup/BootOnly/MiniSetupBin.mak b/EDK/MiniSetup/BootOnly/MiniSetupBin.mak new file mode 100644 index 0000000..d4216c2 --- /dev/null +++ b/EDK/MiniSetup/BootOnly/MiniSetupBin.mak @@ -0,0 +1,104 @@ +#//*****************************************************************// +#//*****************************************************************// +#//*****************************************************************// +#//** **// +#//** (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/BootOnly/MiniSetupBin.mak $ +## +## $Author: Arunsb $ +## +## $Revision: 5 $ +## +## $Date: 10/18/12 5:46a $ +## +##*****************************************************************## +##*****************************************************************## +## Revision History +## ---------------- +## $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/BootOnly/MiniSetupBin.mak $ +# +# 5 10/18/12 5:46a Arunsb +# Updated for 2.16.1235 QA submission +## +## 10 10/10/12 12:29p Arunsb +## Synched the source for v2.16.1232, backup with Aptio +# +# 4 6/30/11 4:07a Arunsb +# [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. +# +# 3 2/19/10 2:28p Madhans +# Build issue fix +# +# 2 2/19/10 12:58p Madhans +# Updated for TSE 2.01. Refer Changelog.log for File change history. +## +## 5 2/19/10 12:08p Madhans +## To depend on EFI_SPEC SDl token +## +## 4 2/19/10 8:07a Mallikarjunanv +## updated year in copyright message +## +## 3 2/17/10 7:02p Madhans +## If String not found in current lang Search in Default Lang. If not +## search in english. +## +## 2 2/15/10 10:04p Madhans +## +## 1 7/31/09 4:58p Presannar +## Initial Draft. Builkds HiiString depending upon UEFI HII specification +## version +## +##*****************************************************************## +##*****************************************************************## + + +MINISETUP_INCLUDES = \ +!if "$(TSE_BOARD_SOURCE_SUPPORT)" == "1" + -I $(TSE_BOARD_DIR)\ +!endif + -I $(TSEBIN_DIR) \ + -I $(TSEBIN_DIR)\Inc \ + -I $(PROJECT_DIR)\Include\Protocol \ + -I $(PROJECT_DIR) \ + -I $(PROJECT_DIR)\Include \ + -I $(BUILD_DIR) \ + -I $(TSESRC_DIR)\AMILOGO \ + -I $(TSE_STYLE_DIR) \ + -I $(TSELITESRC_DIR) \ +!if "$(UEFI_SOURCES_SUPPORT)" == "1" + -I $(UEFISRC_DIR) \ +!endif + +All: $(BUILD_DIR)\$(TSESRC_DIR)\MiniSetupBin.obj + +$(BUILD_DIR)\$(TSESRC_DIR)\MiniSetupBin.obj: $(PROJECT_DIR)\$(TSESRC_DIR)\HiiString20.c $(TSESRC_DIR)\HiiString21.c + if not exist $(BUILD_DIR)\$(TSESRC_DIR) mkdir $(BUILD_DIR)\$(TSESRC_DIR) +!IF $(EFI_SPECIFICATION_VERSION) > 0x20000 + $(CC) $(CFLAGS) $(MINISETUP_INCLUDES) /DDEFAULT_LANGUAGE_CODE="$(DEFAULT_LANGUAGE)" /DTSE_FOR_APTIO_4_50 /Fo$(BUILD_DIR)\$(TSESRC_DIR)\MiniSetupBin.obj $(PROJECT_DIR)\$(TSESRC_DIR)\HiiString21.c +!ELSE + $(CC) $(CFLAGS) $(MINISETUP_INCLUDES) /DTSE_FOR_APTIO_4_50 /Fo$(BUILD_DIR)\$(TSESRC_DIR)\MiniSetupBin.obj $(PROJECT_DIR)\$(TSESRC_DIR)\HiiString20.c +!ENDIF + +# MAK file for the eModule:MiniSetupBin +AMITSEBin: $(BUILD_DIR)\$(TSESRC_DIR)\MiniSetupBin.obj diff --git a/EDK/MiniSetup/BootOnly/MiniSetupBin.sdl b/EDK/MiniSetup/BootOnly/MiniSetupBin.sdl new file mode 100644 index 0000000..2830357 --- /dev/null +++ b/EDK/MiniSetup/BootOnly/MiniSetupBin.sdl @@ -0,0 +1,45 @@ +TOKEN + Name = "MiniSetup_Bin_SUPPORT" + Value = "1" + Help = "Main switch to enable MiniSetup support in Project" + TokenType = Boolean + TargetEQU = Yes + TargetMAK = Yes + Master = Yes +End + +TOKEN + Name = "HII_VERSION" + Value = "2" + Help = "Build support for Differnet HII versions: Make UEFI 2.1 Token dependand to this." + TokenType = Integer + TargetH = Yes +End + + +TOKEN + Name = "APTIO_4_00" + Value = "1" + Help = "Use enhanced features of Aptio 4.00" + TokenType = Boolean + TargetMAK = Yes + TargetH = Yes +End + + +PATH + Name = "TSESRC_DIR" +End + +ELINK + Name = "$(TSESRC_DIR)\MiniSetupLocal$(ARCH).lib" + Parent = "MINISETUPLIB" + Priority = 10 + InvokeOrder = AfterParent +End + +MODULE + Help = "Includes MiniSetupBin.mak to Project" + File = "MiniSetupBin.mak" +End + diff --git a/EDK/MiniSetup/BootOnly/MiniSetupLocal.lib b/EDK/MiniSetup/BootOnly/MiniSetupLocal.lib new file mode 100644 index 0000000..150ec91 Binary files /dev/null and b/EDK/MiniSetup/BootOnly/MiniSetupLocal.lib differ diff --git a/EDK/MiniSetup/BootOnly/MiniSetupLocalx64.lib b/EDK/MiniSetup/BootOnly/MiniSetupLocalx64.lib new file mode 100644 index 0000000..6484614 Binary files /dev/null and b/EDK/MiniSetup/BootOnly/MiniSetupLocalx64.lib differ diff --git a/EDK/MiniSetup/BootOnly/hiistring20.c b/EDK/MiniSetup/BootOnly/hiistring20.c new file mode 100644 index 0000000..b48ab44 --- /dev/null +++ b/EDK/MiniSetup/BootOnly/hiistring20.c @@ -0,0 +1,636 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (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/BootOnly/hiistring20.c $ +// +// $Author: Arunsb $ +// +// $Revision: 12 $ +// +// $Date: 5/08/14 9:37p $ +// +//*****************************************************************// +//*****************************************************************// +// Revision History +// ---------------- +// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/BootOnly/hiistring20.c $ +// +// 12 5/08/14 9:37p Arunsb +// GetDefaultPasswordFromTokens function added +// +// 11 10/18/12 11:44a Rajashakerg +// [TAG] EIP 97951 +// [Category] Bug Fix +// [Severity] Critical +// [Symptom] Creation of TSE which does not access NVRAM during recovery +// [RootCause] TSE get Platform lang every time using VarGetNvramName +// [Solution] Moved the code accessing PlatformLang to uefi2.1. +// [Files] hiistring21.c, minisetupext.c, hiistring20.c +// +// 10 10/18/12 5:46a Arunsb +// Updated for 2.16.1235 QA submission +// +// 15 10/10/12 12:29p Arunsb +// Synched the source for v2.16.1232, backup with Aptio +// +// 8 9/25/12 1:48p Premkumara +// [TAG] EIP97951 +// [Category] Bug Fix +// [Severity] Critical +// [Symptom] Creation of TSE which does not access NVRAM during recovery +// [Comments] Updated for UEFI2.0 +// +// 7 5/28/12 2:32p Premkumara +// [TAG] EIP85564 +// [Category] Improvement +// [Description] UefiHiiTestPrintLength function needs optimization +// [Files] HiiString20.c +// +// 6 6/30/11 4:09a Arunsb +// +// 5 6/29/11 6:17a Arunsb +// [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. +// +// 4 6/22/11 2:21p Arunsb +// [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. +// +// 3 2/26/10 8:46p Madhans +// For Tse 2.01.1204. Refer Changelog.log file change history +// +// 10 2/26/10 1:29p Madhans +// Bootonly source module need AMITSEStrTokens.h +// +// 9 2/19/10 8:07a Mallikarjunanv +// updated year in copyright message +// +// 8 2/17/10 7:00p Madhans +// HiiString2BltBuffer() function updated to return the StringGlyphwidth +// +// 7 2/15/10 10:04p Madhans +// +// 6 10/28/09 5:36p Madhans +// +// 4 8/17/09 10:49a Presannar +// Removed dependance on Minisetup.h +// Added additional includes to resolve undefined definitions and expose +// fn prototypes +// +// 3 6/23/09 6:56p Blaines +// Coding standard update, +// Remove spaces from file header to allow proper chm function list +// creation. +// +// 2 6/12/09 7:41p Presannar +// Initial implementation of coding standards +// +// 1 6/04/09 8:05p Madhans +// +// 1 4/28/09 11:11p Madhans +// Tse 2.0 Code complete Checkin. +// +// 2 4/28/09 9:39p Madhans +// Tse 2.0 Code complete Checkin. +// +// 1 3/31/09 3:34p Madhans +// Hii string support for UEFI 2.0 and UEFI 2.1 +// +// 1 12/18/08 7:58p Madhans +// Intial version of TSE Lite sourc +// +//*****************************************************************// +//*****************************************************************// + +// +//---------------------------------------------------------------------------- +// +// Name: hiistring20.c +// +// Description: This file contains code to handle UEFI2.0 supported hii strings. +// +//---------------------------------------------------------------------------- +// + +//#include "minisetup.h" + +#ifdef TSE_FOR_APTIO_4_50 +#include "token.h" +#include "efi.h" +#include "devicepath.h" +#else +#include "tokens.h" +#include "efi.h" +#endif + +#ifndef EFI_PROTOCOL_DEFINITION +#define TSE_STRINGIZE(a) #a +#define EFI_PROTOCOL_DEFINITION(a) TSE_STRINGIZE(Protocol/a.h) +#endif + +#include EFI_PROTOCOL_DEFINITION (FirmwareVolume) +#include EFI_PROTOCOL_DEFINITION (LoadedImage) +#include EFI_PROTOCOL_DEFINITION(Hii) + +#include "HiiLib.h" +#include "Mem.h" + +#define GLYPH_WIDTH 8 +#define GLYPH_HEIGHT 19 + +///////////////////////////////////////////////// +// VARIABLE DECLARATIONS +///////////////////////////////////////////////// + +EFI_HII_PROTOCOL *gHiiProtocol = NULL; +CHAR16 *TseSkipEscCode(CHAR16 *String); +extern EFI_BOOT_SERVICES *gBS; +CHAR16 gPlatformLang [20]; //EIP97951 +CHAR8 *GlyphWidthCache = NULL;//EIP 85564 : UefiHiiTestPrintLength function needs optimization + +///////////////////////////////////////////////// +// FUNCTION DECLARATIONS +///////////////////////////////////////////////// +#if HII_VERSION <= 1 +EFI_STATUS _HiiWrapperGetString( VOID* handle, UINT16 token, CHAR16 *lang, UINT16 *bufferSize, CHAR16 *buffer ); +#else +EFI_STATUS _HiiWrapperGetString( VOID* handle, UINT16 token, CHAR16 *lang, UINTN *bufferSize, CHAR16 *buffer ); +#endif //HII_VERSION + +VOID *EfiLibAllocatePool(IN UINTN AllocationSize); +UINTN EfiStrLen(IN CHAR16 *String); +VOID *EfiLibAllocateZeroPool(IN UINTN AllocationSize); +UINTN HiiGetGlyphWidth(VOID); +UINTN HiiGetGlyphHeight(VOID); +///////////////////////////////////////////////// + +// +//---------------------------------------------------------------------------- +// Procedure: Uefi20HiiInitializeProtocol +// +// Description: function to initialize the Hii protocol +// +// Input: void +// +// Output: status +// +//---------------------------------------------------------------------------- +// +EFI_STATUS Uefi20HiiInitializeProtocol( VOID ) +{ + EFI_STATUS Status ; + +#ifdef STANDALONE_APPLICATION +#define APTIO_HII_PROTOCOL_GUID \ + { 0xea816d2c, 0xcee5, 0x4f02, 0x99, 0xb5, 0xd3, 0x90, 0x5c, 0xbb, 0xd0, 0x77 } + EFI_GUID NewHii=APTIO_HII_PROTOCOL_GUID; +#endif //STANDALONE_APPLICATION + + if ( gHiiProtocol != NULL ) + return EFI_SUCCESS; + + Status = gBS->LocateProtocol( &gEfiHiiProtocolGuid, NULL, (VOID **)&gHiiProtocol ); + +#ifdef STANDALONE_APPLICATION +// As the standalone application build in EDK the gEfiHiiProtocolGuid different between aptio and EDK. +// Look for Hiiprotocol from Aptio also. + if ( EFI_ERROR(Status) ) + Status = gBS->LocateProtocol( &NewHii, NULL, (VOID **)&gHiiProtocol ); +#endif //STANDALONE_APPLICATION + + return Status; +} + + +// +//---------------------------------------------------------------------------- +// Procedure: Uefi20HiiGetStringLanguage +// +// Description: function to get the language string +// +// Input: VOID* handle, UINT16 token, CHAR16 *lang +// +// Output: sting +// +//---------------------------------------------------------------------------- +// +CHAR16 *Uefi20HiiGetStringLanguage( /*EFI_HII_HANDLE*/VOID* handle, UINT16 token, CHAR16 *lang ) +{ + EFI_STATUS Status; + CHAR16 *buffer = NULL; +#if HII_VERSION <= 1 + UINT16 bufferSize = 0; +#else + UINTN bufferSize = 0; +#endif //HII_VERSION + Status = HiiInitializeProtocol(); + + if ( EFI_ERROR(Status) ) + return buffer; + + Status = _HiiWrapperGetString( handle, token, lang, &bufferSize, buffer ); + if ( Status != EFI_BUFFER_TOO_SMALL ) + return buffer; + + buffer = EfiLibAllocatePool( bufferSize ); + if ( buffer == NULL ) + return buffer; + + Status = _HiiWrapperGetString( handle, token, lang, &bufferSize, buffer ); + if ( EFI_ERROR(Status) ) + MemFreePointer( (VOID **)&buffer ); + + return buffer; +} + +// +//---------------------------------------------------------------------------- +// Procedure: Uefi20HiiChangeStringLanguage +// +// Description: function to change the language string +// +// Input: VOID* handle, UINT16 token, CHAR16 *lang, CHAR16 *string +// +// Output: token +// +//---------------------------------------------------------------------------- +// +UINT16 Uefi20HiiChangeStringLanguage( /*EFI_HII_HANDLE*/VOID* handle, UINT16 token, CHAR16 *lang, CHAR16 *string ) +{ + EFI_STATUS Status; + UINT16 newToken = token; + + Status = HiiInitializeProtocol(); + + if ( ( EFI_ERROR(Status) ) || ( string == NULL ) ) + return INVALID_TOKEN; + + Status = gHiiProtocol->NewString( gHiiProtocol, lang, (EFI_HII_HANDLE)(UINTN)handle, &newToken, string ); + if ( EFI_ERROR(Status) ) + newToken = INVALID_TOKEN; + + return newToken; +} + + +#if HII_VERSION <= 1 +EFI_STATUS _HiiWrapperGetString( /*EFI_HII_HANDLE*/ VOID * handle, UINT16 token, CHAR16 *lang,UINT16 *bufferSize, CHAR16 *buffer ) +#else +EFI_STATUS _HiiWrapperGetString( /*EFI_HII_HANDLE*/VOID * handle, UINT16 token, CHAR16 *lang,UINTN *bufferSize, CHAR16 *buffer ) +#endif //HII_VERSION +{ + if ( /*(EFI_HII_HANDLE)(UINTN)*/handle == INVALID_HANDLE ) + handle = gHiiHandle; + + return gHiiProtocol->GetString( gHiiProtocol, (EFI_HII_HANDLE)(UINTN)handle, token, TRUE, lang, bufferSize, buffer ); +} + + +UINTN HiiTestPrintLength ( IN CHAR16 *String ) +{ + EFI_STATUS Status; + UINT32 FirstMissing = 0; + UINT32 GlyphBufferSize = 0; + UINT32 BufferSize; + if(EFI_SUCCESS != HiiInitializeProtocol()) + return GlyphBufferSize; + + if(String == NULL) + return 0; + + String = TseSkipEscCode(String); + + while(String[FirstMissing]) + { + BufferSize = 0; + Status = gHiiProtocol->TestString ( + gHiiProtocol, + String, + &FirstMissing, + &BufferSize); + + GlyphBufferSize += BufferSize; + + if(String[FirstMissing]) + { + //Glyph for this character is missing calculate the + //print length for remaining string + FirstMissing++; + } + } + gBS->FreePool( String ); + return GlyphBufferSize; +} + +EFI_STATUS HiiString2BltBuffer( CHAR16 *Message, + EFI_UGA_PIXEL Foreground, + EFI_UGA_PIXEL Background, + OUT UINTN *Width, + OUT EFI_UGA_PIXEL **BltBuffer, + OUT UINTN *BltGlyphWidth) +{ + UINT8 GlyphBuf[sizeof(EFI_WIDE_GLYPH)]; + UINT8 *GlyphArray = (UINT8 *)&GlyphBuf; + UINT16 GlyphWidth, index; + UINT32 GlyphStatus; + CHAR16 *ptr; + UINTN Length; + EFI_STATUS Status = EFI_SUCCESS; + + GlyphStatus = 0; + ptr = Message; + Length = EfiStrLen(Message); + *Width = 0; + + //Allocate enuf memory for all wide chars + *BltBuffer = EfiLibAllocateZeroPool(sizeof (EFI_UGA_PIXEL) * Length * ((2*HiiGetGlyphWidth()) * HiiGetGlyphHeight())); + *BltGlyphWidth = Length * 2 * HiiGetGlyphWidth(); + + while(*ptr) + { + + index=0; + Status = gHiiProtocol->GetGlyph( + gHiiProtocol, + ptr, + &index, + &GlyphArray, + &GlyphWidth, + &GlyphStatus + ); + + if(EFI_SUCCESS == Status) + { + Status = gHiiProtocol->GlyphToBlt( + gHiiProtocol, + GlyphArray, + Foreground, + Background, + Length*2, + HiiGetGlyphWidth() * ((GlyphWidth > 8) ? 2 : 1), + HiiGetGlyphHeight(), + *BltBuffer + *Width); + + *Width += ( HiiGetGlyphWidth() * ((GlyphWidth > 8) ? 2 : 1) ); + } + + ptr++; + } + + return Status; +} + +UINTN Uefi20HiiGetGlyphWidth(VOID) +{ + return GLYPH_WIDTH; +} + +UINTN Uefi20HiiGetGlyphHeight(VOID) +{ + return GLYPH_HEIGHT; +} + +#include EFI_PROTOCOL_DEFINITION(UnicodeCollation) + +EFI_STATUS GetUnicodeCollectionProtocol(VOID **Protocol) +{ + return gBS->LocateProtocol( + &gEfiUnicodeCollationProtocolGuid, + NULL, + Protocol); +} + + +#if TSE_USE_EDK_LIBRARY + +#if APTIO_4_00 +#pragma pack(push,1) +typedef struct{ + EFI_GUID SubtypeGuid; + UINT32 NumberOfPackages; +} RESOURCE_SECTION_HEADER; +#pragma pack(pop) +#endif +EFI_STATUS ReadImageResource( + EFI_HANDLE ImageHandle, EFI_GUID *pGuid, + VOID **ppData, UINTN *pDataSize +); + +#if APTIO_4_00 || SETUP_USE_GUIDED_SECTION + +// +//---------------------------------------------------------------------------- +// Procedure: LoadStrings +// +// Description: Function to load the strings from Hii. +// +// Input: EFI_HANDLE ImageHandle, VOID * *pHiiHandle +// +// Output: Status +// +//---------------------------------------------------------------------------- +// +EFI_STATUS LoadStrings( + EFI_HANDLE ImageHandle, VOID * *pHiiHandle +) +{ + //TODO: create a macros for GUID + static EFI_GUID guidResourceSection= {0x97e409e6, 0x4cc1, 0x11d9, 0x81, 0xf6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; + static EFI_HII_PROTOCOL *pHii = NULL; + EFI_STATUS Status; + EFI_LOADED_IMAGE_PROTOCOL *pImage; + RESOURCE_SECTION_HEADER *pSection; + UINTN SectionSize; + EFI_HII_PACKAGES *pPackages = NULL; + EFI_HII_PACK_HEADER *pPack; + if (!pHii && EFI_ERROR(Status=gBS->LocateProtocol(&gEfiHiiProtocolGuid, NULL, &pHii))) return Status; + if (EFI_ERROR(Status=gBS->HandleProtocol(ImageHandle, &gEfiLoadedImageProtocolGuid, &pImage))) return Status; + Status=ReadImageResource(ImageHandle,&guidResourceSection,&pSection,&SectionSize); + if (EFI_ERROR(Status)) return Status; + pPack = (EFI_HII_PACK_HEADER*)(pSection+1); + if (pPack->Type==EFI_HII_STRING) + { + pPackages = EfiLibAllocatePool(sizeof(EFI_HII_PACKAGES)+sizeof(EFI_HII_PACK_HEADER*)); + pPackages->NumberOfPackages=1; + pPackages->GuidId = &((MEDIA_FW_VOL_FILEPATH_DEVICE_PATH*)(pImage->FilePath))->NameGuid; + *(EFI_HII_PACK_HEADER**)(pPackages+1)=pPack; + Status=pHii->NewPack(pHii, pPackages, (EFI_HII_HANDLE*)pHiiHandle); + } + else + { + Status = EFI_INVALID_PARAMETER; + } + MemFreePointer((VOID **)&pPackages); + gBS->FreePool(pSection); + return Status; +} + +#endif + +#endif //#if TSE_USE_EDK_LIBRARY + +// +//------------------------------------------------------------------------------------------------- +// Procedure: FormHotBootKeys +// +// Description: Dummy function for FormHotBootKeys function +// +// Input: VOID +// +// Output: VOID +// +//------------------------------------------------------------------------------------------------- +// +VOID FormHotBootKeys (CHAR16 *VarName) +{ +} + +// +//------------------------------------------------------------------------------------------------- +// Procedure: FreeExtraKeyMemories +// +// Description: Dummy function for FreeExtraKeyMemories function +// +// Input: VOID +// +// Output: VOID +// +//------------------------------------------------------------------------------------------------- +// +VOID FreeExtraKeyMemories (VOID) +{ +} + +// +//------------------------------------------------------------------------------------------------- +// Procedure: RefreshBootKeysDetails +// +// Description: Dummy function for RefreshBootKeysDetails function +// +// Input: VOID +// +// Output: VOID +// +//------------------------------------------------------------------------------------------------- +// +VOID RefreshBootKeysDetails (VOID) +{ +} + +// +//------------------------------------------------------------------------------------------------- +// Procedure: FindandSetHotKeys +// +// Description: Dummy function for FindandSetHotKeys function +// +// Input: VOID +// +// Output: VOID +// +//------------------------------------------------------------------------------------------------- +// +VOID FindandSetHotKeys (VOID) +{ +} + + +// +//----------------------------------------------------------------------------------------------------------- +// Procedure: CheckForDeviceNeedRepair +// +// Description: Repairs the driver for the input device path protocol +// +// Input: EFI_DEVICE_PATH_PROTOCOL * = Device path for the handle to which repair operation to be done +// +// Output: VOID +// +//------------------------------------------------------------------------------------------------------------ +// +EFI_STATUS CheckForDeviceNeedRepair (EFI_DEVICE_PATH_PROTOCOL *DevicePath) +{ + return EFI_UNSUPPORTED; +} + +// +//----------------------------------------------------------------------------------------------------------- +// Procedure: ReadPlatformLang +// +// Description: Dummy function for PlatformLang function +// +// Input: UINTN *Size +// +// Output: NULL +// +//------------------------------------------------------------------------------------------------------------ +// +CHAR16 *ReadPlatformLang( UINTN *Size ) +{ + return NULL; +} + +// +//------------------------------------------------------------------------------------------------------------------------------ +// +// Name: GetDefaultPasswordFromTokens +// +// Description: Gets default password throug sdl tokens +// +// Input: UINT32 PasswordType +// +// Output: CHAR16 * Password +// +//------------------------------------------------------------------------------------------------------------------------------- +// +#define EMPTY_DATA "" +CHAR16 *GetDefaultPasswordFromTokens (UINT32 PasswordType) +{ +#if TSE_DEFAULT_SETUP_PASSWORD_SUPPORT + if (AMI_PASSWORD_ADMIN == PasswordType) + { + return CONVERT_TO_WSTRING (TSE_ADMIN_PASSWORD); + } + if (AMI_PASSWORD_USER == PasswordType) + { + return CONVERT_TO_WSTRING (TSE_USER_PASSWORD); + } +#endif + return NULL; +} + +//********************************************************************** +//********************************************************************** +//** ** +//** (C)Copyright 2011, American Megatrends, Inc. ** +//** ** +//** All Rights Reserved. ** +//** ** +//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 ** +//** ** +//** Phone: (770)-246-8600 ** +//** ** +//********************************************************************** +//********************************************************************** + diff --git a/EDK/MiniSetup/BootOnly/hiistring21.c b/EDK/MiniSetup/BootOnly/hiistring21.c new file mode 100644 index 0000000..5cf33d7 --- /dev/null +++ b/EDK/MiniSetup/BootOnly/hiistring21.c @@ -0,0 +1,1462 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (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/BootOnly/hiistring21.c $ +// +// $Author: Premkumara $ +// +// $Revision: 30 $ +// +// $Date: 9/08/14 12:50p $ +// +//*****************************************************************// +//*****************************************************************// +// Revision History +// ---------------- +// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/BootOnly/hiistring21.c $ +// +// 30 9/08/14 12:50p Premkumara +// [TAG] EIP182798 +// [Category] Bug Fix +// [Severity] Important +// [Symptom] Build error when token TSE_USE_GETGYLPH_PRINTLENGH = 1 +// [RootCause] Variable "Status" is not declared in +// UefiHiiTestPrintLength() function when token is enabled. +// [Solution] Handled Status variable properly in both the case +// [Files] HiiString21.c +// +// 29 9/05/14 2:29p Premkumara +// Moved below functions from HiiString21.c to CommonHelper.c +// - IsSupportDefaultForStringControl() +// - IsTseBestTextGOPModeSupported() +// +// 28 9/05/14 6:56a Premkumara +// added IsTseBestTextGOPModeSupported() defination to resolve build error +// +// 27 8/28/14 6:46a Premkumara +// [TAG] EIP93340 +// [Category] Improvement +// [Description] - Defaults can be given to string type controls using tag +// "Default = STRING_TOKEN(STR_DEFAULT_STRING)". +// - New token TSE_SUPPORT_DEFAULT_FOR_STRING_CONTROL is introduced for +// this support. +// - Enabling this TSE_SUPPORT_DEFAULT_FOR_STRING_CONTROL token will +// display default string mention in setup. +// - On loading optimal defaults also string will load default mentioned +// in default value tag. +// [Files] AMITSE.sdl, HiiString21.c, TseAdvanced.c, MiniSetupExt.c, Hii.c +// +// 26 8/28/14 5:41a Premkumara +// EIP-135253 Updating file name proper in #include +// +// 25 5/08/14 9:12p Arunsb +// [TAG] EIP162981 +// [Category] Improvement +// [Description] Configuring default Password through SDL token +// TSE_ADMIN_PASSWORD, TSE_USER_PASSWORD handled from binary. +// +// 24 10/18/12 11:42a Rajashakerg +// [TAG] EIP 97951 +// [Category] Bug Fix +// [Severity] Critical +// [Symptom] Creation of TSE which does not access NVRAM during recovery +// [RootCause] TSE get Platform lang every time using VarGetNvramName +// [Solution] Moved the code accessing PlatformLang to uefi2.1. +// [Files] hiistring21.c, minisetupext.c, hiistring20.c +// +// 21 9/25/12 6:19a Rajashakerg +// [TAG] EIP85564 +// [Category] Improvement +// [Description] UefiHiiTestPrintLength function needs optimization +// [Files] TseLiteCommon.c, hiistring21.c +// +// 20 9/21/12 9:32a Premkumara +// [TAG] EIP97951 +// [Solution ] Resolved build issue because of adding +// space in #define EfiCopyMem and #define EfiZeroMem +// +// 19 9/21/12 3:42a Premkumara +// [TAG] EIP 97951 +// [Category] Bug Fix +// [Severity] Critical +// [Symptom] Creation of TSE which does not access NVRAM during recovery +// [RootCause] TSE get Platform lang every time using VarGetNvramName +// [Solution] Created cache to store Platform lang intially and using +// cached value instead of +// reading from NVRAM (VarGetNvramName ). +// [Files] hiistring21.c, minisetupext.c +// +// 18 5/29/12 3:27a Arunsb +// [TAG] EIP91109 +// [Category] Improvement +// [Description] Sync the Aptio IV source for AptioV +// +// 17 5/28/12 7:27a Rajashakerg +// [TAG] EIP85564 +// [Category] Improvement +// [Description] UefiHiiTestPrintLength function needs optimization +// [Files] TseLiteCommon.c, hiistring21.c +// +// 16 1/25/12 8:01a Rajashakerg +// [TAG] EIP81617 +// [Category] Improvement +// [Description] Avoiding memory leaks in TSE +// [Files] hiistring21.c, CommonHelper.c, notify.c +// +// 15 1/20/12 5:04a Rajashakerg +// [TAG] EIP77875 +// [Category] Improvement +// [Description] Minisetup: Memory leaks in text browser +// [Files] Uefi21Wapper.c, hiistring21.c, variable.c +// +// 14 12/08/11 7:49a Premkumara +// [TAG] EIP72588 +// [Category] Bug Fix +// [Severity] Normal +// [Symptom] System execption error if print string +"*" in Japanese & +// French +// [RootCause] can't get correct length size, because this data have +// include height data +// [Solution] Fixed the length +// [Files] hiistring21.c +// +// 13 12/01/11 12:55p Premkumara +// [TAG] EIP75536 +// [Category] Improvement +// [Description] 1.String handling inside the callbacks in +// Minisetup.Adding Null termination for String and Password control type. +// 2.Iterate to check the available language and add/change the string +// only for the passed language. +// [Files] HiiCallback.c, hiistring21.c +// +// 12 11/30/11 12:23a Premkumara +// [TAG] EIP75351 +// [Category] Improvement +// [Description] Static code analysis.Suppress the warnings from static +// code analyzer +// [Files] String.c, HiiString21.c, TseAdvanced.c, Special.c, +// UefiAction., Time.c, PopupEdit.c, MessageBox.c, Label.c, Edit.c, Date.c +// +// 11 7/01/11 5:14a Arunsb +// FormBrowser2.h included for resolving build error. +// +// 10 6/30/11 4:08a Arunsb +// [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. +// +// 9 6/29/11 6:24a Arunsb +// [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. +// +// 8 6/22/11 2:45p Arunsb +// [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. +// +// 7 11/15/10 11:05a Madhans +// [TAG] EIP47355 +// [Category] Defect +// [Symptom] HiiAddString was overwrtting the exiting strings when the +// projects support multiple language. +// [RootCause] - +// [Solution] Fixed the Uefi21HiiChangeStringLanguage() function to +// add/update the string only to specified lang. +// [Files] hiistring21.c +// +// 6 10/27/10 3:16p Madhans +// [TAG] EIP45875 +// [Category] Defect +// [Symptom] Memory Leaks in Language reading functions. +// [RootCause] - +// [Solution] Freed the memory after use. +// [Files] hiistring21.c +// +// 5 6/17/10 2:17p Madhans +// Refer Changelog.log. +// +// 4 2/26/10 8:46p Madhans +// For Tse 2.01.1204. Refer Changelog.log file change history +// +// 10 2/26/10 7:04p Madhans +// To void build issue when build with EDK +// +// 9 2/19/10 8:07a Mallikarjunanv +// updated year in copyright message +// +// 8 2/17/10 7:01p Madhans +// HiiString2BltBuffer() function updated to return the StringGlyphwidth +// If String not found in current lang Search in Default Lang. If not +// search in english. +// +// 7 2/15/10 9:42p Madhans +// Wide Char Support +// +// 6 1/09/10 3:04a Mallikarjunanv +// Updated TSE2.01 Release sources with coding standards +// +// 5 10/28/09 5:36p Madhans +// +// 3 7/31/09 4:55p Presannar +// HiiString21.c moved to Boot Only binary module +// Modifications done to build without EDK dependencies +// +// 2 6/12/09 7:41p Presannar +// Initial implementation of coding standards +// +// 1 6/04/09 8:05p Madhans +// +// 1 4/28/09 11:11p Madhans +// Tse 2.0 Code complete Checkin. +// +// 2 4/28/09 9:39p Madhans +// Tse 2.0 Code complete Checkin. +// +// 1 3/31/09 3:34p Madhans +// Hii string support for UEFI 2.0 and UEFI 2.1 +// +// 1 12/18/08 7:58p Madhans +// Intial version of TSE Lite sources +// +//*****************************************************************// +//*****************************************************************// + +// +//---------------------------------------------------------------------------- +// +// Name: hiistring21.c +// +// Description: This file contains code to handle UEFI2.1 supported hii strings. +// +//---------------------------------------------------------------------------- +// + +#ifdef TSE_FOR_APTIO_4_50 +#include "Token.h" +#include "Efi.h" +#include "Protocol/DevicePath.h" +#else +#include "tokens.h" +#include "efi.h" +#endif + +#ifdef TSE_FOR_APTIO_4_50 +#ifndef EFI_PROTOCOL_DEFINITION +#define TSE_STRINGIZE(a) #a +#define EFI_PROTOCOL_DEFINITION(a) TSE_STRINGIZE(Protocol/a.h) +#endif +#endif + +#include EFI_PROTOCOL_DEFINITION (HiiString) +#include EFI_PROTOCOL_DEFINITION (HiiDatabase) +#include EFI_PROTOCOL_DEFINITION (HiiFont) +#include EFI_PROTOCOL_DEFINITION (LoadedImage) +#include EFI_PROTOCOL_DEFINITION (SimpleTextIn) +#include EFI_PROTOCOL_DEFINITION (SimpleTextInEx) +#include EFI_PROTOCOL_DEFINITION (AmiKeycode) +#include EFI_PROTOCOL_DEFINITION (FormBrowser2) + +#include "Mem.h" +#include "HiiLib.h" +#include "Variable.h" +#include "TseDrvHealth.h" //Has TSE related driver health structures +#include "PwdLib.h" +#include "AmiLib.h" + +#pragma pack(push,1) +typedef struct{ + EFI_GUID SubtypeGuid; + UINT32 NumberOfPackages; +} RESOURCE_SECTION_HEADER; +#pragma pack(pop) + +typedef struct HOT_KEYS +{ + EFI_KEY_DATA KeyData; + UINT16 BootOption; + UINT32 BootOptionCrc; +}HOT_KEYS; +UINT32 CheckBootOptionMatch (UINT16 BootOption); +HOT_KEYS *gHotKeysDetails = NULL; +UINTN gHotKeysCount = 0; +UINTN gAllocateKeysCount = 0; +#define HOTKEY_ALLOC_UNIT 10 +#define HOT_KEY_SHIFT 0x00000100 +#define HOT_KEY_CTRL 0x00000200 +#define HOT_KEY_ALT 0x00000400 +#define HOT_KEY_LOGO 0x00000800 +#define HOT_KEY_MENU 0x00001000 +#define HOT_KEY_SYSREQ 0x00002000 +#define MODIFIER_DUAL_KEYS 0x000000FF //For handling any of 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 +BOOLEAN CheckAdvShiftState (UINT32 AmiKeyShiftState, UINT32 CondShiftState); +extern INTN gHotKeyBootOption; +VOID SetBootOptionSupportVariable (UINT32); +BOOLEAN MetaiMatch (VOID *,IN CHAR16 *, IN CHAR16 *); +EFI_STATUS InitUnicodeCollectionProtocol (VOID **); + +#define RFC_3066_ENTRY_SIZE (42 + 1) +#define GLYPH_WIDTH 8 +#define GLYPH_HEIGHT 19 +#define NG_SIZE 19 +#define WG_SIZE 38 + +#define MINI_SETUP_RESOURCE_SECTION_GUID \ + {0x97e409e6, 0x4cc1, 0x11d9, 0x81, 0xf6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0} +typedef EFI_GRAPHICS_OUTPUT_BLT_PIXEL EFI_UGA_PIXEL; + +extern EFI_BOOT_SERVICES *gBS; +extern EFI_RUNTIME_SERVICES *gRT; +extern /*EFI_HII_HANDLE*/VOID* gHiiHandle; + +#if !TSE_APTIO_5_SUPPORT +EFI_GUID gEfiHiiFontProtocolGuid = EFI_HII_FONT_PROTOCOL_GUID; +#endif +EFI_GUID gEfiHiiDatabaseProtocolGuid = EFI_HII_DATABASE_PROTOCOL_GUID; +EFI_GUID gEfiHiiStringProtocolGuid = EFI_HII_STRING_PROTOCOL_GUID; + +EFI_HII_STRING_PROTOCOL *gHiiString; +EFI_HII_DATABASE_PROTOCOL *gHiiDatabase; +EFI_HII_FONT_PROTOCOL *gHiiFont; + +extern EFI_GUID gEfiGlobalVariableGuid; +CHAR8 *GlyphWidthCache = NULL;//EIP 85564 : UefiHiiTestPrintLength function needs optimization + +CHAR8 *_GetSupportedLanguages(EFI_HII_HANDLE HiiHandle); +VOID _GetNextLanguage(CHAR8 **LangCode, CHAR8 *Lang); +EFI_STATUS UefiHiiWrapperGetString( EFI_HII_HANDLE handle, CHAR8 *Language, EFI_STRING_ID StringId, CHAR16 *buffer,UINTN *bufferSize ); + +extern VOID *EfiLibAllocatePool(IN UINTN AllocationSize); +extern EFI_STATUS HiiExtendedInitializeProtocol(); +extern CHAR8* StrDup16to8(CHAR16 *String); +extern VOID *VarGetNvram( UINT32 variable, UINTN *size ); +extern INTN EfiAsciiStrCmp(IN CHAR8 *String, IN CHAR8 *String2); +extern CHAR8 *StrDup8( CHAR8 *string ); +extern EFI_STATUS ReadImageResource(EFI_HANDLE ImageHandle, EFI_GUID *pGuid, + VOID **ppData, UINTN *pDataSize); +BOOLEAN AdvancedRepairSupported (VOID); +VOID DriverHealthSystemReset (VOID); +// Typecast EFI_KEY_OPTION to make it compatible Aptio 4 and 5 +typedef struct { + /// + /// Specifies options about how the key will be processed. + /// + HOT_KEY_EFI_KEY_DATA KeyData; + /// + /// The CRC-32 which should match the CRC-32 of the entire EFI_LOAD_OPTION to + /// which BootOption refers. If the CRC-32s do not match this value, then this key + /// option is ignored. + /// + UINT32 BootOptionCrc; + /// + /// The Boot#### option which will be invoked if this key is pressed and the boot option + /// is active (LOAD_OPTION_ACTIVE is set). + /// + UINT16 BootOption; + /// + /// The key codes to compare against those returned by the + /// EFI_SIMPLE_TEXT_INPUT and EFI_SIMPLE_TEXT_INPUT_EX protocols. + /// The number of key codes (0-3) is specified by the EFI_KEY_CODE_COUNT field in KeyOptions. + /// + //EFI_INPUT_KEY Keys[]; +} AMI_EFI_KEY_OPTION; + +CHAR16 gPlatformLang [20]; //EIP97951 +// +//---------------------------------------------------------------------------- +// +// Procedure: _GetSupportedLanguages +// +// Description: +// +// Parameter: +// +// Return value: +// +//---------------------------------------------------------------------------- +// +CHAR8 *_GetSupportedLanguages (EFI_HII_HANDLE HiiHandle) +{ + EFI_STATUS status; + UINTN BufferSize; + CHAR8 *LanguageString; + + status = HiiInitializeProtocol (); + + // + // Collect current supported Languages for given HII handle + // + BufferSize = 0x1000; + LanguageString = (CHAR8*)EfiLibAllocatePool (BufferSize); + status = gHiiString->GetLanguages (gHiiString, HiiHandle, LanguageString, &BufferSize); + if(status == EFI_BUFFER_TOO_SMALL) + { + MemFreePointer((VOID**)&LanguageString); + LanguageString = (CHAR8*)EfiLibAllocatePool (BufferSize); + status = gHiiString->GetLanguages (gHiiString, HiiHandle, LanguageString, &BufferSize); + } + + if(EFI_ERROR(status)) + { + LanguageString = NULL; + } + + return LanguageString; +} + +VOID _GetNextLanguage(CHAR8 **LangCode, CHAR8 *Lang) +{ + UINTN Index; + CHAR8 *StringPtr; + + if (LangCode == NULL || *LangCode == NULL) + { + *Lang = 0; + return; + } + + Index = 0; + StringPtr = *LangCode; + while (StringPtr[Index] != 0 && StringPtr[Index] != ';') + { + Index++; + } + + MemCopy(Lang, StringPtr, Index); + Lang[Index] = 0; + + if (StringPtr[Index] == ';') + { + Index++; + } + *LangCode = StringPtr + Index; +} + +// +//---------------------------------------------------------------------------- +// +// Procedure: HiiInitializeProtocol +// +// Description: +// +// Parameter: +// +// Return value: EFI_STATUS +// EFI_SUCCESS +//---------------------------------------------------------------------------- +// +EFI_STATUS Uefi21HiiInitializeProtocol(VOID) +{ + EFI_STATUS Status = EFI_SUCCESS; + + Status = gBS->LocateProtocol(&gEfiHiiFontProtocolGuid, NULL, &gHiiFont); + if(EFI_ERROR(Status)) + { + goto DONE; + } + Status = gBS->LocateProtocol(&gEfiHiiDatabaseProtocolGuid, NULL, &gHiiDatabase); + if(EFI_ERROR(Status)) + { + goto DONE; + } + Status = gBS->LocateProtocol(&gEfiHiiStringProtocolGuid, NULL, &gHiiString); + if(EFI_ERROR(Status)) + { + goto DONE; + } + Status = HiiExtendedInitializeProtocol(); + +DONE: + return Status; +} + +UINT16 Uefi21HiiChangeStringLanguage(VOID* handle, UINT16 token, CHAR16 *lang, CHAR16 *string) +{ + EFI_STATUS status = EFI_SUCCESS; + UINT16 newToken = INVALID_TOKEN; + CHAR8 *passedLang = (CHAR8 *)NULL; + CHAR8 *Languages = (CHAR8 *)NULL; + CHAR8 *LangStrings = (CHAR8 *)NULL; + CHAR8 Lang[RFC_3066_ENTRY_SIZE]; + + status = HiiInitializeProtocol(); + + if((EFI_ERROR(status)) || (string == NULL)) + { + return (UINT16)INVALID_TOKEN; + } + + passedLang = StrDup16to8(lang); + + Languages = _GetSupportedLanguages(handle); + if(Languages == NULL) + return INVALID_TOKEN; + + // + //EIP-75536 Iterate through the languages supported by package list to see whether passed language is supported. If yes, add/change the string. + // + LangStrings = Languages; + while (*LangStrings != 0) + { + _GetNextLanguage (&LangStrings, Lang); + + if(EfiAsciiStrCmp(passedLang, Lang) == 0) + { + if(token) + { + status = gHiiString->SetString(gHiiString, handle, token, Lang, string, NULL); + newToken = token; + } + else + { + status = gHiiString->NewString(gHiiString, handle, &newToken, Lang, NULL, string, NULL); + } + + if(EFI_ERROR(status)) + { + newToken = INVALID_TOKEN; + } + break; + } + } + + MemFreePointer ((VOID **)&passedLang);//EIP 77875 : Freeing the allocated memory before returning + MemFreePointer ((VOID **)&Languages); + return newToken; +} + + +#define TSE_TO_STRING(a) #a +// +//---------------------------------------------------------------------------- +// Procedure: Uefi21HiiGetStringLanguage +// +// Description: Returns the string for incoming token. +// If lang is valid then return string for this lang +// else return string for PlatformLang variable +// else return english string - default +// +// Input: Handle, string token and lang code +// +// Output: Sting buffer +// +//---------------------------------------------------------------------------- +// +VOID * EfiLibAllocateZeroPool (IN UINTN AllocationSize); +VOID EfiStrCpy (IN CHAR16 *Destination, IN CHAR16 *Source); +#define EfiCopyMem(_Destination, _Source, _Length) gBS->CopyMem((_Destination), (_Source), (_Length)) +#define EfiZeroMem(_Destination, _Length) gBS->SetMem((_Destination), (_Length), 0) +CHAR16 *Uefi21HiiGetStringLanguage(EFI_HII_HANDLE handle, UINT16 token, CHAR16 *lang) +{ + EFI_STATUS status; + CHAR16 *buffer = NULL; + UINTN bufferSize = 0,Size=0; + UINT8 *language = NULL; + + status = HiiInitializeProtocol(); + if ( EFI_ERROR(status) ) + { + return buffer; + } + + /* This is a Quick Fix. We need to get the Default Languag here. */ + if (lang) + language = StrDup16to8 (lang); + else + { + //EIP97951-Start + //language = VarGetNvramName( L"PlatformLang", &gEfiGlobalVariableGuid, NULL, &Size ); + if (*gPlatformLang) //gPlatformLang will filled in mainsetuploop only if any call comes before it get from NVRAM + { + language = EfiLibAllocateZeroPool (20 * sizeof (CHAR16)); + if (NULL != language) + { + EfiStrCpy ((CHAR16 *)language, gPlatformLang); + } + } + else + { + language = VarGetNvramName( L"PlatformLang", &gEfiGlobalVariableGuid, NULL, &Size ); + if (NULL != language) + { + EfiZeroMem (gPlatformLang, sizeof (gPlatformLang)); + EfiCopyMem (gPlatformLang, language, Size); + } + } + //EIP97951-End + } + if (NULL == language)//EIP-75351 Suppress the warnings from static code analyzer + return NULL; + + status = UefiHiiWrapperGetString(handle, language,token ,buffer, &bufferSize ); + + if(status == EFI_INVALID_PARAMETER) + { + buffer = (CHAR16*)EfiLibAllocateZeroPool(sizeof(CHAR16)); + if(buffer == NULL) + { + return buffer; + } + status = UefiHiiWrapperGetString(handle, language,token ,buffer, &bufferSize ); + } +// String not found with currnet Lang + if (( EFI_ERROR(status) ) && (bufferSize==0)) + { + MemFreePointer( (VOID **)&language ); + language = StrDup8(TSE_TO_STRING(DEFAULT_LANGUAGE_CODE)); + status = UefiHiiWrapperGetString(handle, language,token ,buffer, &bufferSize ); +// String not found in Default Lang + if (( EFI_ERROR(status) )&&(bufferSize==0)) + { + if(EfiAsciiStrCmp(language, "en-US")!=0) + { + MemFreePointer( (VOID **)&language ); + language = StrDup8("en-US"); + status = UefiHiiWrapperGetString(handle, language,token ,buffer, &bufferSize ); +// string not found in english + if (( EFI_ERROR(status) )&&(bufferSize==0)) + { +//81617 : Avoiding memory leaks in TSE + MemFreePointer( (VOID **)&language ); + return buffer; + } + } + else + { +//81617 : Avoiding memory leaks in TSE + MemFreePointer( (VOID **)&language ); + return buffer; + } + } + } + buffer = (CHAR16*)EfiLibAllocatePool( bufferSize ); + if ( buffer == NULL ) + return buffer; + + status = UefiHiiWrapperGetString(handle, language,token ,buffer, &bufferSize ); + + if ( EFI_ERROR(status) ) + MemFreePointer( (VOID **)&buffer ); + MemFreePointer( (VOID **)&language ); + + return buffer; +} + +EFI_STATUS UefiHiiWrapperGetString( EFI_HII_HANDLE handle, CHAR8 *Language, EFI_STRING_ID StringId, CHAR16 *buffer,UINTN *bufferSize ) +{ + if ( handle == INVALID_HANDLE ) + handle = gHiiHandle; + + return gHiiString->GetString(gHiiString, Language, handle, StringId, buffer, bufferSize, NULL); +} + +#if TSE_USE_EDK_LIBRARY + +#if APTIO_4_00 || SETUP_USE_GUIDED_SECTION + +EFI_STATUS LoadStrings( + EFI_HANDLE ImageHandle, VOID * *pHiiHandle +) +{ + static EFI_GUID guidResourceSection= MINI_SETUP_RESOURCE_SECTION_GUID; + EFI_STATUS Status = EFI_SUCCESS; + EFI_LOADED_IMAGE_PROTOCOL *pImage; + RESOURCE_SECTION_HEADER *pSection; + UINTN SectionSize; + EFI_HII_PACKAGE_LIST_HEADER *pPackages = NULL; + EFI_HII_PACKAGE_HEADER *pPack; + + Status = HiiInitializeProtocol(); + if (EFI_ERROR(Status)) + goto DONE; + + Status = gBS->HandleProtocol(ImageHandle, &gEfiLoadedImageProtocolGuid, &pImage); + if (EFI_ERROR(Status)) + goto DONE; + + Status = ReadImageResource(ImageHandle,&guidResourceSection,&pSection,&SectionSize); + if (EFI_ERROR(Status)) + goto DONE; + + pPack = (EFI_HII_PACKAGE_HEADER*)(pSection+1); + if (pPack->Type==EFI_HII_PACKAGE_STRINGS) + { + pPackages = EfiLibAllocateZeroPool(sizeof(EFI_HII_PACKAGE_LIST_HEADER) + + pPack->Length); + pPackages->PackageListGuid = ((MEDIA_FW_VOL_FILEPATH_DEVICE_PATH*)(pImage->FilePath))->NameGuid; + pPackages->PackageLength = sizeof(EFI_HII_PACKAGE_LIST_HEADER) + pPack->Length; + MemCopy(pPackages + 1, pPack, pPack->Length); + Status = gHiiDatabase->NewPackageList(gHiiDatabase, pPackages, ImageHandle, (EFI_HII_HANDLE*)pHiiHandle); + } + else + { + Status = EFI_INVALID_PARAMETER; + } + MemFreePointer((VOID **)&pPackages); + gBS->FreePool(pSection); + +DONE: + return Status; +} +#endif + +#endif //#if TSE_USE_EDK_LIBRARY + +UINTN Uefi21HiiGetGlyphWidth(VOID) +{ + return GLYPH_WIDTH; +} + +UINTN Uefi21HiiGetGlyphHeight(VOID) +{ + return GLYPH_HEIGHT; +} + +//---------------------------------------------------------------------------- +// Patch to use UnicodeCollation until +// Aptio supports UnicodeCollation2 protocol +//---------------------------------------------------------------------------- +#include EFI_PROTOCOL_DEFINITION(UnicodeCollation) +#if UEFI_2_1_SUPPORT +#ifndef TSE_FOR_APTIO_4_50 +#include EFI_PROTOCOL_DEFINITION(UnicodeCollation2) +#endif +#endif + +EFI_STATUS GetUnicodeCollection2Protocol(VOID **Protocol) +{ + EFI_STATUS Status = EFI_SUCCESS; + + Status = gBS->LocateProtocol( + &gEfiUnicodeCollation2ProtocolGuid, + NULL, + Protocol); +//---------------------------------------------------------------------------- +// Patch to use UnicodeCollation until +// Aptio supports UnicodeCollation2 protocol +//---------------------------------------------------------------------------- + if(EFI_ERROR(Status)) + { + Status = gBS->LocateProtocol( + &gEfiUnicodeCollationProtocolGuid, + NULL, + Protocol); + } + + return Status; +} +//EIP : 85564 STARTS +CHAR16 *TseSkipEscCode(CHAR16 *String); +UINTN EfiStrLen(IN CHAR16 *String); +// +//---------------------------------------------------------------------------- +// Procedure: EfiTestPrintLength +// +// Description: function to get the printable lenght of the string +// +// Input: CHAR16 *string +// +// Output: Size of string +// +//---------------------------------------------------------------------------- +// +UINTN UefiHiiTestPrintLength ( IN CHAR16 *String ) +{ + + UINTN Size = 0; + + if(String == NULL) + { + goto DONE; + } + +#if !TSE_USE_GETGYLPH_PRINTLENGH + { + EFI_STATUS Status = EFI_SUCCESS; + EFI_IMAGE_OUTPUT *Blt = NULL; + UINTN BltX = 0; + UINTN BltY = 0; + UINT32 Flag = EFI_HII_OUT_FLAG_WRAP; + + // Skip Esc Characters from String + String = (UINT16* )TseSkipEscCode(String); + + Status = gHiiFont->StringToImage(gHiiFont, Flag, String, NULL, &Blt, BltX, BltY, NULL, NULL, NULL); + if(EFI_ERROR(Status)) + { + if(String != NULL) + gBS->FreePool( String ); + goto DONE; + } + if(Blt) + { + Size = Blt->Width * Blt->Height; + Size = Size/GLYPH_WIDTH; + Size = Size/(Blt->Height/EFI_GLYPH_HEIGHT); // EIP72588 + MemFreePointer(&Blt->Image.Bitmap); + MemFreePointer(&Blt); + } + + if(String != NULL) + gBS->FreePool( String ); + } +#else // Non Aptio case with EDK Nt32 emulation + { + EFI_STATUS Status = EFI_SUCCESS; + UINTN StringLen = 0; + UINT32 Index = 0; + + if (GlyphWidthCache == NULL) { + // Allocate a 64k buffer to store the widths of each possible CHAR16 glyph + GlyphWidthCache = EfiLibAllocateZeroPool(65536); + if (GlyphWidthCache == NULL) + return 0; + } + + StringLen = EfiStrLen(String); + while(Index < StringLen) //Get the glyph of each character + { + UINTN Baseline = 0; + CHAR16 Character = String[Index]; + + if (*(GlyphWidthCache+Character) == 0) { + EFI_IMAGE_OUTPUT *Blt = NULL; + + Status = gHiiFont->GetGlyph(gHiiFont, Character, NULL, &Blt, &Baseline); + if(EFI_ERROR(Status) && Status != EFI_WARN_UNKNOWN_GLYPH) + { + goto DONE; + } + if(Blt == NULL) + { + Character = L' '; + gHiiFont->GetGlyph(gHiiFont, Character, NULL, &Blt, &Baseline); + } + *(GlyphWidthCache+Character) = (CHAR8) Blt->Width; + if(Blt) + { + MemFreePointer(&Blt->Image.Bitmap); + MemFreePointer(&Blt); + } + } + + Size += *(GlyphWidthCache+Character); + Index++; + } + Size = ((Size/GLYPH_WIDTH)*NG_SIZE); + } +#endif + +DONE: + + return Size; +} +//EIP : 85564 ENDS + +// +//---------------------------------------------------------------------------- +// Procedure: HiiString2BltBuffer +// +// Description: function to get the Blt for the message with the given attributes +// +// Input: CHAR16 *Message, EFI_UGA_PIXEL Foreground, EFI_UGA_PIXEL Background, +// OUT UINTN *Width, OUT EFI_UGA_PIXEL **BltBuffer +// +// Output: Size of string +// +//---------------------------------------------------------------------------- +// +EFI_STATUS HiiString2BltBuffer( CHAR16 *Message, + EFI_UGA_PIXEL Foreground, + EFI_UGA_PIXEL Background, + OUT UINTN *Width, + OUT EFI_UGA_PIXEL **BltBuffer, + OUT UINTN *BltGlyphWidth) +{ + EFI_STATUS Status = EFI_SUCCESS; + EFI_IMAGE_OUTPUT *Blt = NULL; + EFI_FONT_DISPLAY_INFO FontDisplayInfo={0}; + UINTN BltX = 0; + UINTN BltY = 0; + UINT32 Flag = EFI_HII_OUT_FLAG_WRAP; + + // Get the Font Display Info for use in StringToImage + FontDisplayInfo.ForegroundColor = Foreground; + FontDisplayInfo.BackgroundColor = Background; + + // Get the String To Image Blt Buffer + Status = gHiiFont->StringToImage(gHiiFont, Flag, Message, &FontDisplayInfo, &Blt, BltX, BltY, NULL, NULL, NULL); + if(EFI_ERROR(Status)) + { + goto DONE; + } + *BltBuffer = Blt->Image.Bitmap; + *BltGlyphWidth = *Width = Blt->Width; + + // Free Blt. Only Blt is freed. The Bitmap memory is not freed. + if(Blt) + MemFreePointer(&Blt); + +DONE: + return Status; +} + +//EIP: 62631 Start +// +//---------------------------------------------------------------------------- +// Procedure: RefreshBootKeysDetails +// +// Description: Clears the boot key gloabl details +// +// Input: VOID +// +// Output: VOID +// +//---------------------------------------------------------------------------- +// +VOID RefreshBootKeysDetails (VOID) +{ + gHotKeysCount = 0; + gAllocateKeysCount = 0; + MemFreePointer ((VOID **)&gHotKeysDetails); +} + +// +//---------------------------------------------------------------------------- +// Procedure: FormHotBootKeys +// +// Description: Function to form the boot option hot keys +// +// Input: CHAR16 * = Hot key name to retrieve the hot key details +// +// Output: VOID +// +//---------------------------------------------------------------------------- +// +VOID FormHotBootKeys (CHAR16 *VarName) +{ + UINT8 Keycount = 0; + EFI_INPUT_KEY *InputKey; + HOT_KEYS *ParseKey = NULL; + UINTN size=0; + UINT32 CRC32 = 0; + AMI_EFI_KEY_OPTION *HotKeyBuff = NULL; + + + if (gHotKeysCount >= gAllocateKeysCount) + { + gHotKeysDetails = MemReallocateZeroPool (gHotKeysDetails, gHotKeysCount * sizeof (HOT_KEYS), ((gAllocateKeysCount + HOTKEY_ALLOC_UNIT) * sizeof (HOT_KEYS)) ); + if (NULL == gHotKeysDetails) + { + return; + } + gAllocateKeysCount = gAllocateKeysCount + HOTKEY_ALLOC_UNIT; + } + HotKeyBuff = VarGetNvramName (VarName, &gEfiGlobalVariableGuid, NULL, &size); + if (NULL == HotKeyBuff) + { + return; + } + Keycount = HotKeyBuff->KeyData.Options.InputKeyCount; + CRC32 = CheckBootOptionMatch (HotKeyBuff->BootOption); + if ((!CRC32) || (CRC32 != HotKeyBuff->BootOptionCrc)) //For failure case CRC32 will return 0 + { + return; + } + gHotKeysDetails [gHotKeysCount].KeyData.KeyState.KeyShiftState = SHIFT_STATE_VALID; //Making valid shift state + if (HotKeyBuff->KeyData.PackedValue & HOT_KEY_SHIFT) //Checking for shift(special) keys, if anything found in data then we have to give the value for both the shifts/ctrls etc., + { + gHotKeysDetails [gHotKeysCount].KeyData.KeyState.KeyShiftState |= RIGHT_LEFT_SHIFT_PRESSED; + } + if (HotKeyBuff->KeyData.PackedValue & HOT_KEY_CTRL) + { + gHotKeysDetails [gHotKeysCount].KeyData.KeyState.KeyShiftState |= RIGHT_LEFT_CONTROL_PRESSED; + } + if (HotKeyBuff->KeyData.PackedValue & HOT_KEY_ALT) + { + gHotKeysDetails [gHotKeysCount].KeyData.KeyState.KeyShiftState |= RIGHT_LEFT_ALT_PRESSED; + } + if (HotKeyBuff->KeyData.PackedValue & HOT_KEY_LOGO) + { + gHotKeysDetails [gHotKeysCount].KeyData.KeyState.KeyShiftState |= RIGHT_LEFT_LOGO_PRESSED; + } + if (HotKeyBuff->KeyData.PackedValue & HOT_KEY_MENU) + { + gHotKeysDetails [gHotKeysCount].KeyData.KeyState.KeyShiftState |= MENU_KEY_PRESSED; + } + if (HotKeyBuff->KeyData.PackedValue & HOT_KEY_SYSREQ) + { + gHotKeysDetails [gHotKeysCount].KeyData.KeyState.KeyShiftState |= SYS_REQ_PRESSED; + } + gHotKeysDetails [gHotKeysCount].BootOption = HotKeyBuff->BootOption; + gHotKeysDetails [gHotKeysCount].BootOptionCrc = HotKeyBuff->BootOptionCrc; + + while (Keycount) + { //Since the values are ORED the values may read at reverse also + InputKey = (EFI_INPUT_KEY *)((UINT8 *)HotKeyBuff + (sizeof (EFI_KEY_OPTION) + ((Keycount-1) * sizeof (EFI_INPUT_KEY)))); + gHotKeysDetails [gHotKeysCount].KeyData.Key.ScanCode |= InputKey->ScanCode; + gHotKeysDetails [gHotKeysCount].KeyData.Key.UnicodeChar |= InputKey->UnicodeChar; + Keycount --; + } + gHotKeysCount ++; +} + +// +//---------------------------------------------------------------------------- +// Procedure: FreeExtraKeyMemories +// +// Description: Function to free the extra memories allocated +// +// Input: VOID +// +// Output: VOID +// +//---------------------------------------------------------------------------- +// +VOID FreeExtraKeyMemories (VOID) +{ + if (gHotKeysCount < gAllocateKeysCount) + { + gHotKeysDetails = MemReallocateZeroPool (gHotKeysDetails, gAllocateKeysCount * sizeof (HOT_KEYS), gHotKeysCount * sizeof (HOT_KEYS)); + } +} + +// +//---------------------------------------------------------------------------- +// Procedure: FindandSetHotKeys +// +// Description: Function to form the hot keys from NVRAM +// +// Input: VOID +// +// Output: VOID +// +//---------------------------------------------------------------------------- +// +VOID FindandSetHotKeys (VOID) +{ +#ifndef STANDALONE_APPLICATION + CHAR16 KeyPattern [] = L"Key[0-9a-f][0-9a-f][0-9a-f][0-9a-f]"; + UINTN VarNameSize = 80; + CHAR16 *VarName = NULL; + EFI_GUID VarGuid; + UINTN OldVarNameSize = 0; + EFI_STATUS Status = EFI_SUCCESS; + VOID * UnicodeInterface; + + OldVarNameSize = VarNameSize; + VarName = EfiLibAllocateZeroPool(VarNameSize); + if (NULL == VarName) + { + return; + } + RefreshBootKeysDetails (); + SetBootOptionSupportVariable (EFI_BOOT_OPTION_SUPPORT_KEY); //Indicates boot manager supports hot key boot + Status = InitUnicodeCollectionProtocol (&UnicodeInterface); + do + { + Status = gRT->GetNextVariableName (&VarNameSize, + VarName, + &VarGuid); + if (EFI_BUFFER_TOO_SMALL == Status) + { + //Allocate correct size + VarName = MemReallocateZeroPool ( + VarName, + OldVarNameSize, + VarNameSize); + OldVarNameSize = VarNameSize; + continue; + } + if (VarNameSize == ((EfiStrLen(L"keyXXXX")+1)*2)) + { + if (MetaiMatch (UnicodeInterface, VarName, KeyPattern)) + { + FormHotBootKeys (VarName); + } + } + VarNameSize = OldVarNameSize; + }while (EFI_NOT_FOUND != Status); + FreeExtraKeyMemories (); + MemFreePointer ((VOID **)&VarName); +#endif +} + +// +//-------------------------------------------------------------------------------------- +// Procedure: CheckforHotKey +// +// Description: Checks for the key pressed by user matches the boot key options +// +// Input: AMI_EFI_KEY_DATA = Input key details pressed by user +// UINT16 * = Boot index to return; Memory should be allocated by user +// +// Output: BOOLEAN TRUE = If boot option found for user pressed key +// FALSE = If boot index not found for user pressed key +// +//-------------------------------------------------------------------------------------- +// +BOOLEAN CheckforHotKey (AMI_EFI_KEY_DATA InputKey) +{ + UINTN Count = 0; + UINT32 CRC32 = 0; + + while (Count < gHotKeysCount) + { + if ( (gHotKeysDetails [Count].KeyData.Key.UnicodeChar == InputKey.Key.UnicodeChar) + && (gHotKeysDetails [Count].KeyData.Key.ScanCode == InputKey.Key.ScanCode) +#if TSE_USE_AMI_EFI_KEYCODE_PROTOCOL + && (CheckAdvShiftState (InputKey.KeyState.KeyShiftState, gHotKeysDetails [Count].KeyData.KeyState.KeyShiftState)) +#endif + ) + { + gHotKeyBootOption = (INTN)gHotKeysDetails->BootOption; + return TRUE; + } + Count ++; + } + return FALSE; +} +//EIP: 62631 End + +// +//----------------------------------------------------------------------------------------------------------- +// Procedure: FindtheMatchUptoEndNode +// +// Description: Finds all agent handle which opens the input handle upto the last agent for the controller +// +// Input: EFI_HANDLE = Handle to be examined +// EFI_HANDLE = Handle to be matched +// +// Output: BOOLEAN => If handle matches return TRUE else FALSE +// +//------------------------------------------------------------------------------------------------------------ +// +BOOLEAN FindtheMatchUptoEndNode (EFI_HANDLE Handle, EFI_HANDLE DPHandle) +{ + EFI_GUID **ppGuid = NULL; + UINTN Count = 0; + UINTN iIndex = 0; + UINTN jIndex = 0; + VOID *Interface = NULL; + UINTN EntryCount = 0; + EFI_STATUS Status = EFI_SUCCESS; + BOOLEAN RetStatus = FALSE; + EFI_OPEN_PROTOCOL_INFORMATION_ENTRY *EntryBuffer = NULL; + + Status = gBS->ProtocolsPerHandle (Handle, &ppGuid, &Count); + if (EFI_ERROR (Status) ) + { + return FALSE; + } + for (iIndex = 0; (iIndex < Count && !RetStatus); iIndex ++) + { + Status = gBS->OpenProtocolInformation (Handle, ppGuid [iIndex], &EntryBuffer, &EntryCount); + if (EFI_ERROR (Status) ) + { + continue; + } + for (jIndex = 0; (jIndex < EntryCount && !RetStatus); jIndex ++) + { + if (!(EntryBuffer [jIndex].Attributes & (EFI_OPEN_PROTOCOL_BY_DRIVER|EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER))) + { + continue; + } + if ((EntryBuffer [jIndex].AgentHandle == DPHandle) || (EntryBuffer [jIndex].ControllerHandle == DPHandle) ) + { + RetStatus = TRUE; + break; + } + RetStatus = FindtheMatchUptoEndNode (EntryBuffer [jIndex].AgentHandle, DPHandle); + } + MemFreePointer ((VOID **)&EntryBuffer); + } + MemFreePointer ((VOID **)&ppGuid); + return RetStatus; +} + +// +//-------------------------------------------------------------------------------------------- +// Procedure: MatchDPHandleWithDrvHlthHndls +// +// Description: Checks whether the input handle has the driver health support +// +// Input: EFI_HANDLE = Handle to be examined +// +// Output: BOOLEAN => TRUE if input handle has the driver health support else FALSE +// +//-------------------------------------------------------------------------------------------- +// +BOOLEAN MatchDPHandleWithDrvHlthHndls (EFI_HANDLE DPHandle) +{ + EFI_STATUS Status; + UINTN NumHandles = 0; + UINTN Count = 0; + UINTN EntryCount = 0; + EFI_HANDLE *DriverHealthHandles = NULL; + UINTN iIndex = 0, jIndex = 0, kIndex = 0; + EFI_GUID **ppGuid = NULL; + EFI_OPEN_PROTOCOL_INFORMATION_ENTRY *EntryBuffer = NULL; + EFI_GUID EfiDriverHealthProtocolGuid = EFI_DRIVER_HEALTH_PROTOCOL_GUID; + + Status = gBS->LocateHandleBuffer ( + ByProtocol, + &EfiDriverHealthProtocolGuid, + NULL, + &NumHandles, + &DriverHealthHandles + ); + if (EFI_ERROR (Status)) + { + return FALSE; + } + for (iIndex = 0; iIndex < NumHandles; iIndex ++) + { + Status = gBS->ProtocolsPerHandle (DriverHealthHandles [iIndex], &ppGuid, &Count); + if (EFI_ERROR (Status) ) + { + return FALSE; + } + for (jIndex = 0; jIndex < Count; jIndex++) + { + Status = gBS->OpenProtocolInformation (DriverHealthHandles [iIndex], ppGuid [jIndex], &EntryBuffer, &EntryCount); + if (EFI_ERROR (Status) ) + { + continue; + } + for (kIndex = 0; kIndex < EntryCount; kIndex ++) + { + if (!(EntryBuffer [kIndex].Attributes & (EFI_OPEN_PROTOCOL_BY_DRIVER|EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER)) ) + { + continue; + } + if ((EntryBuffer [kIndex].AgentHandle == DPHandle) || (EntryBuffer [kIndex].ControllerHandle == DPHandle)) + { + MemFreePointer ((VOID **)&DriverHealthHandles); + return TRUE; + } + if (TRUE == FindtheMatchUptoEndNode (EntryBuffer [kIndex].AgentHandle, DPHandle) ) //ControllerHandle is NULL here + { + MemFreePointer ((VOID **)&DriverHealthHandles); + return TRUE; + } + } + MemFreePointer ((VOID **)&EntryBuffer); + } + MemFreePointer ((VOID **)&ppGuid); + } + MemFreePointer ((VOID **)&DriverHealthHandles); + return FALSE; +} + +// +//----------------------------------------------------------------------------------------------------------- +// Procedure: CheckForDeviceNeedRepair +// +// Description: Repairs the driver for the input device path protocol +// +// Input: EFI_DEVICE_PATH_PROTOCOL * = Device path for the handle to which repair operation to be done +// +// Output: VOID +// +//------------------------------------------------------------------------------------------------------------ +// +EFI_STATUS CheckForDeviceNeedRepair (EFI_DEVICE_PATH_PROTOCOL *DevicePath) +{ + UINTN EntryCount = 0; + UINTN iIndex = 0; + EFI_STATUS Status = EFI_SUCCESS; + EFI_HANDLE DevHandle = NULL; + EFI_HANDLE FormHiiHandle = NULL; + EFI_DEVICE_PATH_PROTOCOL *TempDevicePath = DevicePath; + EFI_DRIVER_HEALTH_PROTOCOL *DrvHealthInstance = NULL; + EFI_DRIVER_HEALTH_STATUS HealthStatus = EfiDriverHealthStatusHealthy; + EFI_FORM_BROWSER2_PROTOCOL *FormBrowserInterface = NULL; + EFI_GUID FormBrowserGuid = EFI_FORM_BROWSER2_PROTOCOL_GUID; + EFI_GUID DrvHealthFormsetGuid = EFI_HII_DRIVER_HEALTH_FORMSET_GUID; + EFI_GUID EfiDriverHealthProtocolGuid = EFI_DRIVER_HEALTH_PROTOCOL_GUID; + + Status = gBS->LocateDevicePath ( + &gEfiDevicePathProtocolGuid, + &TempDevicePath, + &DevHandle + ); + if (EFI_ERROR (Status)) + { + return Status; + } + if (FALSE == MatchDPHandleWithDrvHlthHndls (DevHandle)) + { + return EFI_UNSUPPORTED; + } + Status = gBS->HandleProtocol (DevHandle, &EfiDriverHealthProtocolGuid, &DrvHealthInstance); + if (EFI_ERROR (Status)) + { + return Status; + } + Status = DrvHealthInstance->GetHealthStatus (DrvHealthInstance, DevHandle, NULL, &HealthStatus, NULL, &FormHiiHandle); + if (EFI_ERROR (Status)) + { + return Status; + } + Status = gBS->LocateProtocol (&FormBrowserGuid, NULL, &FormBrowserInterface); + if (EFI_ERROR (Status)) + { + return Status; + } +DriverRepair: + if (EfiDriverHealthStatusRepairRequired == HealthStatus) + { + Status = DrvHealthInstance->Repair ( + DrvHealthInstance, + DevHandle, + NULL, + NULL + ); + if (EFI_ERROR (Status)) + { + return EFI_UNSUPPORTED; + } + } + if (AdvancedRepairSupported ()) + { + Status = DrvHealthInstance->GetHealthStatus (DrvHealthInstance, DevHandle, NULL, &HealthStatus, NULL, &FormHiiHandle); + if (!EFI_ERROR (Status)) + { + if (EfiDriverHealthStatusConfigurationRequired == HealthStatus) + { + Status = FormBrowserInterface->SendForm ( + FormBrowserInterface, + &FormHiiHandle, + 1, + &DrvHealthFormsetGuid, + 0, + NULL, + NULL + ); + if (EFI_ERROR (Status)) + { + return Status; + } + Status = DrvHealthInstance->GetHealthStatus (DrvHealthInstance, DevHandle, NULL, &HealthStatus, NULL, &FormHiiHandle); + if (EFI_ERROR (Status)) + { + return Status; + } + } + if ((EfiDriverHealthStatusRepairRequired == HealthStatus) || (EfiDriverHealthStatusConfigurationRequired == HealthStatus)) + { + goto DriverRepair; + } + else if (EfiDriverHealthStatusRebootRequired == HealthStatus) + { + DriverHealthSystemReset (); + } + else if (EfiDriverHealthStatusReconnectRequired == HealthStatus) + { + Status = gBS->DisconnectController (DevHandle, NULL, NULL); + gBS->ConnectController (DevHandle, NULL, NULL, TRUE); + } + } + } + Status = DrvHealthInstance->GetHealthStatus (DrvHealthInstance, DevHandle, NULL, &HealthStatus, NULL, &FormHiiHandle); + if ((!(EFI_ERROR (Status))) && (EfiDriverHealthStatusHealthy == HealthStatus) ) + { + return EFI_SUCCESS; + } + return EFI_UNSUPPORTED; +} + +// +//----------------------------------------------------------------------------------------------------------- +// Procedure: ReadPlatformLang +// +// Description: Function to return the PlatformLang +// +// Input: UINTN *Size +// +// Output: PlatformLang String +// +//------------------------------------------------------------------------------------------------------------ +// +CHAR16 *ReadPlatformLang( UINTN *Size ) +{ + return VarGetNvramName (L"PlatformLang", &gEfiGlobalVariableGuid, NULL, Size); +} + +// +//------------------------------------------------------------------------------------------------------------------------------ +// +// Name: GetDefaultPasswordFromTokens +// +// Description: Gets default password throug sdl tokens +// +// Input: UINT32 PasswordType +// +// Output: CHAR16 * Password +// +//------------------------------------------------------------------------------------------------------------------------------- +// +#define EMPTY_DATA "" +CHAR16 *GetDefaultPasswordFromTokens (UINT32 PasswordType) +{ +#if TSE_DEFAULT_SETUP_PASSWORD_SUPPORT + if (AMI_PASSWORD_ADMIN == PasswordType) + { + return CONVERT_TO_WSTRING (TSE_ADMIN_PASSWORD); + } + if (AMI_PASSWORD_USER == PasswordType) + { + return CONVERT_TO_WSTRING (TSE_USER_PASSWORD); + } +#endif + return NULL; +} + +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2012, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// diff --git a/EDK/MiniSetup/Ezport/EzportBin.cif b/EDK/MiniSetup/Ezport/EzportBin.cif new file mode 100644 index 0000000..cc69ff7 --- /dev/null +++ b/EDK/MiniSetup/Ezport/EzportBin.cif @@ -0,0 +1,17 @@ + + name = "TSE Sytle Binary - Ezport" + category = ModulePart + LocalRoot = "EDK\MiniSetup\Ezport" + RefName = "EzportBin" +[files] +"EzportBin.sdl" +"TseStyle.lib" +"TseStylex64.lib" +"StyleStr.uni" +"StyleTokens.c" +"HotkeyBin.h" +"HotkeyBin.c" +"EzportBin.mak" +"HotclickBin.h" +"HotclickBin.c" + diff --git a/EDK/MiniSetup/Ezport/EzportBin.mak b/EDK/MiniSetup/Ezport/EzportBin.mak new file mode 100644 index 0000000..3f44030 --- /dev/null +++ b/EDK/MiniSetup/Ezport/EzportBin.mak @@ -0,0 +1,156 @@ +##*****************************************************************## +##*****************************************************************## +##*****************************************************************## +##** **## +##** (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/Ezport/EzportBin.mak $ +## +## $Author: Arunsb $ +## +## $Revision: 7 $ +## +## $Date: 10/18/12 5:49a $ +## +##*****************************************************************## +##*****************************************************************## +## Revision History +## ---------------- +## $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Ezport/EzportBin.mak $ +# +# 7 10/18/12 5:49a Arunsb +# Updated for 2.16.1235 QA submission +## +## 7 10/10/12 12:32p Arunsb +## Synched the source for v2.16.1232, backup with Aptio +# +# 6 6/29/11 12:30p 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 +# +# 5 3/28/11 11:49p Madhans +# [TAG] EIP54968 +# [Category] Improvement +# [Description] To Support different style modules in TSE generically +# [Files] Ezport module updated. EzportPlus and Legacy Styles Modules +# added. +# +# 4 2/19/10 12:59p Madhans +# Updated for TSE 2.01. Refer Changelog.log for File change history. +## +## 5 2/19/10 8:10a Mallikarjunanv +## updated year in copyright message +## +## 4 2/12/10 7:18a Mallikarjunanv +## added dependency to add BOARD Module path +## +## 3 12/02/09 9:25a Mallikarjunanv +## Fixed ithe eip 30917 by Updated the mak file to include the TseOem.h +## in HotkeyBin.c. +## +## 2 6/24/09 6:33p Madhans +## Coding Standards +# +# 2 6/24/09 11:55a Blaines +# Coding standard update +# +# 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 11:15p Madhans +# Tse 2.0 Code complete Checkin. +## +## 3 4/28/09 9:39p Madhans +## Tse 2.0 Code complete Checkin. +## +## 2 4/24/09 9:35p Blaines +## +## 1 12/18/08 7:59p Madhans +## Intial version of TSE Lite sources +## +## +##*****************************************************************## +##*****************************************************************## + +all : $(BUILD_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.obj \ + $(BUILD_DIR)\$(TSE_STYLE_DIR)\HotclickBin.obj + +$(BUILD_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.obj: $(PROJECT_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.c $(TSE_STYLE_DIR)\HotkeyBin.h HotKeyElinkList + if not exist $(BUILD_DIR)\$(TSE_STYLE_DIR) mkdir $(BUILD_DIR)\$(TSE_STYLE_DIR) +!IF "$(TSE_BOARD_MODULE_SUPPORT)"=="1" + $(CC) $(CFLAGS) -I $(BUILD_DIR) -I $(TSE_BOARD_DIR) /DTSE_FOR_APTIO_4_50 /Fo$(BUILD_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.obj $(PROJECT_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.c +!ELSE + $(CC) $(CFLAGS) -I $(BUILD_DIR) /DTSE_FOR_APTIO_4_50 /Fo$(BUILD_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.obj $(PROJECT_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.c +!ENDIF + +$(BUILD_DIR)\$(TSE_STYLE_DIR)\HotclickBin.obj: $(PROJECT_DIR)\$(TSE_STYLE_DIR)\HotclickBin.c $(TSE_STYLE_DIR)\HotclickBin.h HotClickElinkList + if not exist $(BUILD_DIR)\$(TSE_STYLE_DIR) mkdir $(BUILD_DIR)\$(TSE_STYLE_DIR) +!IF "$(TSE_BOARD_MODULE_SUPPORT)"=="1" + $(CC) $(CFLAGS) -I $(BUILD_DIR) -I $(TSE_BOARD_DIR) /DTSE_FOR_APTIO_4_50 /Fo$(BUILD_DIR)\$(TSE_STYLE_DIR)\HotclickBin.obj $(PROJECT_DIR)\$(TSE_STYLE_DIR)\HotclickBin.c +!ELSE + $(CC) $(CFLAGS) -I $(BUILD_DIR) /DTSE_FOR_APTIO_4_50 /Fo$(BUILD_DIR)\$(TSE_STYLE_DIR)\HotclickBin.obj $(PROJECT_DIR)\$(TSE_STYLE_DIR)\HotclickBin.c +!ENDIF + +HotKeyElinkList: + echo #define HOTKEY_LIST $(HOTKEY_LIST) > $(BUILD_DIR)\HotKeyElinks.h +# cl $(CFLAGS) /DTSE_FOR_APTIO_4_50 -I $(BUILD_DIR) /Fo$(BUILD_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.obj $(PROJECT_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.c + +# MAK file for the eModule:EzportBin +AMITSEBin: $(BUILD_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.obj + +HotClickElinkList: + echo #define HOTCLICK_LIST $(HOTCLICK_LIST) > $(BUILD_DIR)\HotClickElinks.h +# cl $(CFLAGS) /DTSE_FOR_APTIO_4_50 -I $(BUILD_DIR) /Fo$(BUILD_DIR)\$(TSE_STYLE_DIR)\HotclickBin.obj $(PROJECT_DIR)\$(TSE_STYLE_DIR)\HotclickBin.c + +# MAK file for the eModule:EzportBin +AMITSEBin: $(BUILD_DIR)\$(TSE_STYLE_DIR)\HotclickBin.obj + +$(BUILD_DIR)\EzportBin.mak : $(TSE_STYLE_DIR)\$(@B).cif $(TSE_STYLE_DIR)\$(@B).mak $(BUILD_RULES) + $(CIF2MAK) $(TSE_STYLE_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS) + +AMITSESDB : EzportSDB + +EzportSDB : $(BUILD_DIR)\EzportBin.mak + $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\ + /f $(BUILD_DIR)\EzportBin.mak all\ + "UNI_INCLUDE_PATH=$(TSEBIN_DIR) $(TSE_UNI_INCLUDE_PATH)"\ + "STRING_CONSUMERS=$(TSE_STYLE_DIR)\StyleTokens.c"\ + TYPE=SDB NAME=EzportBin + + + +##*****************************************************************## +##*****************************************************************## +##** **## +##** (C)Copyright 2011, American Megatrends, Inc. **## +##** **## +##** All Rights Reserved. **## +##** **## +##** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **## +##** **## +##** Phone (770)-246-8600 **## +##** **## +##*****************************************************************## +##*****************************************************************## diff --git a/EDK/MiniSetup/Ezport/EzportBin.sdl b/EDK/MiniSetup/Ezport/EzportBin.sdl new file mode 100644 index 0000000..522b794 --- /dev/null +++ b/EDK/MiniSetup/Ezport/EzportBin.sdl @@ -0,0 +1,162 @@ +TOKEN + Name = "TSE_STYLE_EZPORT_BIN_SUPPORT" + Value = "1" + Help = "Main switch to enable Ezport Style in TSE" + TokenType = Boolean + TargetEQU = Yes + TargetMAK = Yes + Master = Yes +End + +TOKEN + Name = "STYLE_COLOR_GRAYOUT" + Value = "EFI_DARKGRAY" + Help = " Item grayout colour " + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + + +TOKEN + Name = "SETUP_STYLE_BIN_EZPORT" + Value = "1" + Help = "Condition to support Ezport Style Sources" + TokenType = Boolean + TargetH = Yes +End + +TOKEN + Name = "TSE_PRN_SCRN_KEY_SCAN" + Value = "SCAN_F12" + Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT protocol. On pressing this key AMITSE_PRINT_SCREEN_PRESS_GUID event will be generated." + TokenType = Expression + TargetH = Yes +End + +TOKEN + Name = "HOTCLICK_FULLSCREEN_SUPPORT" + Value = "1" + Help = "Set one to enable the hot click support for full screen. The x,y coordinates for corresponding hot click ELINKS are done for a sample case(style). If customer needs his own style or not needs full screen then values in the ELINKS should be customized based on thier needs." + TokenType = Boolean + TargetH = Yes +End + +ELINK + Name = "{{SCAN_F4, 0},0, HandleSaveExitKey, 0 }," + Parent = "HOTKEY_LIST" + InvokeOrder = AfterParent +End + +ELINK + Name = "{{SCAN_F2, 0 },0,HandlePrevValuesKey, 1 }," + Parent = "HOTKEY_LIST" + InvokeOrder = AfterParent +End + +ELINK + Name = "{{SCAN_F3, 0 },0,HandleOptimalKey, 1 }," + Parent = "HOTKEY_LIST" + InvokeOrder = AfterParent +End + +ELINK + Name = "{{SCAN_F1, 0 },0,HandleHelpKey, 1 }," + Parent = "HOTKEY_LIST" + InvokeOrder = AfterParent +End + +ELINK + Name = "{{SCAN_ESC,0},0, HandleEscKey, 0 }," + Parent = "HOTKEY_LIST" + InvokeOrder = AfterParent +End + +ELINK + Name = "{{TSE_PRN_SCRN_KEY_SCAN,0},0, HandlePrnScrnKey, 0 }," + Parent = "HOTKEY_LIST" + InvokeOrder = AfterParent + Token = "TSE_PRN_SCRN_EVENT_SUPPORT" "=" "1" +End + +ELINK + Name = "{ 1, 3, 1 + 64, 3 + 26, MainFrameHandlewithMouse, 0 }," + Parent = "HOTCLICK_LIST" + InvokeOrder = AfterParent + Help = "Dont change the HOTCLICK_LIST order, for 100*31 mode" + Token = "HOTCLICK_FULLSCREEN_SUPPORT" "=" "1" +End + +ELINK + Name = "{ 67, 3, 67 + 32, 3 + 11, HelpFrameHandlewithMouse, 1 }," + Parent = "HOTCLICK_LIST" + InvokeOrder = AfterParent + Help = "Dont change the HOTCLICK_LIST order, for 100*31 mode" + Token = "HOTCLICK_FULLSCREEN_SUPPORT" "=" "1" +End + +ELINK + Name = "{ 67, 16, 67 + 32, 16 + 13, NavFrameHandlewithMouse, 1 }," + Parent = "HOTCLICK_LIST" + InvokeOrder = AfterParent + Help = "Dont change the HOTCLICK_LIST order, for 100*31 mode" + Token = "HOTCLICK_FULLSCREEN_SUPPORT" "=" "1" +End + +ELINK + Name = "{ 1, 3, 1 + 51, 3 + 18, MainFrameHandlewithMouse, 0 }," + Parent = "HOTCLICK_LIST" + InvokeOrder = AfterParent + Help = "Dont change the HOTCLICK_LIST order, for 80*25 mode" + Token = "HOTCLICK_FULLSCREEN_SUPPORT" "=" "1" +End + +ELINK + Name = "{ 54, 3, 54 + 24, 3 + 8, HelpFrameHandlewithMouse, 1 }," + Parent = "HOTCLICK_LIST" + InvokeOrder = AfterParent + Help = "Dont change the HOTCLICK_LIST order, for 80*25 mode" + Token = "HOTCLICK_FULLSCREEN_SUPPORT" "=" "1" +End + +ELINK + Name = "{ 54, 13, 54 + 24, 13 + 8, NavFrameHandlewithMouse, 1 }," + Parent = "HOTCLICK_LIST" + InvokeOrder = AfterParent + Help = "Dont change the HOTCLICK_LIST order, for 80*25 mode" + Token = "HOTCLICK_FULLSCREEN_SUPPORT" "=" "1" +End + +PATH + Name = "TSE_STYLE_DIR" +End + +MODULE + Help = "Includes EzportBin.mak to Project" + File = "EzportBin.mak" +End + +ELINK + Name = "$(TSE_STYLE_DIR)\TSEStyle$(ARCH).lib" + Parent = "MINISETUPLIB" + Priority = 30 + InvokeOrder = AfterParent +End + +ELINK + Name = "-i $(TSE_STYLE_DIR)" + Parent = "TSE_UNI_INCLUDE_PATH" + InvokeOrder = AfterParent +End + +ELINK + Name = "$(TSE_STYLE_DIR)\StyleTokens.c" + Parent = "TSE_STRING_CONSUMERS_LIST" + InvokeOrder = AfterParent +End + +ELINK + Name = "$(BUILD_DIR)\EzportBin.sdb" + Parent = "TSE_SDBS" + InvokeOrder = AfterParent +End diff --git a/EDK/MiniSetup/Ezport/HotclickBin.c b/EDK/MiniSetup/Ezport/HotclickBin.c new file mode 100644 index 0000000..0e4d27e --- /dev/null +++ b/EDK/MiniSetup/Ezport/HotclickBin.c @@ -0,0 +1,58 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2010, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +#ifdef TSE_FOR_APTIO_4_50 + +#include "Token.h" +#include +#include + +#else //#ifdef TSE_FOR_APTIO_4_50 + +#include "minisetup.h" + +#endif //#ifdef TSE_FOR_APTIO_4_50 + +#include "HotclickBin.h" +#include "HotClickElinks.h" + +// Build time file generated from AMITSE_OEM_HEADER_LIST elink. +#include "AmiTseOem.h" + +#ifdef TSE_FOR_APTIO_4_50 +#include "AMITSEStrTokens.h" +#else +#include STRING_DEFINES_FILE +#endif + +HOTCLICK_TEMPLATE gHotClickInfo[] = { HOTCLICK_LIST 0}; +UINT32 gHotClickCount = sizeof(gHotClickInfo) / sizeof(HOTCLICK_TEMPLATE); + + +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2010, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// diff --git a/EDK/MiniSetup/Ezport/HotclickBin.h b/EDK/MiniSetup/Ezport/HotclickBin.h new file mode 100644 index 0000000..5ff05d6 --- /dev/null +++ b/EDK/MiniSetup/Ezport/HotclickBin.h @@ -0,0 +1,49 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2010, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +#ifndef __HOTCLICK_BIN_H__ +#define __HOTCLICK_BIN_H__ + +typedef VOID (*HOTCLICK_CALLBACK) ( VOID *container, VOID *object, VOID *cookie ); + +typedef struct _HOTCLICK_TEMPLATE +{ + UINT32 Xo, Yo, Xn, Yn; + HOTCLICK_CALLBACK Callback; + UINT32 BasePage; +} +HOTCLICK_TEMPLATE; + +extern VOID MainFrameHandlewithMouse( VOID *app, VOID *hotclick, VOID *cookie ); +extern VOID HelpFrameHandlewithMouse( VOID *app, VOID *hotclick, VOID *cookie ); +extern VOID NavFrameHandlewithMouse( VOID *app, VOID *hotclick, VOID *cookie ); + + +#endif //__HOTKEY_BIN_H__ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2010, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// diff --git a/EDK/MiniSetup/Ezport/HotkeyBin.c b/EDK/MiniSetup/Ezport/HotkeyBin.c new file mode 100644 index 0000000..0c239f9 --- /dev/null +++ b/EDK/MiniSetup/Ezport/HotkeyBin.c @@ -0,0 +1,106 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2010, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +#ifdef TSE_FOR_APTIO_4_50 + +#include "Token.h" +#include +#include + +#else //#ifdef TSE_FOR_APTIO_4_50 + +#include "minisetup.h" + +#endif //#ifdef TSE_FOR_APTIO_4_50 + +#include "HotkeyBin.h" +#include "HotKeyElinks.h" + +// Build time file generated from AMITSE_OEM_HEADER_LIST elink. +#include "AmiTseOem.h" + +#ifdef TSE_FOR_APTIO_4_50 +#include "AMITSEStrTokens.h" +#else +#include STRING_DEFINES_FILE +#endif + +#ifdef TSE_FOR_APTIO_4_50 +#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 + +HOTKEY_TEMPLATE gHotKeyInfo[] = { HOTKEY_LIST }; +UINT32 gHotKeyCount = sizeof(gHotKeyInfo) / sizeof(HOTKEY_TEMPLATE); + +#if MINISETUP_MOUSE_SUPPORT +UINT16 gStrNavToken = STRING_TOKEN(STR_NAV_STRINGS_3); +#else +UINT16 gStrNavToken = STRING_TOKEN(STR_NAV_STRINGS_2); +#endif + + +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2010, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// diff --git a/EDK/MiniSetup/Ezport/HotkeyBin.h b/EDK/MiniSetup/Ezport/HotkeyBin.h new file mode 100644 index 0000000..a99433a --- /dev/null +++ b/EDK/MiniSetup/Ezport/HotkeyBin.h @@ -0,0 +1,54 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2013, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +#ifndef __HOTKEY_BIN_H__ +#define __HOTKEY_BIN_H__ + +typedef VOID (*HOTKEY_CALLBACK) ( VOID *container, VOID *object, VOID *cookie ); + +typedef struct _HOTKEY_TEMPLATE +{ + EFI_INPUT_KEY Key; + UINT32 KeySftSte; + HOTKEY_CALLBACK Callback; + UINT32 BasePage; +} +HOTKEY_TEMPLATE; + +extern VOID HandleEscKey( VOID *app, VOID *hotkey, VOID *cookie ); +extern VOID HandleHelpKey( VOID *app, VOID *hotkey, VOID *cookie ); +extern VOID HandlePrevValuesKey( VOID *app, VOID *hotkey, VOID *cookie ); +extern VOID HandleFailsafeKey( VOID *app, VOID *hotkey, VOID *cookie ); +extern VOID HandleOptimalKey( VOID *app, VOID *hotkey, VOID *cookie ); +extern VOID HandleSaveExitKey( VOID *app, VOID *hotkey, VOID *cookie ); +extern VOID HandlePrnScrnKey( VOID *app, VOID *hotkey, VOID *cookie ); +extern VOID PrntScrnKeyNotification(VOID *app, VOID *hotkey, VOID *cookie ); + +#endif //__HOTKEY_BIN_H__ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2013, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// diff --git a/EDK/MiniSetup/Ezport/StyleStr.uni b/EDK/MiniSetup/Ezport/StyleStr.uni new file mode 100644 index 0000000..a3a8772 Binary files /dev/null and b/EDK/MiniSetup/Ezport/StyleStr.uni differ diff --git a/EDK/MiniSetup/Ezport/StyleTokens.c b/EDK/MiniSetup/Ezport/StyleTokens.c new file mode 100644 index 0000000..ad302d3 --- /dev/null +++ b/EDK/MiniSetup/Ezport/StyleTokens.c @@ -0,0 +1,106 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2010, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +// $Archive: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Ezport/StyleTokens.c $ +// +// $Author: Arunsb $ +// +// $Revision: 3 $ +// +// $Date: 10/18/12 5:49a $ +// +//*****************************************************************// +//*****************************************************************// +// Revision History +// ---------------- +// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Ezport/StyleTokens.c $ +// +// 3 10/18/12 5:49a Arunsb +// Updated for 2.16.1235 QA submission +// +// 6 10/10/12 12:32p Arunsb +// Synched the source for v2.16.1232, backup with Aptio +// +// 2 2/19/10 12:59p Madhans +// Updated for TSE 2.01. Refer Changelog.log for File change history. +// +// 4 2/19/10 8:10a Mallikarjunanv +// updated year in copyright message +// +// 3 2/04/10 11:08p Madhans +// Navigation Help for Mouse added. +// +// 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 5/06/09 8:14p Madhans +// Tse 2.0 Bin Module Initial Checkin. +// +// 1 5/06/09 8:10p Madhans +// Tse 2.0 Binary Modules +// +// 1 4/28/09 9:39p Madhans +// Tse 2.0 Code complete Checkin. +// +// +//*****************************************************************// +//*****************************************************************// +//********************************************************************** +// +// +// Name: ezporttokens.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 +// +// +//********************************************************************** + + +//Following code is to force strgatherer to include these strings +#if 0 +STRING_TOKEN(STR_NAV_STRINGS_0) +STRING_TOKEN(STR_NAV_STRINGS_1) +STRING_TOKEN(STR_NAV_STRINGS_2) +STRING_TOKEN(STR_NAV_STRINGS_3) +STRING_TOKEN(STR_EXIT_HELP) +STRING_TOKEN(STR_RESET_HELP) +#endif + + +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2010, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// diff --git a/EDK/MiniSetup/Ezport/TseStyle.lib b/EDK/MiniSetup/Ezport/TseStyle.lib new file mode 100644 index 0000000..0fb4a55 Binary files /dev/null and b/EDK/MiniSetup/Ezport/TseStyle.lib differ diff --git a/EDK/MiniSetup/Ezport/TseStylex64.lib b/EDK/MiniSetup/Ezport/TseStylex64.lib new file mode 100644 index 0000000..704882f Binary files /dev/null and b/EDK/MiniSetup/Ezport/TseStylex64.lib differ diff --git a/EDK/MiniSetup/EzportPlus/EzportPlusBin.cif b/EDK/MiniSetup/EzportPlus/EzportPlusBin.cif new file mode 100644 index 0000000..23a92d2 --- /dev/null +++ b/EDK/MiniSetup/EzportPlus/EzportPlusBin.cif @@ -0,0 +1,17 @@ + + name = "TSE Sytle Binary - EzportPlus" + category = ModulePart + LocalRoot = "EDK\MiniSetup\EzportPlus" + RefName = "EzportPlusBin" +[files] +"EzportPlusBin.sdl" +"TseStyleEzportPlus.lib" +"TseStyleEzportPlusx64.lib" +"StyleStr.uni" +"StyleTokens.c" +"HotkeyBin.h" +"HotkeyBin.c" +"EzportPlusBin.mak" +"HotclickBin.h" +"HotclickBin.c" + diff --git a/EDK/MiniSetup/EzportPlus/EzportPlusBin.mak b/EDK/MiniSetup/EzportPlus/EzportPlusBin.mak new file mode 100644 index 0000000..89b2e40 --- /dev/null +++ b/EDK/MiniSetup/EzportPlus/EzportPlusBin.mak @@ -0,0 +1,155 @@ +##*****************************************************************## +##*****************************************************************## +##*****************************************************************## +##** **## +##** (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/EzportPlus/EzportPlusBin.mak $ +## +## $Author: Arunsb $ +## +## $Revision: 3 $ +## +## $Date: 10/18/12 5:51a $ +## +##*****************************************************************## +##*****************************************************************## +## Revision History +## ---------------- +## $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/EzportPlus/EzportPlusBin.mak $ +# +# 3 10/18/12 5:51a Arunsb +# Updated for 2.16.1235 QA submission +## +## 3 10/10/12 12:33p Arunsb +## Synched the source for v2.16.1232, backup with Aptio +# +# 2 6/29/11 12:39p 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 +# +# 1 3/28/11 11:49p Madhans +# [TAG] EIP54968 +# [Category] Improvement +# [Description] To Support different style modules in TSE generically +# [Files] Ezport module updated. EzportPlus and Legacy Styles Modules +# added. +# +# 4 2/19/10 12:59p Madhans +# Updated for TSE 2.01. Refer Changelog.log for File change history. +## +## 5 2/19/10 8:10a Mallikarjunanv +## updated year in copyright message +## +## 4 2/12/10 7:18a Mallikarjunanv +## added dependency to add BOARD Module path +## +## 3 12/02/09 9:25a Mallikarjunanv +## Fixed ithe eip 30917 by Updated the mak file to include the TseOem.h +## in HotkeyBin.c. +## +## 2 6/24/09 6:33p Madhans +## Coding Standards +# +# 2 6/24/09 11:55a Blaines +# Coding standard update +# +# 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 11:15p Madhans +# Tse 2.0 Code complete Checkin. +## +## 3 4/28/09 9:39p Madhans +## Tse 2.0 Code complete Checkin. +## +## 2 4/24/09 9:35p Blaines +## +## 1 12/18/08 7:59p Madhans +## Intial version of TSE Lite sources +## +## +##*****************************************************************## +##*****************************************************************## + +all : $(BUILD_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.obj \ + $(BUILD_DIR)\$(TSE_STYLE_DIR)\HotclickBin.obj + +$(BUILD_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.obj: $(PROJECT_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.c $(TSE_STYLE_DIR)\HotkeyBin.h HotKeyElinkList + if not exist $(BUILD_DIR)\$(TSE_STYLE_DIR) mkdir $(BUILD_DIR)\$(TSE_STYLE_DIR) +!IF "$(TSE_BOARD_MODULE_SUPPORT)"=="1" + $(CC) $(CFLAGS) -I $(BUILD_DIR) -I $(TSE_BOARD_DIR) /DTSE_FOR_APTIO_4_50 /Fo$(BUILD_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.obj $(PROJECT_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.c +!ELSE + $(CC) $(CFLAGS) -I $(BUILD_DIR) /DTSE_FOR_APTIO_4_50 /Fo$(BUILD_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.obj $(PROJECT_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.c +!ENDIF + +$(BUILD_DIR)\$(TSE_STYLE_DIR)\HotclickBin.obj: $(PROJECT_DIR)\$(TSE_STYLE_DIR)\HotclickBin.c $(TSE_STYLE_DIR)\HotclickBin.h HotClickElinkList + if not exist $(BUILD_DIR)\$(TSE_STYLE_DIR) mkdir $(BUILD_DIR)\$(TSE_STYLE_DIR) +!IF "$(TSE_BOARD_MODULE_SUPPORT)"=="1" + $(CC) $(CFLAGS) -I $(BUILD_DIR) -I $(TSE_BOARD_DIR) /DTSE_FOR_APTIO_4_50 /Fo$(BUILD_DIR)\$(TSE_STYLE_DIR)\HotclickBin.obj $(PROJECT_DIR)\$(TSE_STYLE_DIR)\HotclickBin.c +!ELSE + $(CC) $(CFLAGS) -I $(BUILD_DIR) /DTSE_FOR_APTIO_4_50 /Fo$(BUILD_DIR)\$(TSE_STYLE_DIR)\HotclickBin.obj $(PROJECT_DIR)\$(TSE_STYLE_DIR)\HotclickBin.c +!ENDIF + +HotKeyElinkList: + echo #define HOTKEY_LIST $(HOTKEY_LIST) > $(BUILD_DIR)\HotKeyElinks.h + +# cl $(CFLAGS) /DTSE_FOR_APTIO_4_50 -I $(BUILD_DIR) /Fo$(BUILD_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.obj $(PROJECT_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.c + +# MAK file for the eModule:EzportPlusBin +AMITSEBin: $(BUILD_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.obj + +HotClickElinkList: + echo #define HOTCLICK_LIST $(HOTCLICK_LIST) > $(BUILD_DIR)\HotClickElinks.h +# cl $(CFLAGS) /DTSE_FOR_APTIO_4_50 -I $(BUILD_DIR) /Fo$(BUILD_DIR)\$(TSE_STYLE_DIR)\HotclickBin.obj $(PROJECT_DIR)\$(TSE_STYLE_DIR)\HotclickBin.c + +# MAK file for the eModule:EzportPlusBin +AMITSEBin: $(BUILD_DIR)\$(TSE_STYLE_DIR)\HotclickBin.obj + +$(BUILD_DIR)\EzportPlusBin.mak : $(TSE_STYLE_DIR)\$(@B).cif $(TSE_STYLE_DIR)\$(@B).mak $(BUILD_RULES) + $(CIF2MAK) $(TSE_STYLE_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS) + +AMITSESDB : EzportPlusSDB + +EzportPlusSDB : $(BUILD_DIR)\EzportPlusBin.mak + $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\ + /f $(BUILD_DIR)\EzportPlusBin.mak all\ + "UNI_INCLUDE_PATH=$(TSEBIN_DIR) $(TSE_UNI_INCLUDE_PATH)"\ + "STRING_CONSUMERS=$(TSE_STYLE_DIR)\StyleTokens.c"\ + TYPE=SDB NAME=EzportPlusBin + +##*****************************************************************## +##*****************************************************************## +##** **## +##** (C)Copyright 2011, American Megatrends, Inc. **## +##** **## +##** All Rights Reserved. **## +##** **## +##** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **## +##** **## +##** Phone (770)-246-8600 **## +##** **## +##*****************************************************************## +##*****************************************************************## diff --git a/EDK/MiniSetup/EzportPlus/EzportPlusBin.sdl b/EDK/MiniSetup/EzportPlus/EzportPlusBin.sdl new file mode 100644 index 0000000..fdf42b1 --- /dev/null +++ b/EDK/MiniSetup/EzportPlus/EzportPlusBin.sdl @@ -0,0 +1,185 @@ +TOKEN + Name = "TSE_STYLE_EZPORTPLUS_BIN_SUPPORT" + Value = "0" + Help = "Main switch to enable EzportPlus Style in TSE" + TokenType = Boolean + TargetEQU = Yes + TargetMAK = Yes + Master = Yes +End + +TOKEN + Name = "STYLE_COLOR_GRAYOUT" + Value = "EFI_DARKGRAY" + Help = " Item grayout colour " + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "FIRST_PAGE_ID_INDEX" + Value = "1" + Help = "EIP25281.style" + TokenType = Expression + TargetH = Yes +End + +TOKEN + Name = "SETUP_STYLE_BIN_EZPORTPLUS" + Value = "1" + Help = "Condition to support EzportPlus Style Sources" + TokenType = Boolean + TargetH = Yes +End + +TOKEN + Name = "TSE_PRN_SCRN_KEY_SCAN" + Value = "SCAN_F12" + Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT protocol. On pressing this key AMITSE_PRINT_SCREEN_PRESS_GUID event will be generated." + TokenType = Expression + TargetH = Yes +End + +TOKEN + Name = "TSE_ANSI_ESC_CODE_SUPPORT" + Value = "1" + Help = "Tse advanced Esc colour support" + TokenType = Integer + TargetH = Yes +End + +TOKEN + Name = "HOTCLICK_FULLSCREEN_SUPPORT" + Value = "1" + Help = "Set one to enable the hot click support for full screen. The x,y coordinates for corresponding hot click ELINKS are done for a sample case(style). If customer needs his own style or not needs full screen then values in the ELINKS should be customized based on thier needs." + TokenType = Boolean + TargetH = Yes +End + +ELINK + Name = "{{SCAN_F4, 0},0, EzportPlusHandleSaveExitKey, 0 }," + Parent = "HOTKEY_LIST" + InvokeOrder = AfterParent +End + +TOKEN + Name = "SETUP_UPDATE_BOOT_ORDER_CURSOR" + Value = "1" + 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 + +ELINK + Name = "{{SCAN_F2, 0 },0,EzportPlusHandlePrevValuesKey, 1 }," + Parent = "HOTKEY_LIST" + InvokeOrder = AfterParent +End + +ELINK + Name = "{{SCAN_F3, 0 },0,EzportPlusHandleOptimalKey, 1 }," + Parent = "HOTKEY_LIST" + InvokeOrder = AfterParent +End + +ELINK + Name = "{{SCAN_F1, 0 },0,EzportPlusHandleHelpKey, 1 }," + Parent = "HOTKEY_LIST" + InvokeOrder = AfterParent +End + +ELINK + Name = "{{SCAN_ESC,0},0, EzportPlusHandleEscKey, 0 }," + Parent = "HOTKEY_LIST" + InvokeOrder = AfterParent +End + +ELINK + Name = "{{TSE_PRN_SCRN_KEY_SCAN,0},0, EzportPlusHandlePrnScrnKey, 0 }," + Parent = "HOTKEY_LIST" + InvokeOrder = AfterParent + Token = "TSE_PRN_SCRN_EVENT_SUPPORT" "=" "1" +End + +ELINK + Name = "{ 1, 3, 1 + 64, 3+25, EzportPlusMainFrameHandlewithMouse, 0 }," + Parent = "HOTCLICK_LIST" + InvokeOrder = AfterParent + Help = "Dont change the HOTCLICK_LIST order, for 100*31 mode" + Token = "HOTCLICK_FULLSCREEN_SUPPORT" "=" "1" +End + +ELINK + Name = "{ 67, 5, 67 + 32, 5 + 23, EzportPlusHelpFrameHandlewithMouse, 1 }," + Parent = "HOTCLICK_LIST" + InvokeOrder = AfterParent + Help = "Dont change the HOTCLICK_LIST order, for 100*31 mode" + Token = "HOTCLICK_FULLSCREEN_SUPPORT" "=" "1" +End + +ELINK + Name = "{ 0, 29, 0 + 100, 29 + 2, EzportPlusNavFrameHandlewithMouse, 1 }," + Parent = "HOTCLICK_LIST" + InvokeOrder = AfterParent + Help = "Dont change the HOTCLICK_LIST order, for 100*31 mode" + Token = "HOTCLICK_FULLSCREEN_SUPPORT" "=" "1" +End + +ELINK + Name = "{ 0, 0, 0, 0, EzportPlusMainFrameHandlewithMouse, 0 }," + Parent = "HOTCLICK_LIST" + InvokeOrder = AfterParent + Help = "Dont change the HOTCLICK_LIST order, for 80*25 mode. Not supported customization needed" + Token = "HOTCLICK_FULLSCREEN_SUPPORT" "=" "1" +End + +ELINK + Name = "{ 0, 0, 0, 0, EzportPlusHelpFrameHandlewithMouse, 1 }," + Parent = "HOTCLICK_LIST" + InvokeOrder = AfterParent + Help = "Dont change the HOTCLICK_LIST order, for 80*25 mode. Not supported customization needed" + Token = "HOTCLICK_FULLSCREEN_SUPPORT" "=" "1" +End + +ELINK + Name = "{ 0, 0, 0, 0, EzportPlusNavFrameHandlewithMouse, 1 }," + Parent = "HOTCLICK_LIST" + InvokeOrder = AfterParent + Help = "Dont change the HOTCLICK_LIST order, for 80*25 mode. Not supported customization needed" + Token = "HOTCLICK_FULLSCREEN_SUPPORT" "=" "1" +End + +PATH + Name = "TSE_STYLE_DIR" +End + +MODULE + Help = "Includes EzportPlusBin.mak to Project" + File = "EzportPlusBin.mak" +End + +ELINK + Name = "$(TSE_STYLE_DIR)\TSEStyleEzportPlus$(ARCH).lib" + Parent = "MINISETUPLIB" + Priority = 30 + InvokeOrder = AfterParent +End + +ELINK + Name = "-i $(TSE_STYLE_DIR)" + Parent = "TSE_UNI_INCLUDE_PATH" + InvokeOrder = AfterParent +End + +ELINK + Name = "$(TSE_STYLE_DIR)\StyleTokens.c" + Parent = "TSE_STRING_CONSUMERS_LIST" + InvokeOrder = AfterParent +End + +ELINK + Name = "$(BUILD_DIR)\EzportPlusBin.sdb" + Parent = "TSE_SDBS" + InvokeOrder = AfterParent +End diff --git a/EDK/MiniSetup/EzportPlus/HotclickBin.c b/EDK/MiniSetup/EzportPlus/HotclickBin.c new file mode 100644 index 0000000..cac75e1 --- /dev/null +++ b/EDK/MiniSetup/EzportPlus/HotclickBin.c @@ -0,0 +1,58 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2011, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +#ifdef TSE_FOR_APTIO_4_50 + +#include "Token.h" +#include +#include + +#else //#ifdef TSE_FOR_APTIO_4_50 + +#include "minisetup.h" + +#endif //#ifdef TSE_FOR_APTIO_4_50 + +#include "HotclickBin.h" +#include "HotClickElinks.h" + +// Build time file generated from AMITSE_OEM_HEADER_LIST elink. +#include "AmiTseOem.h" + +#ifdef TSE_FOR_APTIO_4_50 +#include "AMITSEStrTokens.h" +#else +#include STRING_DEFINES_FILE +#endif + +HOTCLICK_TEMPLATE gHotClickInfo[] = { HOTCLICK_LIST 0 }; +UINT32 gHotClickCount = sizeof(gHotClickInfo) / sizeof(HOTCLICK_TEMPLATE); + + +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2011, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// diff --git a/EDK/MiniSetup/EzportPlus/HotclickBin.h b/EDK/MiniSetup/EzportPlus/HotclickBin.h new file mode 100644 index 0000000..ee2dcd8 --- /dev/null +++ b/EDK/MiniSetup/EzportPlus/HotclickBin.h @@ -0,0 +1,49 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2011, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +#ifndef __HOTCLICK_BIN_H__ +#define __HOTCLICK_BIN_H__ + +typedef VOID (*HOTCLICK_CALLBACK) ( VOID *container, VOID *object, VOID *cookie ); + +typedef struct _HOTCLICK_TEMPLATE +{ + UINT32 Xo, Yo, Xn, Yn; + HOTCLICK_CALLBACK Callback; + UINT32 BasePage; +} +HOTCLICK_TEMPLATE; + +extern VOID EzportPlusMainFrameHandlewithMouse( VOID *app, VOID *hotclick, VOID *cookie ); +extern VOID EzportPlusHelpFrameHandlewithMouse( VOID *app, VOID *hotclick, VOID *cookie ); +extern VOID EzportPlusNavFrameHandlewithMouse( VOID *app, VOID *hotclick, VOID *cookie ); + + +#endif //__HOTKEY_BIN_H__ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2011, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// diff --git a/EDK/MiniSetup/EzportPlus/HotkeyBin.c b/EDK/MiniSetup/EzportPlus/HotkeyBin.c new file mode 100644 index 0000000..0c239f9 --- /dev/null +++ b/EDK/MiniSetup/EzportPlus/HotkeyBin.c @@ -0,0 +1,106 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2010, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +#ifdef TSE_FOR_APTIO_4_50 + +#include "Token.h" +#include +#include + +#else //#ifdef TSE_FOR_APTIO_4_50 + +#include "minisetup.h" + +#endif //#ifdef TSE_FOR_APTIO_4_50 + +#include "HotkeyBin.h" +#include "HotKeyElinks.h" + +// Build time file generated from AMITSE_OEM_HEADER_LIST elink. +#include "AmiTseOem.h" + +#ifdef TSE_FOR_APTIO_4_50 +#include "AMITSEStrTokens.h" +#else +#include STRING_DEFINES_FILE +#endif + +#ifdef TSE_FOR_APTIO_4_50 +#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 + +HOTKEY_TEMPLATE gHotKeyInfo[] = { HOTKEY_LIST }; +UINT32 gHotKeyCount = sizeof(gHotKeyInfo) / sizeof(HOTKEY_TEMPLATE); + +#if MINISETUP_MOUSE_SUPPORT +UINT16 gStrNavToken = STRING_TOKEN(STR_NAV_STRINGS_3); +#else +UINT16 gStrNavToken = STRING_TOKEN(STR_NAV_STRINGS_2); +#endif + + +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2010, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// diff --git a/EDK/MiniSetup/EzportPlus/HotkeyBin.h b/EDK/MiniSetup/EzportPlus/HotkeyBin.h new file mode 100644 index 0000000..838ed05 --- /dev/null +++ b/EDK/MiniSetup/EzportPlus/HotkeyBin.h @@ -0,0 +1,54 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2010, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +#ifndef __HOTKEY_BIN_H__ +#define __HOTKEY_BIN_H__ + +typedef VOID (*HOTKEY_CALLBACK) ( VOID *container, VOID *object, VOID *cookie ); + +typedef struct _HOTKEY_TEMPLATE +{ + EFI_INPUT_KEY Key; + UINT32 KeySftSte; + HOTKEY_CALLBACK Callback; + UINT32 BasePage; +} +HOTKEY_TEMPLATE; + +extern VOID EzportPlusHandleEscKey( VOID *app, VOID *hotkey, VOID *cookie ); +extern VOID EzportPlusHandleHelpKey( VOID *app, VOID *hotkey, VOID *cookie ); +extern VOID EzportPlusHandlePrevValuesKey( VOID *app, VOID *hotkey, VOID *cookie ); +extern VOID EzportPlusHandleFailsafeKey( VOID *app, VOID *hotkey, VOID *cookie ); +extern VOID EzportPlusHandleOptimalKey( VOID *app, VOID *hotkey, VOID *cookie ); +extern VOID EzportPlusHandleSaveExitKey( VOID *app, VOID *hotkey, VOID *cookie ); +extern VOID EzportPlusHandlePrnScrnKey( VOID *app, VOID *hotkey, VOID *cookie ); +extern VOID PrntScrnKeyNotification(VOID *app, VOID *hotkey, VOID *cookie );//EIP-123311 + +#endif //__HOTKEY_BIN_H__ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2010, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// diff --git a/EDK/MiniSetup/EzportPlus/StyleStr.uni b/EDK/MiniSetup/EzportPlus/StyleStr.uni new file mode 100644 index 0000000..2b00331 Binary files /dev/null and b/EDK/MiniSetup/EzportPlus/StyleStr.uni differ diff --git a/EDK/MiniSetup/EzportPlus/StyleTokens.c b/EDK/MiniSetup/EzportPlus/StyleTokens.c new file mode 100644 index 0000000..54f06c5 --- /dev/null +++ b/EDK/MiniSetup/EzportPlus/StyleTokens.c @@ -0,0 +1,137 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2010, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +// $Archive: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/EzportPlus/StyleTokens.c $ +// +// $Author: Arunsb $ +// +// $Revision: 4 $ +// +// $Date: 10/18/12 5:50a $ +// +//*****************************************************************// +//*****************************************************************// +// Revision History +// ---------------- +// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/EzportPlus/StyleTokens.c $ +// +// 4 10/18/12 5:50a Arunsb +// Updated for 2.16.1235 QA submission +// +// 3 10/10/12 12:33p Arunsb +// Synched the source for v2.16.1232, backup with Aptio +// +// 3 12/13/11 6:13p Blaines +// Remove error message when ESC key pressed. +// Display message when password is cleared. +// +// 2 11/23/11 1:25p Blaines +// [TAG] - EIP 74899 +// [Category]- Function Request +// [Synopsis]- Change input password box in same window +// [Description] - Display Hdd and System password prompts for old, new, +// and confirm text in the same window, +// +// [Files] +// StyleTokens.c, StyleStr.uni, EzportPlus.sdl, ezportplus.c +// +// 1 3/28/11 11:49p Madhans +// [TAG] EIP54968 +// [Category] Improvement +// [Description] To Support different style modules in TSE generically +// [Files] Ezport module updated. EzportPlus and Legacy Styles Modules +// added. +// +// 2 2/19/10 12:59p Madhans +// Updated for TSE 2.01. Refer Changelog.log for File change history. +// +// 4 2/19/10 8:10a Mallikarjunanv +// updated year in copyright message +// +// 3 2/04/10 11:08p Madhans +// Navigation Help for Mouse added. +// +// 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 5/06/09 8:14p Madhans +// Tse 2.0 Bin Module Initial Checkin. +// +// 1 5/06/09 8:10p Madhans +// Tse 2.0 Binary Modules +// +// 1 4/28/09 9:39p Madhans +// Tse 2.0 Code complete Checkin. +// +// +//*****************************************************************// +//*****************************************************************// +//********************************************************************** +// +// +// Name: ezportplustokens.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 +// +// +//********************************************************************** + + +//Following code is to force strgatherer to include these strings +#if 0 +STRING_TOKEN(STR_NAV_STRINGS_0) +STRING_TOKEN(STR_NAV_STRINGS_1) +STRING_TOKEN(STR_NAV_STRINGS_2) +STRING_TOKEN(STR_NAV_STRINGS_3) +STRING_TOKEN(STR_EXIT_HELP) +STRING_TOKEN(STR_RESET_HELP) +STRING_TOKEN(STR_NAV_STRINGS_4) +STRING_TOKEN(STR_NAV_STRINGS_5) +STRING_TOKEN(STR_NAV_STRINGS_6) +STRING_TOKEN(STR_NAV_STRINGS_7) +STRING_TOKEN(STR_SET_PASSWORD_PROMPT) +STRING_TOKEN(STR_CHANGE_PASSWORD_PROMPT) +STRING_TOKEN(STR_PASSWORD_SUCCESS_MSG) +STRING_TOKEN(STR_PASSWORD_CLEARED_MSG) +STRING_TOKEN(STR_SUCCESS) +STRING_TOKEN(STR_INFO) +#endif + + +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2010, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// diff --git a/EDK/MiniSetup/EzportPlus/TseStyleEzportPlus.lib b/EDK/MiniSetup/EzportPlus/TseStyleEzportPlus.lib new file mode 100644 index 0000000..795965c Binary files /dev/null and b/EDK/MiniSetup/EzportPlus/TseStyleEzportPlus.lib differ diff --git a/EDK/MiniSetup/EzportPlus/TseStyleEzportPlusx64.lib b/EDK/MiniSetup/EzportPlus/TseStyleEzportPlusx64.lib new file mode 100644 index 0000000..ae0873d Binary files /dev/null and b/EDK/MiniSetup/EzportPlus/TseStyleEzportPlusx64.lib differ diff --git a/EDK/MiniSetup/Legacy/HotclickBin.c b/EDK/MiniSetup/Legacy/HotclickBin.c new file mode 100644 index 0000000..a200ec7 --- /dev/null +++ b/EDK/MiniSetup/Legacy/HotclickBin.c @@ -0,0 +1,58 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2011, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +#ifdef TSE_FOR_APTIO_4_50 + +#include "Token.h" +#include +#include + +#else //#ifdef TSE_FOR_APTIO_4_50 + +#include "minisetup.h" + +#endif //#ifdef TSE_FOR_APTIO_4_50 + +#include "HotclickBin.h" +#include "HotClickElinks.h" + +// Build time file generated from AMITSE_OEM_HEADER_LIST elink. +#include "AmiTseOem.h" + +#ifdef TSE_FOR_APTIO_4_50 +#include "AMITSEStrTokens.h" +#else +#include STRING_DEFINES_FILE +#endif + +HOTCLICK_TEMPLATE gHotClickInfo[] = { HOTCLICK_LIST 0 }; //Added 0 for having null entry if HOTCLICK_FULLSCREEN_SUPPORT = 0 +UINT32 gHotClickCount = sizeof(gHotClickInfo) / sizeof(HOTCLICK_TEMPLATE); + + +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2011, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// diff --git a/EDK/MiniSetup/Legacy/HotclickBin.h b/EDK/MiniSetup/Legacy/HotclickBin.h new file mode 100644 index 0000000..e68fcbb --- /dev/null +++ b/EDK/MiniSetup/Legacy/HotclickBin.h @@ -0,0 +1,49 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2011, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +#ifndef __HOTCLICK_BIN_H__ +#define __HOTCLICK_BIN_H__ + +typedef VOID (*HOTCLICK_CALLBACK) ( VOID *container, VOID *object, VOID *cookie ); + +typedef struct _HOTCLICK_TEMPLATE +{ + UINT32 Xo, Yo, Xn, Yn; + HOTCLICK_CALLBACK Callback; + UINT32 BasePage; +} +HOTCLICK_TEMPLATE; + +extern VOID LegacyMainFrameHandlewithMouse( VOID *app, VOID *hotclick, VOID *cookie ); +extern VOID LegacyHelpFrameHandlewithMouse( VOID *app, VOID *hotclick, VOID *cookie ); +extern VOID LegacyNavFrameHandlewithMouse( VOID *app, VOID *hotclick, VOID *cookie ); + + +#endif //__HOTKEY_BIN_H__ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2011, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// diff --git a/EDK/MiniSetup/Legacy/HotkeyBin.c b/EDK/MiniSetup/Legacy/HotkeyBin.c new file mode 100644 index 0000000..f78761f --- /dev/null +++ b/EDK/MiniSetup/Legacy/HotkeyBin.c @@ -0,0 +1,106 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2010, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +#ifdef TSE_FOR_APTIO_4_50 + +#include "Token.h" +#include +#include + +#else //#ifdef TSE_FOR_APTIO_4_50 + +#include "minisetup.h" + +#endif //#ifdef TSE_FOR_APTIO_4_50 + +#include "HotkeyBin.h" +#include "HotKeyElinks.h" + +// Build time file generated from AMITSE_OEM_HEADER_LIST elink. +#include "AmiTseOem.h" + +#ifdef TSE_FOR_APTIO_4_50 +#include "AMITSEStrTokens.h" +#else +#include STRING_DEFINES_FILE +#endif + +#ifdef TSE_FOR_APTIO_4_50 +#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 + +HOTKEY_TEMPLATE gHotKeyInfo[] = { HOTKEY_LIST }; +UINT32 gHotKeyCount = sizeof(gHotKeyInfo) / sizeof(HOTKEY_TEMPLATE); + +#if MINISETUP_MOUSE_SUPPORT +UINT16 gStrNavToken = STRING_TOKEN(STR_NAV_STRINGS_1); +#else +UINT16 gStrNavToken = STRING_TOKEN(STR_NAV_STRINGS_1); +#endif + + +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2010, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// diff --git a/EDK/MiniSetup/Legacy/HotkeyBin.h b/EDK/MiniSetup/Legacy/HotkeyBin.h new file mode 100644 index 0000000..b739fa1 --- /dev/null +++ b/EDK/MiniSetup/Legacy/HotkeyBin.h @@ -0,0 +1,54 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2010, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +#ifndef __HOTKEY_BIN_H__ +#define __HOTKEY_BIN_H__ + +typedef VOID (*HOTKEY_CALLBACK) ( VOID *container, VOID *object, VOID *cookie ); + +typedef struct _HOTKEY_TEMPLATE +{ + EFI_INPUT_KEY Key; + UINT32 KeySftSte; + HOTKEY_CALLBACK Callback; + UINT32 BasePage; +} +HOTKEY_TEMPLATE; + +extern VOID LegacyHandleEscKey( VOID *app, VOID *hotkey, VOID *cookie ); +extern VOID LegacyHandleHelpKey( VOID *app, VOID *hotkey, VOID *cookie ); +extern VOID LegacyHandlePrevValuesKey( VOID *app, VOID *hotkey, VOID *cookie ); +extern VOID LegacyHandleFailsafeKey( VOID *app, VOID *hotkey, VOID *cookie ); +extern VOID LegacyHandleOptimalKey( VOID *app, VOID *hotkey, VOID *cookie ); +extern VOID LegacyHandleSaveExitKey( VOID *app, VOID *hotkey, VOID *cookie ); +extern VOID LegacyHandlePrnScrnKey( VOID *app, VOID *hotkey, VOID *cookie ); +extern VOID PrntScrnKeyNotification(VOID *app, VOID *hotkey, VOID *cookie );//EIP-123311 + +#endif //__HOTKEY_BIN_H__ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2010, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// diff --git a/EDK/MiniSetup/Legacy/LegacyBin.cif b/EDK/MiniSetup/Legacy/LegacyBin.cif new file mode 100644 index 0000000..dafa9c8 --- /dev/null +++ b/EDK/MiniSetup/Legacy/LegacyBin.cif @@ -0,0 +1,17 @@ + + name = "TSE Sytle Binary - Legacy" + category = ModulePart + LocalRoot = "EDK\MiniSetup\Legacy" + RefName = "LegacyBin" +[files] +"LegacyBin.sdl" +"TseStyleLegacy.lib" +"TseStyleLegacyx64.lib" +"StyleStr.uni" +"StyleTokens.c" +"HotkeyBin.h" +"HotkeyBin.c" +"LegacyBin.mak" +"HotclickBin.h" +"HotclickBin.c" + diff --git a/EDK/MiniSetup/Legacy/LegacyBin.mak b/EDK/MiniSetup/Legacy/LegacyBin.mak new file mode 100644 index 0000000..6218927 --- /dev/null +++ b/EDK/MiniSetup/Legacy/LegacyBin.mak @@ -0,0 +1,156 @@ +##*****************************************************************## +##*****************************************************************## +##*****************************************************************## +##** **## +##** (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/Legacy/LegacyBin.mak $ +## +## $Author: Arunsb $ +## +## $Revision: 3 $ +## +## $Date: 10/18/12 5:50a $ +## +##*****************************************************************## +##*****************************************************************## +## Revision History +## ---------------- +## $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Legacy/LegacyBin.mak $ +# +# 3 10/18/12 5:50a Arunsb +# Updated for 2.16.1235 QA submission +## +## 3 10/10/12 12:33p Arunsb +## Synched the source for v2.16.1232, backup with Aptio +# +# 2 6/29/11 12:46p 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 +# +# 1 3/28/11 11:49p Madhans +# [TAG] EIP54968 +# [Category] Improvement +# [Description] To Support different style modules in TSE generically +# [Files] Ezport module updated. EzportPlus and Legacy Styles Modules +# added. +## +## 1 9/16/10 6:37p Blaines +## +## 1 9/16/10 6:32p Blaines +## +## 5 2/19/10 8:10a Mallikarjunanv +## updated year in copyright message +## +## 4 2/12/10 7:18a Mallikarjunanv +## added dependency to add BOARD Module path +## +## 3 12/02/09 9:25a Mallikarjunanv +## Fixed ithe eip 30917 by Updated the mak file to include the TseOem.h +## in HotkeyBin.c. +## +## 2 6/24/09 6:33p Madhans +## Coding Standards +# +# 2 6/24/09 11:55a Blaines +# Coding standard update +# +# 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 11:15p Madhans +# Tse 2.0 Code complete Checkin. +## +## 3 4/28/09 9:39p Madhans +## Tse 2.0 Code complete Checkin. +## +## 2 4/24/09 9:35p Blaines +## +## 1 12/18/08 7:59p Madhans +## Intial version of TSE Lite sources +## +## +##*****************************************************************## +##*****************************************************************## + +all : $(BUILD_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.obj \ + $(BUILD_DIR)\$(TSE_STYLE_DIR)\HotclickBin.obj + +$(BUILD_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.obj: $(PROJECT_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.c $(TSE_STYLE_DIR)\HotkeyBin.h HotKeyElinkList + if not exist $(BUILD_DIR)\$(TSE_STYLE_DIR) mkdir $(BUILD_DIR)\$(TSE_STYLE_DIR) +!IF "$(TSE_BOARD_MODULE_SUPPORT)"=="1" + $(CC) $(CFLAGS) -I $(BUILD_DIR) -I $(TSE_BOARD_DIR) /DTSE_FOR_APTIO_4_50 /Fo$(BUILD_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.obj $(PROJECT_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.c +!ELSE + $(CC) $(CFLAGS) -I $(BUILD_DIR) /DTSE_FOR_APTIO_4_50 /Fo$(BUILD_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.obj $(PROJECT_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.c +!ENDIF + +$(BUILD_DIR)\$(TSE_STYLE_DIR)\HotclickBin.obj: $(PROJECT_DIR)\$(TSE_STYLE_DIR)\HotclickBin.c $(TSE_STYLE_DIR)\HotclickBin.h HotClickElinkList + if not exist $(BUILD_DIR)\$(TSE_STYLE_DIR) mkdir $(BUILD_DIR)\$(TSE_STYLE_DIR) +!IF "$(TSE_BOARD_MODULE_SUPPORT)"=="1" + $(CC) $(CFLAGS) -I $(BUILD_DIR) -I $(TSE_BOARD_DIR) /DTSE_FOR_APTIO_4_50 /Fo$(BUILD_DIR)\$(TSE_STYLE_DIR)\HotclickBin.obj $(PROJECT_DIR)\$(TSE_STYLE_DIR)\HotclickBin.c +!ELSE + $(CC) $(CFLAGS) -I $(BUILD_DIR) /DTSE_FOR_APTIO_4_50 /Fo$(BUILD_DIR)\$(TSE_STYLE_DIR)\HotclickBin.obj $(PROJECT_DIR)\$(TSE_STYLE_DIR)\HotclickBin.c +!ENDIF + +HotKeyElinkList: + echo #define HOTKEY_LIST $(HOTKEY_LIST) > $(BUILD_DIR)\HotKeyElinks.h + +# cl $(CFLAGS) /DTSE_FOR_APTIO_4_50 -I $(BUILD_DIR) /Fo$(BUILD_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.obj $(PROJECT_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.c + +# MAK file for the eModule:LegacyBin +AMITSEBin: $(BUILD_DIR)\$(TSE_STYLE_DIR)\HotkeyBin.obj + +HotClickElinkList: + echo #define HOTCLICK_LIST $(HOTCLICK_LIST) > $(BUILD_DIR)\HotClickElinks.h +# cl $(CFLAGS) /DTSE_FOR_APTIO_4_50 -I $(BUILD_DIR) /Fo$(BUILD_DIR)\$(TSE_STYLE_DIR)\HotclickBin.obj $(PROJECT_DIR)\$(TSE_STYLE_DIR)\HotclickBin.c + +# MAK file for the eModule:LegacyBin +AMITSEBin: $(BUILD_DIR)\$(TSE_STYLE_DIR)\HotclickBin.obj + +$(BUILD_DIR)\LegacyBin.mak : $(TSE_STYLE_DIR)\$(@B).cif $(TSE_STYLE_DIR)\$(@B).mak $(BUILD_RULES) + $(CIF2MAK) $(TSE_STYLE_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS) + +AMITSESDB : LegacySDB + +LegacySDB : $(BUILD_DIR)\LegacyBin.mak + $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\ + /f $(BUILD_DIR)\LegacyBin.mak all\ + "UNI_INCLUDE_PATH=$(TSEBIN_DIR) $(TSE_UNI_INCLUDE_PATH)"\ + "STRING_CONSUMERS=$(TSE_STYLE_DIR)\StyleTokens.c"\ + TYPE=SDB NAME=LegacyBin + +##*****************************************************************## +##*****************************************************************## +##** **## +##** (C)Copyright 2011, American Megatrends, Inc. **## +##** **## +##** All Rights Reserved. **## +##** **## +##** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **## +##** **## +##** Phone (770)-246-8600 **## +##** **## +##*****************************************************************## +##*****************************************************************## diff --git a/EDK/MiniSetup/Legacy/LegacyBin.sdl b/EDK/MiniSetup/Legacy/LegacyBin.sdl new file mode 100644 index 0000000..ad9f37b --- /dev/null +++ b/EDK/MiniSetup/Legacy/LegacyBin.sdl @@ -0,0 +1,162 @@ +TOKEN + Name = "TSE_STYLE_LEGACY_BIN_SUPPORT" + Value = "0" + Help = "Main switch to enable Legacy Style in TSE" + TokenType = Boolean + TargetEQU = Yes + TargetMAK = Yes + Master = Yes +End + +TOKEN + Name = "STYLE_COLOR_GRAYOUT" + Value = "EFI_DARKGRAY" + Help = " Item grayout colour " + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + + +TOKEN + Name = "SETUP_STYLE_BIN_LEGACY" + Value = "1" + Help = "Condition to support Legacy Style Sources" + TokenType = Boolean + TargetH = Yes +End + +TOKEN + Name = "TSE_PRN_SCRN_KEY_SCAN" + Value = "SCAN_F12" + Help = "Set to one of the defined constants from EFI_SIMPLE_TEXT_INPUT protocol. On pressing this key AMITSE_PRINT_SCREEN_PRESS_GUID event will be generated." + TokenType = Expression + TargetH = Yes +End + +TOKEN + Name = "HOTCLICK_FULLSCREEN_SUPPORT" + Value = "1" + Help = "Set one to enable the hot click support for full screen. The x,y coordinates for corresponding hot click ELINKS are done for a sample case(style). If customer needs his own style or not needs full screen then values in the ELINKS should be customized based on thier needs." + TokenType = Boolean + TargetH = Yes +End + +ELINK + Name = "{{SCAN_F4, 0},0, LegacyHandleSaveExitKey, 0 }," + Parent = "HOTKEY_LIST" + InvokeOrder = AfterParent +End + +ELINK + Name = "{{SCAN_F2, 0 },0,LegacyHandlePrevValuesKey, 1 }," + Parent = "HOTKEY_LIST" + InvokeOrder = AfterParent +End + +ELINK + Name = "{{SCAN_F3, 0 },0,LegacyHandleOptimalKey, 1 }," + Parent = "HOTKEY_LIST" + InvokeOrder = AfterParent +End + +ELINK + Name = "{{SCAN_F1, 0 },0,LegacyHandleHelpKey, 1 }," + Parent = "HOTKEY_LIST" + InvokeOrder = AfterParent +End + +ELINK + Name = "{{SCAN_ESC,0},0, LegacyHandleEscKey, 0 }," + Parent = "HOTKEY_LIST" + InvokeOrder = AfterParent +End + +ELINK + Name = "{{TSE_PRN_SCRN_KEY_SCAN,0},0, LegacyHandlePrnScrnKey, 0 }," + Parent = "HOTKEY_LIST" + InvokeOrder = AfterParent + Token = "TSE_PRN_SCRN_EVENT_SUPPORT" "=" "1" +End + +PATH + Name = "TSE_STYLE_DIR" +End + +MODULE + Help = "Includes LegacyBin.mak to Project" + File = "LegacyBin.mak" +End + +ELINK + Name = "$(TSE_STYLE_DIR)\TSEStyleLegacy$(ARCH).lib" + Parent = "MINISETUPLIB" + Priority = 30 + InvokeOrder = AfterParent +End + +ELINK + Name = "{ 1, 2, 1 + 98, 2+19, LegacyMainFrameHandlewithMouse, 0 }," + Parent = "HOTCLICK_LIST" + InvokeOrder = AfterParent + Help = "Dont change the HOTCLICK_LIST order, for 100*31 mode" + Token = "HOTCLICK_FULLSCREEN_SUPPORT" "=" "1" +End + +ELINK + Name = "{ 70, 5, 70 + 29, 5 + 21, LegacyHelpFrameHandlewithMouse, 1 }," + Parent = "HOTCLICK_LIST" + InvokeOrder = AfterParent + Help = "Dont change the HOTCLICK_LIST order, for 100*31 mode" + Token = "HOTCLICK_FULLSCREEN_SUPPORT" "=" "1" +End + +ELINK + Name = "{ 0, 29, 0 + 100, 29 + 2, LegacyNavFrameHandlewithMouse, 1 }," + Parent = "HOTCLICK_LIST" + InvokeOrder = AfterParent + Help = "Dont change the HOTCLICK_LIST order, for 100*31 mode" + Token = "HOTCLICK_FULLSCREEN_SUPPORT" "=" "1" +End + +ELINK + Name = "{ 0, 0, 0, 0, LegacyMainFrameHandlewithMouse, 0 }," + Parent = "HOTCLICK_LIST" + InvokeOrder = AfterParent + Help = "Dont change the HOTCLICK_LIST order, for 80*25 mode. Not supported customization needed" + Token = "HOTCLICK_FULLSCREEN_SUPPORT" "=" "1" +End + +ELINK + Name = "{ 0, 0, 0, 0, LegacyHelpFrameHandlewithMouse, 1 }," + Parent = "HOTCLICK_LIST" + InvokeOrder = AfterParent + Help = "Dont change the HOTCLICK_LIST order, for 80*25 mode. Not supported customization needed" + Token = "HOTCLICK_FULLSCREEN_SUPPORT" "=" "1" +End + +ELINK + Name = "{ 0, 0, 0, 0, LegacyNavFrameHandlewithMouse, 1 }," + Parent = "HOTCLICK_LIST" + InvokeOrder = AfterParent + Help = "Dont change the HOTCLICK_LIST order, for 80*25 mode. Not supported customization needed" + Token = "HOTCLICK_FULLSCREEN_SUPPORT" "=" "1" +End + +ELINK + Name = "-i $(TSE_STYLE_DIR)" + Parent = "TSE_UNI_INCLUDE_PATH" + InvokeOrder = AfterParent +End + +ELINK + Name = "$(TSE_STYLE_DIR)\StyleTokens.c" + Parent = "TSE_STRING_CONSUMERS_LIST" + InvokeOrder = AfterParent +End + +ELINK + Name = "$(BUILD_DIR)\LegacyBin.sdb" + Parent = "TSE_SDBS" + InvokeOrder = AfterParent +End \ No newline at end of file diff --git a/EDK/MiniSetup/Legacy/StyleStr.uni b/EDK/MiniSetup/Legacy/StyleStr.uni new file mode 100644 index 0000000..2130388 Binary files /dev/null and b/EDK/MiniSetup/Legacy/StyleStr.uni differ diff --git a/EDK/MiniSetup/Legacy/StyleTokens.c b/EDK/MiniSetup/Legacy/StyleTokens.c new file mode 100644 index 0000000..ebab296 --- /dev/null +++ b/EDK/MiniSetup/Legacy/StyleTokens.c @@ -0,0 +1,114 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2010, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +// $Archive: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Legacy/StyleTokens.c $ +// +// $Author: Arunsb $ +// +// $Revision: 2 $ +// +// $Date: 10/18/12 5:49a $ +// +//*****************************************************************// +//*****************************************************************// +// Revision History +// ---------------- +// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/Legacy/StyleTokens.c $ +// +// 2 10/18/12 5:49a Arunsb +// Updated for 2.16.1235 QA submission +// +// 3 10/10/12 12:33p Arunsb +// Synched the source for v2.16.1232, backup with Aptio +// +// 1 3/28/11 11:49p Madhans +// [TAG] EIP54968 +// [Category] Improvement +// [Description] To Support different style modules in TSE generically +// [Files] Ezport module updated. EzportPlus and Legacy Styles Modules +// added. +// +// 1 9/16/10 6:37p Blaines +// +// 1 9/16/10 6:32p Blaines +// +// 4 2/19/10 8:10a Mallikarjunanv +// updated year in copyright message +// +// 3 2/04/10 11:08p Madhans +// Navigation Help for Mouse added. +// +// 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 5/06/09 8:14p Madhans +// Tse 2.0 Bin Module Initial Checkin. +// +// 1 5/06/09 8:10p Madhans +// Tse 2.0 Binary Modules +// +// 1 4/28/09 9:39p Madhans +// Tse 2.0 Code complete Checkin. +// +// +//*****************************************************************// +//*****************************************************************// +//********************************************************************** +// +// +// Name: ezporttokens.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 +// +// +//********************************************************************** + + +//Following code is to force strgatherer to include these strings +#if 0 +STRING_TOKEN(STR_NAV_STRINGS_0) +STRING_TOKEN(STR_NAV_STRINGS_1) +STRING_TOKEN(STR_NAV_STRINGS_2) +STRING_TOKEN(STR_NAV_STRINGS_3) +STRING_TOKEN(STR_EXIT_HELP) +STRING_TOKEN(STR_RESET_HELP) +#endif + + +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2010, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// diff --git a/EDK/MiniSetup/Legacy/TseStyleLegacy.lib b/EDK/MiniSetup/Legacy/TseStyleLegacy.lib new file mode 100644 index 0000000..86db99e Binary files /dev/null and b/EDK/MiniSetup/Legacy/TseStyleLegacy.lib differ diff --git a/EDK/MiniSetup/Legacy/TseStyleLegacyx64.lib b/EDK/MiniSetup/Legacy/TseStyleLegacyx64.lib new file mode 100644 index 0000000..cb8c5f5 Binary files /dev/null and b/EDK/MiniSetup/Legacy/TseStyleLegacyx64.lib differ diff --git a/EDK/MiniSetup/PasswordEncode/PasswordEncode.c b/EDK/MiniSetup/PasswordEncode/PasswordEncode.c new file mode 100644 index 0000000..8af67e9 --- /dev/null +++ b/EDK/MiniSetup/PasswordEncode/PasswordEncode.c @@ -0,0 +1,217 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (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/PasswordEncode/PasswordEncode.c $ +// +// +//---------------------------------------------------------------------------- +// +// Name: PasswordEncode.c +// +// Description: This file contains code to handle password encoding feature +// +//---------------------------------------------------------------------------- +// +// + + +#include "PasswordEncode.h" + +INTN MemCmp(VOID* pDestination, VOID* pSource, UINTN Length); + +BOOLEAN TseEfiCompareGuid (IN EFI_GUID *Guid1,IN EFI_GUID *Guid2) +{ + return !MemCmp(Guid1,Guid2,sizeof(EFI_GUID)); +} + +VOID +TseMemCopy ( + IN VOID *Destination, + IN VOID *Source, + IN UINTN Length + ) +/*++ + +Routine Description: + + Copy Length bytes from Source to Destination. + +Arguments: + + Destination - Target of copy + + Source - Place to copy from + + Length - Number of bytes to copy + +Returns: + + None + +--*/ +{ + CHAR8 *Destination8; + CHAR8 *Source8; + + if (Source < Destination) { + Destination8 = (CHAR8 *) Destination + Length - 1; + Source8 = (CHAR8 *) Source + Length - 1; + while (Length--) { + *(Destination8--) = *(Source8--); + } + } else { + Destination8 = (CHAR8 *) Destination; + Source8 = (CHAR8 *) Source; + while (Length--) { + *(Destination8++) = *(Source8++); + } + } +} + + +//********************************************************************** +// +// +// Procedure: Hash +// +// Description: Allows creating a hash of an arbitrary message digest using one or more hash algorithms +// +// Input: +// This Pointer to the AMI_DIGITAL_SIGNATURE_PROTOCOL instance. +// HashAlgorithm Points to the EFI_GUID which identifies the algorithm to use. +// num_elem Number of blocks to be passed via next argument:addr[] +// addr[] Pointer to array of UINT8* addresses of data blocks to be hashed +// len Pointer to array of integers containing length of each block listed by addr[] +// Hash Holds the resulting hash computed from the message. +// +// Output: +// EFI_SUCCESS Hash returned successfully. +// EFI_INVALID_PARAMETER Message or Hash is NULL +// EFI_UNSUPPORTED The algorithm specified by HashAlgorithm is not supported by this +// driver. Or extend is TRUE and the algorithm doesn't support extending the hash. +// +// +//********************************************************************** +#if TSE_HASH_PASSWORD +EFI_STATUS Hash( + IN CONST EFI_GUID *HashAlgorithm, + IN UINTN num_elem, + IN CONST UINT8 *stringToHash[], + IN CONST UINTN *HashSize, + OUT UINT8 *HashOutput + ) +{ + BOOLEAN bSha1 = FALSE, bSha256 = FALSE; + UINT32 HashLen=SHA256_DIGEST_SIZE; + + // Support only SHA1 & SHA256 hashes + if(TseEfiCompareGuid((EFI_GUID*)HashAlgorithm, &gEfiHashAlgorithmSha1Guid)) + { + bSha1 = TRUE; + HashLen = SHA1_DIGEST_SIZE; + } + else + if(TseEfiCompareGuid((EFI_GUID*)HashAlgorithm, &gEfiHashAlgorithmSha256Guid)) + { + bSha256 = TRUE; + HashLen = SHA256_DIGEST_SIZE; + } + else + return EFI_UNSUPPORTED; + + MemSet(HashOutput, HashLen, 0); + + if(bSha1) + sha1_vector(num_elem, stringToHash, HashSize, HashOutput); + else + sha256_vector(num_elem, stringToHash, HashSize, HashOutput); + + return EFI_SUCCESS; +} +#endif + +// +//---------------------------------------------------------------------------- +// Procedure: PasswordEncodeLocal +// +// Description: Encodes the input string +// +// Input: Password : Password array to be encrypted. Encryped +// password is returned in the same array. +// MaxSize : Max size of Password +// +// Output: VOID +// +//---------------------------------------------------------------------------- +// +UINT8 HashOutput[20]; +VOID TsePasswordEncodeLocal( CHAR16 *Password, UINTN MaxSize); +VOID PasswordEncode( CHAR16 *Password, UINTN MaxSize) +{ +#if TSE_HASH_PASSWORD + UINTN ii; + EFI_STATUS Status; + UINTN HashSize = SHA1_DIGEST_SIZE; + + if (IsPasswordSupportNonCaseSensitive ()) + { + for ( ii = 0; ii < MaxSize/2; ii++ ) + Password[ii] = ((Password[ii]>=L'a')&&(Password[ii]<=L'z'))?(Password[ii]+L'A'-L'a'):Password[ii]; + } + + Status = Hash(&gEfiHashAlgorithmSha1Guid, TRUE, (CONST UINT8**)&Password, (CONST UINTN*)&MaxSize, (UINT8*)&HashOutput); + if (!EFI_ERROR (Status)) + { + MemSet (Password, MaxSize, 0); + TseMemCopy ((UINT8*)Password, (UINT8*)HashOutput, HashSize); + } +#else + TsePasswordEncodeLocal (Password, MaxSize); +#endif +} + +// +//---------------------------------------------------------------------------- +// Procedure: IsPasswordSupportNonCaseSensitive +// +// Description: Returns SETUP_PASSWORD_NON_CASE_SENSITIVE token value +// +// Input: void +// +// Output: BOOLEAN +// +//---------------------------------------------------------------------------- +// +BOOLEAN IsPasswordSupportNonCaseSensitive() +{ +#if SETUP_PASSWORD_NON_CASE_SENSITIVE + return TRUE; +#endif + return FALSE; +} + +//********************************************************************** +//********************************************************************** +//** ** +//** (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/EDK/MiniSetup/PasswordEncode/PasswordEncode.h b/EDK/MiniSetup/PasswordEncode/PasswordEncode.h new file mode 100644 index 0000000..4103c51 --- /dev/null +++ b/EDK/MiniSetup/PasswordEncode/PasswordEncode.h @@ -0,0 +1,71 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (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/PasswordEncode/PasswordEncode.h $ +// +//*****************************************************************// +// +//---------------------------------------------------------------------------- +// +// Name: password.h +// +// Description: Header file for code to handle password operations +// +//---------------------------------------------------------------------------- +// + +#ifndef _PASSWORDENCODE_H_ +#define _PASSWORDENCODE_H_ + +#if TSE_USE_EDK_LIBRARY +#include "Tiano.h" +#else +#include "Efi.h" +#endif + +#include "token.h" + +#if TSE_HASH_PASSWORD +#include "Protocol\Hash.h" +#include "Protocol\AmiDigitalSignature.h" +#include "Include\CryptLib.h" +#endif + +/////////////////////////////////////////////////////// +// EXTERN FUNCTIONS AND VARIABLES +////////////////////////////////////////////////////// +extern BOOLEAN IsPasswordSupportNonCaseSensitive (); +extern BOOLEAN IsHashingSupported (VOID); +extern BOOLEAN EfiCompareGuid (IN EFI_GUID *Guid1,IN EFI_GUID *Guid2); +extern VOID * EfiLibAllocateZeroPool (IN UINTN AllocationSize); +extern VOID MemCopy( VOID *dest, VOID *src, UINTN size ); +extern VOID MemSet( VOID *buffer, UINTN size, UINT8 value ); + +#endif /* _PASSWORDENCODE_H_ */ + + +//********************************************************************** +//********************************************************************** +//** ** +//** (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/EDK/MiniSetup/PasswordEncode/PasswordEncodeBin.cif b/EDK/MiniSetup/PasswordEncode/PasswordEncodeBin.cif new file mode 100644 index 0000000..42b209f --- /dev/null +++ b/EDK/MiniSetup/PasswordEncode/PasswordEncodeBin.cif @@ -0,0 +1,13 @@ + + name = "TSE Binary - PasswordEncode" + category = ModulePart + LocalRoot = "EDK\MiniSetup\PasswordEncode" + RefName = "PasswordEncodeBin" +[files] +"PasswordEncodeBin.sdl" +"PasswordEncodeBin.mak" +"PasswordEncode.c" +"PasswordEncode.h" +"TsePasswordEncode.lib" +"TsePasswordEncodex64.lib" + diff --git a/EDK/MiniSetup/PasswordEncode/PasswordEncodeBin.mak b/EDK/MiniSetup/PasswordEncode/PasswordEncodeBin.mak new file mode 100644 index 0000000..c50cb89 --- /dev/null +++ b/EDK/MiniSetup/PasswordEncode/PasswordEncodeBin.mak @@ -0,0 +1,98 @@ +##*****************************************************************## +##*****************************************************************## +##*****************************************************************## +##** **## +##** (C)Copyright 2004, 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/PasswordEncode/PasswordEncodeBin.mak $ +## +## $Author: Arunsb $ +## +## $Revision: 3 $ +## +## $Date: 5/08/14 4:46p $ +## +##*****************************************************************## +##*****************************************************************## +## Revision History +## ---------------- +## $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/PasswordEncode/PasswordEncodeBin.mak $ +# +# 3 5/08/14 4:46p Arunsb +# [TAG] EIP162197 +# [Category] Improvement +# [Description] Password encode feature. Modify to encode using Hashing +# based on token. +# +# 2 5/02/14 10:42p Arunsb +# If TSE_HASH_PASSWORD is not supported then CRYPTOLIB wont be linked +# +# 1 5/01/14 6:33p Arunsb +# [TAG] EIP162197 +# [Category] Improvement +# [Description] Password Encode Feature using hash algorithm +# [Files] PasswordEncode.c, PasswordEncode.h, PasswordEncodeBin.cif, +# PasswordEncodeBin.mak and PasswordEncodeBin.sdl +# +## Intial version of TSE PassworEncodeBin file sources +##*****************************************************************## + +# MAK file for the eModule:PasswordEncode + +!if "$(TSE_HASH_PASSWORD)" == "1" +CRYPTOLIB_TEMP = $(CRYPTOLIB) +!else +CRYPTOLIB_TEMP = +!endif + + +PASSWORDENCODE_INCLUDES = \ +!if "$(TSE_BOARD_SOURCE_SUPPORT)" == "1" + -I $(TSE_BOARD_DIR)\ +!endif + -I $(TSEBIN_DIR) \ + -I $(TSEBIN_DIR)\Inc \ + -I $(PROJECT_DIR)\Include\Protocol \ + -I $(PROJECT_DIR) \ + -I $(PROJECT_DIR)\Include \ + -I $(BUILD_DIR) \ + -I $(TSESRC_DIR)\AMILOGO \ + -I $(TSE_STYLE_DIR) \ + -I $(TSELITESRC_DIR) \ + -I $(TSE_PWD_ENCODE_DIR) \ +!if "$(UEFI_SOURCES_SUPPORT)" == "1" + -I $(UEFISRC_DIR) \ +!endif + + +All: $(BUILD_DIR)\$(TSE_PWD_ENCODE_DIR)\PasswordEncodeBin.obj + +$(BUILD_DIR)\$(TSE_PWD_ENCODE_DIR)\PasswordEncodeBin.obj: $(PROJECT_DIR)\$(TSE_PWD_ENCODE_DIR)\PasswordEncode.c + if not exist $(BUILD_DIR)\$(TSE_PWD_ENCODE_DIR) mkdir $(BUILD_DIR)\$(TSE_PWD_ENCODE_DIR) + $(CC) $(CFLAGS) $(PASSWORDENCODE_INCLUDES) /DTSE_FOR_APTIO_4_50 /Fo$(BUILD_DIR)\$(TSE_PWD_ENCODE_DIR)\PasswordEncodeBin.obj $(PROJECT_DIR)\$(TSE_PWD_ENCODE_DIR)\PasswordEncode.c + +# MAK file for the eModule:PasswordEncodeBin +AMITSEBin: $(BUILD_DIR)\$(TSE_PWD_ENCODE_DIR)\PasswordEncodeBin.obj $(CRYPTOLIB_TEMP) + +##*****************************************************************## +##*****************************************************************## +##** **## +##** (C)Copyright 2010, American Megatrends, Inc. **## +##** **## +##** All Rights Reserved. **## +##** **## +##** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **## +##** **## +##** Phone (770)-246-8600 **## +##** **## +##*****************************************************************## +##*****************************************************************## diff --git a/EDK/MiniSetup/PasswordEncode/PasswordEncodeBin.sdl b/EDK/MiniSetup/PasswordEncode/PasswordEncodeBin.sdl new file mode 100644 index 0000000..319678e --- /dev/null +++ b/EDK/MiniSetup/PasswordEncode/PasswordEncodeBin.sdl @@ -0,0 +1,34 @@ +TOKEN + Name = "PASSWORDENCODE_Bin_SUPPORT" + Value = "1" + Help = "Main switch to enable PasswordEncode binary support in Project" + TokenType = Boolean + TargetEQU = Yes + TargetMAK = Yes + Master = Yes +End + +PATH + Name = "TSE_PWD_ENCODE_DIR" +End + +TOKEN + Name = "PASSWORDENCODELIB" + Value = "$(TSE_PWD_ENCODE_DIR)/TsePasswordEncode$(ARCH).lib" + Help = "Password encode library" + TokenType = Expression + TargetMAK = Yes + TargetH = Yes +End + + +MODULE + Help = "Includes PasswordEncodeBin.mak to Project" + File = "PasswordEncodeBin.mak" +End + +ELINK + Name = "$(TSE_PWD_ENCODE_DIR)/TsePasswordEncode$(ARCH).lib" + Parent = "MINISETUPLIB" + InvokeOrder = AfterParent +End \ No newline at end of file diff --git a/EDK/MiniSetup/PasswordEncode/TsePasswordEncode.lib b/EDK/MiniSetup/PasswordEncode/TsePasswordEncode.lib new file mode 100644 index 0000000..2f365de Binary files /dev/null and b/EDK/MiniSetup/PasswordEncode/TsePasswordEncode.lib differ diff --git a/EDK/MiniSetup/PasswordEncode/TsePasswordEncodex64.lib b/EDK/MiniSetup/PasswordEncode/TsePasswordEncodex64.lib new file mode 100644 index 0000000..b69b4d9 Binary files /dev/null and b/EDK/MiniSetup/PasswordEncode/TsePasswordEncodex64.lib differ diff --git a/EDK/MiniSetup/TseAdvanced/AddDelBootDrvOpts.sd b/EDK/MiniSetup/TseAdvanced/AddDelBootDrvOpts.sd new file mode 100644 index 0000000..b0655b9 --- /dev/null +++ b/EDK/MiniSetup/TseAdvanced/AddDelBootDrvOpts.sd @@ -0,0 +1,286 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2012, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +// $Header: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/TseAdvanced/AddDelBootDrvOpts.sd 3 6/06/12 1:26p Arunsb $ +// +// $Revision: 3 $ +// +// $Date: 6/06/12 1:26p $ +//********************************************************************** +// Revision History +// ---------------- +// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/TseAdvanced/AddDelBootDrvOpts.sd $ +// +// 3 6/06/12 1:26p Arunsb +// Made compatible with 2.0 +// +// 2 6/06/12 12:54p Arunsb +// Driver Option Priorities label suppressed for no driver option +// presented +// +// 1 2/03/12 2:27a Arunsb +// EIP74967 Support for add/del boot/driver option from TSE +// +//*************************************************************************** +// +// +// Name: AMITSE.sd +// +// Description: SD File for Add/Del Boot/Driver options to show in setup +// +// +//*************************************************************************** + +#ifdef BOOT_FORM_SET + +#ifdef FORM_SET_VARSTORE + + varstore DRIVER_MANAGER, + key = DRIVER_MANAGER_KEY_ID, + name = DriverManager, + guid = DRIVER_MANAGER_GUID; + + varstore DRIVER_ORDER, + key = DRIVER_ORDER_KEY_ID, + name = DriverOrder, + guid = EFI_GLOBAL_VARIABLE_GUID; + +#if SETUP_SUPPORT_ADD_DRIVER_OPTION + varstore NEW_DRIVER_OPTION, + key = NEW_DRIVER_OPTION_KEY_ID, + name = AddDriverOption, + guid = ADD_DRIVER_OPTION_GUID; + + varstore DEL_DRIVER_OPTION, + key = DEL_DRIVER_OPTION_KEY_ID, + name = DelDriverOption, + guid = DEL_DRIVER_OPTION_GUID; +#endif +#endif + +//Add/Del new boot option starts +#if SETUP_SUPPORT_ADD_BOOT_OPTION +#ifdef FORM_SET_GOTO + SEPARATOR + suppressif ideqval NEW_BOOT_OPTION.FsCount == 0; + goto ADD_FORM_ID, + prompt = STRING_TOKEN (STR_ADD_BOOT_OPTION), + help = STRING_TOKEN (STR_ADD_BOOT_OPTION_HELP); + endif; + + goto DEL_FORM_ID, + prompt = STRING_TOKEN(STR_DEL_BOOT_OPTION), + help = STRING_TOKEN(STR_DEL_BOOT_OPTION_HELP), + flags = 0, key = 0; +#endif +#ifdef FORM_SET_FORM + form + formid = ADD_FORM_ID, + title = STRING_TOKEN(STR_ADD_BOOT_OPTION); + + subtitle text = STRING_TOKEN(STR_ADD_BOOT_OPTION); + subtitle text = STRING_TOKEN(STR_EMPTY); + + string varid = NEW_BOOT_OPTION.Label, + prompt = STRING_TOKEN(STR_ADD_BOOT_LABEL), + help = STRING_TOKEN(STR_BOOT_LABEL_HELP), + flags = 0, + key = 0, + minsize = 3, + maxsize = 20, + endstring; + + suppressif ideqval AMI_CALLBACK.Value == LAUNCH_FILE_PATH; + goto ADD_FORM_ID, + prompt = STRING_TOKEN(STR_ADD_BOOT_PATH), + help = STRING_TOKEN(STR_BOOT_PATH_HELP); + endif; + + grayoutif ideqid NEW_BOOT_OPTION.FsCount == NEW_BOOT_OPTION.FsCount; + string varid = NEW_BOOT_OPTION.Path, + prompt = STRING_TOKEN(STR_NEW_BOOT_FILE_PATH), + help = STRING_TOKEN(STR_NEW_BOOT_FILE_PATH_HELP), + flags = 0, + key = 0, + minsize = 0, + maxsize = 120, + endstring; + endif; + + suppressif ideqval AMI_CALLBACK.Value == SAVE_BOOT_OPTION; + goto ADD_FORM_ID, + prompt = STRING_TOKEN(STR_SAVE_BOOT_OPTION), + help = STRING_TOKEN(STR_SAVE_BOOT_OPTION_HELP); + endif; + endform; + + form + formid = DEL_FORM_ID, + title = STRING_TOKEN(STR_DEL_BOOT_OPTION); + + subtitle text = STRING_TOKEN(STR_DEL_BOOT_OPTION); + subtitle text = STRING_TOKEN(STR_EMPTY); + + suppressif ideqvallist BOOT_MANAGER.BootCount == 0xFFFF; + oneof + varid = DEL_BOOT_OPTION.Option, + prompt = STRING_TOKEN(STR_DEL_BOOT_OPTION), + help = STRING_TOKEN(STR_DEL_BOOT_OPTION_HELP), + option + text = STRING_TOKEN(STR_SELECT_TO_DEL), + value = 0xFFFF, + flags = DEFAULT; + option + text = STRING_TOKEN(STR_EMPTY), + value = 0, + flags = 0; + endoneof; + endif; + endform; +#endif +#endif +//Add/Del new boot option ends + +//For driver order priorities starts +#ifdef FORM_SET_ITEM + SEPARATOR +#if EFI_SPECIFICATION_VERSION>0x20000 + suppressif ideqvallist DRIVER_MANAGER.DriverCount == 0; +#endif + SUBTITLE(STRING_TOKEN(STR_DRIVER_ORDER_SUBTITLE)) +#if EFI_SPECIFICATION_VERSION>0x20000 + endif; +#endif + + suppressif ideqvallist DRIVER_MANAGER.DriverCount == 0xFFFF; + oneof varid = DRIVER_ORDER.Value, + prompt = STRING_TOKEN(STR_DRIVER_ORDER_X), + help = STRING_TOKEN(STR_DRIVER_ORDER_HELP), + option + text = STRING_TOKEN(STR_EMPTY), + value = 0, + flags = DEFAULT; + option + text = STRING_TOKEN(STR_EMPTY), + value = 1, + flags = 0; + endoneof; + endif; +#endif +//For driver order priorities ends + +//Add/Del new driver option starts +#if SETUP_SUPPORT_ADD_DRIVER_OPTION +#ifdef FORM_SET_GOTO + SEPARATOR + suppressif ideqval NEW_DRIVER_OPTION.FsCount == 0; + goto ADD_DRIVER_FORM_ID, + prompt = STRING_TOKEN(STR_ADD_DRIVER_OPTION), + help = STRING_TOKEN(STR_ADD_DRIVER_OPTION_HELP); + endif; + + goto DEL_DRIVER_FORM_ID, + prompt = STRING_TOKEN(STR_DEL_DRIVER_OPTION), + help = STRING_TOKEN(STR_DEL_DRIVER_OPTION_HELP), + flags = 0, key = 0; +#endif +#ifdef FORM_SET_FORM + form + formid = ADD_DRIVER_FORM_ID, + title = STRING_TOKEN(STR_ADD_DRIVER_OPTION); + + subtitle text = STRING_TOKEN(STR_ADD_DRIVER_OPTION); + subtitle text = STRING_TOKEN(STR_EMPTY); + + string varid = NEW_DRIVER_OPTION.Label, + prompt = STRING_TOKEN(STR_ADD_DRIVER_LABEL), + help = STRING_TOKEN(STR_DRIVER_LABEL_HELP), + flags = 0, + key = 0, + minsize = 3, + maxsize = 20, + endstring; + + suppressif ideqval AMI_CALLBACK.Value == LAUNCH_FILE_PATH_DRIVER; + goto ADD_DRIVER_FORM_ID, + prompt = STRING_TOKEN(STR_ADD_DRIVER_PATH), + help = STRING_TOKEN(STR_DRIVER_PATH_HELP); + endif; + + grayoutif ideqid NEW_DRIVER_OPTION.FsCount == NEW_DRIVER_OPTION.FsCount; + string varid = NEW_DRIVER_OPTION.DriverPath, + prompt = STRING_TOKEN (STR_NEW_DRIVER_FILE_PATH), + help = STRING_TOKEN (STR_NEW_DRIVER_FILE_PATH_HELP), + flags = 0, + key = 0, + minsize = 0, + maxsize = 120, + endstring; + endif; + + suppressif ideqval AMI_CALLBACK.Value == SAVE_DRIVER_OPTION; + goto ADD_DRIVER_FORM_ID, + prompt = STRING_TOKEN(STR_SAVE_BOOT_OPTION), + help = STRING_TOKEN(STR_SAVE_DRIVER_OPTION_HELP); + endif; + + endform; + + form + formid = DEL_DRIVER_FORM_ID, + title = STRING_TOKEN(STR_DEL_DRIVER_OPTION); + + subtitle text = STRING_TOKEN(STR_DEL_DRIVER_OPTION); + subtitle text = STRING_TOKEN(STR_EMPTY); + + suppressif ideqvallist DRIVER_MANAGER.DriverCount == 0xFFFF; + oneof + varid = DEL_DRIVER_OPTION.Option, + prompt = STRING_TOKEN(STR_DEL_DRIVER_OPTION), + help = STRING_TOKEN(STR_DEL_DRIVER_OPTION_HELP), + option + text = STRING_TOKEN(STR_SELECT_TO_DEL), + value = 0xFFFF, + flags = DEFAULT; + option + text = STRING_TOKEN(STR_EMPTY), + value = 0, + flags = 0; + endoneof; + endif; + + endform; + +#endif +#endif +//Add/Del new driver option ends + +#endif //ifdef ADVANCED_FORM_SET + +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (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/EDK/MiniSetup/TseAdvanced/AddDelBootDrvOpts.uni b/EDK/MiniSetup/TseAdvanced/AddDelBootDrvOpts.uni new file mode 100644 index 0000000..3903e18 Binary files /dev/null and b/EDK/MiniSetup/TseAdvanced/AddDelBootDrvOpts.uni differ diff --git a/EDK/MiniSetup/TseAdvanced/Mouse.c b/EDK/MiniSetup/TseAdvanced/Mouse.c new file mode 100644 index 0000000..8505b1d --- /dev/null +++ b/EDK/MiniSetup/TseAdvanced/Mouse.c @@ -0,0 +1,1029 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 2014, 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/TseAdvanced/Mouse.c $ +// +// $Author: Premkumara $ +// +// $Revision: 19 $ +// +// $Date: 8/28/14 8:25a $ +// +//*****************************************************************// +//*****************************************************************// +// Revision History +// ---------------- +// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/TseAdvanced/Mouse.c $ +// +// 19 8/28/14 8:25a Premkumara +// [TAG] EIP103757 +// [Category] Improvement +// [Description] - Introduced two functions such as +// TSE_SOFTKBD_GetMouseCoordinates() and TSE_SOFTKBD_GetButtonStatus() +// to override softkbd interface such as GetButtonStatus() and +// GetCoordinate(). +// [Files] Mouse.c +// +// 18 8/28/14 6:04a Premkumara +// EIP-135253 Updating file name proper in #include +// +// 17 5/02/14 9:23p Arunsb +// EIP164232 Error case handled properly +// +// 16 5/02/14 7:03a 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 +// +// 15 10/18/12 5:45a Arunsb +// Updated for 2.16.1235 QA submission +// +// 17 10/10/12 12:28p Arunsb +// Synched the source for v2.16.1232 backup with Aptio +// +// 14 5/28/12 11:55a Premkumara +// [TAG] EIP89272 +// [Category] Improvement +// [Description] Change softkbd layout for numeric control +// [Files] CommonHelper.c, Mouse.c, Minisetup.h, C, Numeric.c +// +// 13 5/28/12 11:33a 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 +// +// 12 5/09/12 4:09p Arunsb +// [TAG] EIP89753 +// [Category] Improvement +// [Description] Make mouse.c functions as board module hook +// [Files] Amitse.sdl and mouse.c +// +// 11 4/05/12 7:11a 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 +// +// 10 4/04/12 12:38a Rajashakerg +// [TAG] EIP83753 +// [Category] Bug Fix +// [Severity] Normal +// [Symptom] SoftKbd flickers when positioned near Top/Left end of the +// screen display. +// [RootCause] When Soft kbd is positioned near Top/Left end of the +// screen to display and when mouse pointer is on softkbd then we are +// stopping the mouse. +// Because of the implicit type casting of negative to UINT32 by the +// compiler the logic failed to stop the mouse when it is on softkbd. +// [Solution] In the logic to stop the mouse on soft kbd the cordinates +// check is Explicitly type cast to INT32. +// [Files] Mouse.c +// +// 9 4/03/12 3:07a Premkumara +// [TAG] EIP84150 +// [Category] Bug Fix +// [Severity] Normal +// [Symptom] All the timers for mouse drivers before exiting from setup +// is not stopped +// [RootCause] MouseDestroy() is not called StopPointingDevice() +// function to stop Mouse device +// [Solution] StopPointingDevice() function is called in MouseDestroy() +// function +// [Files] Mouse.c, Protocol.c, Ezport/StyleCommon.c, +// EzportPlus/StyleCommon.c, Legacy/StyleCommon.c, Minisetupext.c +// +// 8 1/18/12 4:58a 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 +// +// 7 11/20/11 7: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. +// +// 6 3/29/11 12:17p 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 +// +// 5 3/28/11 9:08p 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 +// +// 4 4/21/10 12:00p Madhans +// Tse 2.02 +// +// 2 2/26/10 8:46p Madhans +// For Tse 2.01.1204. Refer Changelog.log file change history +// +// 11 2/23/10 8:33p Madhans +// For GTSE support. +// +// 10 2/19/10 11:32a Madhans +// to avoid build errors +// +// 9 2/19/10 8:06a Mallikarjunanv +// updated year in copyright message +// +// 8 2/05/10 6:03p Madhans +// Mouse.c is moved to Binary to contol TSE_MOUSE_SUPPORT from binary +// +// 5 9/03/09 2:45a Madhans +// updated file wiht the fix for eip 25555 +// +// 4 8/13/09 7:37a Mallikarjunanv +// eip:24971 - supporting tse features without tse sources +// +// 3 7/20/09 1:16p Mallikarjunanv +// updated the #if conditions +// +// 2 6/12/09 7:43p Presannar +// Initial implementation of coding standards for AMITSE2.0 +// +//*****************************************************************// +//*****************************************************************// + +// +//---------------------------------------------------------------------------- +// +// Name: Mouse.c +// +// Description: This file contains code to handle Mouse Operations +// +//---------------------------------------------------------------------------- +// + +//#include "minisetup.h" +#ifdef TSE_FOR_APTIO_4_50 + +#include "Token.h" +#include +#include +#include +#include +#include "TseCommon.h" +#include "commonoem.h" + +#else //#ifdef TSE_FOR_APTIO_4_50 + +#include "minisetup.h" + +#endif //#ifdef TSE_FOR_APTIO_4_50 + +#if TSE_STYLE_GTSE_BIN_SUPPORT +#include "gtseconfig.h" +#endif + +#if MINISETUP_MOUSE_SUPPORT + +#if OLD_MOUSE_DRIVER_SUPPORT +#include "Include\Protocol\MouseLib\MouseLib.h" +#else +#include "Include\Protocol\MouseProtocol.h" +#endif + +#if AMITSE_SOFTKBD_SUPPORT +#include "Include\Protocol\SoftKbdProtocol.h" + +SOFT_KBD_PROTOCOL *TSESoftKbd_n = NULL; +EFI_GUID gSoftKbdGuid = EFI_SOFT_KBD_PROTOCOL_GUID; +#endif + + +#define CURSOR_WIDTH 20 +#define CURSOR_HEIGHT 20 + +EFI_GUID gMouseDriverGuid = EFI_MOUSE_DRIVER_PROTOCOL_GUID; +DXE_MOUSE_PROTOCOL *TSEMouse = (DXE_MOUSE_PROTOCOL *)NULL; +DXE_MOUSE_PROTOCOL FakeTSEMouse; +INT32 Screen_Top=0,Screen_Left=0; //Calculated Setup Screen Top and Left +EFI_STATUS GetScreenResolution(UINTN *ResX, UINTN *ResY); +UINTN HiiGetGlyphWidth(VOID); +UINTN HiiGetGlyphHeight(VOID); +UINTN StyleGetStdMaxRows(VOID); +extern UINTN gMaxRows; +extern UINTN gMaxCols; +extern UINTN gPostStatus; +VOID TSEStringReadLoopEntryHook(VOID); +VOID TSEStringReadLoopExitHook(VOID); +VOID TSEMouseInitHook(VOID); +VOID TSEMouseStopHook(VOID); +VOID TSEMouseRefreshHook(VOID); +VOID TSEMouseStartHook(VOID); +BOOLEAN TSEMouseIgnoreMouseActionHook(VOID); +VOID TSEMouseDestroyHook(VOID); + +//EIP-103757 Starts +#if AMITSE_SOFTKBD_SUPPORT +// +//-------------------------------------------------------------------------------- +// Procedure: TSE_SOFTKBD_GetMouseCoordinates +// +// Description: Function to return the mouse co-ordinates if it is over softkbd +// +// Input: DXE_MOUSE_PROTOCOL *, INT32 *, INT32 *, INT32 * +// +// Output: EFI_STATUS +// +//-------------------------------------------------------------------------------- +// +EFI_STATUS TSE_SOFTKBD_GetMouseCoordinates (DXE_MOUSE_PROTOCOL *This, INT32 *X, INT32 *Y, INT32 *Z) +{ + EFI_STATUS Status = EFI_UNSUPPORTED; + UINT32 x = 0, y = 0, z = 0; + UINT32 SoftKbdStartX = 0, SoftKbdStartY = 0, SoftKbdWidth = 0, SoftKbdHeight = 0; + + if (NULL == TSESoftKbd_n) + { + return Status; + } + + if (TSESoftKbd_n->SoftKbdActive) //if softkbd active + { + TSESoftKbd_n->GetPosition(TSESoftKbd_n,FALSE, &SoftKbdStartY,&SoftKbdStartX); + TSESoftKbd_n->GetDimension(TSESoftKbd_n,&SoftKbdWidth, &SoftKbdHeight); + TSEMouse->GetCoordinates(TSEMouse, &x, &y, &z); + + //Give the mouse co-ordinates only if the mouse is inside softkbd and when is not in dragging state + if ( ( x > SoftKbdStartX) && (y > SoftKbdStartY) && (x < (SoftKbdStartX + SoftKbdWidth)) && (y < (SoftKbdStartY + SoftKbdHeight))) + { + *X = x; + *Y = y; + *Z = z; + Status = EFI_SUCCESS; + } + else + {//If the mouse pointer is outside the softkbd, send 0s + *X = *Y = *Z = 0; + Status = EFI_NOT_READY; + } + } + return Status; +} + +// +//-------------------------------------------------------------------------------- +// Procedure: TSE_SOFTKBD_GetButtonStatus +// +// Description: Function to return the mouse button status if it is over softkbd +// +// Input: DXE_MOUSE_PROTOCOL *, INT32 * +// +// Output: EFI_STATUS +// +//-------------------------------------------------------------------------------- +// +EFI_STATUS TSE_SOFTKBD_GetButtonStatus (DXE_MOUSE_PROTOCOL *This, INT32 *ButtonStatus ) +{ + EFI_STATUS Status = EFI_UNSUPPORTED; + UINT32 x = 0, y = 0, z = 0; + UINT32 SoftKbdStartX = 0, SoftKbdStartY = 0, SoftKbdWidth = 0, SoftKbdHeight = 0; + + if (NULL == TSESoftKbd_n) + { + return Status; + } + if (TSESoftKbd_n->SoftKbdActive) //if softkbd active + { + TSESoftKbd_n->GetPosition(TSESoftKbd_n,FALSE, &SoftKbdStartY,&SoftKbdStartX); + TSESoftKbd_n->GetDimension(TSESoftKbd_n,&SoftKbdWidth, &SoftKbdHeight); + TSEMouse->GetCoordinates(TSEMouse, &x, &y, &z); + + //Give the mouse co-ordinates only if the mouse is inside softkbd and when is not in dragging state + if ( ( x > SoftKbdStartX) && (y > SoftKbdStartY) && (x < (SoftKbdStartX + SoftKbdWidth)) && (y < (SoftKbdStartY + SoftKbdHeight)) ) + { + TSEMouse->GetButtonStatus(TSEMouse, ButtonStatus); + Status = EFI_SUCCESS; + } + else + {//If the mouse pointer is outside the softkbd, send NULL + *ButtonStatus = TSEMOUSE_NULL_CLICK; + Status = EFI_NOT_READY; + } + } + return Status; +} +#endif //end for #if AMITSE_SOFTKBD_SUPPORT +//EIP-103757 Ends + +#if !OVERRIDE_TSEMouseInit +// +//---------------------------------------------------------------------------- +// Procedure: TSEMouseInit +// +// Description: Function to initialize the mouse +// +// Input: None +// +// Output: VOID +// +//---------------------------------------------------------------------------- +// +VOID MemCopy( VOID *dest, VOID *src, UINTN size ); +VOID TSEMouseInit(VOID) +{ + EFI_STATUS Status; + UINTN HorizontalResolution = 0; + UINTN VerticalResolution = 0; + + Status = gBS->LocateProtocol(&gMouseDriverGuid, NULL, &TSEMouse); + if (EFI_ERROR (Status)) + { + TSEMouse=NULL; + } + else + { + //Initialize the Mouse to Full Screen Resolution in case of QuietBoot + if(TSE_POST_STATUS_IN_QUITE_BOOT_SCREEN == gPostStatus) + { + GetScreenResolution(&HorizontalResolution, &VerticalResolution); + if (TSEMouse) + { + //Initializing the Mouse (CURSOR,BOUNDARY,MAPPING etc) + #if OLD_MOUSE_DRIVER_SUPPORT + TSEMouse->Initialize( + (UINT32)0, + (UINT32)0, + (UINT32)HorizontalResolution, + (UINT32)VerticalResolution + ); + #else + TSEMouse->InitializePointingDevice( + TSEMouse, + (UINT32)0, + (UINT32)0, + (UINT32)HorizontalResolution, + (UINT32)VerticalResolution + ); + #endif + } + } + else + { + Status = GetScreenResolution(&HorizontalResolution, &VerticalResolution); + if ( EFI_ERROR( Status ) ) + TSEMouse = NULL; + + if(TSEMouse) + { + + #if TSE_STYLE_GTSE_BIN_SUPPORT + { + GTSESetupConfigData* Data; + Data = GTSEGetConfigData(); + Screen_Top = Data->StartY ; + Screen_Left = Data->StartX ; + } + #else + Screen_Top = (INT32)(VerticalResolution - (gMaxRows*HiiGetGlyphHeight()) ) /2; + Screen_Left = (INT32)(HorizontalResolution - (gMaxCols*HiiGetGlyphWidth()) ) /2; + #endif + + #if OLD_MOUSE_DRIVER_SUPPORT + TSEMouse->Initialize( + (UINT32)Screen_Left, + (UINT32)Screen_Top, + (UINT32)(Screen_Left + (gMaxCols*HiiGetGlyphWidth())), + (UINT32)(Screen_Top + (gMaxRows*HiiGetGlyphHeight())) + ); + #else + //Initializing the Mouse (CURSOR,BOUNDARY,MAPPING etc) + TSEMouse->InitializePointingDevice(TSEMouse, + (INT32)Screen_Left, + (INT32)Screen_Top, + (INT32)(Screen_Left + (gMaxCols*HiiGetGlyphWidth())), + (INT32)(Screen_Top + (gMaxRows*HiiGetGlyphHeight())) + ); + #endif + } + }//End of gPostStatus not quietBoot case +#if AMITSE_SOFTKBD_SUPPORT + if (TSEMouse) + { + MemCopy (&FakeTSEMouse, TSEMouse, sizeof (DXE_MOUSE_PROTOCOL)); + FakeTSEMouse.GetCoordinates = TSE_SOFTKBD_GetMouseCoordinates; + FakeTSEMouse.GetButtonStatus = TSE_SOFTKBD_GetButtonStatus; + + Status = gBS->LocateProtocol(&gSoftKbdGuid, NULL, &TSESoftKbd_n); + if (!EFI_ERROR (Status)){ + TSESoftKbd_n->UpdateMouseInterface (TSESoftKbd_n, &FakeTSEMouse); + } + } +#endif + } + TSEMouseInitHook(); +} +#endif + +#if !OVERRIDE_TSEMouseStop +// +//---------------------------------------------------------------------------- +// Procedure: TSEMouseStop +// +// Description: Function to handle the mouse stop +// +// Input: None +// +// Output: None +// +//---------------------------------------------------------------------------- +// +VOID TSEMouseStop(VOID) +{ + //Stop mouse pointer draw + if(TSEMouse!=NULL) + { +#if OLD_MOUSE_DRIVER_SUPPORT + TSEMouse->Stop(); +#else + TSEMouse->StopUpdatingMouseCursor(TSEMouse); +#endif + } + + TSEMouseStopHook(); +} +#endif + +#if !OVERRIDE_TSEIsMouseClickedonSoftkbd +// +//---------------------------------------------------------------------------- +// Procedure: TSEIsMouseClickedonSoftkbd +// +// Description: Function to handle the mouse Clicked on Softkbd +// +// Input: None +// +// Output: None +// +//---------------------------------------------------------------------------- +// +BOOLEAN TSEIsMouseClickedonSoftkbd(VOID) +{ + EFI_STATUS Status = EFI_UNSUPPORTED; + UINT32 x=0,y=0, z=0; + UINT32 SoftKbdStartX=0, SoftKbdStartY=0, SoftKbdWidth=0, SoftKbdHeight=0; + +#if AMITSE_SOFTKBD_SUPPORT +Status = gBS->LocateProtocol(&gSoftKbdGuid, NULL, &TSESoftKbd_n); + + if( Status==( EFI_INVALID_PARAMETER | EFI_NOT_FOUND ) ) + { + TSESoftKbd_n=NULL; + } + + TSEMouse->GetCoordinates(TSEMouse,&x,&y,&z); + TSESoftKbd_n->GetPosition(TSESoftKbd_n, FALSE ,&SoftKbdStartY,&SoftKbdStartX); + TSESoftKbd_n->GetDimension(TSESoftKbd_n,&SoftKbdWidth, &SoftKbdHeight); + //EIP 83753 : SoftKbd flickers when positioned near Top/Left end of the screen display. + if((( (INT32)x > (INT32)(SoftKbdStartX-HiiGetGlyphHeight()))&&((INT32)y > (INT32)(SoftKbdStartY-(2*HiiGetGlyphHeight()))))&& (((INT32)x < (INT32)(SoftKbdStartX+SoftKbdWidth))&&((INT32)y < (INT32)(SoftKbdStartY + SoftKbdHeight))) ) + return TRUE; + else + return FALSE; +#endif +return FALSE; +} +#endif + +#if !OVERRIDE_TSEMouseRefresh +// +//---------------------------------------------------------------------------- +// Procedure: TSEMouseRefresh +// +// Description: Function to handle the mouse Refresh +// +// Input: None +// +// Output: None +// +//---------------------------------------------------------------------------- +// +VOID TSEMouseRefresh(VOID) +{ + EFI_STATUS Status = EFI_UNSUPPORTED; + + if((TRUE == TSEMouseIgnoreMouseActionHook())&&(TRUE == TSEIsMouseClickedonSoftkbd())) + { + TSEMouse->StopUpdatingMouseCursor(TSEMouse); + } + + TSEMouseRefreshHook(); + + //refresh mouse pointer + if(TSEMouse!=NULL) + { +#if OLD_MOUSE_DRIVER_SUPPORT + TSEMouse->Refresh(); +#else + TSEMouse->UpdateMousePointerProperty(TSEMouse ,MOUSE_POINTER_PROPERTY_NORMAL); + TSEMouse->RefreshMouseCursor(TSEMouse); +#endif + } +} +#endif + +#if !OVERRIDE_TSEMouseStart +// +//---------------------------------------------------------------------------- +// Procedure: TSEMouseStart +// +// Description: Function to handle the mouse Startd +// +// Input: None +// +// Output: None +// +//---------------------------------------------------------------------------- +// +VOID TSEMouseStart(VOID) +{ + TSEMouseStartHook(); + + if(TSEMouse!=NULL) +#if OLD_MOUSE_DRIVER_SUPPORT + TSEMouse->Start(); +#else + TSEMouse->StartUpdatingMouseCursor(TSEMouse); +#endif +} +#endif + +#if !OVERRIDE_TSEMouseFreeze +// +//---------------------------------------------------------------------------- +// Procedure: TSEMouseFreeze +// +// Description: Function to handle the mouse Destory +// +// Input: None +// +// Output: None +// +//---------------------------------------------------------------------------- +// +VOID TSEMouseFreeze(VOID) +{ + //Stop mouse pointer draw + if(TSEMouse!=NULL) +#if OLD_MOUSE_DRIVER_SUPPORT + return; +#else + TSEMouse->UpdateMousePointerProperty(TSEMouse ,MOUSE_POINTER_PROPERTY_FREEZE); +#endif + +} +#endif + +#if !OVERRIDE_TSEGetCoordinates +// +//---------------------------------------------------------------------------- +// Procedure: TSEGetCoordinates +// +// Description: Function to handle the mouse Destory +// +// Input: None +// +// Output: EFI_STATUS +// +//---------------------------------------------------------------------------- +// +EFI_STATUS TSEGetCoordinates(INT32 *x, INT32 *y, INT32 *z) +{ +EFI_STATUS Status = EFI_SUCCESS; + //Stop mouse pointer draw + if(TSEMouse!=NULL) +#if OLD_MOUSE_DRIVER_SUPPORT + return; +#else + TSEMouse->GetCoordinates(TSEMouse ,x,y,z); +#endif + return EFI_SUCCESS; +} +#endif + +#if !OVERRIDE_TSEMouseReadInfo +// +//---------------------------------------------------------------------------- +// Procedure: TSEMouseReadInfo +// +// Description: Function to read the information using mouse +// +// Input: MOUSE_INFO *MouseInfo +// +// Output: EFI_STATUS +// +//---------------------------------------------------------------------------- +// +EFI_STATUS TSEMouseReadInfo(MOUSE_INFO *MouseInfo) +{ + EFI_STATUS Status = EFI_UNSUPPORTED; + UINT32 Button_Status=0; + UINT32 x=0,y=0, z=0; + UINT32 SoftKbdStartX=0, SoftKbdStartY=0, SoftKbdWidth=0, SoftKbdHeight=0; + + if(NULL == TSEMouse) + return EFI_UNSUPPORTED; + + TSEMouse->GetCoordinates(TSEMouse,&x,&y,&z); + + // If mouse action are consumed by Modules like SoftKeyBoard. + if(TSEMouseIgnoreMouseActionHook() == TRUE) + { + +#if AMITSE_SOFTKBD_SUPPORT + Status = gBS->LocateProtocol(&gSoftKbdGuid, NULL, &TSESoftKbd_n); + + if( Status==( EFI_INVALID_PARAMETER | EFI_NOT_FOUND ) ) + { + TSESoftKbd_n=NULL; + } + + TSESoftKbd_n->GetPosition(TSESoftKbd_n,FALSE, &SoftKbdStartY,&SoftKbdStartX); + TSESoftKbd_n->GetDimension(TSESoftKbd_n,&SoftKbdWidth, &SoftKbdHeight); + if((( x > SoftKbdStartX)&&(y > SoftKbdStartY))&& ((x < (SoftKbdStartX+SoftKbdWidth))&&(y <(SoftKbdStartY + SoftKbdHeight))) ) + { + //TSESoftKbd_n->UpdateMouseInterface(TSESoftKbd_n, TSEMouse); + + return EFI_NOT_FOUND; + } + // else + // TSESoftKbd_n->UpdateMouseInterface(TSESoftKbd_n, NULL); +#endif + + // return EFI_NOT_FOUND; + } +#if OLD_MOUSE_DRIVER_SUPPORT + //Getting Mouse Button Status + TSEMouse->GetButtonStatus(&Button_Status); + + //Getting Mouse Pointer Position + TSEMouse->GetPosition((INT32*)&x,(INT32*)&y); +#else + + TSEMouse->MousePoll(TSEMouse); + TSEMouse->GetButtonStatus(TSEMouse,&Button_Status); + + //Getting Mouse Pointer Position + TSEMouse->GetCoordinates(TSEMouse,&x,&y,&z); +#endif + + y-=Screen_Top; + x-=Screen_Left; + + //Converting Graphics Resolution to Text Mode Location + MouseInfo->Left = (UINT16)(x/HiiGetGlyphWidth()); + MouseInfo->Top = (UINT16)(y/HiiGetGlyphHeight()); + + //Setting the Calculated SCREEN_TOP and SCREEN_LEFT Rather than Hardcoding +// MouseInfo->Top-=Screen_Top; +// MouseInfo->Left-=Screen_Left; + MouseInfo->ButtonStatus=Button_Status; + + return EFI_SUCCESS; +} +#endif + +#if !OVERRIDE_TSEMouseDestroy +// +//---------------------------------------------------------------------------- +// Procedure: TSEMouseDestroy +// +// Description: Function to handle the mouse Destory +// +// Input: None +// +// Output: None +// +//---------------------------------------------------------------------------- +// +VOID TSEMouseDestroy(VOID) +{ + //Stop mouse pointer draw + if(TSEMouse!=NULL) + { +#if OLD_MOUSE_DRIVER_SUPPORT + TSEMouse->Stop(); +#else + TSEMouse->StopUpdatingMouseCursor(TSEMouse); + TSEMouse->StopPointingDevice(TSEMouse); //EIP-84150 +#endif + } + + TSEMouseDestroyHook(); +} +#endif + +#if !OVERRIDE_TSEGetactualScreentop +//EIP 79962 : START +// Mouse pointer corruption in GTSE +// +//---------------------------------------------------------------------------- +// Procedure: TSEGetactualScreentop +// +// Description: Function to retrun the actual Screen Top value +// +// Input: None +// +// Output: INT32 +// +//---------------------------------------------------------------------------- +// +INT32 TSEGetactualScreentop(VOID) +{ + return Screen_Top; +} +//EIP 79962 : END +#endif + +#if AMITSE_SOFTKBD_SUPPORT +#if !OVERRIDE_TSENumericSoftKbdInit +// +//---------------------------------------------------------------------------- +// Procedure: TSENumericSoftKbdInit +// +// Description: Function to display the numeric softkbd +// +// Input: None +// +// Output: INT32 +// +//---------------------------------------------------------------------------- +// +VOID TSENumericSoftKbdInit(VOID) +{ + EFI_STATUS Status = EFI_UNSUPPORTED; + + Status = gBS->LocateProtocol(&gSoftKbdGuid, NULL, &TSESoftKbd_n); + + if( Status==( EFI_INVALID_PARAMETER | EFI_NOT_FOUND ) ) + { + TSESoftKbd_n=NULL; + } + if(NULL == TSESoftKbd_n) + return; + + TSESoftKbd_n->SetKbdLayout(TSESoftKbd_n, SOFT_KEY_LAYOUT_NUMERIC); + TSEStringReadLoopEntryHook(); +} +#endif + +#if !OVERRIDE_TSENumericSoftKbdExit +// +//---------------------------------------------------------------------------- +// Procedure: TSENumericSoftKbdExit +// +// Description: Function to destroy the numeric softkbd display +// +// Input: None +// +// Output: INT32 +// +//---------------------------------------------------------------------------- +// +VOID TSENumericSoftKbdExit (VOID) +{ + if(NULL == TSESoftKbd_n) + return; + TSEStringReadLoopExitHook(); + TSESoftKbd_n->SetKbdLayout(TSESoftKbd_n, SOFT_KEY_LAYOUT_FULL_US_KEYBOARD); +} +#endif + +//EIP-88912 Starts +// +//---------------------------------------------------------------------------- +// Procedure: TSESetPwdKeyboardLayout +// +// Description: function to initialize TSESetKeyboardLayout +// +// Input: VOID +// +// Output: VOID +// +//---------------------------------------------------------------------------- +// +VOID TSESetPwdKeyboardLayout(VOID) +{ + EFI_STATUS Status = EFI_UNSUPPORTED; + + Status = gBS->LocateProtocol(&gSoftKbdGuid, NULL, &TSESoftKbd_n); + + if(EFI_ERROR( Status )) + { + TSESoftKbd_n=NULL; + } + if(NULL == TSESoftKbd_n) + return; + + if ( SETUP_STORE_KEYCODE_PASSWORD ) + TSESoftKbd_n->SetKbdLayout(TSESoftKbd_n, SOFT_KEY_LAYOUT_FULL_US_KEYBOARD ); + else + TSESoftKbd_n->SetKbdLayout(TSESoftKbd_n, SOFT_KEY_LAYOUT_PRINTABLE_KEYS ); +} + +// +//---------------------------------------------------------------------------- +// Procedure: TSEResetPwdKeyboardLayout +// +// Description: function to exit TSEResetKeyboardLayout and reset with default keyboard layout +// +// Input: VOID +// +// Output: VOID +// +//---------------------------------------------------------------------------- +// +VOID TSEResetPwdKeyboardLayout(VOID) +{ + if(NULL == TSESoftKbd_n) + return; + TSESoftKbd_n->SetKbdLayout(TSESoftKbd_n, SOFT_KEY_LAYOUT_FULL_US_KEYBOARD); +} +//EIP-88912 Ends + +//EIP-89272 Starts +// +//---------------------------------------------------------------------------- +// Procedure: TSEPrintableKeysSoftKbdInit +// +// Description: function to launch PrintableKeysSoftkbd layout +// +// Input: VOID +// +// Output: VOID +// +//---------------------------------------------------------------------------- +// +VOID TSEPrintableKeysSoftKbdInit(VOID) +{ + EFI_STATUS Status = EFI_UNSUPPORTED; + + Status = gBS->LocateProtocol(&gSoftKbdGuid, NULL, &TSESoftKbd_n); + + if(EFI_ERROR( Status )) + { + TSESoftKbd_n=NULL; + } + if(NULL == TSESoftKbd_n) + return; + + TSESoftKbd_n->SetKbdLayout(TSESoftKbd_n, SOFT_KEY_LAYOUT_PRINTABLE_KEYS); + TSEStringReadLoopEntryHook(); +} + +// +//---------------------------------------------------------------------------- +// Procedure: TSEPrintableKeysSoftKbdExit +// +// Description: function to exit PrintableKeysSoftkbd layout and reset with default keyboard layout +// +// Input: VOID +// +// Output: VOID +// +//---------------------------------------------------------------------------- +// +VOID TSEPrintableKeysSoftKbdExit(VOID) +{ + if(NULL == TSESoftKbd_n) + return; + TSEStringReadLoopExitHook(); + TSESoftKbd_n->SetKbdLayout(TSESoftKbd_n, SOFT_KEY_LAYOUT_FULL_US_KEYBOARD); +} + +//EIP-89272 Ends + +// +//---------------------------------------------------------------------------- +// Procedure: TSEIsMouseOnSoftkbd +// +// Description: Function to return whether MousePointer is on softkbd or not +// +// Input: None +// +// Output: TRUE/FALSE +// +//---------------------------------------------------------------------------- +// +BOOLEAN +TSEIsMouseOnSoftkbd(VOID) +{ + EFI_STATUS Status = EFI_UNSUPPORTED; + INT32 mouseX = 0, mouseY = 0, mouseZ = 0; + INT32 SoftKbdStartX = 0, SoftKbdStartY = 0, SoftKbdWidth = 0, SoftKbdHeight = 0; + INT32 SoftKbdPosX1 = 0, SoftKbdPosY1 = 0, SoftKbdPosX2 = 0, SoftKbdPosY2 = 0; + +#if AMITSE_SOFTKBD_SUPPORT + Status = gBS->LocateProtocol(&gSoftKbdGuid, NULL, &TSESoftKbd_n); + + if(EFI_ERROR( Status )) { + TSESoftKbd_n=NULL; + return FALSE; + } + + TSEMouse->GetCoordinates(TSEMouse,&mouseX, &mouseY, &mouseZ); + TSESoftKbd_n->GetPosition(TSESoftKbd_n, FALSE , &SoftKbdStartY, &SoftKbdStartX); + TSESoftKbd_n->GetDimension(TSESoftKbd_n, &SoftKbdWidth, &SoftKbdHeight); + + SoftKbdPosX1 = SoftKbdStartX - (INT32)HiiGetGlyphHeight(); + SoftKbdPosY1 = SoftKbdStartY - (INT32)HiiGetGlyphHeight(); + SoftKbdPosX2 = SoftKbdStartX + SoftKbdWidth; + SoftKbdPosY2 = SoftKbdStartY + SoftKbdHeight; + + if( ( (mouseX > (INT32)(SoftKbdStartX-HiiGetGlyphHeight()))&& (mouseY > (INT32)(SoftKbdStartY-(HiiGetGlyphHeight()))))&& + ( (mouseX < (INT32)(SoftKbdStartX+SoftKbdWidth))&& (mouseY < (INT32)(SoftKbdStartY + SoftKbdHeight)) ) + ) + { + return TRUE; + } + else + { + return FALSE; + } +#endif +return FALSE; +} + +#endif //AMITSE_SOFTKBD_SUPPORT +#endif //MINISETUP_MOUSE_SUPPORT + +//********************************************************************** +//********************************************************************** +//** ** +//** (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/EDK/MiniSetup/TseAdvanced/TseAdvanced.lib b/EDK/MiniSetup/TseAdvanced/TseAdvanced.lib new file mode 100644 index 0000000..e257ad3 Binary files /dev/null and b/EDK/MiniSetup/TseAdvanced/TseAdvanced.lib differ diff --git a/EDK/MiniSetup/TseAdvanced/TseAdvancedBin.cif b/EDK/MiniSetup/TseAdvanced/TseAdvancedBin.cif new file mode 100644 index 0000000..4cb3322 --- /dev/null +++ b/EDK/MiniSetup/TseAdvanced/TseAdvancedBin.cif @@ -0,0 +1,14 @@ + + name = "TSE Binary - Advanced TSE" + category = ModulePart + LocalRoot = "EDK\MiniSetup\TseAdvanced" + RefName = "TseAdvancedBin" +[files] +"TseAdvancedBin.sdl" +"TseAdvanced.lib" +"TseAdvancedx64.lib" +"TseAdvancedBin.mak" +"Mouse.c" +"AddDelBootDrvOpts.sd" +"AddDelBootDrvOpts.uni" + diff --git a/EDK/MiniSetup/TseAdvanced/TseAdvancedBin.mak b/EDK/MiniSetup/TseAdvanced/TseAdvancedBin.mak new file mode 100644 index 0000000..662ca74 --- /dev/null +++ b/EDK/MiniSetup/TseAdvanced/TseAdvancedBin.mak @@ -0,0 +1,141 @@ +##*****************************************************************## +##*****************************************************************## +##*****************************************************************## +##** **## +##** (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/TseAdvanced/TseAdvancedBin.mak $ +## +## $Author: Arunsb $ +## +## $Revision: 7 $ +## +## $Date: 10/18/12 5:45a $ +## +##*****************************************************************## +##*****************************************************************## +## Revision History +## ---------------- +## $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/TseAdvanced/TseAdvancedBin.mak $ +# +# 7 10/18/12 5:45a Arunsb +# Updated for 2.16.1235 QA submission +## +## 9 10/10/12 12:28p Arunsb +## Synched the source for v2.16.1232 backup with Aptio +# +# 6 2/03/12 2:31a Arunsb +# [TAG] EIP74967 +# [Category] Improvement +# [Description] Publishing add/del boot/driver option from TSE to +# setup. +# [Files] TseAdvancedBin.sdl, TseAdvancedBin.mak, TseAdvancedBin.cif, +# AddDelBootDrvOpts.sd and AddDelBootDrvOpts.uni +# +# 5 2/26/10 8:46p Madhans +# For Tse 2.01.1204. Refer Changelog.log file change history +## +## 7 2/23/10 8:33p Madhans +## For GTSE support. +## +## 6 2/19/10 8:06a Mallikarjunanv +## updated year in copyright message +## +## 5 2/15/10 10:06p Madhans +## -I flag not required +## +## 4 2/05/10 6:03p Madhans +## Mouse.c is moved to Binary to contol TSE_MOUSE_SUPPORT from binary +## +## 3 12/04/09 9:35a Mallikarjunanv +## EIP:31683 - To compatible with new WDK added $(LIBEXE) in place of LIB +## +## 2 6/24/09 6:33p Madhans +## Coding Standards. +# +# 2 6/24/09 11:56a Blaines +# Coding standard update +# +# 1 6/09/09 9:53a Madhans +# TSE 2.00.1201 +## +## 1 6/04/09 7:49p Madhans +## AMI TSE Advanced. +# +# 1 5/06/09 8:14p Madhans +# Tse 2.0 Bin Module Initial Checkin. +## +## 1 5/06/09 8:10p Madhans +## Tse 2.0 Binary Modules +## +## 1 12/18/08 7:59p Madhans +## Intial version of TSE Lite sources +## +## +##*****************************************************************## +##*****************************************************************## + +# MAK file for the eModule:TseLite + + +!if "$(TseLite_SUPPORT)" == "1" +$(BUILD_DIR)\FixedTseLiteLocal.lib : TseLiteLib TseFixedLiteLibBin +!else +$(BUILD_DIR)\FixedTseLiteLocal.lib : TseFixedLiteLibBin +!endif + +TseFixedLiteLibBin : $(TSELITELIB) + COPY /y $(TSELITELIB) $(BUILD_DIR)\FixedTseLiteLocal.lib +## Fix to EIP:31683 - To compatible with new WDK added $(LIBEXE) in place of LIB + $(LIBEXE) /REMOVE:Build\EDK\MiniSetup\TseLite\TseLitehelper.obj $(BUILD_DIR)\FixedTseLiteLocal.lib + +MINISETUP_INCLUDES = \ +!if "$(TSE_BOARD_SOURCE_SUPPORT)" == "1" + -I $(TSE_BOARD_DIR)\ +!endif + -I $(TSEBIN_DIR) \ + -I $(TSEBIN_DIR)\Inc \ + -I $(PROJECT_DIR)\Include\Protocol \ + -I $(PROJECT_DIR) \ + -I $(PROJECT_DIR)\Include \ + -I $(BUILD_DIR) \ + -I $(TSE_STYLE_DIR) + +All: $(BUILD_DIR)\$(TSE_ADVANCED_DIR)\mouse.obj + +$(BUILD_DIR)\$(TSE_ADVANCED_DIR)\mouse.obj: $(PROJECT_DIR)\$(TSE_ADVANCED_DIR)\mouse.c + if not exist $(BUILD_DIR)\$(TSE_ADVANCED_DIR) mkdir $(BUILD_DIR)\$(TSE_ADVANCED_DIR) + $(CC) $(CFLAGS) $(MINISETUP_INCLUDES) /DTSE_FOR_APTIO_4_50 /Fo$(BUILD_DIR)\$(TSE_ADVANCED_DIR)\mouse.obj $(PROJECT_DIR)\$(TSE_ADVANCED_DIR)\mouse.c + +# MAK file for the eModule:MiniSetupBin +AMITSEBin: $(BUILD_DIR)\$(TSE_ADVANCED_DIR)\mouse.obj + +#EIP74967 add/del boot option and driver option +SetupSdbs : $(BUILD_DIR)\AddDelBootDrvOpts.sdb + +$(BUILD_DIR)\AddDelBootDrvOpts.sdb : $(TSE_ADVANCED_DIR)\AddDelBootDrvOpts.sd $(TSE_ADVANCED_DIR)\AddDelBootDrvOpts.uni + $(STRGATHER) -i INCLUDE -parse -newdb -db $(BUILD_DIR)\AddDelBootDrvOpts.sdb $(TSE_ADVANCED_DIR)\AddDelBootDrvOpts.uni + $(STRGATHER) -scan -db $(BUILD_DIR)\AddDelBootDrvOpts.sdb -od $(BUILD_DIR)\AddDelBootDrvOpts.sdb $(TSE_ADVANCED_DIR)\AddDelBootDrvOpts.sd + +##*****************************************************************## +##*****************************************************************## +##** **## +##** (C)Copyright 2010, American Megatrends, Inc. **## +##** **## +##** All Rights Reserved. **## +##** **## +##** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **## +##** **## +##** Phone (770)-246-8600 **## +##** **## +##*****************************************************************## +##*****************************************************************## diff --git a/EDK/MiniSetup/TseAdvanced/TseAdvancedBin.sdl b/EDK/MiniSetup/TseAdvanced/TseAdvancedBin.sdl new file mode 100644 index 0000000..125fe9f --- /dev/null +++ b/EDK/MiniSetup/TseAdvanced/TseAdvancedBin.sdl @@ -0,0 +1,45 @@ +TOKEN + Name = "TSE_ADVANCED_BIN_SUPPORT" + Value = "1" + Help = "Main switch to enable Ezport Style in TSE" + TokenType = Boolean + TargetEQU = Yes + TargetMAK = Yes + TargetH = Yes + Master = Yes +End + +PATH + Name = "TSE_ADVANCED_DIR" +End + +MODULE + Help = "Includes TseAdvancedBin.mak to Project" + File = "TseAdvancedbin.mak" +End + +ELINK + Name = "$(TSE_ADVANCED_DIR)\TseAdvanced$(ARCH).lib" + Parent = "MINISETUPLIB" + Priority = 50 + InvokeOrder = AfterParent +End + +ELINK + Name = "$(BUILD_DIR)\FixedTseLiteLocal.lib" + Parent = "MINISETUPLIB" + Priority = 40 + InvokeOrder = AfterParent +End + +ELINK + Name = "$(TSE_ADVANCED_DIR)\AddDelBootDrvOpts.sd" + Parent = "SETUP_DEFINITIONS" + InvokeOrder = AfterParent +End + +ELINK + Name = "$(BUILD_DIR)\AddDelBootDrvOpts.sdb" + Parent = "SETUP_SDBS" + InvokeOrder = AfterParent +End \ No newline at end of file diff --git a/EDK/MiniSetup/TseAdvanced/TseAdvancedx64.lib b/EDK/MiniSetup/TseAdvanced/TseAdvancedx64.lib new file mode 100644 index 0000000..3a7441d Binary files /dev/null and b/EDK/MiniSetup/TseAdvanced/TseAdvancedx64.lib differ diff --git a/EDK/MiniSetup/TseLite/StyleHook/StyleHook.lib b/EDK/MiniSetup/TseLite/StyleHook/StyleHook.lib new file mode 100644 index 0000000..f8c08ac Binary files /dev/null and b/EDK/MiniSetup/TseLite/StyleHook/StyleHook.lib differ diff --git a/EDK/MiniSetup/TseLite/StyleHook/StyleHookx64.lib b/EDK/MiniSetup/TseLite/StyleHook/StyleHookx64.lib new file mode 100644 index 0000000..00dacb2 Binary files /dev/null and b/EDK/MiniSetup/TseLite/StyleHook/StyleHookx64.lib differ diff --git a/EDK/MiniSetup/TseLite/TseLiteBin.cif b/EDK/MiniSetup/TseLite/TseLiteBin.cif new file mode 100644 index 0000000..1c222cb --- /dev/null +++ b/EDK/MiniSetup/TseLite/TseLiteBin.cif @@ -0,0 +1,12 @@ + + name = "TSE Binary - TSE Lite" + category = ModulePart + LocalRoot = "EDK\MiniSetup\TseLite" + RefName = "TseLiteBin" +[files] +"TseLiteBin.sdl" +"TseLiteLocal.lib" +"TseLiteLocalx64.lib" +"StyleHook\StyleHook.lib" +"StyleHook\StyleHookx64.lib" + diff --git a/EDK/MiniSetup/TseLite/TseLiteBin.sdl b/EDK/MiniSetup/TseLite/TseLiteBin.sdl new file mode 100644 index 0000000..b646d33 --- /dev/null +++ b/EDK/MiniSetup/TseLite/TseLiteBin.sdl @@ -0,0 +1,36 @@ +TOKEN + Name = "TseLite_Bin_SUPPORT" + Value = "1" + Help = "Main switch to enable TseLite sources support in Project" + TokenType = Boolean + TargetEQU = Yes + TargetMAK = Yes + Master = Yes +End + +PATH + Name = "TSELITESRC_DIR" +End + +ELINK + Name = "$(TSELITESRC_DIR)\TseLiteLocal$(ARCH).lib" + Parent = "TSELITELIB" + InvokeOrder = AfterParent +End + +ELINK + Name = "$(TSELITESRC_DIR)\StyleHook\StyleHook$(ARCH).lib" + Parent = "MINISETUPLIB" + Priority = 100 + InvokeOrder = AfterParent +End + +ELINK + Name = "HOTKEY_LIST" + InvokeOrder = ReplaceParent +End + +ELINK + Name = "HOTCLICK_LIST" + InvokeOrder = ReplaceParent +End \ No newline at end of file diff --git a/EDK/MiniSetup/TseLite/TseLiteLocal.lib b/EDK/MiniSetup/TseLite/TseLiteLocal.lib new file mode 100644 index 0000000..64e8f96 Binary files /dev/null and b/EDK/MiniSetup/TseLite/TseLiteLocal.lib differ diff --git a/EDK/MiniSetup/TseLite/TseLiteLocalx64.lib b/EDK/MiniSetup/TseLite/TseLiteLocalx64.lib new file mode 100644 index 0000000..4e17902 Binary files /dev/null and b/EDK/MiniSetup/TseLite/TseLiteLocalx64.lib differ diff --git a/EDK/MiniSetup/TseOEM/TseOEM.C b/EDK/MiniSetup/TseOEM/TseOEM.C new file mode 100644 index 0000000..25443d2 --- /dev/null +++ b/EDK/MiniSetup/TseOEM/TseOEM.C @@ -0,0 +1,96 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (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/TseOEM/TseOEM.C $ +// +// $Author: Arunsb $ +// +// $Revision: 4 $ +// +// $Date: 10/18/12 6:34a $ +// +//*****************************************************************// +//*****************************************************************// +// Revision History +// ---------------- +// $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/TseOEM/TseOEM.C $ +// +// 4 10/18/12 6:34a Arunsb +// Updated for 2.16.1235 QA submission +// +// 4 10/10/12 12:31p 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 8:09a Mallikarjunanv +// updated year in copyright message +// +// 2 6/24/09 6:33p Madhans +// Coding Standards. +// +// 2 6/24/09 11:56a Blaines +// Coding standard update +// +// 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 11:08p Madhans +// Tse 2.0 Code complete Checkin. +// +// 1 4/28/09 10:27p Madhans +// Tse 2.0 Code complete Checkin. +// +// +//*****************************************************************// +//*****************************************************************// +#include "token.h" +#include + +// +//---------------------------------------------------------------------------- +// Procedure: OEMEmpty +// +// Description: Empty Template +// +// Input: None +// +// Output: None +// +//---------------------------------------------------------------------------- +// +VOID OEMEmpty(VOID) +{ + +} + + +//********************************************************************** +//********************************************************************** +//** ** +//** (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/EDK/MiniSetup/TseOEM/TseOEM.cif b/EDK/MiniSetup/TseOEM/TseOEM.cif new file mode 100644 index 0000000..595b79c --- /dev/null +++ b/EDK/MiniSetup/TseOEM/TseOEM.cif @@ -0,0 +1,10 @@ + + name = "TSE Sources - OEM" + category = ModulePart + LocalRoot = "EDK\MiniSetup\TseOEM" + RefName = "TseOEM" +[files] +"TseOEM.sdl" +"TseOEM.mak" +"TseOEM.C" + diff --git a/EDK/MiniSetup/TseOEM/TseOEM.mak b/EDK/MiniSetup/TseOEM/TseOEM.mak new file mode 100644 index 0000000..358e753 --- /dev/null +++ b/EDK/MiniSetup/TseOEM/TseOEM.mak @@ -0,0 +1,113 @@ +##*****************************************************************## +##*****************************************************************## +##*****************************************************************## +##** **## +##** (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/TseOEM/TseOEM.mak $ +## +## $Author: Arunsb $ +## +## $Revision: 5 $ +## +## $Date: 10/18/12 6:34a $ +## +##*****************************************************************## +##*****************************************************************## +## Revision History +## ---------------- +## $Log: /Alaska/BIN/Modules/AMITSE2_0/AMITSE/TseOEM/TseOEM.mak $ +# +# 5 10/18/12 6:34a Arunsb +# Updated for 2.16.1235 QA submission +## +## 5 10/10/12 12:31p Arunsb +## Synched the source for v2.16.1232, backup with Aptio +# +# 4 2/19/10 12:59p Madhans +# Updated for TSE 2.01. Refer Changelog.log for File change history. +## +## 4 2/19/10 8:09a Mallikarjunanv +## updated year in copyright message +## +## 3 6/24/09 6:33p Madhans +## Coding Standards. +# +# 2 6/24/09 11:56a Blaines +# Coding standard update +# +# 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 11:08p Madhans +# Tse 2.0 Code complete Checkin. +## +## 1 4/28/09 10:27p Madhans +## Tse 2.0 Code complete Checkin. +## +## +##*****************************************************************## +##*****************************************************************## + +# MAK file for the eModule:TseOEM + +TSEOEM_INCLUDES = \ + -I $(UEFISRC_DIR) \ + -I $(TSE_STYLE_DIR) \ + -I $(TSESRC_DIR) \ + -I $(TSESRC_DIR)\AMILOGO \ + -I $(TSELITESRC_DIR) \ + -I $(TSEBIN_DIR) \ + -I $(TSEBIN_DIR)\Inc \ +!if "$(TSE_BOARD_SOURCE_SUPPORT)" == "1" + -I $(TSE_BOARD_DIR)\ +!endif + -I $(PROJECT_DIR)\Include\Protocol \ + -I $(PROJECT_DIR) \ + -I $(PROJECT_DIR)\Include \ + -I $(BUILD_DIR) + +EDK : TseOEMLib + +$(BUILD_DIR)\TseOEMLocal.lib : TseOEMLib + +TseOEMLib : $(BUILD_DIR)\TseOEM.mak TseOEMLibBin + +$(BUILD_DIR)\TseOEM.mak : $(TSEOEMSRC_DIR)\$(@B).cif $(TSEOEMSRC_DIR)\$(@B).mak $(BUILD_RULES) + $(CIF2MAK) $(TSEOEMSRC_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS) + +TseOEMLibBin : + $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\ + /f $(BUILD_DIR)\TseOEM.mak all\ + "MY_INCLUDES=$(TSEOEM_INCLUDES)"\ + "UNI_INCLUDE_PATH=$(TSEBIN_DIR)"\ + TYPE=LIBRARY \ + "EXT_HEADERS=$(BUILD_DIR)\token.h"\ + LIBRARY_NAME=$(BUILD_DIR)\TseOEMLocal.lib\ + "CFLAGS=$(CFLAGS) /DTSE_FOR_APTIO_4_50" + +##*****************************************************************## +##*****************************************************************## +##** **## +##** (C)Copyright 2010, American Megatrends, Inc. **## +##** **## +##** All Rights Reserved. **## +##** **## +##** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **## +##** **## +##** Phone (770)-246-8600 **## +##** **## +##*****************************************************************## +##*****************************************************************## diff --git a/EDK/MiniSetup/TseOEM/TseOEM.sdl b/EDK/MiniSetup/TseOEM/TseOEM.sdl new file mode 100644 index 0000000..57b63d9 --- /dev/null +++ b/EDK/MiniSetup/TseOEM/TseOEM.sdl @@ -0,0 +1,26 @@ +TOKEN + Name = "TseOEM_SUPPORT" + Value = "1" + Help = "Main switch to enable TseLite sources support in Project" + TokenType = Boolean + TargetEQU = Yes + TargetMAK = Yes + Master = Yes +End + +PATH + Name = "TSEOEMSRC_DIR" +End + +MODULE + Help = "Includes TseOEM.mak to Project" + File = "TseOEM.mak" +End + +ELINK + Name = "$(BUILD_DIR)\TseOEMLocal.lib" + Parent = "MINISETUPLIB" + Priority = 60 + InvokeOrder = AfterParent +End + diff --git a/EDK/MiniSetup/uefi2.0/Uefi20Bin.cif b/EDK/MiniSetup/uefi2.0/Uefi20Bin.cif new file mode 100644 index 0000000..f051e38 --- /dev/null +++ b/EDK/MiniSetup/uefi2.0/Uefi20Bin.cif @@ -0,0 +1,10 @@ + + name = "TSE Binary - UEFI2.0" + category = ModulePart + LocalRoot = "EDK\MiniSetup\uefi2.0" + RefName = "Uefi20Bin" +[files] +"uefi20Bin.sdl" +"Uefi20Local.lib" +"Uefi20Localx64.lib" + diff --git a/EDK/MiniSetup/uefi2.0/Uefi20Local.lib b/EDK/MiniSetup/uefi2.0/Uefi20Local.lib new file mode 100644 index 0000000..a3bd712 Binary files /dev/null and b/EDK/MiniSetup/uefi2.0/Uefi20Local.lib differ diff --git a/EDK/MiniSetup/uefi2.0/Uefi20Localx64.lib b/EDK/MiniSetup/uefi2.0/Uefi20Localx64.lib new file mode 100644 index 0000000..f561964 Binary files /dev/null and b/EDK/MiniSetup/uefi2.0/Uefi20Localx64.lib differ diff --git a/EDK/MiniSetup/uefi2.0/uefi20Bin.sdl b/EDK/MiniSetup/uefi2.0/uefi20Bin.sdl new file mode 100644 index 0000000..4918dbe --- /dev/null +++ b/EDK/MiniSetup/uefi2.0/uefi20Bin.sdl @@ -0,0 +1,21 @@ +TOKEN + Name = "UEFI_2_0_BIN_SUPPORT" + Value = "1" + Help = "Main switch to enable UEFI 2.0 sources support in Project" + TokenType = Boolean + TargetEQU = Yes + TargetMAK = Yes + Master = Yes + Token = "EFI_SPECIFICATION_VERSION" "<=" "0x20000" +End + +PATH + Name = "UEFISRC_DIR" +End + +ELINK + Name = "$(UEFISRC_DIR)\Uefi20Local$(ARCH).lib" + Parent = "MINISETUPLIB" + Priority = 20 + InvokeOrder = AfterParent +End diff --git a/EDK/MiniSetup/uefi2.1/Uefi21Bin.cif b/EDK/MiniSetup/uefi2.1/Uefi21Bin.cif new file mode 100644 index 0000000..7396b7b --- /dev/null +++ b/EDK/MiniSetup/uefi2.1/Uefi21Bin.cif @@ -0,0 +1,10 @@ + + name = "TSE Binary - UEFI2.1" + category = ModulePart + LocalRoot = "EDK\MiniSetup\uefi2.1" + RefName = "Uefi21Bin" +[files] +"uefi21Bin.sdl" +"Uefi21Local.lib" +"Uefi21Localx64.lib" + diff --git a/EDK/MiniSetup/uefi2.1/Uefi21Local.lib b/EDK/MiniSetup/uefi2.1/Uefi21Local.lib new file mode 100644 index 0000000..20c7ff8 Binary files /dev/null and b/EDK/MiniSetup/uefi2.1/Uefi21Local.lib differ diff --git a/EDK/MiniSetup/uefi2.1/Uefi21Localx64.lib b/EDK/MiniSetup/uefi2.1/Uefi21Localx64.lib new file mode 100644 index 0000000..bde83ac Binary files /dev/null and b/EDK/MiniSetup/uefi2.1/Uefi21Localx64.lib differ diff --git a/EDK/MiniSetup/uefi2.1/uefi21Bin.sdl b/EDK/MiniSetup/uefi2.1/uefi21Bin.sdl new file mode 100644 index 0000000..b73b2f9 --- /dev/null +++ b/EDK/MiniSetup/uefi2.1/uefi21Bin.sdl @@ -0,0 +1,38 @@ +TOKEN + Name = "UEFI_2_1_BIN_SUPPORT" + Value = "1" + Help = "Main switch to enable UEFI 2.1 binary support in Project" + TokenType = Boolean + TargetEQU = Yes + TargetMAK = Yes + Master = Yes + Token = "EFI_SPECIFICATION_VERSION" ">" "0x20000" +End + +TOKEN + Name = "UEFI_2_1_SUPPORT" + Value = "1" + TokenType = Boolean + TargetEQU = Yes + TargetMAK = Yes + TargetH = Yes +End + +TOKEN + Name = "SETUP_SUPPORT_PLATFORM_LANG_VAR" + Value = "1" + Help = "Set to enable PlatformLang and PlatformLangCode Vars." + TokenType = Boolean + TargetH = Yes +End + +PATH + Name = "UEFISRC_DIR" +End + +ELINK + Name = "$(UEFISRC_DIR)\Uefi21Local$(ARCH).lib" + Parent = "MINISETUPLIB" + Priority = 20 + InvokeOrder = AfterParent +End \ No newline at end of file -- cgit v1.2.3