summaryrefslogtreecommitdiff
path: root/Board/EM/MeWrapper/PttWrapper
diff options
context:
space:
mode:
authorraywu <raywu0301@gmail.com>2018-06-15 00:00:50 +0800
committerraywu <raywu0301@gmail.com>2018-06-15 00:00:50 +0800
commitb7c51c9cf4864df6aabb99a1ae843becd577237c (patch)
treeeebe9b0d0ca03062955223097e57da84dd618b9a /Board/EM/MeWrapper/PttWrapper
downloadzprj-b7c51c9cf4864df6aabb99a1ae843becd577237c.tar.xz
init. 1AQQW051HEADmaster
Diffstat (limited to 'Board/EM/MeWrapper/PttWrapper')
-rw-r--r--Board/EM/MeWrapper/PttWrapper/PttWrapper.c142
-rw-r--r--Board/EM/MeWrapper/PttWrapper/PttWrapper.cif11
-rw-r--r--Board/EM/MeWrapper/PttWrapper/PttWrapper.dxs99
-rw-r--r--Board/EM/MeWrapper/PttWrapper/PttWrapper.mak68
-rw-r--r--Board/EM/MeWrapper/PttWrapper/PttWrapper.sdl27
5 files changed, 347 insertions, 0 deletions
diff --git a/Board/EM/MeWrapper/PttWrapper/PttWrapper.c b/Board/EM/MeWrapper/PttWrapper/PttWrapper.c
new file mode 100644
index 0000000..6a8c668
--- /dev/null
+++ b/Board/EM/MeWrapper/PttWrapper/PttWrapper.c
@@ -0,0 +1,142 @@
+//*************************************************************************
+//*************************************************************************
+//** **
+//** (C)Copyright 1985-2010, American Megatrends, Inc. **
+//** **
+//** All Rights Reserved. **
+//** **
+//** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 **
+//** **
+//** Phone: (770)-246-8600 **
+//** **
+//*************************************************************************
+//*************************************************************************
+//**********************************************************************
+//
+// $Header: /Alaska/SOURCE/Modules/SharkBayRefCodes/ME/MeWrapper/PttWrapper/PttWrapper.c 4 11/05/14 6:00a Tristinchou $
+//
+// $Revision: 4 $
+//
+// $Date: 11/05/14 6:00a $
+//
+//**********************************************************************
+// Revision History
+// ----------------
+// $Log: /Alaska/SOURCE/Modules/SharkBayRefCodes/ME/MeWrapper/PttWrapper/PttWrapper.c $
+//
+// 4 11/05/14 6:00a Tristinchou
+// [TAG] EIP190594
+// [Description] Avoid install smm protocol with bootservice
+// InstallProtocol()
+//
+// 3 1/18/13 12:20a Klzhan
+// [TAG] EIPNone
+// [Category] Improvement
+// [Description] Fix SMM Variable protocol fail.
+// [Files] PttWrapper.dxs
+// PttWrapper.c
+// PttWrapper.mak
+// PttWrapper.sdl
+// PttWrapper.cif
+//
+// 2 11/20/12 3:35a Klzhan
+// [TAG] EIPNone
+// [Category] Bug Fix
+// [Severity] Important
+// [Symptom] Smm Variable Protocol not installed
+//
+// 1 11/07/12 6:21a Klzhan
+//
+//
+//**********************************************************************
+
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: PttWrapper.c
+//
+// Description: Setup Hooks for Tdt.
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+#include <EFI.h>
+#include <AmiDxeLib.h>
+#include <ReferenceCode\ME\SampleCode\Protocol\SmmVariable\SmmVariable.h>
+
+
+#define EFI_SMM_RUNTIME_SERVICES_TABLE_GUID \
+ { 0x395c33fe, 0x287f, 0x413e, { 0xa0, 0x55, 0x80, 0x88, 0xc0, 0xe1, 0xd4, 0x3e } }
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: InSmmFunction
+//
+// Description: InSmmFunction
+//
+// Input:
+//
+// Output:
+//
+// Modified:
+//
+// Referrals:
+//
+// Notes:
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS
+InSmmFunction
+(
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+)
+{
+ //Modification in PttHciSmm.c uses RuntimeServices' variable service
+ //directly, so we don't need to install SmmVariableProtocol in gBS.
+
+ return EFI_SUCCESS;
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: PttWrapperEntryPoint
+//
+// Description: Driver EntryPoint
+//
+// Input:
+//
+// Output:
+//
+// Modified:
+//
+// Referrals:
+//
+// Notes:
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+EFI_STATUS
+EFIAPI
+PttWrapperEntryPoint (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+)
+{
+ InitAmiLib(ImageHandle, SystemTable);
+ InitSmmHandlerEx(ImageHandle, SystemTable, InSmmFunction, NULL);
+
+ return EFI_SUCCESS;
+}
+
+//*************************************************************************
+//*************************************************************************
+//** **
+//** (C)Copyright 1985-2010, American Megatrends, Inc. **
+//** **
+//** All Rights Reserved. **
+//** **
+//** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 **
+//** **
+//** Phone: (770)-246-8600 **
+//** **
+//*************************************************************************
+//************************************************************************* \ No newline at end of file
diff --git a/Board/EM/MeWrapper/PttWrapper/PttWrapper.cif b/Board/EM/MeWrapper/PttWrapper/PttWrapper.cif
new file mode 100644
index 0000000..9b38c3e
--- /dev/null
+++ b/Board/EM/MeWrapper/PttWrapper/PttWrapper.cif
@@ -0,0 +1,11 @@
+<component>
+ name = "PttWrapper"
+ category = ModulePart
+ LocalRoot = "Board\EM\MeWrapper\PttWrapper\"
+ RefName = "PttWrapper"
+[files]
+"PttWrapper.dxs"
+"PttWrapper.c"
+"PttWrapper.mak"
+"PttWrapper.sdl"
+<endComponent>
diff --git a/Board/EM/MeWrapper/PttWrapper/PttWrapper.dxs b/Board/EM/MeWrapper/PttWrapper/PttWrapper.dxs
new file mode 100644
index 0000000..c75d348
--- /dev/null
+++ b/Board/EM/MeWrapper/PttWrapper/PttWrapper.dxs
@@ -0,0 +1,99 @@
+//*************************************************************************
+//*************************************************************************
+//** **
+//** (C)Copyright 1985-2010, American Megatrends, Inc. **
+//** **
+//** All Rights Reserved. **
+//** **
+//** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 **
+//** **
+//** Phone: (770)-246-8600 **
+//** **
+//*************************************************************************
+//*************************************************************************
+//**********************************************************************
+//
+// $Header: /Alaska/SOURCE/Modules/SharkBayRefCodes/ME/MeWrapper/PttWrapper/PttWrapper.dxs 2 1/18/13 12:20a Klzhan $
+//
+// $Revision: 2 $
+//
+// $Date: 1/18/13 12:20a $
+//
+//**********************************************************************
+// Revision History
+// ----------------
+// $Log: /Alaska/SOURCE/Modules/SharkBayRefCodes/ME/MeWrapper/PttWrapper/PttWrapper.dxs $
+//
+// 2 1/18/13 12:20a Klzhan
+// [TAG] EIPNone
+// [Category] Improvement
+// [Description] Fix SMM Variable protocol fail.
+// [Files] PttWrapper.dxs
+// PttWrapper.c
+// PttWrapper.mak
+// PttWrapper.sdl
+// PttWrapper.cif
+//
+// 1 11/07/12 6:21a Klzhan
+//
+//
+//**********************************************************************
+
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: TdtSetup.dxs
+//
+// Description: Dependency expression file.
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+/*++
+
+Copyright (c) 2004-2006 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+Module Name:
+
+ TDTPlatformPolicy.h
+
+Abstract:
+
+ Dependency expression file for TDTPlatformPolicy Invocation Driver.
+
+--*/
+/*++
+ This file contains an 'Intel Peripheral Driver' and is
+ licensed for Intel CPUs and chipsets under the terms of your
+ license agreement with Intel or your vendor. This file may
+ be modified by the user, subject to additional terms of the
+ license agreement
+--*/
+#include <Protocol/SmmBase.h>
+#include <Protocol/SmmSwDispatch.h>
+
+DEPENDENCY_START
+ EFI_SMM_BASE_PROTOCOL_GUID AND
+ EFI_SMM_SW_DISPATCH_PROTOCOL_GUID
+DEPENDENCY_END
+
+
+//*************************************************************************
+//*************************************************************************
+//** **
+//** (C)Copyright 1985-2010, American Megatrends, Inc. **
+//** **
+//** All Rights Reserved. **
+//** **
+//** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 **
+//** **
+//** Phone: (770)-246-8600 **
+//** **
+//*************************************************************************
+//************************************************************************* \ No newline at end of file
diff --git a/Board/EM/MeWrapper/PttWrapper/PttWrapper.mak b/Board/EM/MeWrapper/PttWrapper/PttWrapper.mak
new file mode 100644
index 0000000..66da210
--- /dev/null
+++ b/Board/EM/MeWrapper/PttWrapper/PttWrapper.mak
@@ -0,0 +1,68 @@
+#*************************************************************************
+#*************************************************************************
+#** **
+#** (C)Copyright 1985-2010, American Megatrends, Inc. **
+#** **
+#** All Rights Reserved. **
+#** **
+#** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 **
+#** **
+#** Phone: (770)-246-8600 **
+#** **
+#*************************************************************************
+#*************************************************************************
+#**********************************************************************
+#
+# $Header: /Alaska/SOURCE/Modules/SharkBayRefCodes/ME/MeWrapper/PttWrapper/PttWrapper.mak 1 11/07/12 6:21a Klzhan $
+#
+# $Revision: 1 $
+#
+# $Date: 11/07/12 6:21a $
+#
+#**********************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/SOURCE/Modules/SharkBayRefCodes/ME/MeWrapper/PttWrapper/PttWrapper.mak $
+#
+# 1 11/07/12 6:21a Klzhan
+#
+#
+#
+#**********************************************************************
+#<AMI_FHDR_START>
+#
+# Name: PttWrapper.mak
+#
+# Description:
+#
+#<AMI_FHDR_END>
+#**********************************************************************
+
+all : PttWrapper
+
+PttWrapper : $(BUILD_DIR)\PttWrapper.mak PttWrapperBin
+
+$(BUILD_DIR)\PttWrapper.mak : $(PttWrapper_DIR)\$(@B).cif $(PttWrapper_DIR)\$(@B).mak $(BUILD_RULES)
+ $(CIF2MAK) $(PttWrapper_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS)
+
+PttWrapperBin : $(AMIDXELIB)
+ $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
+ /f $(BUILD_DIR)\PttWrapper.mak all\
+ GUID=b19ef33c-10a6-4066-9217-8e5ee011a52f\
+ ENTRY_POINT=PttWrapperEntryPoint\
+ TYPE=BS_DRIVER \
+ COMPRESS=1
+
+#*************************************************************************
+#*************************************************************************
+#** **
+#** (C)Copyright 1985-2010, American Megatrends, Inc. **
+#** **
+#** All Rights Reserved. **
+#** **
+#** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 **
+#** **
+#** Phone: (770)-246-8600 **
+#** **
+#*************************************************************************
+#************************************************************************* \ No newline at end of file
diff --git a/Board/EM/MeWrapper/PttWrapper/PttWrapper.sdl b/Board/EM/MeWrapper/PttWrapper/PttWrapper.sdl
new file mode 100644
index 0000000..c7643e3
--- /dev/null
+++ b/Board/EM/MeWrapper/PttWrapper/PttWrapper.sdl
@@ -0,0 +1,27 @@
+TOKEN
+ Name = "PttWrapper_SUPPORT"
+ Value = "0"
+ Help = "Main switch to enable TdtWrapper support in Project"
+ TokenType = Boolean
+ TargetMAK = Yes
+ TargetH = Yes
+ Master = Yes
+ Token = "PTTHciSmm_SUPPORT" "=" "1"
+End
+
+
+PATH
+ Name = "PttWrapper_DIR"
+End
+
+MODULE
+ Help = "Includes TdtWrapper.mak to Project"
+ File = "PttWrapper.mak"
+End
+
+ELINK
+ Name = "$(BUILD_DIR)\PttWrapper.ffs"
+ Parent = "FV_MAIN"
+ InvokeOrder = AfterParent
+End
+