summaryrefslogtreecommitdiff
path: root/Board/EM/MeWrapper/MePciPlatform
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/MePciPlatform
downloadzprj-b7c51c9cf4864df6aabb99a1ae843becd577237c.tar.xz
init. 1AQQW051HEADmaster
Diffstat (limited to 'Board/EM/MeWrapper/MePciPlatform')
-rw-r--r--Board/EM/MeWrapper/MePciPlatform/MePciPlatform.c342
-rw-r--r--Board/EM/MeWrapper/MePciPlatform/MePciPlatform.cif12
-rw-r--r--Board/EM/MeWrapper/MePciPlatform/MePciPlatform.dxs98
-rw-r--r--Board/EM/MeWrapper/MePciPlatform/MePciPlatform.h154
-rw-r--r--Board/EM/MeWrapper/MePciPlatform/MePciPlatform.mak122
-rw-r--r--Board/EM/MeWrapper/MePciPlatform/MePciPlatform.sdl24
6 files changed, 752 insertions, 0 deletions
diff --git a/Board/EM/MeWrapper/MePciPlatform/MePciPlatform.c b/Board/EM/MeWrapper/MePciPlatform/MePciPlatform.c
new file mode 100644
index 0000000..db1c1ee
--- /dev/null
+++ b/Board/EM/MeWrapper/MePciPlatform/MePciPlatform.c
@@ -0,0 +1,342 @@
+//*************************************************************************
+//*************************************************************************
+//** **
+//** (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/MePciPlatform/MePciPlatform.c 1 2/08/12 1:05a Klzhan $
+//
+// $Revision: 1 $
+//
+// $Date: 2/08/12 1:05a $
+//
+//**********************************************************************
+// Revision History
+// ----------------
+// $Log: /Alaska/SOURCE/Modules/SharkBayRefCodes/ME/MeWrapper/MePciPlatform/MePciPlatform.c $
+//
+// 1 2/08/12 1:05a Klzhan
+// Initial Check in
+//
+// 1 2/25/11 1:41a Klzhan
+// Initial Check-in
+//
+// 1 12/03/10 5:09a Klzhan
+// Initial Check-in.
+//
+//
+//**********************************************************************
+
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: MePciPlatform.c
+//
+// Description:
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+/*++
+
+This file contains a 'Sample Driver' and is licensed as such
+under the terms of your license agreement with Intel or your
+vendor. This file may be modified by the user, subject to
+the additional terms of the license agreement
+
+--*/
+
+/*++
+Copyright (c) 2008 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:
+
+ MePciPlatform.c
+
+Abstract:
+
+
+--*/
+#include "MePciPlatform.h"
+
+#define SETUP_GUID \
+ {0xEC87D643, 0xEBA4, 0x4BB5, 0xA1, 0xE5, 0x3F, 0x3E, 0x36, 0xB2, 0x0D, 0xA9}
+EFI_GUID gSetupGuid = SETUP_GUID;
+//-jeff PLATFORM_INFO_PROTOCOL *gPlatformInfoProtocol;
+
+EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo;
+EFI_PCI_PLATFORM_PROTOCOL *MePciPlatformInstance;
+PLATFORM_PCI_EXPRESS_BRIDGE *mPlatformPciExpressBridge;
+
+EFI_STATUS
+EFIAPI
+PhaseNotify (
+ IN EFI_PCI_PLATFORM_PROTOCOL *This,
+ IN EFI_HANDLE HostBridge,
+ IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PHASE Phase,
+ IN EFI_PCI_CHIPSET_EXECUTION_PHASE ChipsetPhase
+ )
+/*++
+
+ Routine Description:
+ The PlatformNotify() function can be used to notify the platform driver so that
+ it can perform platform-specific actions. No specific actions are required.
+ Eight notification points are defined at this time. More synchronization points
+ may be added as required in the future. The PCI bus driver calls the platform driver
+ twice for every Phase-once before the PCI Host Bridge Resource Allocation Protocol
+ driver is notified, and once after the PCI Host Bridge Resource Allocation Protocol
+ driver has been notified.
+ This member function may not perform any error checking on the input parameters. It
+ also does not return any error codes. If this member function detects any error condition,
+ it needs to handle those errors on its own because there is no way to surface any
+ errors to the caller.
+
+ Arguments:
+ This - Pointer to the EFI_PCI_PLATFORM_PROTOCOL instance.
+ HostBridge - The handle of the host bridge controller.
+ Phase - The phase of the PCI bus enumeration.
+ ChipsetPhase - Defines the execution phase of the PCI chipset driver.
+
+ Returns:
+ EFI_SUCCESS - The function completed successfully.
+
+--*/
+{
+/*
+ EFI_STATUS Status;
+
+ if (Phase == EfiPciHostBridgeEndBusAllocation && ChipsetPhase == ChipsetEntry) {
+ Status = HeciSetClockEnables (CurrentClockMask, CurrentClockEnables, TRUE);
+ }
+*/
+ return EFI_SUCCESS;
+}
+
+EFI_STATUS
+EFIAPI
+PlatformPrepController (
+ IN EFI_PCI_PLATFORM_PROTOCOL *This,
+ IN EFI_HANDLE HostBridge,
+ IN EFI_HANDLE RootBridge,
+ IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS PciAddress,
+ IN EFI_PCI_CONTROLLER_RESOURCE_ALLOCATION_PHASE Phase,
+ IN EFI_PCI_CHIPSET_EXECUTION_PHASE ChipsetPhase
+ )
+/*++
+
+ Routine Description:
+ The PlatformPrepController() function can be used to notify the platform driver so that
+ it can perform platform-specific actions. No specific actions are required.
+ Several notification points are defined at this time. More synchronization points may be
+ added as required in the future. The PCI bus driver calls the platform driver twice for
+ every PCI controller-once before the PCI Host Bridge Resource Allocation Protocol driver
+ is notified, and once after the PCI Host Bridge Resource Allocation Protocol driver has
+ been notified.
+ This member function may not perform any error checking on the input parameters. It also
+ does not return any error codes. If this member function detects any error condition, it
+ needs to handle those errors on its own because there is no way to surface any errors to
+ the caller.
+
+ Arguments:
+ This - Pointer to the EFI_PCI_PLATFORM_PROTOCOL instance.
+ HostBridge - The associated PCI host bridge handle.
+ RootBridge - The associated PCI root bridge handle.
+ PciAddress - The address of the PCI device on the PCI bus.
+ Phase - The phase of the PCI controller enumeration.
+ ChipsetPhase - Defines the execution phase of the PCI chipset driver.
+
+ Returns:
+ EFI_SUCCESS - The function completed successfully.
+
+--*/
+{
+ return EFI_SUCCESS;
+}
+
+EFI_STATUS
+EFIAPI
+GetPlatformPolicy (
+ IN EFI_PCI_PLATFORM_PROTOCOL *This,
+ OUT EFI_PCI_PLATFORM_POLICY *PciPolicy
+ )
+/*++
+
+ Routine Description:
+ The GetPlatformPolicy() function retrieves the platform policy regarding PCI
+ enumeration. The PCI bus driver and the PCI Host Bridge Resource Allocation Protocol
+ driver can call this member function to retrieve the policy.
+
+ Arguments:
+ This - Pointer to the EFI_PCI_PLATFORM_PROTOCOL instance.
+ PciPolicy - The platform policy with respect to VGA and ISA aliasing.
+
+ Returns:
+ EFI_SUCCESS - The function completed successfully.
+ EFI_INVALID_PARAMETER - PciPolicy is NULL.
+
+--*/
+{
+ return EFI_SUCCESS;
+}
+
+EFI_STATUS
+EFIAPI
+GetPciRom (
+ IN EFI_PCI_PLATFORM_PROTOCOL *This,
+ IN EFI_HANDLE PciHandle,
+ OUT VOID **RomImage,
+ OUT UINTN *RomSize
+ )
+/*++
+
+ Routine Description:
+ The GetPciRom() function gets the PCI device's option ROM from a platform-specific location.
+ The option ROM will be loaded into memory. This member function is used to return an image
+ that is packaged as a PCI 2.2 option ROM. The image may contain both legacy and EFI option
+ ROMs. See the EFI 1.10 Specification for details. This member function can be used to return
+ option ROM images for embedded controllers. Option ROMs for embedded controllers are typically
+ stored in platform-specific storage, and this member function can retrieve it from that storage
+ and return it to the PCI bus driver. The PCI bus driver will call this member function before
+ scanning the ROM that is attached to any controller, which allows a platform to specify a ROM
+ image that is different from the ROM image on a PCI card.
+
+ Arguments:
+ This - Pointer to the EFI_PCI_PLATFORM_PROTOCOL instance.
+ PciHandle - The handle of the PCI device.
+ RomImage - If the call succeeds, the pointer to the pointer to the option ROM image.
+ Otherwise, this field is undefined. The memory for RomImage is allocated
+ by EFI_PCI_PLATFORM_PROTOCOL.GetPciRom() using the EFI Boot Service AllocatePool().
+ It is the caller's responsibility to free the memory using the EFI Boot Service
+ FreePool(), when the caller is done with the option ROM.
+ RomSize - If the call succeeds, a pointer to the size of the option ROM size. Otherwise,
+ this field is undefined.
+
+ Returns:
+ EFI_SUCCESS - The option ROM was available for this device and loaded into memory.
+ EFI_NOT_FOUND - No option ROM was available for this device.
+ EFI_OUT_OF_RESOURCES - No memory was available to load the option ROM.
+ EFI_DEVICE_ERROR - An error occurred in getting the option ROM.
+
+--*/
+{
+ return EFI_NOT_FOUND;
+}
+
+//
+// Driver entry point
+//
+EFI_DRIVER_ENTRY_POINT (MePlatformPolicyEntryPoint)
+
+//
+// Function implementations
+//
+EFI_STATUS
+EFIAPI
+MePciPlatformEntryPoint (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+)
+/*++
+
+Routine Description:
+
+ Entry point for the Management Engine Driver.
+
+Arguments:
+
+ ImageHandle Image handle of this driver.
+ SystemTable Global system service table.
+
+Returns:
+
+ EFI_SUCCESS Initialization complete.
+ EFI_UNSUPPORTED The chipset is unsupported by this driver.
+ EFI_OUT_OF_RESOURCES Do not have enough resources to initialize the driver.
+ EFI_DEVICE_ERROR Device error, driver exits abnormally.
+
+--*/
+{
+ EFI_STATUS Status;
+ EFI_HECI_PROTOCOL *Heci;
+ UINT32 MeMode;
+
+
+ EfiInitializeDriverLib (ImageHandle, SystemTable);
+
+ //
+ // Locate Heci protocol
+ //
+ Status = gBS->LocateProtocol (&gEfiHeciProtocolGuid, NULL, &Heci);
+ if (EFI_ERROR(Status)) {
+ DEBUG ((EFI_D_ERROR, "MePciPlatform locate Heci failed and the Status is %r\n", Status));
+ return Status;
+ }
+
+ Status = Heci->GetMeMode(&MeMode);
+ if (EFI_ERROR(Status)) {
+ DEBUG ((EFI_D_ERROR, "MePciPlatform Get Me mode failed and the Status is %r\n", Status));
+ return Status;
+ }
+ if (MeMode == ME_MODE_SECOVER) {
+ DEBUG ((EFI_D_ERROR, "SetICC doesn't supported in this mode\n"));
+ return EFI_UNSUPPORTED;
+ }
+
+ MePciPlatformInstance = (EFI_PCI_PLATFORM_PROTOCOL *) (UINTN) AllocatePool (sizeof (EFI_PCI_PLATFORM_PROTOCOL));
+
+ //-jeff Status = gBS->LocateProtocol(&gPlatformInfoProtocolGuid, NULL, &gPlatformInfoProtocol);
+ //-jeff ASSERT_EFI_ERROR (Status);
+
+ // Locate root bridge IO protocol
+ //
+ Status = gBS->LocateProtocol (&gEfiPciRootBridgeIoProtocolGuid, NULL, &PciRootBridgeIo);
+ if (EFI_ERROR(Status)) {
+ return Status;
+ }
+
+ MePciPlatformInstance->PhaseNotify = PhaseNotify;
+ MePciPlatformInstance->PlatformPrepController = PlatformPrepController;
+ MePciPlatformInstance->GetPlatformPolicy = GetPlatformPolicy;
+ MePciPlatformInstance->GetPciRom = GetPciRom;
+
+ //
+ // Install the EFI_MANAGEMENT_ENGINE_PROTOCOL interface
+ //
+ Status = gBS->InstallProtocolInterface (
+ &ImageHandle,
+ &gEfiPciPlatformProtocolGuid,
+ EFI_NATIVE_INTERFACE,
+ MePciPlatformInstance
+ );
+
+ return Status;
+}
+
+//*************************************************************************
+//*************************************************************************
+//** **
+//** (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/MePciPlatform/MePciPlatform.cif b/Board/EM/MeWrapper/MePciPlatform/MePciPlatform.cif
new file mode 100644
index 0000000..3b2bea3
--- /dev/null
+++ b/Board/EM/MeWrapper/MePciPlatform/MePciPlatform.cif
@@ -0,0 +1,12 @@
+<component>
+ name = "MePciPlatform"
+ category = ModulePart
+ LocalRoot = "Board\EM\MeWrapper\MePciPlatform"
+ RefName = "MePciPlatform"
+[files]
+"MePciPlatform.c"
+"MePciPlatform.h"
+"MePciPlatform.sdl"
+"MePciPlatform.mak"
+"MePciPlatform.dxs"
+<endComponent>
diff --git a/Board/EM/MeWrapper/MePciPlatform/MePciPlatform.dxs b/Board/EM/MeWrapper/MePciPlatform/MePciPlatform.dxs
new file mode 100644
index 0000000..1a16fc8
--- /dev/null
+++ b/Board/EM/MeWrapper/MePciPlatform/MePciPlatform.dxs
@@ -0,0 +1,98 @@
+//*************************************************************************
+//*************************************************************************
+//** **
+//** (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/MePciPlatform/MePciPlatform.dxs 1 2/08/12 1:05a Klzhan $
+//
+// $Revision: 1 $
+//
+// $Date: 2/08/12 1:05a $
+//
+//**********************************************************************
+// Revision History
+// ----------------
+// $Log: /Alaska/SOURCE/Modules/SharkBayRefCodes/ME/MeWrapper/MePciPlatform/MePciPlatform.dxs $
+//
+// 1 2/08/12 1:05a Klzhan
+// Initial Check in
+//
+// 1 2/25/11 1:41a Klzhan
+// Initial Check-in
+//
+// 1 12/03/10 5:09a Klzhan
+// Initial Check-in.
+//
+//
+//**********************************************************************
+
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: MePciPlatform.dxs
+//
+// Description:
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+/*++
+
+This file contains a 'Sample Driver' and is licensed as such
+under the terms of your license agreement with Intel or your
+vendor. This file may be modified by the user, subject to
+the additional terms of the license agreement
+
+--*/
+
+/*++
+Copyright (c) 2008 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:
+
+ MePciPlatform.dxs
+
+Abstract:
+
+ Dependency expression source file.
+
+--*/
+
+#include "EfiDepex.h"
+#include EFI_PROTOCOL_DEFINITION (Heci)
+#include EFI_PROTOCOL_DEFINITION (PciRootBridgeIo)
+
+DEPENDENCY_START
+ EFI_HECI_PROTOCOL_GUID AND
+ EFI_PCI_ROOT_BRIDGE_IO_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/MePciPlatform/MePciPlatform.h b/Board/EM/MeWrapper/MePciPlatform/MePciPlatform.h
new file mode 100644
index 0000000..818c3dc
--- /dev/null
+++ b/Board/EM/MeWrapper/MePciPlatform/MePciPlatform.h
@@ -0,0 +1,154 @@
+//*************************************************************************
+//*************************************************************************
+//** **
+//** (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/MePciPlatform/MePciPlatform.h 1 2/08/12 1:05a Klzhan $
+//
+// $Revision: 1 $
+//
+// $Date: 2/08/12 1:05a $
+//
+//**********************************************************************
+// Revision History
+// ----------------
+// $Log: /Alaska/SOURCE/Modules/SharkBayRefCodes/ME/MeWrapper/MePciPlatform/MePciPlatform.h $
+//
+// 1 2/08/12 1:05a Klzhan
+// Initial Check in
+//
+// 1 2/25/11 1:41a Klzhan
+// Initial Check-in
+//
+// 1 12/03/10 5:09a Klzhan
+// Initial Check-in.
+//
+//
+//**********************************************************************
+
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: MePciPlatform.h
+//
+// Description:
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+/*++
+
+This file contains a 'Sample Driver' and is licensed as such
+under the terms of your license agreement with Intel or your
+vendor. This file may be modified by the user, subject to
+the additional terms of the license agreement
+
+--*/
+
+/*++
+Copyright (c) 2008 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:
+
+ MePciPlatform.h
+
+Abstract:
+
+
+--*/
+#ifndef _DXE_ME_PCI_PLATFORM_H_
+#define _DXE_ME_PCI_PLATFORM_H_
+
+#include "EdkIIGlueDxe.h"
+#include "MeLib.h"
+
+#include EFI_PROTOCOL_PRODUCER (PciPlatform)
+#include EFI_PROTOCOL_DEFINITION (PciRootBridgeIo)
+
+#define EFI_DRIVER_ENTRY_POINT(x)
+
+#define Flex0 (1 << 0)
+#define Flex1 (1 << 1)
+#define Flex2 (1 << 2)
+#define Flex3 (1 << 3)
+#define PCI_Clock0 (1 << 7)
+#define PCI_Clock1 (1 << 8)
+#define PCI_Clock2 (1 << 9)
+#define PCI_Clock3 (1 << 10)
+#define PCI_Clock4 (1 << 11)
+#define SRC0 (1 << 16)
+#define SRC1 (1 << 17)
+#define SRC2 (1 << 18)
+#define SRC3 (1 << 19)
+#define SRC4 (1 << 20)
+#define SRC5 (1 << 21)
+#define SRC6 (1 << 22)
+#define SRC7 (1 << 23)
+#define CSI_SRC8 (1 << 24)
+#define CSI_DP (1 << 25)
+#define PEG_A (1 << 26)
+#define PEG_B (1 << 27)
+#define DMI (1 << 28)
+
+#define PCI_SKIP 0xFF
+#define R_PCH_PCIE_SLSTS 0x5A
+
+typedef union _R_PCH_PCIE_SLSTS_VALUE {
+ UINT16 REG;
+ struct {
+ UINT16 ReservedBIT0 : 1;
+ UINT16 PFD : 1;
+ UINT16 MSC : 1;
+ UINT16 PDC : 1;
+ UINT16 ReservedBIT4 : 1;
+ UINT16 MS : 1;
+ UINT16 PDS : 1;
+ UINT16 ReservedBIT7 : 1;
+ UINT16 LASC : 1;
+ UINT16 Reserved : 7;
+ } Fields;
+} R_PCH_PCIE_SLSTS_VALUE;
+
+typedef union _PCI_CFG_ADDR {
+ UINT64 ADDR;
+ EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS Addr;
+} PCI_CFG_ADDR;
+
+typedef struct {
+ PCI_CFG_ADDR PciExpressBridgeAddress;
+ BOOLEAN HotPlugSupport;
+ UINT32 ClockEnables;
+} PLATFORM_PCI_EXPRESS_BRIDGE;
+
+#endif
+
+
+//*************************************************************************
+//*************************************************************************
+//** **
+//** (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/MePciPlatform/MePciPlatform.mak b/Board/EM/MeWrapper/MePciPlatform/MePciPlatform.mak
new file mode 100644
index 0000000..b9ea7e4
--- /dev/null
+++ b/Board/EM/MeWrapper/MePciPlatform/MePciPlatform.mak
@@ -0,0 +1,122 @@
+#*************************************************************************
+#*************************************************************************
+#** **
+#** (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/MePciPlatform/MePciPlatform.mak 3 9/27/12 4:52a Klzhan $
+#
+# $Revision: 3 $
+#
+# $Date: 9/27/12 4:52a $
+#
+#**********************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/SOURCE/Modules/SharkBayRefCodes/ME/MeWrapper/MePciPlatform/MePciPlatform.mak $
+#
+# 3 9/27/12 4:52a Klzhan
+# [TAG] EIP102254
+# [Category] Spec Update
+# [Severity] Important
+# [Description] Update ME RC 0.7
+#
+# 2 2/23/12 8:57a Klzhan
+# Support New EDK
+#
+# 1 2/08/12 1:05a Klzhan
+# Initial Check in
+#
+# 1 2/25/11 1:41a Klzhan
+# Initial Check-in
+#
+# 1 12/03/10 5:10a Klzhan
+# Initial Check-in.
+#
+#
+#**********************************************************************
+#
+#<AMI_FHDR_START>
+#----------------------------------------------------------------------------
+#
+# Name: MePciPlatform.h
+#
+# Description:
+#
+#----------------------------------------------------------------------------
+#<AMI_FHDR_END>
+All : MePciPlatform
+
+MePciPlatform : $(BUILD_DIR)\MePciPlatform.mak MePciPlatformBin
+
+$(BUILD_DIR)\MePciPlatform.mak : $(MePciPlatform_DIR)\$(@B).cif $(MePciPlatform_DIR)\$(@B).mak $(BUILD_RULES)
+ $(CIF2MAK) $(MePciPlatform_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS)
+
+MePciPlatform_INCLUDES=\
+ $(EDK_INCLUDES) \
+ $(ME_INCLUDES) \
+ $(MISCFRAMEWORK_INCLUDES) \
+ $(NB_INCLUDES)\
+ $(SB_INCLUDES)\
+ $(EdkIIGlueLib_INCLUDES)\
+ $(INTEL_PCH_INCLUDES)\
+
+MePciPlatform_LIBS=\
+ $(EFIDRIVERLIB)\
+ $(MeProtocolLib_LIB)\
+ $(MeLibDxe_LIB)\
+ $(EdkIIGlueBaseLib_LIB)\
+!IF "$(x64_BUILD)"=="1"
+ $(EdkIIGlueBaseLibX64_LIB)\
+!ELSE
+ $(EdkIIGlueBaseLibIA32_LIB)\
+!ENDIF
+ $(EdkIIGlueDxeReportStatusCodeLib_LIB)\
+ $(EdkIIGlueDxeDebugLibReportStatusCode_LIB)\
+ $(EdkIIGlueDxeMemoryAllocationLib_LIB)\
+ $(EDKFRAMEWORKPROTOCOLLIB)\
+
+DxeCpuBuildDefine = \
+!IF "$(x64_BUILD)"=="1"
+ /DMDE_CPU_X64\
+!ELSE
+ /DMDE_CPU_IA32\
+!ENDIF
+
+MePciPlatform_DEFINES = \
+ $(DxeCpuBuildDefine)\
+
+MePciPlatformBin : $(MePciPlatform_LIBS)
+ $(MAKE) /$(MAKEFLAGS) $(EDK_DEFAULTS)\
+ /f $(BUILD_DIR)\MePciPlatform.mak all\
+ GUID=459C70C3-9344-4484-9F93-7822530D0D11\
+ "MY_INCLUDES = $(MePciPlatform_INCLUDES)" \
+ "MY_DEFINES=$(MePciPlatform_DEFINES)"\
+ ENTRY_POINT=MePciPlatformEntryPoint\
+ DEPEX1=$(MePciPlatform_DIR)\MePciPlatform.dxs\
+ DEPEX1_TYPE=EFI_SECTION_DXE_DEPEX\
+ 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 **
+#** **
+#*************************************************************************
+#*************************************************************************
diff --git a/Board/EM/MeWrapper/MePciPlatform/MePciPlatform.sdl b/Board/EM/MeWrapper/MePciPlatform/MePciPlatform.sdl
new file mode 100644
index 0000000..5c9f445
--- /dev/null
+++ b/Board/EM/MeWrapper/MePciPlatform/MePciPlatform.sdl
@@ -0,0 +1,24 @@
+TOKEN
+ Name = "MePciPlatform_SUPPORT"
+ Value = "1"
+ Help = "Main switch to enable MePciPlatform support in Project"
+ TokenType = Boolean
+ TargetEQU = Yes
+ TargetMAK = Yes
+ Master = Yes
+End
+
+PATH
+ Name = "MePciPlatform_DIR"
+End
+
+MODULE
+ Help = "Includes MePciPlatform.mak to Project"
+ File = "MePciPlatform.mak"
+End
+
+ELINK
+ Name = "$(BUILD_DIR)\MePciPlatform.ffs"
+ Parent = "FV_MAIN"
+ InvokeOrder = AfterParent
+End