summaryrefslogtreecommitdiff
path: root/CRB/CRBDxe.c
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 /CRB/CRBDxe.c
downloadzprj-master.tar.xz
init. 1AQQW051HEADmaster
Diffstat (limited to 'CRB/CRBDxe.c')
-rw-r--r--CRB/CRBDxe.c146
1 files changed, 146 insertions, 0 deletions
diff --git a/CRB/CRBDxe.c b/CRB/CRBDxe.c
new file mode 100644
index 0000000..52298c1
--- /dev/null
+++ b/CRB/CRBDxe.c
@@ -0,0 +1,146 @@
+//*************************************************************************
+//*************************************************************************
+//** **
+//** (C)Copyright 1985-2013, American Megatrends, Inc. **
+//** **
+//** All Rights Reserved. **
+//** **
+//** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 **
+//** **
+//** Phone: (770)-246-8600 **
+//** **
+//*************************************************************************
+//*************************************************************************
+
+//*************************************************************************
+// $Header: /Alaska/Projects/Intel/Haswell/LynxPoint_SharkBay-DT_Crb_1AQQW/CRB/CRBDxe.c 2 4/16/13 5:27a Thomaschen $
+//
+// $Revision: 2 $
+//
+// $Date: 4/16/13 5:27a $
+//*************************************************************************
+// Revision History
+// ----------------
+// $Log: /Alaska/Projects/Intel/Haswell/LynxPoint_SharkBay-DT_Crb_1AQQW/CRB/CRBDxe.c $
+//
+// 2 4/16/13 5:27a Thomaschen
+//
+// 1 2/12/12 10:38p Victortu
+// Intel SharkBay CRB initially releases.
+//
+//*************************************************************************
+//<AMI_FHDR_START>
+//
+// Name: CRBDXE.c
+//
+// Description: This file contains code for Chipset Reference Board Template
+// initialization in the DXE stage
+//
+//<AMI_FHDR_END>
+//*************************************************************************
+
+//---------------------------------------------------------------------------
+// Include(s)
+//---------------------------------------------------------------------------
+
+#include <Efi.h>
+#include <token.h>
+#include <AmiLib.h>
+#include <AmiDxeLib.h>
+#include <Setup.h>
+#include <Dxe.h>
+#include <PCI.h>
+#include <AmiHobs.h>
+#include <AmiCspLib.h>
+
+// Produced Protocols
+
+// Consumed Protocols
+#include <Protocol\PciIO.h>
+#include <Protocol\PciRootBridgeIo.h>
+
+#if ACPI_SUPPORT
+ #if defined(PI_SPECIFICATION_VERSION)&&(PI_SPECIFICATION_VERSION>=0x0001000A)
+ #include <Protocol\S3SaveState.h>
+ #else
+ #include <Protocol\BootScriptSave.h>
+ #endif
+#endif
+
+//---------------------------------------------------------------------------
+// Constant, Macro and Type Definition(s)
+//---------------------------------------------------------------------------
+// Constant Definition(s)
+
+#if ACPI_SUPPORT
+ #if defined(PI_SPECIFICATION_VERSION)&&(PI_SPECIFICATION_VERSION>=0x0001000A)
+ #define CRB_S3_SAVE_PROTOCOL EFI_S3_SAVE_STATE_PROTOCOL
+ #define CRB_S3_SAVE_PROTOCOL_GUID gEfiS3SaveStateProtocolGuid
+ #else
+ #define CRB_S3_SAVE_PROTOCOL EFI_BOOT_SCRIPT_SAVE_PROTOCOL
+ #define CRB_S3_SAVE_PROTOCOL_GUID gEfiBootScriptSaveGuid
+ #endif
+#endif
+
+// Macro Definition(s)
+
+// Type Definition(s)
+
+// Function Prototype(s)
+
+//---------------------------------------------------------------------------
+// Variable and External Declaration(s)
+//---------------------------------------------------------------------------
+// Variable Declaration(s)
+
+// GUID Definition(s)
+
+// Protocol Definition(s)
+
+// External Declaration(s)
+
+// Function Definition(s)
+
+//---------------------------------------------------------------------------
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+//
+// Procedure: CRBDXE_Init
+//
+// Description: This function is the entry point for CRB DXE driver.
+// This function initializes the CRB in DXE phase.
+//
+// Input: ImageHandle - Image handle
+// SystemTable - Pointer to the system table
+//
+// Output: EFI_SUCCESS
+//
+// Notes: This routine is called very early, prior to SBDXE and NBDXE.
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+
+EFI_STATUS CRBDXE_Init (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable )
+{
+ EFI_STATUS Status = EFI_SUCCESS;
+
+ InitAmiLib(ImageHandle, SystemTable);
+
+ return EFI_SUCCESS;
+}
+
+//*************************************************************************
+//*************************************************************************
+//** **
+//** (C)Copyright 1985-2013, American Megatrends, Inc. **
+//** **
+//** All Rights Reserved. **
+//** **
+//** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 **
+//** **
+//** Phone: (770)-246-8600 **
+//** **
+//*************************************************************************
+//*************************************************************************