summaryrefslogtreecommitdiff
path: root/ReferenceCode/RapidStart/GfxDisplay/Library
diff options
context:
space:
mode:
Diffstat (limited to 'ReferenceCode/RapidStart/GfxDisplay/Library')
-rw-r--r--ReferenceCode/RapidStart/GfxDisplay/Library/Dxe/GfxDisplayLibDxe.c141
-rw-r--r--ReferenceCode/RapidStart/GfxDisplay/Library/Dxe/GfxDisplayLibDxe.cif12
-rw-r--r--ReferenceCode/RapidStart/GfxDisplay/Library/Dxe/GfxDisplayLibDxe.h29
-rw-r--r--ReferenceCode/RapidStart/GfxDisplay/Library/Dxe/GfxDisplayLibDxe.inf58
-rw-r--r--ReferenceCode/RapidStart/GfxDisplay/Library/Dxe/GfxDisplayLibDxe.mak76
-rw-r--r--ReferenceCode/RapidStart/GfxDisplay/Library/Dxe/GfxDisplayLibDxe.sdl77
-rw-r--r--ReferenceCode/RapidStart/GfxDisplay/Library/Pei/GfxDisplayLibPei.c55
-rw-r--r--ReferenceCode/RapidStart/GfxDisplay/Library/Pei/GfxDisplayLibPei.cif12
-rw-r--r--ReferenceCode/RapidStart/GfxDisplay/Library/Pei/GfxDisplayLibPei.h35
-rw-r--r--ReferenceCode/RapidStart/GfxDisplay/Library/Pei/GfxDisplayLibPei.inf51
-rw-r--r--ReferenceCode/RapidStart/GfxDisplay/Library/Pei/GfxDisplayLibPei.mak75
-rw-r--r--ReferenceCode/RapidStart/GfxDisplay/Library/Pei/GfxDisplayLibPei.sdl77
12 files changed, 698 insertions, 0 deletions
diff --git a/ReferenceCode/RapidStart/GfxDisplay/Library/Dxe/GfxDisplayLibDxe.c b/ReferenceCode/RapidStart/GfxDisplay/Library/Dxe/GfxDisplayLibDxe.c
new file mode 100644
index 0000000..8a1c156
--- /dev/null
+++ b/ReferenceCode/RapidStart/GfxDisplay/Library/Dxe/GfxDisplayLibDxe.c
@@ -0,0 +1,141 @@
+/** @file
+ Implementation file for GfxDisplay Dxe functionality
+
+@copyright
+ Copyright (c) 2012 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.
+
+ This file contains an 'Intel Peripheral Driver' and uniquely
+ identified as "Intel Reference Module" 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
+**/
+
+//
+// External include files do NOT need to be explicitly specified in real EDKII
+// environment
+//
+//
+// 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 EFI_PROTOCOL_PRODUCER (DxeGfxProtocol)
+#include EFI_PROTOCOL_DEPENDENCY (RapidStartGlobalNvsArea)
+#include EFI_PROTOCOL_CONSUMER (RapidStartPlatformPolicy)
+#include EFI_PROTOCOL_DEPENDENCY (IgdOpRegion)
+
+#define BDS_ALL_DRIVERS_CONNECTED_PROTOCOL_GUID \
+ {0xdbc9fd21, 0xfad8, 0x45b0, 0x9e, 0x78, 0x27, 0x15, 0x88, 0x67, 0xcc, 0x93}
+
+#define EFI_CONSOLE_CONTROL_PROTOCOL_GUID \
+ {0xf42f7782, 0x12e, 0x4c12, 0x99, 0x56, 0x49, 0xf9, 0x43, 0x4, 0xf7, 0x21}
+
+EFI_GUID gEfiConsoleControlProtocolGuid = BDS_ALL_DRIVERS_CONNECTED_PROTOCOL_GUID;
+
+#endif
+
+//
+// Internal function for GfxDisplayLib used only
+//
+/**
+ Event callback to get screen shot for RapidStart exit
+
+ @param[in] Event - The event that triggered this notification function
+ @param[in] Context - Pointer to the notification functions context
+**/
+STATIC
+VOID
+RapidStartDisplayScreenCallback (
+ IN EFI_EVENT Event,
+ IN VOID *Context
+ )
+{
+ EFI_STATUS Status, IgdOpRegionStatus;
+ VOID *ProtocolPointer;
+ DXE_GFX_PROTOCOL *DxeGfxProtocol;
+ RAPID_START_PLATFORM_POLICY_PROTOCOL *RapidStartPolicy;
+ RAPID_START_GLOBAL_NVS_AREA_PROTOCOL *RapidStartGlobalNvsAreaProtocol;
+ RAPID_START_PERSISTENT_DATA *RapidStartData;
+ IGD_OPREGION_PROTOCOL *IgdOpRegion;
+
+ //
+ // Check whether this is real protocal callback notification, or just a SignalEvent
+ //
+ Status = gBS->LocateProtocol (&gEfiConsoleControlProtocolGuid, NULL, &ProtocolPointer);
+ if (EFI_ERROR (Status)) {
+ return;
+ }
+
+ //
+ // Locate RapidStart platform policy.
+ //
+ Status = gBS->LocateProtocol (&gRapidStartPlatformPolicyProtocolGuid, NULL, &RapidStartPolicy);
+ if (EFI_ERROR (Status)) {
+ DEBUG ((EFI_D_ERROR, "No RapidStart Platform Policy Protocol available\n"));
+ return;
+ }
+
+ Status = gBS->LocateProtocol (&gRapidStartGlobalNvsAreaProtocolGuid, NULL, &RapidStartGlobalNvsAreaProtocol);
+ if (EFI_ERROR (Status)) {
+ DEBUG ((EFI_D_INFO, "No RapidStart info protocol available\n"));
+ return;
+ }
+
+ RapidStartData = RapidStartGlobalNvsAreaProtocol->RapidStartData;
+
+ IgdOpRegionStatus = gBS->LocateProtocol (&gIgdOpRegionProtocolGuid, NULL, &IgdOpRegion);
+ if (!EFI_ERROR (IgdOpRegionStatus)) {
+ IgdOpRegion->OpRegion->MBox3.FDSP = RapidStartData->DssAddress;
+ IgdOpRegion->OpRegion->MBox3.FDSS = (UINT32)(RapidStartData->DssSize);
+ }
+
+ if (RapidStartPolicy->DisplaySaveRestore == 1) {
+ Status = gBS->LocateProtocol (&gDxeGfxProtocolGuid, NULL, &DxeGfxProtocol);
+ DEBUG ((EFI_D_INFO, "RapidStartDisplayScreenCallback():Locating DxeGfxProtocol - Status = %r\n", Status));
+ if (!EFI_ERROR(Status)) {
+ if (RapidStartPolicy->DisplayType == BIOS_RESTORE) {
+ Status = DxeGfxProtocol->SaveDisplay(NULL);
+ } else {
+ Status = DxeGfxProtocol->SaveDisplay((UINT8*)(UINTN)((RapidStartData)->DssAddress));
+ }
+ }
+ }
+
+ gBS->CloseEvent (Event);
+}
+
+//
+// Interface functions of GfxDisplayLib
+//
+/**
+ Install EFI_CONSOLE_CONTROL_PROTOCOL_GUID callback handler.
+**/
+VOID
+RegisterForRapidStartDisplayScreenCallback (
+ VOID
+ )
+{
+ EFI_EVENT Event;
+
+ //
+ // Create an EFI_CONSOLE_CONTROL_PROTOCOL_GUID protocol call back event, to capture splash screen.
+ //
+ EfiCreateProtocolNotifyEvent (
+ &gEfiConsoleControlProtocolGuid,
+ EFI_TPL_CALLBACK,
+ RapidStartDisplayScreenCallback,
+ NULL,
+ &Event
+ );
+}
diff --git a/ReferenceCode/RapidStart/GfxDisplay/Library/Dxe/GfxDisplayLibDxe.cif b/ReferenceCode/RapidStart/GfxDisplay/Library/Dxe/GfxDisplayLibDxe.cif
new file mode 100644
index 0000000..f97cd70
--- /dev/null
+++ b/ReferenceCode/RapidStart/GfxDisplay/Library/Dxe/GfxDisplayLibDxe.cif
@@ -0,0 +1,12 @@
+<component>
+ name = "GfxDisplayLibDxe"
+ category = ModulePart
+ LocalRoot = "ReferenceCode\RapidStart\GfxDisplay\Library\Dxe\"
+ RefName = "GfxDisplayLibDxe"
+[files]
+"GfxDisplayLibDxe.sdl"
+"GfxDisplayLibDxe.mak"
+"GfxDisplayLibDxe.c"
+"GfxDisplayLibDxe.h"
+"GfxDisplayLibDxe.inf"
+<endComponent>
diff --git a/ReferenceCode/RapidStart/GfxDisplay/Library/Dxe/GfxDisplayLibDxe.h b/ReferenceCode/RapidStart/GfxDisplay/Library/Dxe/GfxDisplayLibDxe.h
new file mode 100644
index 0000000..59fd7a5
--- /dev/null
+++ b/ReferenceCode/RapidStart/GfxDisplay/Library/Dxe/GfxDisplayLibDxe.h
@@ -0,0 +1,29 @@
+/** @file
+ Header file for GfxDisplay functionality
+
+@copyright
+ Copyright (c) 2012 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.
+
+ This file contains an 'Intel Peripheral Driver' and uniquely
+ identified as "Intel Reference Module" 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
+**/
+#ifndef _DXE_GFX_DISPLAY_LIB_H_
+#define _DXE_GFX_DISPLAY_LIB_H_
+
+VOID
+RegisterForRapidStartDisplayScreenCallback (
+ VOID
+ );
+
+#endif
diff --git a/ReferenceCode/RapidStart/GfxDisplay/Library/Dxe/GfxDisplayLibDxe.inf b/ReferenceCode/RapidStart/GfxDisplay/Library/Dxe/GfxDisplayLibDxe.inf
new file mode 100644
index 0000000..c9cc81b
--- /dev/null
+++ b/ReferenceCode/RapidStart/GfxDisplay/Library/Dxe/GfxDisplayLibDxe.inf
@@ -0,0 +1,58 @@
+## @file
+# Component description file for GfxDisplay Library functions for Dxe
+#
+#@copyright
+# Copyright (c) 2012 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.
+#
+# 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
+#
+
+[defines]
+BASE_NAME = GfxDisplayLibDxe
+COMPONENT_TYPE = LIBRARY
+
+[sources.common]
+ GfxDisplayLibDxe.c
+ GfxDisplayLibDxe.h
+
+[includes.common]
+ $(EFI_SOURCE)\$(PROJECT_RAPID_START_ROOT)
+ $(EFI_SOURCE)\$(PROJECT_RAPID_START_ROOT)\Include
+ $(EFI_SOURCE)\$(PROJECT_SA_ROOT)
+
+#
+# EDK II Glue Library utilizes some standard headers from EDK
+#
+ $(EDK_SOURCE)\Foundation
+ $(EDK_SOURCE)\Foundation\Core\Dxe
+ $(EDK_SOURCE)\Foundation\Efi
+ $(EDK_SOURCE)\Foundation\Efi\Include
+ $(EDK_SOURCE)\Foundation\Framework
+ $(EDK_SOURCE)\Foundation\Framework\Include
+ $(EDK_SOURCE)\Foundation\Include
+ $(EDK_SOURCE)\Foundation\Include\IndustryStandard
+ $(EDK_SOURCE)\Foundation\Include\Pei
+ $(EDK_SOURCE)\Foundation\Library\Dxe\Include
+ $(EDK_SOURCE)\Foundation\Library\EdkIIGlueLib\Include
+
+[libraries.common]
+ EdkFrameworkProtocolLib
+ EdkIIGlueBaseMemoryLib
+ EdkIIGlueDxeFirmwarePerformanceLib
+ RapidStartProtocolLib
+ IntelSaProtocolLib
+
+[nmake.common]
+ C_FLAGS = $(C_FLAGS) /D __EDKII_GLUE_BASE_MEMORY_LIB__ \
+ /D __EDKII_GLUE_EDK_DXE_RUNTIME_DRIVER_LIB__ \
+ /D __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
diff --git a/ReferenceCode/RapidStart/GfxDisplay/Library/Dxe/GfxDisplayLibDxe.mak b/ReferenceCode/RapidStart/GfxDisplay/Library/Dxe/GfxDisplayLibDxe.mak
new file mode 100644
index 0000000..02f32f7
--- /dev/null
+++ b/ReferenceCode/RapidStart/GfxDisplay/Library/Dxe/GfxDisplayLibDxe.mak
@@ -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/GfxDisplayLibDxe/GfxDisplayLibDxe.mak 2 10/15/12 5:11a Bensonlai $
+#
+# $Revision: 2 $
+#
+# $Date: 10/15/12 5:11a $
+#*************************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/SOURCE/Modules/Intel Fast Flash Standby/iRST_SharkBay/GfxDisplayLibDxe/GfxDisplayLibDxe.mak $
+#
+# 2 10/15/12 5:11a Bensonlai
+# [Category] Improvement
+# [Severity] Important
+# [Description] Update Intel Rapid Start Graphics Driver for Shark Bay
+# Platform 5.0.1.1001, please increase your FV_BB_BLOCKS size if you
+# compile fail that caused by FV_BB size too small.
+# [Files] ReferenceCode\RapidStart\GfxDisplay\FfsGfxDriver\Pei\*.*,
+# ReferenceCode\RapidStart\GfxDisplay\FfsGfxDriver\Dxe\*.*
+#
+# 1 9/26/12 3:51a Yurenlai
+# [TAG] None
+# [Category] Improvement
+# [Severity] Important
+# [Description] Update Intel Rapid Start Technology Framework Reference
+# Code Beta Version 0.7.0.
+# [Description] ReferenceCode\RapidStart\*.*, RapidStartPeiLib.h
+#
+#*************************************************************************
+
+all : GfxDisplayLibDxe
+
+$(GfxDisplayLibDxe_LIB) : GfxDisplayLibDxe
+
+GfxDisplayLibDxe : $(BUILD_DIR)\GfxDisplayLibDxe.mak GfxDisplayLibDxeBin
+
+$(BUILD_DIR)\GfxDisplayLibDxe.mak : $(GfxDisplayLibDxe_DIR)\$(@B).cif $(GfxDisplayLibDxe_DIR)\$(@B).mak $(BUILD_RULES)
+ $(CIF2MAK) $(GfxDisplayLibDxe_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS)
+
+GfxDisplayLibDxe_INCLUDES =\
+ $(EDK_INCLUDES)\
+ $(RAPIDSTART_INCLUDES)\
+ $(INTEL_MCH_INCLUDES)\
+
+GfxDisplayLibDxeBin : $(INTEL_SA_PROTOCOL_LIB)
+ $(MAKE) /$(MAKEFLAGS) $(EDKIIGLUE_DEFAULTS)\
+ /f $(BUILD_DIR)\GfxDisplayLibDxe.mak all\
+ "MY_INCLUDES=$(GfxDisplayLibDxe_INCLUDES)" \
+ TYPE=LIBRARY
+#*************************************************************************
+#*************************************************************************
+#** **
+#** (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/ReferenceCode/RapidStart/GfxDisplay/Library/Dxe/GfxDisplayLibDxe.sdl b/ReferenceCode/RapidStart/GfxDisplay/Library/Dxe/GfxDisplayLibDxe.sdl
new file mode 100644
index 0000000..7c590da
--- /dev/null
+++ b/ReferenceCode/RapidStart/GfxDisplay/Library/Dxe/GfxDisplayLibDxe.sdl
@@ -0,0 +1,77 @@
+#*************************************************************************
+#*************************************************************************
+#** **
+#** (C)Copyright 1985-2011, 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/GfxDisplayLibDxe/GfxDisplayLibDxe.sdl 1 9/26/12 3:51a Yurenlai $
+#
+# $Revision: 1 $
+#
+# $Date: 9/26/12 3:51a $
+#*************************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/SOURCE/Modules/Intel Fast Flash Standby/iRST_SharkBay/GfxDisplayLibDxe/GfxDisplayLibDxe.sdl $
+#
+# 1 9/26/12 3:51a Yurenlai
+# [TAG] None
+# [Category] Improvement
+# [Severity] Important
+# [Description] Update Intel Rapid Start Technology Framework Reference
+# Code Beta Version 0.7.0.
+# [Description] ReferenceCode\RapidStart\*.*, RapidStartPeiLib.h
+#
+#*************************************************************************
+TOKEN
+ Name = "GfxDisplayLibDxe_SUPPORT"
+ Value = "1"
+ TokenType = Boolean
+ TargetEQU = Yes
+ TargetMAK = Yes
+ Master = Yes
+ Help = "Main switch to enable GfxDisplayLibDxe support in Project"
+End
+
+PATH
+ Name = "GfxDisplayLibDxe_DIR"
+ Help = "GfxDisplayLibDxe file source directory"
+End
+
+MODULE
+ File = "GfxDisplayLibDxe.mak"
+ Help = "Includes GfxDisplayLibDxe.mak to Project"
+End
+
+ELINK
+ Name = "GfxDisplayLibDxe_LIB"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "$(BUILD_DIR)\GfxDisplayLibDxe.lib"
+ Parent = "GfxDisplayLibDxe_LIB"
+ InvokeOrder = AfterParent
+End
+#*************************************************************************
+#*************************************************************************
+#** **
+#** (C)Copyright 1985-2011, American Megatrends, Inc. **
+#** **
+#** All Rights Reserved. **
+#** **
+#** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 **
+#** **
+#** Phone: (770)-246-8600 **
+#** **
+#*************************************************************************
+#*************************************************************************
diff --git a/ReferenceCode/RapidStart/GfxDisplay/Library/Pei/GfxDisplayLibPei.c b/ReferenceCode/RapidStart/GfxDisplay/Library/Pei/GfxDisplayLibPei.c
new file mode 100644
index 0000000..a7c05b2
--- /dev/null
+++ b/ReferenceCode/RapidStart/GfxDisplay/Library/Pei/GfxDisplayLibPei.c
@@ -0,0 +1,55 @@
+/** @file
+ Implementation file for GfxDisplay Pei functionality
+
+@copyright
+ Copyright (c) 2012 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.
+
+ This file contains an 'Intel Peripheral Driver' and uniquely
+ identified as "Intel Reference Module" 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
+**/
+
+//
+// External include files do NOT need to be explicitly specified in real EDKII
+// environment
+//
+#if !defined(EDK_RELEASE_VERSION) || (EDK_RELEASE_VERSION < 0x00020000)
+#include "EdkIIGluePeim.h"
+#include "GfxDisplayLibPei.h"
+#include EFI_PPI_DEFINITION (PeiGfxPpi)
+#endif
+
+/**
+ This function allows the platform to restore the display to the Display Save State.
+
+ @retval EFI_SUCCESS - RapidStartGfxDisplayScreen succeeded
+ @retval EFI_INVALID_PARAMETER - Invalid Parameter
+ @retval EFI_NOT_FOUND - Display Save State Header Signature failed
+**/
+EFI_STATUS
+RapidStartGfxDisplayScreen (
+ VOID
+ )
+{
+ EFI_STATUS Status;
+ PEI_GFX_PPI *PeiGfxPpi;
+
+ DEBUG ((EFI_D_INFO, "RapidStartGfxDisplayScreen Start\n"));
+ Status = PeiServicesLocatePpi (&gPeiGfxPpiGuid, 0, NULL, &PeiGfxPpi);
+ ASSERT_EFI_ERROR (Status);
+
+ Status = PeiGfxPpi->RestoreDisplay (GetPeiServicesTablePointer ());
+ DEBUG ((EFI_D_INFO, "Call PeiGfxPpi->RestoreDisplay, Status = %r\n", Status));
+
+ return Status;
+}
diff --git a/ReferenceCode/RapidStart/GfxDisplay/Library/Pei/GfxDisplayLibPei.cif b/ReferenceCode/RapidStart/GfxDisplay/Library/Pei/GfxDisplayLibPei.cif
new file mode 100644
index 0000000..3e8c5f3
--- /dev/null
+++ b/ReferenceCode/RapidStart/GfxDisplay/Library/Pei/GfxDisplayLibPei.cif
@@ -0,0 +1,12 @@
+<component>
+ name = "GfxDisplayLibPei"
+ category = ModulePart
+ LocalRoot = "ReferenceCode\RapidStart\GfxDisplay\Library\Pei\"
+ RefName = "GfxDisplayLibPei"
+[files]
+"GfxDisplayLibPei.sdl"
+"GfxDisplayLibPei.mak"
+"GfxDisplayLibPei.c"
+"GfxDisplayLibPei.h"
+"GfxDisplayLibPei.inf"
+<endComponent>
diff --git a/ReferenceCode/RapidStart/GfxDisplay/Library/Pei/GfxDisplayLibPei.h b/ReferenceCode/RapidStart/GfxDisplay/Library/Pei/GfxDisplayLibPei.h
new file mode 100644
index 0000000..198bfb3
--- /dev/null
+++ b/ReferenceCode/RapidStart/GfxDisplay/Library/Pei/GfxDisplayLibPei.h
@@ -0,0 +1,35 @@
+/** @file
+ Header file for GfxDisplay functionality
+
+@copyright
+ Copyright (c) 2012 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.
+
+ This file contains an 'Intel Peripheral Driver' and uniquely
+ identified as "Intel Reference Module" 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
+**/
+#ifndef _PEI_GFX_DISPLAY_LIB_H_
+#define _PEI_GFX_DISPLAY_LIB_H_
+
+/**
+ This function allows the platform to restore the display to the Display Save State.
+
+ @retval EFI_SUCCESS - RapidStartGfxDisplayScreen succeeded
+ @retval EFI_INVALID_PARAMETER - Invalid Parameter
+ @retval EFI_NOT_FOUND - Display Save State Header Signature failed
+**/
+EFI_STATUS
+RapidStartGfxDisplayScreen (
+ VOID
+ );
+#endif
diff --git a/ReferenceCode/RapidStart/GfxDisplay/Library/Pei/GfxDisplayLibPei.inf b/ReferenceCode/RapidStart/GfxDisplay/Library/Pei/GfxDisplayLibPei.inf
new file mode 100644
index 0000000..44ca9fd
--- /dev/null
+++ b/ReferenceCode/RapidStart/GfxDisplay/Library/Pei/GfxDisplayLibPei.inf
@@ -0,0 +1,51 @@
+## @file
+# Component description file for GfxDisplay Library functions for PEIMs
+#
+#@copyright
+# Copyright (c) 2012 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.
+#
+# 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
+#
+
+[defines]
+BASE_NAME = GfxDisplayLibPei
+COMPONENT_TYPE = LIBRARY
+
+[sources.common]
+ GfxDisplayLibPei.c
+ GfxDisplayLibPei.h
+
+[includes.common]
+ $(EFI_SOURCE)\$(PROJECT_RAPID_START_ROOT)
+
+#
+# EDK II Glue Library utilizes some standard headers from EDK
+#
+ $(EDK_SOURCE)\Foundation
+ $(EDK_SOURCE)\Foundation\Core\Dxe
+ $(EDK_SOURCE)\Foundation\Efi
+ $(EDK_SOURCE)\Foundation\Efi\Include
+ $(EDK_SOURCE)\Foundation\Framework
+ $(EDK_SOURCE)\Foundation\Framework\Include
+ $(EDK_SOURCE)\Foundation\Include
+ $(EDK_SOURCE)\Foundation\Include\IndustryStandard
+ $(EDK_SOURCE)\Foundation\Include\Pei
+ $(EDK_SOURCE)\Foundation\Library\Dxe\Include
+ $(EDK_SOURCE)\Foundation\Library\EdkIIGlueLib\Include
+
+[libraries.common]
+ EdkIIGluePeiServicesLib
+ RapidStartPpiLib
+
+[nmake.common]
+ C_FLAGS = $(C_FLAGS) /D __EDKII_GLUE_PEI_SERVICES_LIB__
diff --git a/ReferenceCode/RapidStart/GfxDisplay/Library/Pei/GfxDisplayLibPei.mak b/ReferenceCode/RapidStart/GfxDisplay/Library/Pei/GfxDisplayLibPei.mak
new file mode 100644
index 0000000..48f1893
--- /dev/null
+++ b/ReferenceCode/RapidStart/GfxDisplay/Library/Pei/GfxDisplayLibPei.mak
@@ -0,0 +1,75 @@
+#*************************************************************************
+#*************************************************************************
+#** **
+#** (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/GfxDisplayLibPei/GfxDisplayLibPei.mak 2 10/15/12 5:07a Bensonlai $
+#
+# $Revision: 2 $
+#
+# $Date: 10/15/12 5:07a $
+#*************************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/SOURCE/Modules/Intel Fast Flash Standby/iRST_SharkBay/GfxDisplayLibPei/GfxDisplayLibPei.mak $
+#
+# 2 10/15/12 5:07a Bensonlai
+# [Category] Improvement
+# [Severity] Important
+# [Description] Update Intel Rapid Start Graphics Driver for Shark Bay
+# Platform 5.0.1.1001, please increase your FV_BB_BLOCKS size if you
+# compile fail that caused by FV_BB size too small.
+# [Files] ReferenceCode\RapidStart\GfxDisplay\FfsGfxDriver\Pei\*.*,
+# ReferenceCode\RapidStart\GfxDisplay\FfsGfxDriver\Dxe\*.*
+#
+# 1 9/26/12 3:53a Yurenlai
+# [TAG] None
+# [Category] Improvement
+# [Severity] Important
+# [Description] Update Intel Rapid Start Technology Framework Reference
+# Code Beta Version 0.7.0.
+# [Description] ReferenceCode\RapidStart\*.*, RapidStartPeiLib.h
+#
+#*************************************************************************
+
+all : GfxDisplayLibPei
+
+$(GfxDisplayLibPei_LIB) : GfxDisplayLibPei
+
+GfxDisplayLibPei : $(BUILD_DIR)\GfxDisplayLibPei.mak GfxDisplayLibPeiBin
+
+$(BUILD_DIR)\GfxDisplayLibPei.mak : $(GfxDisplayLibPei_DIR)\$(@B).cif $(GfxDisplayLibPei_DIR)\$(@B).mak $(BUILD_RULES)
+ $(CIF2MAK) $(GfxDisplayLibPei_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS)
+
+GfxDisplayLibPei_INCLUDES =\
+ $(EDK_INCLUDES)\
+ $(RAPIDSTART_INCLUDES)\
+
+GfxDisplayLibPeiBin :
+ $(MAKE) /$(MAKEFLAGS) $(EDKIIGLUE_DEFAULTS)\
+ /f $(BUILD_DIR)\GfxDisplayLibPei.mak all\
+ "MY_INCLUDES=$(GfxDisplayLibPei_INCLUDES)" \
+ TYPE=PEI_LIBRARY
+#*************************************************************************
+#*************************************************************************
+#** **
+#** (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/ReferenceCode/RapidStart/GfxDisplay/Library/Pei/GfxDisplayLibPei.sdl b/ReferenceCode/RapidStart/GfxDisplay/Library/Pei/GfxDisplayLibPei.sdl
new file mode 100644
index 0000000..8b78b83
--- /dev/null
+++ b/ReferenceCode/RapidStart/GfxDisplay/Library/Pei/GfxDisplayLibPei.sdl
@@ -0,0 +1,77 @@
+#*************************************************************************
+#*************************************************************************
+#** **
+#** (C)Copyright 1985-2011, 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/GfxDisplayLibPei/GfxDisplayLibPei.sdl 1 9/26/12 3:53a Yurenlai $
+#
+# $Revision: 1 $
+#
+# $Date: 9/26/12 3:53a $
+#*************************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/SOURCE/Modules/Intel Fast Flash Standby/iRST_SharkBay/GfxDisplayLibPei/GfxDisplayLibPei.sdl $
+#
+# 1 9/26/12 3:53a Yurenlai
+# [TAG] None
+# [Category] Improvement
+# [Severity] Important
+# [Description] Update Intel Rapid Start Technology Framework Reference
+# Code Beta Version 0.7.0.
+# [Description] ReferenceCode\RapidStart\*.*, RapidStartPeiLib.h
+#
+#*************************************************************************
+TOKEN
+ Name = "GfxDisplayLibPei_SUPPORT"
+ Value = "1"
+ TokenType = Boolean
+ TargetEQU = Yes
+ TargetMAK = Yes
+ Master = Yes
+ Help = "Main switch to enable GfxDisplayLibPei support in Project"
+End
+
+PATH
+ Name = "GfxDisplayLibPei_DIR"
+ Help = "GfxDisplayLibPei file source directory"
+End
+
+MODULE
+ File = "GfxDisplayLibPei.mak"
+ Help = "Includes GfxDisplayLibPei.mak to Project"
+End
+
+ELINK
+ Name = "GfxDisplayLibPei_LIB"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "$(BUILD_DIR)\GfxDisplayLibPei.lib"
+ Parent = "GfxDisplayLibPei_LIB"
+ InvokeOrder = AfterParent
+End
+#*************************************************************************
+#*************************************************************************
+#** **
+#** (C)Copyright 1985-2011, American Megatrends, Inc. **
+#** **
+#** All Rights Reserved. **
+#** **
+#** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 **
+#** **
+#** Phone: (770)-246-8600 **
+#** **
+#*************************************************************************
+#*************************************************************************