diff options
author | raywu <raywu0301@gmail.com> | 2018-06-15 00:00:50 +0800 |
---|---|---|
committer | raywu <raywu0301@gmail.com> | 2018-06-15 00:00:50 +0800 |
commit | b7c51c9cf4864df6aabb99a1ae843becd577237c (patch) | |
tree | eebe9b0d0ca03062955223097e57da84dd618b9a /Board/EM/RapidStartWrapper/RapidStartSetup | |
download | zprj-master.tar.xz |
Diffstat (limited to 'Board/EM/RapidStartWrapper/RapidStartSetup')
-rw-r--r-- | Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.c | 248 | ||||
-rw-r--r-- | Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.cif | 13 | ||||
-rw-r--r-- | Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.h | 76 | ||||
-rw-r--r-- | Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.mak | 97 | ||||
-rw-r--r-- | Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.sd | 367 | ||||
-rw-r--r-- | Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.sdl | 161 | ||||
-rw-r--r-- | Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.uni | bin | 0 -> 12256 bytes |
7 files changed, 962 insertions, 0 deletions
diff --git a/Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.c b/Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.c new file mode 100644 index 0000000..f8c8172 --- /dev/null +++ b/Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.c @@ -0,0 +1,248 @@ +//********************************************************************** +//********************************************************************** +//** ** +//** (C)Copyright 1985-2012, American Megatrends, Inc. ** +//** ** +//** All Rights Reserved. ** +//** ** +//** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 ** +//** ** +//** Phone: (770)-246-8600 ** +//** ** +//********************************************************************** +//********************************************************************** + +//********************************************************************** +// $Header: /Alaska/SOURCE/Modules/Intel Fast Flash Standby/iRST_SharkBay/RapidStartWrapper/RapidStartSetup/RapidStartSetup.c 4 7/16/14 5:14a Joshchou $ +// +// $Revision: 4 $ +// +// $Date: 7/16/14 5:14a $ +//********************************************************************** +// Revision History +// ---------------- +// $Log: /Alaska/SOURCE/Modules/Intel Fast Flash Standby/iRST_SharkBay/RapidStartWrapper/RapidStartSetup/RapidStartSetup.c $ +// +// 4 7/16/14 5:14a Joshchou +// [TAG] EIP177828 +// [Category] Bug Fix +// [Severity] Minor +// [Symptom] Restore Defaults on setup cannot set the SATA mode to +// default. +// [RootCause] When action == EFI_BROWSER_ACTION_DEFAULT_STANDARD. +// Need to return unsupported. +// [Solution] Add the judgement when action == +// EFI_BROWSER_ACTION_DEFAULT_STANDARD. +// +// 3 7/11/14 4:08a Joshchou +// [TAG] EIP176979 +// [Category] Improvement +// [Description] Change "#else if" to "#elif". +// +// 2 1/13/13 7:48a Bensonlai +// [TAG] EIPNone +// [Category] Improvement +// [Description] Disabling the RapidStart while STAT mode in the IDE +// mode +// [Files] RapidStartDxePolicyInit.c, RapidStartDxePolicyInit.h, +// RapidStartDxePolicyInit.mak, RapidStartSetup.c, RapidStartSetup.mak, +// RapidStartSetup.sd, RapidStartSetup.sdl +// +// 1 10/15/12 4:42a Bensonlai +// [TAG] None +// [Category] Improvement +// [Description] [Category] Improvement +// [Severity] Important +// [Description] Rename all IFFS sting to Rapid Start. +// [Files] Board\EM\RapidStartWrapper\*.*, ReferenceCode\RapidStart\*.* +// [Files] RapidStartSetup.cif +// RapidStartSetup.sdl +// RapidStartSetup.mak +// RapidStartSetup.sd +// RapidStartSetup.uni +// RapidStartSetup.c +// RapidStartSetup.h +// RapidStartSetupReset.c +// +//********************************************************************** +//<AMI_FHDR_START> +// +// Name: RapidStartSetup.c +// +// Description: Create the setup item for RapidStart. +// +//<AMI_FHDR_END> +//********************************************************************** + +#include <token.h> +#include <Setup.h> +#include <SetupStrTokens.h> +#include "RapidStartSetup.h" +#include <AmiCspLib.h> +#include <AmiDxeLib.h> +#if EFI_SPECIFICATION_VERSION>0x20000 +#include <Protocol\HiiDatabase.h> +#include <Protocol\HiiString.h> +#else +#include <Protocol/Hii.h> +#endif + +#if defined RAPID_START_PARTITION_DETECT_MODE && RAPID_START_PARTITION_DETECT_MODE == 1 + +#define RAPID_START_PARTITION_STATUS_PROTOCOL_GUID \ + { \ + 0x65639144, 0xd492, 0x4328, 0xa4, 0x98, 0xf4, 0xb5, 0x54, 0x5e, 0x4a, 0x30 \ + } + +#else + +#define RAPID_START_PERSISTENT_DATA_GUID \ + { \ + 0xf9f0b131, 0xf346, 0x4f16, 0x80, 0xdd, 0xf9, 0x41, 0x07, 0x2b, 0x3a, 0x7d \ + } + +EFI_GUID gRapidStartPersistentDataGuid = RAPID_START_PERSISTENT_DATA_GUID; + +typedef struct { + UINT32 RapidStartMem; + UINT32 MmioSpace; + UINT32 RapidStartGlobalNvsPtr; + UINT32 StoreSectors; + UINT64 StoreLbaAddr; + UINT8 StoreSataPort; + UINT8 SataPortConfiguration; + UINT32 Tolm; + UINT64 Tohm; + UINT64 TotalMem; + UINT32 RapidStartMemSize; + UINT32 ZeroBitmapSize; + UINT32 WlanMmioSpace; + UINT64 SystemMemoryLengthBelow4GB; + UINT64 SystemMemoryLengthAbove4GB; + UINT64 AcpiReservedMemoryBase; + UINT32 AcpiReservedMemorySize; + UINT32 Crc32RecordSize; + UINT64 RapidStartStoreUid; + UINT32 ActivePageThresholdSizeInSector; +} RAPID_START_PERSISTENT_DATA; + +#endif + + +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// +// Procedure: InitRapidStartInfo +// +// Description: Initializes Intel Rapid Start Technology (RapidStart) Setup String +// +// Input: HiiHandle - Handle to HII database +// Class - Indicates the setup class +// +// Output: None +// +// Notes: PORTING REQUIRED +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> + +VOID +InitRapidStartInfo( + IN EFI_HII_HANDLE HiiHandle, + IN UINT16 Class +) +{ + return; +} + +EFI_STATUS +EFIAPI +RapidStartMenuEntry ( + IN EFI_HII_HANDLE HiiHandle, + IN UINT16 Class, + IN UINT16 SubClass, + IN UINT16 Key +) +{ + EFI_STATUS Status; + CALLBACK_PARAMETERS *pCallbackData = NULL; + SETUP_DATA *SetupData = NULL; + UINTN BufferSize = sizeof(SETUP_DATA); + EFI_GUID SetupGuid = SETUP_GUID; +#if defined RAPID_START_PARTITION_DETECT_MODE && RAPID_START_PARTITION_DETECT_MODE == 1 + VOID *Empty; + EFI_GUID RapidStartPartitionProtocolGuid = RAPID_START_PARTITION_STATUS_PROTOCOL_GUID; +#else + UINTN VariableSize = sizeof(RAPID_START_PERSISTENT_DATA); + RAPID_START_PERSISTENT_DATA RapidStartData; +#endif + PCH_SERIES PchSeries = GetPchSeries();; + + pCallbackData = GetCallbackParameters(); + if (pCallbackData == NULL) return EFI_SUCCESS; + + if(pCallbackData->Action == EFI_BROWSER_ACTION_DEFAULT_STANDARD) return EFI_UNSUPPORTED; + + if (pCallbackData->Action == EFI_BROWSER_ACTION_FORM_OPEN) { +#if defined RAPID_START_PARTITION_DETECT_MODE && RAPID_START_PARTITION_DETECT_MODE == 1 + Status = pBS->LocateProtocol ( &RapidStartPartitionProtocolGuid, + NULL, + &Empty ); +#else + Status = pRS->GetVariable ( L"RapidStartData", + &gRapidStartPersistentDataGuid, + NULL, + &VariableSize, + &RapidStartData ); +#endif + if (!EFI_ERROR(Status)) { + // If RapidStart Persistent Data or RAPID_START_PARTITION_STATUS_PROTOCOL_GUID is exist, + // hidng the warning message. + InitString( HiiHandle, \ + STRING_TOKEN(STR_RAPIDSTART_PAR_STATUS_PROMPT), \ + L""); + } + } + + // Check callback action +#if ((TSE_BUILD >= 0x1224) && (EFI_SPECIFICATION_VERSION >= 0x2000A)) + if (pCallbackData->Action != EFI_BROWSER_ACTION_CHANGED) + return EFI_SUCCESS; +#elif ((TSE_BUILD > 0x1208) && (EFI_SPECIFICATION_VERSION >= 0x2000A)) + if (pCallbackData->Action != EFI_BROWSER_ACTION_CHANGING) + return EFI_SUCCESS; +#endif + + Status = pBS->AllocatePool(EfiBootServicesData, BufferSize, &SetupData); + + Status = HiiLibGetBrowserData( &BufferSize, SetupData, &SetupGuid, L"Setup" ); + + if (PchSeries == PchLp) { + if (SetupData->ULTSataInterfaceMode == 0) { + SetupData->RapidStartEnabled = 0; + } + } else { + if (SetupData->SataInterfaceMode == 0) { + SetupData->RapidStartEnabled = 0; + } + } + + Status = HiiLibSetBrowserData( BufferSize, SetupData, &SetupGuid, L"Setup" ); + + pBS->FreePool(SetupData); + + + return EFI_SUCCESS; +} +//********************************************************************** +//********************************************************************** +//** ** +//** (C)Copyright 1985-2012, American Megatrends, Inc. ** +//** ** +//** All Rights Reserved. ** +//** ** +//** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 ** +//** ** +//** Phone: (770)-246-8600 ** +//** ** +//********************************************************************** +//********************************************************************** diff --git a/Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.cif b/Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.cif new file mode 100644 index 0000000..38f3760 --- /dev/null +++ b/Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.cif @@ -0,0 +1,13 @@ +<component> + name = "RapidStartSetup" + category = ModulePart + LocalRoot = "Board\EM\RapidStartWrapper\RapidStartSetup" + RefName = "RapidStartSetup" +[files] +"RapidStartSetup.sdl" +"RapidStartSetup.mak" +"RapidStartSetup.sd" +"RapidStartSetup.uni" +"RapidStartSetup.c" +"RapidStartSetup.h" +<endComponent> diff --git a/Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.h b/Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.h new file mode 100644 index 0000000..bc9b688 --- /dev/null +++ b/Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.h @@ -0,0 +1,76 @@ +//********************************************************************** +//********************************************************************** +//** ** +//** (C)Copyright 1985-2012, American Megatrends, Inc. ** +//** ** +//** All Rights Reserved. ** +//** ** +//** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 ** +//** ** +//** Phone: (770)-246-8600 ** +//** ** +//********************************************************************** +//********************************************************************** + +//********************************************************************** +// $Header: /Alaska/SOURCE/Modules/Intel Fast Flash Standby/iRST_SharkBay/RapidStartWrapper/RapidStartSetup/RapidStartSetup.h 1 10/15/12 4:42a Bensonlai $ +// +// $Revision: 1 $ +// +// $Date: 10/15/12 4:42a $ +//********************************************************************** +// Revision History +// ---------------- +// $Log: /Alaska/SOURCE/Modules/Intel Fast Flash Standby/iRST_SharkBay/RapidStartWrapper/RapidStartSetup/RapidStartSetup.h $ +// +// 1 10/15/12 4:42a Bensonlai +// [TAG] None +// [Category] Improvement +// [Description] [Category] Improvement +// [Severity] Important +// [Description] Rename all IFFS sting to Rapid Start. +// [Files] Board\EM\RapidStartWrapper\*.*, ReferenceCode\RapidStart\*.* +// [Files] RapidStartSetup.cif +// RapidStartSetup.sdl +// RapidStartSetup.mak +// RapidStartSetup.sd +// RapidStartSetup.uni +// RapidStartSetup.c +// RapidStartSetup.h +// RapidStartSetupReset.c +// +//********************************************************************** +//<AMI_FHDR_START> +// +// Name: RapidStartSetup.h +// +// Description: Header file for RapidStart. +// +//<AMI_FHDR_END> +//********************************************************************** + +#ifndef __RapidStart_SETUP_H__ +#define __RapidStart_SETUP_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/****** DO NOT WRITE BELOW THIS LINE *******/ +#ifdef __cplusplus +} +#endif +#endif +//************************************************************************* +//************************************************************************* +//** ** +//** (C)Copyright 1985-2012, American Megatrends, Inc. ** +//** ** +//** All Rights Reserved. ** +//** ** +//** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 ** +//** ** +//** Phone: (770)-246-8600 ** +//** ** +//************************************************************************* +//************************************************************************* diff --git a/Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.mak b/Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.mak new file mode 100644 index 0000000..2e563d7 --- /dev/null +++ b/Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.mak @@ -0,0 +1,97 @@ +#********************************************************************** +#********************************************************************** +#** ** +#** (C)Copyright 1985-2012, American Megatrends, Inc. ** +#** ** +#** All Rights Reserved. ** +#** ** +#** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 ** +#** ** +#** Phone: (770)-246-8600 ** +#** ** +#********************************************************************** +#********************************************************************** + +#********************************************************************** +# $Header: /Alaska/SOURCE/Modules/Intel Fast Flash Standby/iRST_SharkBay/RapidStartWrapper/RapidStartSetup/RapidStartSetup.mak 3 5/03/13 2:53a Bensonlai $ +# +# $Revision: 3 $ +# +# $Date: 5/03/13 2:53a $ +#********************************************************************** +# Revision History +# ---------------- +# $Log: /Alaska/SOURCE/Modules/Intel Fast Flash Standby/iRST_SharkBay/RapidStartWrapper/RapidStartSetup/RapidStartSetup.mak $ +# +# 3 5/03/13 2:53a Bensonlai +# [TAG] None +# [Category] Improvement +# [Description] After changed the iRST status, we don't have to do a +# cold reset. +# +# 2 1/13/13 7:49a Bensonlai +# [TAG] EIPNone +# [Category] Improvement +# [Description] Disabling the RapidStart while STAT mode in the IDE +# mode +# [Files] RapidStartDxePolicyInit.c, RapidStartDxePolicyInit.h, +# RapidStartDxePolicyInit.mak, RapidStartSetup.c, RapidStartSetup.mak, +# RapidStartSetup.sd, RapidStartSetup.sdl +# +# 1 10/15/12 4:42a Bensonlai +# [TAG] None +# [Category] Improvement +# [Description] [Category] Improvement +# [Severity] Important +# [Description] Rename all IFFS sting to Rapid Start. +# [Files] Board\EM\RapidStartWrapper\*.*, ReferenceCode\RapidStart\*.* +# [Files] RapidStartSetup.cif +# RapidStartSetup.sdl +# RapidStartSetup.mak +# RapidStartSetup.sd +# RapidStartSetup.uni +# RapidStartSetup.c +# RapidStartSetup.h +# RapidStartSetupReset.c +# +#********************************************************************** +#<AMI_FHDR_START> +# +# Name: RapidStartSetup.mak +# +# Description: Component description file for the RapidStart +# +#<AMI_FHDR_END> +#********************************************************************** + +All : RapidStartSetup + +RapidStartSetup : $(BUILD_DIR)\RapidStartSetup.mak + +SetupSdbs : $(BUILD_DIR)\RapidStartSetup.sdb + +$(BUILD_DIR)\RapidStartSetup.sdb : $(RapidStartSetup_DIR)\$(@B).sd $(RapidStartSetup_DIR)\$(@B).uni + $(STRGATHER) -i INCLUDE -parse -newdb -db $(BUILD_DIR)\$(@B).sdb $(RapidStartSetup_DIR)\$(@B).uni + $(STRGATHER) -scan -db $(BUILD_DIR)\$(@B).sdb -od $(BUILD_DIR)\$(@B).sdb $(RapidStartSetup_DIR)\$(@B).sd + +$(BUILD_DIR)\RapidStartSetup.mak : $(RapidStartSetup_DIR)\$(@B).cif $(RapidStartSetup_DIR)\$(@B).mak $(BUILD_RULES) + $(CIF2MAK) $(RapidStartSetup_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS) + +SetupBin : $(BUILD_DIR)\RapidStartSetup.obj + +$(BUILD_DIR)\RapidStartSetup.obj : $(PROJECT_DIR)\$(RapidStartSetup_DIR)\RapidStartSetup.c $(BUILD_DIR)\SetupStrTokens.h $(AMICSPLib) + $(CC) $(CFLAGS) $(INTEL_PCH_INCLUDES) /I$(RapidStartInclude_DIR) /Fo$(BUILD_DIR)\ $(RapidStartSetup_DIR)\RapidStartSetup.c + +#************************************************************************* +#************************************************************************* +#** ** +#** (C)Copyright 1985-2012, American Megatrends, Inc. ** +#** ** +#** All Rights Reserved. ** +#** ** +#** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 ** +#** ** +#** Phone: (770)-246-8600 ** +#** ** +#************************************************************************* +#************************************************************************* diff --git a/Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.sd b/Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.sd new file mode 100644 index 0000000..751d63f --- /dev/null +++ b/Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.sd @@ -0,0 +1,367 @@ +//********************************************************************** +//********************************************************************** +//** ** +//** (C)Copyright 1985-2012, American Megatrends, Inc. ** +//** ** +//** All Rights Reserved. ** +//** ** +//** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 ** +//** ** +//** Phone: (770)-246-8600 ** +//** ** +//********************************************************************** +//********************************************************************** + +//********************************************************************** +// $Header: /Alaska/SOURCE/Modules/Intel Fast Flash Standby/iRST_SharkBay/RapidStartWrapper/RapidStartSetup/RapidStartSetup.sd 4 1/15/13 4:46a Bensonlai $ +// +// $Revision: 4 $ +// +// $Date: 1/15/13 4:46a $ +//********************************************************************** +// Revision History +// ---------------- +// $Log: /Alaska/SOURCE/Modules/Intel Fast Flash Standby/iRST_SharkBay/RapidStartWrapper/RapidStartSetup/RapidStartSetup.sd $ +// +// 4 1/15/13 4:46a Bensonlai +// [TAG] EIP112263 +// [Category] Bug Fix +// [Severity] Normal +// [Symptom] [RapidStart] Instant-on can't work +// [RootCause] Intel reference code can't work on AMI base. +// [Solution] Modified the PeiGfxDriver.dxs and RapidStartDxe.dxs for +// AMI code +// [Files] RapidStartDxePolicyInit.c, RapidStartSetup.uni, +// RapidStartSetup.sdl, RapidStartSetup.sd, PeiGfxDriver.dxs, +// RapidStartDxe.dxs +// +// 3 1/13/13 7:49a Bensonlai +// [TAG] EIPNone +// [Category] Improvement +// [Description] Disabling the RapidStart while STAT mode in the IDE +// mode +// [Files] RapidStartDxePolicyInit.c, RapidStartDxePolicyInit.h, +// RapidStartDxePolicyInit.mak, RapidStartSetup.c, RapidStartSetup.mak, +// RapidStartSetup.sd, RapidStartSetup.sdl +// +// 2 12/27/12 1:17a Bensonlai +// [TAG] EIP110680 +// [Category] New Feature +// [Description] When iRST application is run under OS, and change +// timer. +// BIOS should update the changed to Setup option as well. +// [Files] Board\EM\RapidStartWrapper\Smm\RapidStartWrapperSmm.c +// Board\EM\RapidStartWrapper\Smm\RapidStartWrapperSmm.h +// Board\EM\RapidStartWrapper\Smm\RapidStartWrapperSmm.mak +// Board\EM\RapidStartWrapper\Smm\RapidStartWrapperSmm.dxs +// Board\EM\RapidStartWrapper\Smm\RapidStartWrapperSmm.sdl +// Board\EM\RapidStartWrapper\Smm\RapidStartWrapperSmm.cif +// Board\EM\RapidStartWrapper\AcpiTables\RapidStartWrapperAcpiTables.cif +// Board\EM\RapidStartWrapper\AcpiTables\RapidStartWrapperAcpiTables.sdl +// Board\EM\RapidStartWrapper\AcpiTables\Ssdt\RapidStartWrapper.asl +// Board\EM\RapidStartWrapper\RapidStartSetup\RapidStartSetup.sd +// +// 1 10/15/12 4:42a Bensonlai +// [TAG] None +// [Category] Improvement +// [Description] [Category] Improvement +// [Severity] Important +// [Description] Rename all IFFS sting to Rapid Start. +// [Files] Board\EM\RapidStartWrapper\*.*, ReferenceCode\RapidStart\*.* +// [Files] RapidStartSetup.cif +// RapidStartSetup.sdl +// RapidStartSetup.mak +// RapidStartSetup.sd +// RapidStartSetup.uni +// RapidStartSetup.c +// RapidStartSetup.h +// RapidStartSetupReset.c +// +//********************************************************************** +//<AMI_FHDR_START> +// +// Name: RapidStartSetup.sd +// +// Description: Create the setup item for RapidStart. +// +//<AMI_FHDR_END> +//********************************************************************** + +#ifndef SATA_MODE_IDE +#define SATA_MODE_IDE 0 +#endif + +#ifndef SATA_MODE_AHCI +#define SATA_MODE_AHCI 1 +#endif + +#ifndef SATA_MODE_RAID +#define SATA_MODE_RAID 2 +#endif + +#ifdef SETUP_DATA_DEFINITION +/***********************************************************/ +/* Put NVRAM data definitions here. +/* For example: UINT8 Data1; +/* These definitions will be converted by the build process +/* to a definitions of SETUP_DATA fields. +/***********************************************************/ + + UINT8 RapidStartEnabled; + UINT8 EntryOnS3RtcWake; + UINT16 S3WakeTimerMin; + UINT8 EntryOnS3CritBattWake; + UINT8 CritBattWakeThreshold; + UINT8 ActivePageThresholdSupport; + UINT32 ActivePageThresholdSize; + UINT8 RapidStartLock; + UINT8 RapidStartHybridHardDisk; + UINT8 RapidStartDisplaySaveRestore; + UINT8 RapidStartDisplayType; +#endif + +#if defined(VFRCOMPILE) && !defined(CONTROLS_ARE_DEFINED) +#define CONTROL_DEFINITION +#endif +//--------------------------------------------------------------------------- + +//--------------------------------------------------------------------------- +#ifdef CONTROL_DEFINITION + +#define RAPIDSTART_ONEOF_RAPIDSTARTENABLED\ + oneof varid = SETUP_DATA.RapidStartEnabled,\ + prompt = STRING_TOKEN(STR_RAPIDSTART_SUPPORT_PROMPT),\ + help = STRING_TOKEN(STR_RAPIDSTART_SUPPORT_HELP),\ + option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED, key = 0;\ + option text = STRING_TOKEN(STR_ENABLED), value = 1, flags = RESET_REQUIRED, key = 0;\ + endoneof; + +#define RAPIDSTART_ONEOF_ENTRYONS3RTCWAKE\ + oneof varid = SETUP_DATA.EntryOnS3RtcWake,\ + prompt = STRING_TOKEN(STR_S3_RTC_WAKE_PROMPT),\ + help = STRING_TOKEN(STR_S3_RTC_WAKE_SUPPORT_HELP),\ + option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = RESET_REQUIRED, key = 0;\ + option text = STRING_TOKEN(STR_ENABLED), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED, key = 0;\ + endoneof; + +#define RAPIDSTART_ONEOF_S3WAKETIMERMIN\ + numeric varid = SETUP_DATA.S3WakeTimerMin,\ + prompt = STRING_TOKEN(STR_S3_WAKE_TIMER_MIN_PROMPT),\ + help = STRING_TOKEN(STR_S3_WAKE_TIMER_MIN_SUPPORT_HELP),\ + flags = RESET_REQUIRED,\ + minimum = 0,\ + maximum = 120,\ + step = 1,\ + default = 10,\ + endnumeric; + +#define RAPIDSTART_ONEOF_ENTRYONS3CRITBATTWAKE\ + oneof varid = SETUP_DATA.EntryOnS3CritBattWake,\ + prompt = STRING_TOKEN(STR_CRIT_BATT_WAKE_PROMPT),\ + help = STRING_TOKEN(STR_CRIT_BATT_WAKE_HELP),\ + option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED, key = 0;\ + option text = STRING_TOKEN(STR_ENABLED), value = 1, flags = RESET_REQUIRED, key = 0;\ + endoneof; + +#define RAPIDSTART_ONEOF_ACTIVEPAGETHRESHOLDSUPPORT\ + oneof varid = SETUP_DATA.ActivePageThresholdSupport,\ + prompt = STRING_TOKEN(STR_ACT_PAGE_SUPPORT_PROMPT),\ + help = STRING_TOKEN(STR_ACT_PAGE_SUPPORT_HELP),\ + option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED, key = 0;\ + option text = STRING_TOKEN(STR_ENABLED), value = 1, flags = RESET_REQUIRED, key = 0;\ + endoneof; + +#define RAPIDSTART_ONEOF_ACTIVEPAGETHRESHOLDSIZE\ + numeric varid = SETUP_DATA.ActivePageThresholdSize,\ + prompt = STRING_TOKEN(STR_ACT_PAGE_SIZE_PROMPT),\ + help = STRING_TOKEN(STR_ACT_PAGE_SIZE_HELP),\ + flags = RESET_REQUIRED,\ + minimum = 0,\ + maximum = 65535,\ + step = 1,\ + default = 0,\ + endnumeric; + +#define RAPIDSTART_ONEOF_CRITBATTWAKETHRESHOLD\ + numeric varid = SETUP_DATA.CritBattWakeThreshold,\ + prompt = STRING_TOKEN (STR_CRIT_BAT_WAK_THRHLD),\ + help = STRING_TOKEN (STR_CRIT_BAT_WAK_THRHLD_HELP),\ + flags = RESET_REQUIRED,\ + minimum = 0,\ + maximum = 100,\ + step = 1,\ + default = 10,\ + endnumeric; + +#define RAPIDSTART_ONEOF_RAPIDSTARTPARSTATUSSTRING\ + text\ + help = STRING_TOKEN(STR_EMPTY_STRING),\ + text = STRING_TOKEN(STR_RAPIDSTART_PAR_STATUS_PROMPT),\ + text = STRING_TOKEN(STR_EMPTY_STRING),\ + flags = 0,\ + key = 0;\ + +#define RAPIDSTART_ONEOF_RAPIDSTARTHYBRIDHARDDISK\ + oneof varid = SETUP_DATA.RapidStartHybridHardDisk,\ + prompt = STRING_TOKEN(STR_HYBRID_HARD_DISK_SUPPORT_PROMPT),\ + help = STRING_TOKEN(STR_HYBRID_HARD_DISK_SUPPORT_HELP),\ + option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED, key = 0;\ + option text = STRING_TOKEN(STR_ENABLED), value = 1, flags = RESET_REQUIRED, key = 0;\ + endoneof; + +#define RAPIDSTART_ONEOF_RAPIDSTARTDISPLAYSAVERESTORE\ + oneof varid = SETUP_DATA.RapidStartDisplaySaveRestore,\ + prompt = STRING_TOKEN(STR_DISPLAY_SAVE_RESTORE_PROMPT),\ + help = STRING_TOKEN(STR_DISPLAY_SAVE_RESTORE_HELP),\ + option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED, key = 0;\ + option text = STRING_TOKEN(STR_ENABLED), value = 1, flags = RESET_REQUIRED, key = 0;\ + endoneof; + +#define RAPIDSTART_ONEOF_RAPIDSTARTDISPLAYTYPE\ + oneof varid = SETUP_DATA.RapidStartDisplayType,\ + prompt = STRING_TOKEN(STR_DISPLAY_TYPE_PROMPT),\ + help = STRING_TOKEN(STR_DISPLAY_TYPE_HELP),\ + option text = STRING_TOKEN(STR_BIOS_SAVE_RESTORE_HELP), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED, key = 0;\ + option text = STRING_TOKEN(STR_DESKTOP_SAVE_RESTORE_TYPE_HELP), value = 1, flags = RESET_REQUIRED, key = 0;\ + endoneof; + +#ifdef SB_ONEOF_SATAINTERFACEMODE +#undef SB_ONEOF_SATAINTERFACEMODE +#define SB_ONEOF_SATAINTERFACEMODE\ + grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;\ + suppressif ideqval SETUP_DATA.PchSata == 0;\ + oneof varid = SETUP_DATA.SataInterfaceMode,\ + prompt = STRING_TOKEN (STR_SATA_MODE_SELECTION_PROMPT),\ + help = STRING_TOKEN (STR_SATA_MODE_SELECTION_HELP),\ + option text = STRING_TOKEN (STR_SATA_IDE), value = SATA_MODE_IDE, flags = RESET_REQUIRED | INTERACTIVE, key = AUTO_ID(KEY_IDE);\ + option text = STRING_TOKEN (STR_SATA_AHCI), value = SATA_MODE_AHCI, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED, key = AUTO_ID(KEY_AHCI);\ + option text = STRING_TOKEN (STR_SATA_RAID), value = SATA_MODE_RAID, flags = RESET_REQUIRED, key = AUTO_ID(KEY_RAID);\ + endoneof;\ + SUPPRESS_GRAYOUT_ENDIF +#endif + +#endif // CONTROL_DEFINITION +//--------------------------------------------------------------------------- + +//--------------------------------------------------------------------------- +#ifdef CONTROLS_WITH_DEFAULTS + RAPIDSTART_ONEOF_RAPIDSTARTENABLED + RAPIDSTART_ONEOF_ENTRYONS3RTCWAKE + RAPIDSTART_ONEOF_S3WAKETIMERMIN + RAPIDSTART_ONEOF_ENTRYONS3CRITBATTWAKE + RAPIDSTART_ONEOF_CRITBATTWAKETHRESHOLD + RAPIDSTART_ONEOF_ACTIVEPAGETHRESHOLDSUPPORT + RAPIDSTART_ONEOF_ACTIVEPAGETHRESHOLDSIZE + RAPIDSTART_ONEOF_RAPIDSTARTPARSTATUSSTRING + RAPIDSTART_ONEOF_RAPIDSTARTHYBRIDHARDDISK + RAPIDSTART_ONEOF_RAPIDSTARTDISPLAYSAVERESTORE + RAPIDSTART_ONEOF_RAPIDSTARTDISPLAYTYPE +#endif // CONTROLS_WITH_DEFAULTS +//--------------------------------------------------------------------------- + + +//********************************************************************** +// Advanced - RAPIDSTART Configuration Form +//********************************************************************** + +#ifdef ADVANCED_FORM_SET + +#ifdef FORM_SET_TYPEDEF + #include <RapidStartSetup.h> +#endif + + #ifndef SUPPRESS_GRAYOUT_ENDIF //old Core + #define SUPPRESS_GRAYOUT_ENDIF endif; + #endif + + #ifdef FORM_SET_GOTO + // Define goto commands for the forms defined in this file + goto RAPIDSTART_FORM_ID, + prompt = STRING_TOKEN(STR_RAPIDSTART_FORM), + help = STRING_TOKEN(STR_RAPIDSTART_FORM_HELP); + #endif + + #ifdef FORM_SET_FORM + // Define forms + #ifndef RAPIDSTART_FORM_SETUP + #define RAPIDSTART_FORM_SETUP + form formid = AUTO_ID(RAPIDSTART_FORM_ID), + title = STRING_TOKEN(STR_RAPIDSTART_FORM); + + grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER OR + ideqval SETUP_DATA.RapidStartLock == 1; + RAPIDSTART_ONEOF_RAPIDSTARTENABLED + endif; + + SEPARATOR + + suppressif ideqval SETUP_DATA.RapidStartEnabled == 0; + RAPIDSTART_ONEOF_RAPIDSTARTPARSTATUSSTRING + endif; + + grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER; + suppressif ideqval SETUP_DATA.RapidStartEnabled == 0; + RAPIDSTART_ONEOF_ENTRYONS3RTCWAKE + SUPPRESS_GRAYOUT_ENDIF + + grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER; + suppressif ideqval SETUP_DATA.RapidStartEnabled == 0 OR ideqval SETUP_DATA.EntryOnS3RtcWake == 0; + RAPIDSTART_ONEOF_S3WAKETIMERMIN + SUPPRESS_GRAYOUT_ENDIF + +#if defined CRB_EC_SUPPORT && CRB_EC_SUPPORT == 1 + grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER; + suppressif ideqval SETUP_DATA.RapidStartEnabled == 0; + RAPIDSTART_ONEOF_ENTRYONS3CRITBATTWAKE + SUPPRESS_GRAYOUT_ENDIF + + grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER; + suppressif ideqval SETUP_DATA.RapidStartEnabled == 0 OR ideqval SETUP_DATA.EntryOnS3CritBattWake == 0; + RAPIDSTART_ONEOF_CRITBATTWAKETHRESHOLD + SUPPRESS_GRAYOUT_ENDIF +#endif + + grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER; + suppressif ideqval SETUP_DATA.RapidStartEnabled == 0; + RAPIDSTART_ONEOF_ACTIVEPAGETHRESHOLDSUPPORT + SUPPRESS_GRAYOUT_ENDIF + + grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER; + suppressif ideqval SETUP_DATA.RapidStartEnabled == 0 OR ideqval SETUP_DATA.ActivePageThresholdSupport == 0; + RAPIDSTART_ONEOF_ACTIVEPAGETHRESHOLDSIZE + SUPPRESS_GRAYOUT_ENDIF + + grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER; + suppressif ideqval SETUP_DATA.RapidStartEnabled == 0; + RAPIDSTART_ONEOF_RAPIDSTARTHYBRIDHARDDISK + SUPPRESS_GRAYOUT_ENDIF + + grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER; + suppressif ideqval SETUP_DATA.RapidStartEnabled == 0; + RAPIDSTART_ONEOF_RAPIDSTARTDISPLAYSAVERESTORE + SUPPRESS_GRAYOUT_ENDIF + + grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER; + suppressif ideqval SETUP_DATA.RapidStartEnabled == 0 OR ideqval SETUP_DATA.RapidStartDisplaySaveRestore == 0; + RAPIDSTART_ONEOF_RAPIDSTARTDISPLAYTYPE + SUPPRESS_GRAYOUT_ENDIF + + endform; + #endif // RAPIDSTART_FORM_SETUP + #endif // FORM_SET_FORM + +#endif // ADVANCED_FORM_SET + +//************************************************************************* +//************************************************************************* +//** ** +//** (C)Copyright 1985-2012, American Megatrends, Inc. ** +//** ** +//** All Rights Reserved. ** +//** ** +//** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 ** +//** ** +//** Phone: (770)-246-8600 ** +//** ** +//************************************************************************* +//************************************************************************* diff --git a/Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.sdl b/Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.sdl new file mode 100644 index 0000000..31e34cc --- /dev/null +++ b/Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.sdl @@ -0,0 +1,161 @@ +#********************************************************************** +#********************************************************************** +#** ** +#** (C)Copyright 1985-2012, American Megatrends, Inc. ** +#** ** +#** All Rights Reserved. ** +#** ** +#** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 ** +#** ** +#** Phone: (770)-246-8600 ** +#** ** +#********************************************************************** +#********************************************************************** + +#********************************************************************** +# $Header: /Alaska/SOURCE/Modules/Intel Fast Flash Standby/iRST_SharkBay/RapidStartWrapper/RapidStartSetup/RapidStartSetup.sdl 4 5/03/13 2:54a Bensonlai $ +# +# $Revision: 4 $ +# +# $Date: 5/03/13 2:54a $ +#********************************************************************** +# Revision History +# ---------------- +# $Log: /Alaska/SOURCE/Modules/Intel Fast Flash Standby/iRST_SharkBay/RapidStartWrapper/RapidStartSetup/RapidStartSetup.sdl $ +# +# 4 5/03/13 2:54a Bensonlai +# [TAG] None +# [Category] Improvement +# [Description] After changed the iRST status, we don't have to do a +# cold reset. +# +# 3 1/15/13 4:46a Bensonlai +# [TAG] EIP112263 +# [Category] Bug Fix +# [Severity] Normal +# [Symptom] [RapidStart] Instant-on can't work +# [RootCause] Intel reference code can't work on AMI base. +# [Solution] Modified the PeiGfxDriver.dxs and RapidStartDxe.dxs for +# AMI code +# [Files] RapidStartDxePolicyInit.c, RapidStartSetup.uni, +# RapidStartSetup.sdl, RapidStartSetup.sd, PeiGfxDriver.dxs, +# RapidStartDxe.dxs +# +# 2 1/13/13 7:49a Bensonlai +# [TAG] EIPNone +# [Category] Improvement +# [Description] Disabling the RapidStart while STAT mode in the IDE +# mode +# [Files] RapidStartDxePolicyInit.c, RapidStartDxePolicyInit.h, +# RapidStartDxePolicyInit.mak, RapidStartSetup.c, RapidStartSetup.mak, +# RapidStartSetup.sd, RapidStartSetup.sdl +# +# 1 10/15/12 4:42a Bensonlai +# [TAG] None +# [Category] Improvement +# [Description] [Category] Improvement +# [Severity] Important +# [Description] Rename all IFFS sting to Rapid Start. +# [Files] Board\EM\RapidStartWrapper\*.*, ReferenceCode\RapidStart\*.* +# [Files] RapidStartSetup.cif +# RapidStartSetup.sdl +# RapidStartSetup.mak +# RapidStartSetup.sd +# RapidStartSetup.uni +# RapidStartSetup.c +# RapidStartSetup.h +# RapidStartSetupReset.c +# +#********************************************************************** +#<AMI_FHDR_START> +# +# Name: RapidStartSetup.sdl +# +# Description: SDL file for the RapidStart +# +#<AMI_FHDR_END> +#********************************************************************** + +TOKEN + Name = "RapidStart_Setup" + Value = "1" + Help = "Main switch to enable RapidStart Setup support in Project" + TokenType = Boolean + TargetEQU = Yes + TargetMAK = Yes + Master = Yes +End + +PATH + Name = "RapidStartSetup_DIR" +End + +MODULE + Help = "Includes RapidStartSetup.mak to Project" + File = "RapidStartSetup.mak" +End + +ELINK + Name = "$(BUILD_DIR)\RapidStartSetup.sdb" + Parent = "SETUP_SDBS" + Priority = 30 + Help = "Includes generic FFS setup screens to the project" + InvokeOrder = AfterParent +End + +ELINK + Name = "$(RapidStartSetup_DIR)\RapidStartSetup.sd" + Parent = "SETUP_DEFINITIONS" + Priority = 30 + InvokeOrder = AfterParent +End + +ELINK + Name = "/I$(RapidStartSetup_DIR)" + Parent = "RAPIDSTART_INCLUDES" + InvokeOrder = AfterParent +End + +ELINK + Name = "-i $(RapidStartSetup_DIR)" + Parent = "SETUP_VFR_INCLUDES" + InvokeOrder = AfterParent +End + +ELINK + Name = "InitRapidStartInfo," + Parent = "SetupStringInit" + InvokeOrder = AfterParent +End + +ELINK + Name = "ITEM_CALLBACK(ADVANCED_FORM_SET_CLASS, 0, KEY_IDE, RapidStartMenuEntry)," + Parent = "SetupItemCallbacks" + InvokeOrder = AfterParent +End + +ELINK + Name = "ITEM_CALLBACK(ADVANCED_FORM_SET_CLASS, 0, KEY_AHCI, RapidStartMenuEntry)," + Parent = "SetupItemCallbacks" + InvokeOrder = AfterParent +End + +ELINK + Name = "ITEM_CALLBACK(ADVANCED_FORM_SET_CLASS, 0, KEY_RAID, RapidStartMenuEntry)," + Parent = "SetupItemCallbacks" + InvokeOrder = AfterParent +End + +#************************************************************************* +#************************************************************************* +#** ** +#** (C)Copyright 1985-2012, American Megatrends, Inc. ** +#** ** +#** All Rights Reserved. ** +#** ** +#** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 ** +#** ** +#** Phone: (770)-246-8600 ** +#** ** +#************************************************************************* +#************************************************************************* diff --git a/Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.uni b/Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.uni Binary files differnew file mode 100644 index 0000000..4f4e34b --- /dev/null +++ b/Board/EM/RapidStartWrapper/RapidStartSetup/RapidStartSetup.uni |