summaryrefslogtreecommitdiff
path: root/Board/EM/RapidStartWrapper/Smm
diff options
context:
space:
mode:
Diffstat (limited to 'Board/EM/RapidStartWrapper/Smm')
-rw-r--r--Board/EM/RapidStartWrapper/Smm/RapidStartWrapperSmm.c238
-rw-r--r--Board/EM/RapidStartWrapper/Smm/RapidStartWrapperSmm.cif12
-rw-r--r--Board/EM/RapidStartWrapper/Smm/RapidStartWrapperSmm.dxs92
-rw-r--r--Board/EM/RapidStartWrapper/Smm/RapidStartWrapperSmm.h135
-rw-r--r--Board/EM/RapidStartWrapper/Smm/RapidStartWrapperSmm.mak126
-rw-r--r--Board/EM/RapidStartWrapper/Smm/RapidStartWrapperSmm.sdl120
6 files changed, 723 insertions, 0 deletions
diff --git a/Board/EM/RapidStartWrapper/Smm/RapidStartWrapperSmm.c b/Board/EM/RapidStartWrapper/Smm/RapidStartWrapperSmm.c
new file mode 100644
index 0000000..2d21006
--- /dev/null
+++ b/Board/EM/RapidStartWrapper/Smm/RapidStartWrapperSmm.c
@@ -0,0 +1,238 @@
+//**********************************************************************
+//**********************************************************************
+//** **
+//** (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/RapidStartWrapperSmm.c 3 5/13/14 4:56a Joshchou $
+//
+// $Revision: 3 $
+//
+// $Date: 5/13/14 4:56a $
+//**********************************************************************
+// Revision History
+// ----------------
+// $Log: /Alaska/SOURCE/Modules/Intel Fast Flash Standby/iRST_SharkBay/RapidStartWrapper/RapidStartWrapperSmm.c $
+//
+// 3 5/13/14 4:56a Joshchou
+// [TAG] EIP167032
+// [Category] Improvement
+// [Description] Review the variable's attribute, we shouldn't use
+// runtime attribute with setup variable.
+// [Files] RapidStartWrapperSmm.c
+// RapidStartWrapperSmm.h
+// RapidStartWrapperSmm.cif
+//
+// 2 4/15/13 2:36a Bensonlai
+// [TAG] None
+// [Category] Bug Fix
+// [Severity] Important
+// [Symptom] If users change any item from driver then restore to boot
+// setting, our SMI can't distinguish between user's and driver's event.
+// [RootCause] It's an Intel driver issue.
+// [Solution] 1. Removing the sync up with Rapid Start driver and BIOS
+// variable as default.
+// 2. Remove our BIOS workaround.
+// [Files] RapidStartWrapperSmm.sdl, RapidStartWrapperSmm.h,
+// RapidStartWrapperSmm.sdl, RapidStartWrapperAcpiTables.sdl,
+// RapidStartWrapper.sdl
+//
+// 1 12/27/12 2:23a 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
+//
+//**********************************************************************
+//<AMI_FHDR_START>
+//
+// Name: RapidStartWrapperSmm.c
+//
+// Description: Sw SMI for RapidStart Wrapper
+//
+//<AMI_FHDR_END>
+//**********************************************************************
+
+#include "RapidStartWrapperSmm.h"
+
+VOID* InternalGetSmstConfigurationTable(IN EFI_GUID *TableGuid) {
+ EFI_CONFIGURATION_TABLE *Table;
+ UINTN i;
+ EFI_STATUS Status;
+
+ if (mSmmBase == NULL) {
+ Status = gBS->LocateProtocol (&gEfiSmmBaseProtocolGuid, NULL, &mSmmBase);
+ if (EFI_ERROR(Status) || mSmmBase == NULL)return NULL;
+ }
+
+ if (mSmst == NULL ) {
+ if (mSmmBase!=NULL) {
+ Status = mSmmBase->GetSmstLocation (mSmmBase, &mSmst);
+ if (EFI_ERROR(Status) || mSmst == NULL)return NULL;
+ }
+ }
+
+ if (mSmst != NULL) {
+ Table = mSmst->SmmConfigurationTable;
+ i = mSmst->NumberOfTableEntries;
+
+ for (; i; --i,++Table)
+ {
+ if (CompareGuid(&Table->VendorGuid,TableGuid))
+ return Table->VendorTable;
+ }
+ }
+ return NULL;
+}
+
+VOID
+RapidStartSyncVariable (
+ VOID
+)
+{
+ EFI_STATUS Status;
+ RAPID_START_WRAPPER_SMM_DATA RapidStartWrapperSmmData;
+ RapidStartWrapperSmmData.S3WakeTimerMin = mRapidStartGlobalNvs->WakeTimerMin;
+
+ if ( (mRapidStartGlobalNvs->EventsEnabled & RAPID_START_ACPI_RTC_WAKE) != 0) {
+ RapidStartWrapperSmmData.EntryOnS3RtcWake = 1;
+ } else {
+ RapidStartWrapperSmmData.EntryOnS3RtcWake = 0;
+ }
+
+ if ( (mRapidStartGlobalNvs->EventsEnabled & RAPID_START_ACPI_BATT_WAKE) != 0) {
+ RapidStartWrapperSmmData.EntryOnS3CritBattWake = 1;
+ } else {
+ RapidStartWrapperSmmData.EntryOnS3CritBattWake = 0;
+ }
+
+ Status = mySMMgRT->SetVariable( L"RstWrapVar", \
+ &RapidStartWrapperSmmDataGuid, \
+ EFI_VARIABLE_NON_VOLATILE | \
+ EFI_VARIABLE_BOOTSERVICE_ACCESS | \
+ EFI_VARIABLE_RUNTIME_ACCESS, \
+ sizeof (RAPID_START_WRAPPER_SMM_DATA), \
+ &RapidStartWrapperSmmData
+ );
+
+ if ( EFI_ERROR(Status) ) {
+ return;
+ }
+
+ return;
+}
+
+VOID
+RapidStartWrapperSwSmiCallback (
+ IN EFI_HANDLE DispatchHandle,
+ IN EFI_SMM_SW_DISPATCH_CONTEXT *DispatchContext
+)
+{
+ UINT8 WrapperFunctionIndex;
+
+ WrapperFunctionIndex = IoRead8(SW_SMI_IO_DATA_ADDRESS); // Get Wrapper Function Index
+ IoWrite8(SW_SMI_IO_DATA_ADDRESS, 0x00); // Clear data
+
+ switch ( WrapperFunctionIndex ) {
+ case AMI_RAPID_START_SYNC_VARIABLE_FUNCTION:
+ RapidStartSyncVariable();
+ break;
+
+ default :
+ break;
+ }
+
+ return;
+}
+
+EFI_STATUS
+RapidStartWrapperSmmEntryPoint (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+)
+{
+ RAPID_START_GLOBAL_NVS_AREA_PROTOCOL *RapidStartGlobalNvsAreaProtocol;
+ EFI_SMM_SW_DISPATCH_PROTOCOL *SwDispatch;
+ EFI_SMM_SW_DISPATCH_CONTEXT SwContext;
+ EFI_HANDLE DispatchHandle;
+ EFI_STATUS Status;
+ VOID *ptrRs;
+
+ ptrRs = InternalGetSmstConfigurationTable(&SmmRtServTableGuid);
+ if (ptrRs!=NULL) mySMMgRT = ptrRs;
+
+ DEBUG ((EFI_D_INFO, "RapidStartWrapperSmmEntryPoint()\n"));
+
+ Status = gBS->LocateProtocol (
+ &gRapidStartGlobalNvsAreaProtocolGuid,
+ NULL,
+ (VOID **) &RapidStartGlobalNvsAreaProtocol
+ );
+
+ if ( EFI_ERROR (Status) ) {
+ DEBUG ((EFI_D_INFO, "No RapidStart info protocol available\n"));
+ return Status;
+ }
+
+ mRapidStartGlobalNvs = RapidStartGlobalNvsAreaProtocol->Area;
+ DEBUG ((EFI_D_INFO, "RapidStartGlobalNvs: %x\n", mRapidStartGlobalNvs));
+
+ ///
+ /// Locate the SMM SW dispatch protocol
+ ///
+ Status = gBS->LocateProtocol (&gEfiSmmSwDispatchProtocolGuid, NULL, &SwDispatch);
+ if ( EFI_ERROR (Status) ) {
+ return Status;
+ }
+
+ ///
+ /// Register SWSMI handler
+ ///
+ DEBUG ((EFI_D_INFO, "Register SW_SMI_RAPID_START_WRAPPER: %x\n", SW_SMI_RAPID_START_WRAPPER));
+ SwContext.SwSmiInputValue = SW_SMI_RAPID_START_WRAPPER;
+ Status = SwDispatch->Register (
+ SwDispatch,
+ RapidStartWrapperSwSmiCallback,
+ &SwContext,
+ &DispatchHandle
+ );
+ if ( EFI_ERROR (Status) ) {
+ return Status;
+ }
+
+ 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/Smm/RapidStartWrapperSmm.cif b/Board/EM/RapidStartWrapper/Smm/RapidStartWrapperSmm.cif
new file mode 100644
index 0000000..6ddc4e2
--- /dev/null
+++ b/Board/EM/RapidStartWrapper/Smm/RapidStartWrapperSmm.cif
@@ -0,0 +1,12 @@
+<component>
+ name = "RapidStartWrapperSmm"
+ category = ModulePart
+ LocalRoot = "Board\EM\RapidStartWrapper\Smm"
+ RefName = "RapidStartWrapperSmm"
+[files]
+"RapidStartWrapperSmm.c"
+"RapidStartWrapperSmm.h"
+"RapidStartWrapperSmm.mak"
+"RapidStartWrapperSmm.dxs"
+"RapidStartWrapperSmm.sdl"
+<endComponent>
diff --git a/Board/EM/RapidStartWrapper/Smm/RapidStartWrapperSmm.dxs b/Board/EM/RapidStartWrapper/Smm/RapidStartWrapperSmm.dxs
new file mode 100644
index 0000000..247058d
--- /dev/null
+++ b/Board/EM/RapidStartWrapper/Smm/RapidStartWrapperSmm.dxs
@@ -0,0 +1,92 @@
+//**********************************************************************
+//**********************************************************************
+//** **
+//** (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/RapidStartWrapperSmm.dxs 1 12/27/12 2:23a Bensonlai $
+//
+// $Revision: 1 $
+//
+// $Date: 12/27/12 2:23a $
+//**********************************************************************
+// Revision History
+// ----------------
+// $Log: /Alaska/SOURCE/Modules/Intel Fast Flash Standby/iRST_SharkBay/RapidStartWrapper/RapidStartWrapperSmm.dxs $
+//
+// 1 12/27/12 2:23a 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
+//
+//**********************************************************************
+//<AMI_FHDR_START>
+//
+// Name: RapidStartWrapperSmm.dxs
+//
+// Description: Dependency expression file for RapidStartWrapperSmm Driver
+//
+//<AMI_FHDR_END>
+//**********************************************************************
+
+//
+// Common for R8 and R9 codebase
+//
+#include "AutoGen.h"
+#include "DxeDepex.h"
+
+//
+// BUILD_WITH_GLUELIB and BUILD_WITH_EDKII_GLUE_LIB are both "defined" in R8 codebase;
+// BUILD_WITH_EDKII_GLUE_LIB is defined in Edk-Dev-Snapshot-20070228 and later version
+// BUILD_WITH_GLUELIB and BUILD_WITH_EDKII_GLUE_LIB are "not defined" in R9 codebase.
+//
+#if defined (BUILD_WITH_GLUELIB) || defined (BUILD_WITH_EDKII_GLUE_LIB)
+#include "EfiDepex.h"
+
+#include EFI_PROTOCOL_DEPENDENCY (SmmBase)
+#include EFI_PROTOCOL_DEPENDENCY (SmmSwDispatch)
+#include EFI_PROTOCOL_DEPENDENCY (RapidStartGlobalNvsArea)
+#include EFI_ARCH_PROTOCOL_DEFINITION (Variable)
+#endif
+
+DEPENDENCY_START
+ EFI_SMM_BASE_PROTOCOL_GUID AND
+ EFI_SMM_SW_DISPATCH_PROTOCOL_GUID AND
+ RAPID_START_GLOBAL_NVS_AREA_PROTOCOL_GUID AND
+ EFI_VARIABLE_ARCH_PROTOCOL_GUID
+DEPENDENCY_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/Smm/RapidStartWrapperSmm.h b/Board/EM/RapidStartWrapper/Smm/RapidStartWrapperSmm.h
new file mode 100644
index 0000000..c4ba9a2
--- /dev/null
+++ b/Board/EM/RapidStartWrapper/Smm/RapidStartWrapperSmm.h
@@ -0,0 +1,135 @@
+//**********************************************************************
+//**********************************************************************
+//** **
+//** (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/RapidStartWrapperSmm.h 3 5/13/14 4:56a Joshchou $
+//
+// $Revision: 3 $
+//
+// $Date: 5/13/14 4:56a $
+//**********************************************************************
+// Revision History
+// ----------------
+// $Log: /Alaska/SOURCE/Modules/Intel Fast Flash Standby/iRST_SharkBay/RapidStartWrapper/RapidStartWrapperSmm.h $
+//
+// 3 5/13/14 4:56a Joshchou
+// [TAG] EIP167032
+// [Category] Improvement
+// [Description] Review the variable's attribute, we shouldn't use
+// runtime attribute with setup variable.
+// [Files] RapidStartWrapperSmm.c
+// RapidStartWrapperSmm.h
+// RapidStartWrapperSmm.cif
+//
+// 2 4/15/13 2:37a Bensonlai
+// [TAG] None
+// [Category] Bug Fix
+// [Severity] Important
+// [Symptom] If users change any item from driver then restore to boot
+// setting, our SMI can't distinguish between user's and driver's event.
+// [RootCause] It's an Intel driver issue.
+// [Solution] 1. Removing the sync up with Rapid Start driver and BIOS
+// variable as default.
+// 2. Remove our BIOS workaround.
+// [Files] RapidStartWrapperSmm.sdl, RapidStartWrapperSmm.h,
+// RapidStartWrapperSmm.sdl, RapidStartWrapperAcpiTables.sdl,
+// RapidStartWrapper.sdl
+//
+// 1 12/27/12 2:23a 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
+//
+//**********************************************************************
+//<AMI_FHDR_START>
+//
+// Name: RapidStartWrapperSmm.h
+//
+// Description: Sw SMI for RapidStart Wrapper
+//
+//<AMI_FHDR_END>
+//**********************************************************************
+
+#ifndef _RAPID_START_WRAPPER_SMM_H_
+#define _RAPID_START_WRAPPER_SMM_H_
+
+//
+// External include files do NOT need to be explicitly specified in real EDKII
+// environment
+//
+#if !defined(EDK_RELEASE_VERSION) || (EDK_RELEASE_VERSION < 0x00020000)
+#include "EdkIIGlueDxe.h"
+#include "RapidStartData.h"
+#include <token.h>
+//
+// Driver Consumed Protocol Prototypes
+//
+#include EFI_PROTOCOL_CONSUMER (LoadedImage)
+#include EFI_PROTOCOL_DEPENDENCY (SmmBase)
+#include EFI_PROTOCOL_DEPENDENCY (SmmSwDispatch)
+#include EFI_PROTOCOL_DEPENDENCY (DevicePath)
+#include EFI_PROTOCOL_DEPENDENCY (RapidStartGlobalNvsArea)
+#include EFI_ARCH_PROTOCOL_DEFINITION (Variable)
+#endif
+
+#include <SetupDataDefinition.h>
+#define RAPID_START_WRAPPER_SMM_DATA_GUID { 0xc840359f, 0x1c11, 0x4d41, 0x92, 0x4c, 0x89, 0x70, 0x52, 0x22, 0x6a, 0xd4 }
+EFI_GUID RapidStartWrapperSmmDataGuid = RAPID_START_WRAPPER_SMM_DATA_GUID;
+
+#define EFI_SMM_RUNTIME_SERVICES_TABLE_GUID \
+ { 0x395c33fe, 0x287f, 0x413e, { 0xa0, 0x55, 0x80, 0x88, 0xc0, 0xe1, 0xd4, 0x3e } }
+
+EFI_GUID SmmRtServTableGuid = EFI_SMM_RUNTIME_SERVICES_TABLE_GUID;
+EFI_SMM_BASE_PROTOCOL *mSmmBase;
+EFI_SMM_SYSTEM_TABLE *mSmst = NULL;
+EFI_RUNTIME_SERVICES *mySMMgRT = NULL;
+RAPID_START_GLOBAL_NVS_AREA *mRapidStartGlobalNvs;
+
+//
+// Define SMI number of AMI Wrapper
+//
+#define AMI_RAPID_START_SYNC_VARIABLE_FUNCTION 0x01
+
+typedef struct _RAPID_START_WRAPPER_SMM_DATA {
+ UINT16 S3WakeTimerMin;
+ UINT8 EntryOnS3RtcWake;
+ UINT8 EntryOnS3CritBattWake;
+} RAPID_START_WRAPPER_SMM_DATA;
+#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/Smm/RapidStartWrapperSmm.mak b/Board/EM/RapidStartWrapper/Smm/RapidStartWrapperSmm.mak
new file mode 100644
index 0000000..85fa7fe
--- /dev/null
+++ b/Board/EM/RapidStartWrapper/Smm/RapidStartWrapperSmm.mak
@@ -0,0 +1,126 @@
+#**********************************************************************
+#**********************************************************************
+#** **
+#** (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/RapidStartWrapperSmm.mak 1 12/27/12 2:23a Bensonlai $
+#
+# $Revision: 1 $
+#
+# $Date: 12/27/12 2:23a $
+#**********************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/SOURCE/Modules/Intel Fast Flash Standby/iRST_SharkBay/RapidStartWrapper/RapidStartWrapperSmm.mak $
+#
+# 1 12/27/12 2:23a 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
+#
+#**********************************************************************
+#<AMI_FHDR_START>
+#
+# Name: RapidStartWrapperSmm.mak
+#
+# Description: Make file to build RapidStartWrapperSmm components
+#
+#<AMI_FHDR_END>
+#**********************************************************************
+
+EDK : RapidStartWrapperSmm
+
+RapidStartWrapperSmm : $(BUILD_DIR)\RapidStartWrapperSmm.mak RapidStartWrapperSmmBin
+
+$(BUILD_DIR)\RapidStartWrapperSmm.mak : $(RapidStartWrapperSmm_DIR)\$(@B).cif $(RapidStartWrapperSmm_DIR)\$(@B).mak $(BUILD_RULES)
+ $(CIF2MAK) $(RapidStartWrapperSmm_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS)
+
+RapidStartWrapperSmm_INCLUDES=\
+ $(RAPIDSTART_INCLUDES)\
+ $(EdkIIGlueLib_INCLUDES)\
+
+RapidStartWrapperSmm_DEFINES = $(MY_DEFINES)\
+ /D"__EDKII_GLUE_MODULE_ENTRY_POINT__=RapidStartWrapperSmmEntryPoint"\
+ /D __EDKII_GLUE_BASE_LIB__ \
+ /D __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__ \
+ /D __EDKII_GLUE_BASE_MEMORY_LIB__ \
+ /D __EDKII_GLUE_DXE_MEMORY_ALLOCATION_LIB__ \
+ /D __EDKII_GLUE_DXE_DEBUG_LIB_REPORT_STATUS_CODE__ \
+ /D __EDKII_GLUE_SMM_RUNTIME_DXE_REPORT_STATUS_CODE_LIB__ \
+ /D __EDKII_GLUE_UEFI_LIB__ \
+ /D __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__ \
+ /D __EDKII_GLUE_UEFI_DEVICE_PATH_LIB__ \
+ /D __EDKII_GLUE_BASE_PCI_LIB_PCI_EXPRESS__ \
+
+RapidStartWrapperSmm_LIB =\
+ $(EFIPROTOCOLLIB)\
+ $(EDKPROTOCOLLIB)\
+ $(EDKFRAMEWORKPROTOCOLLIB)\
+ $(EdkIIGlueBaseLib_LIB)\
+!IF "$(x64_BUILD)"=="1"
+ $(EdkIIGlueBaseLibX64_LIB)\
+!ELSE
+ $(EdkIIGlueBaseLibIA32_LIB)\
+!ENDIF
+ $(ArchProtocolLib)\
+ $(EdkIIGlueBaseIoLibIntrinsic_LIB)\
+ $(EdkIIGlueBaseMemoryLib_LIB)\
+ $(EdkIIGlueDxeMemoryAllocationLib_LIB)\
+ $(EdkIIGlueDxeServicesTableLib_LIB)\
+ $(EdkIIGlueDxeDebugLibReportStatusCode_LIB)\
+ $(EdkIIGlueSmmRuntimeDxeReportStatusCodeLib_LIB)\
+ $(EdkIIGlueBasePciLibPciExpress_LIB)\
+ $(EdkIIGlueUefiLib_LIB)\
+ $(EdkIIGlueUefiBootServicesTableLib_LIB)\
+ $(EdkIIGlueUefiDevicePathLib_LIB)\
+ $(RapidStartProtocolLib_LIB)\
+ $(RapidStartGuidLib_LIB)\
+
+RapidStartWrapperSmmBin: $(RapidStartWrapperSmm_LIB)
+ $(MAKE) /$(MAKEFLAGS) $(EDKIIGLUE_DEFAULTS)\
+ /f $(BUILD_DIR)\RapidStartWrapperSmm.mak all \
+ "MY_INCLUDES=$(RapidStartWrapperSmm_INCLUDES)" \
+ "MY_DEFINES=$(RapidStartWrapperSmm_DEFINES)" \
+ GUID=760DCD41-FF47-41d8-91B2-BC527D6C5823\
+ ENTRY_POINT=_ModuleEntryPoint \
+ TYPE=BS_DRIVER\
+ EDKIIModule=SMMDRIVER\
+ DEPEX1=$(RapidStartWrapperSmm_DIR)\RapidStartWrapperSmm.dxs\
+ DEPEX1_TYPE=EFI_SECTION_DXE_DEPEX \
+ COMPRESS=1
+
+#*************************************************************************
+#*************************************************************************
+#** **
+#** (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/Smm/RapidStartWrapperSmm.sdl b/Board/EM/RapidStartWrapper/Smm/RapidStartWrapperSmm.sdl
new file mode 100644
index 0000000..a99eb23
--- /dev/null
+++ b/Board/EM/RapidStartWrapper/Smm/RapidStartWrapperSmm.sdl
@@ -0,0 +1,120 @@
+#**********************************************************************
+#**********************************************************************
+#** **
+#** (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/RapidStartWrapperSmm.sdl 2 4/15/13 2:36a Bensonlai $
+#
+# $Revision: 2 $
+#
+# $Date: 4/15/13 2:36a $
+#**********************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/SOURCE/Modules/Intel Fast Flash Standby/iRST_SharkBay/RapidStartWrapper/RapidStartWrapperSmm.sdl $
+#
+# 2 4/15/13 2:36a Bensonlai
+# [TAG] None
+# [Category] Bug Fix
+# [Severity] Important
+# [Symptom] If users change any item from driver then restore to boot
+# setting, our SMI can't distinguish between user's and driver's event.
+# [RootCause] It's an Intel driver issue.
+# [Solution] 1. Removing the sync up with Rapid Start driver and BIOS
+# variable as default.
+# 2. Remove our BIOS workaround.
+# [Files] RapidStartWrapperSmm.sdl, RapidStartWrapperSmm.h,
+# RapidStartWrapperSmm.sdl, RapidStartWrapperAcpiTables.sdl,
+# RapidStartWrapper.sdl
+#
+# 1 12/27/12 2:23a 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
+#
+#**********************************************************************
+#<AMI_FHDR_START>
+#
+# Name: RapidStartWrapperSmm.sdl
+#
+# Description: SDL file for RapidStartWrapperSmm
+#
+#<AMI_FHDR_END>
+#**********************************************************************
+
+TOKEN
+ Name = "RAPID_START_WRAPPER_SMM_SUPPORT"
+ Value = "1"
+ Help = "Main switch to enable RapidStartWrapperSmm support in Project"
+ TokenType = Boolean
+ TargetEQU = Yes
+ TargetMAK = Yes
+ Master = Yes
+ Token = "SYNC_UP_DRIVER_AND_BIOS_VARIABLE" "=" "1"
+End
+
+TOKEN
+ Name = "AMI_SW_SMI_RAPID_START_WRAPPER"
+ Value = "0xB4"
+ Help = "SWSMI# for AMI_SW_SMI_RAPID_START_WRAPPER"
+ TokenType = Integer
+ TargetH = Yes
+ TargetMAK = Yes
+End
+
+PATH
+ Name = "RapidStartWrapperSmm_DIR"
+End
+
+MODULE
+ Help = "Includes RapidStartWrapperSmm.mak to Project"
+ File = "RapidStartWrapperSmm.mak"
+End
+
+ELINK
+ Name = "$(BUILD_DIR)\RapidStartWrapperSmm.ffs"
+ Parent = "FV_MAIN"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "/D SW_SMI_RAPID_START_WRAPPER=$(AMI_SW_SMI_RAPID_START_WRAPPER)"
+ Parent = "INTEL_IRST_RC_FLAGS"
+ 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 **
+#** **
+#*************************************************************************
+#*************************************************************************