summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Core/DxeIplPeim/DxeIpl.h5
-rw-r--r--MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf3
-rw-r--r--MdeModulePkg/Core/DxeIplPeim/DxeLoad.c23
-rw-r--r--MdeModulePkg/Include/Library/RecoveryLib.h33
-rw-r--r--MdeModulePkg/Include/Library/S3Lib.h32
-rw-r--r--MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.c30
-rw-r--r--MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf44
-rw-r--r--MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.c30
-rw-r--r--MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf43
-rw-r--r--MdeModulePkg/MdeModulePkg.dec4
-rw-r--r--MdeModulePkg/MdeModulePkg.dsc7
11 files changed, 227 insertions, 27 deletions
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
index 3cd9eba..9df5745 100644
--- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
+++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
@@ -22,7 +22,6 @@ Abstract:
#include <PiPei.h>
#include <Ppi/DxeIpl.h>
-#include <Ppi/S3Resume.h>
#include <Protocol/EdkDecompress.h>
#include <Ppi/EndOfPeiPhase.h>
#include <Protocol/CustomizedDecompress.h>
@@ -30,7 +29,6 @@ Abstract:
#include <Ppi/Security.h>
#include <Ppi/SectionExtraction.h>
#include <Ppi/FvLoadFile.h>
-#include <Ppi/RecoveryModule.h>
#include <Ppi/MemoryDiscovered.h>
#include <Ppi/Decompress.h>
#include <Ppi/FirmwareVolumeInfo.h>
@@ -52,7 +50,8 @@ Abstract:
#include <Library/MemoryAllocationLib.h>
#include <Library/PcdLib.h>
#include <Library/PeCoffLib.h>
-
+#include <Library/S3Lib.h>
+#include <Library/RecoveryLib.h>
#define STACK_SIZE 0x20000
#define BSP_STORE_SIZE 0x4000
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
index ff003e1..8203503 100644
--- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
+++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
@@ -75,7 +75,8 @@
BaseLib
PeimEntryPoint
DebugLib
-
+ S3Lib
+ RecoveryLib
[Protocols]
gEfiCustomizedDecompressProtocolGuid # PROTOCOL SOMETIMES_PRODUCED
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
index 089e3bf..2042efa 100644
--- a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
+++ b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
@@ -185,8 +185,6 @@ DxeLoadCore (
EFI_PHYSICAL_ADDRESS DxeCoreEntryPoint;
EFI_PEI_PE_COFF_LOADER_PROTOCOL *PeiEfiPeiPeCoffLoader;
EFI_BOOT_MODE BootMode;
- EFI_PEI_RECOVERY_MODULE_PPI *PeiRecovery;
- EFI_PEI_S3_RESUME_PPI *S3Resume;
EFI_PEI_FV_HANDLE VolumeHandle;
EFI_PEI_FILE_HANDLE FileHandle;
UINTN Instance;
@@ -198,27 +196,10 @@ DxeLoadCore (
ASSERT_EFI_ERROR(Status);
if (BootMode == BOOT_ON_S3_RESUME) {
- Status = PeiServicesLocatePpi (
- &gEfiPeiS3ResumePpiGuid,
- 0,
- NULL,
- (VOID **)&S3Resume
- );
- ASSERT_EFI_ERROR (Status);
-
- Status = S3Resume->S3RestoreConfig (PeiServices);
+ Status = S3RestoreConfig();
ASSERT_EFI_ERROR (Status);
} else if (BootMode == BOOT_IN_RECOVERY_MODE) {
-
- Status = PeiServicesLocatePpi (
- &gEfiPeiRecoveryModulePpiGuid,
- 0,
- NULL,
- (VOID **)&PeiRecovery
- );
- ASSERT_EFI_ERROR (Status);
-
- Status = PeiRecovery->LoadRecoveryCapsule (PeiServices, PeiRecovery);
+ Status = Recovery ();
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "Load Recovery Capsule Failed.(Status = %r)\n", Status));
CpuDeadLoop ();
diff --git a/MdeModulePkg/Include/Library/RecoveryLib.h b/MdeModulePkg/Include/Library/RecoveryLib.h
new file mode 100644
index 0000000..6ec4c58
--- /dev/null
+++ b/MdeModulePkg/Include/Library/RecoveryLib.h
@@ -0,0 +1,33 @@
+/** @file
+ Recovery Library. This library class defines a set of methods related recovery mode.
+
+ Copyright (c) 2005 - 2007, Intel Corporation
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef __RECOVERY_LIB_H__
+#define __RECOVERY_LIB_H__
+
+/**
+ Calling this function causes the system do recovery.
+
+ @retval EFI_SUCESS Sucess to do recovery.
+ @retval Others Fail to do recovery.
+**/
+EFI_STATUS
+EFIAPI
+Recovery (
+ VOID
+ )
+;
+
+#endif
+
+
diff --git a/MdeModulePkg/Include/Library/S3Lib.h b/MdeModulePkg/Include/Library/S3Lib.h
new file mode 100644
index 0000000..0059e01
--- /dev/null
+++ b/MdeModulePkg/Include/Library/S3Lib.h
@@ -0,0 +1,32 @@
+/** @file
+ S3 Library. This library class defines a set of methods related do S3 mode.
+
+ Copyright (c) 2005 - 2007, Intel Corporation
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef __S3_LIB_H__
+#define __S3_LIB_H__
+
+/**
+ Calling this function causes the system restore config from S3.
+
+ @retval EFI_SUCESS Sucess to restore config from S3.
+ @retval Others Fail to restore config from S3.
+**/
+EFI_STATUS
+EFIAPI
+S3RestoreConfig (
+ VOID
+ )
+;
+
+#endif
+
diff --git a/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.c b/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.c
new file mode 100644
index 0000000..2638955
--- /dev/null
+++ b/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.c
@@ -0,0 +1,30 @@
+/**@file
+ Recovery Library. This library class defines a set of methods related do recovery.
+
+Copyright (c) 2006 - 2007 Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+#include <PiPei.h>
+
+/**
+ Calling this function causes the system do recovery.
+
+ @retval EFI_SUCESS Sucess to do recovery.
+ @retval Others Fail to do recovery.
+**/
+EFI_STATUS
+EFIAPI
+Recovery (
+ VOID
+ )
+{
+ return EFI_UNSUPPORTED;
+}
+
diff --git a/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf b/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf
new file mode 100644
index 0000000..51a7e20
--- /dev/null
+++ b/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf
@@ -0,0 +1,44 @@
+#/** @file
+# Recovery for PEIM
+#
+# Copyright (c) 2006 - 2007, Intel Corporation.
+#
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+#
+#**/
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = PeiRecoveryLibNull
+ FILE_GUID = 41789FB9-02AC-4484-BD40-A3147D7EDA25
+ MODULE_TYPE = PEIM
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = RecoveryLib|PEIM
+ EDK_RELEASE_VERSION = 0x00020000
+ EFI_SPECIFICATION_VERSION = 0x00020000
+
+
+#
+# The following information is for reference only and not required by the build tools.
+#
+# VALID_ARCHITECTURES = IA32 X64 IPF EBC
+#
+
+[Sources.common]
+ PeiRecoveryLibNull.c
+
+[Packages]
+ MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+
+[LibraryClasses]
+ BaseLib
+
+
+ \ No newline at end of file
diff --git a/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.c b/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.c
new file mode 100644
index 0000000..5bf65f9
--- /dev/null
+++ b/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.c
@@ -0,0 +1,30 @@
+/**@file
+ S3 Library. This library class defines a set of methods related do S3 mode
+
+Copyright (c) 2006 - 2007 Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+#include <PiPei.h>
+
+/**
+ Calling this function causes the system restore config from S3.
+
+ @retval EFI_SUCESS Sucess to restore config from S3.
+ @retval Others Fail to restore config from S3.
+**/
+EFI_STATUS
+EFIAPI
+S3RestoreConfig (
+ VOID
+ )
+{
+ return EFI_UNSUPPORTED;
+}
+
diff --git a/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf b/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf
new file mode 100644
index 0000000..9b7166f
--- /dev/null
+++ b/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf
@@ -0,0 +1,43 @@
+#/** @file
+# Graphics Library for UEFI drivers
+#
+# This library provides supports for basic graphic functions.
+# Copyright (c) 2006 - 2007, Intel Corporation.
+#
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+#
+#**/
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = PeiS3LibNull
+ FILE_GUID = EFB7D3A8-DEB9-4bed-B6D6-3B09BEEB835A
+ MODULE_TYPE = PEIM
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = S3Lib|PEIM
+ EDK_RELEASE_VERSION = 0x00020000
+ EFI_SPECIFICATION_VERSION = 0x00020000
+
+
+#
+# The following information is for reference only and not required by the build tools.
+#
+# VALID_ARCHITECTURES = IA32 X64 IPF EBC
+#
+
+[Sources.common]
+ PeiS3LibNull.c
+
+[Packages]
+ MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+
+[LibraryClasses]
+ BaseLib
+
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
index 7d9f5a8..7b0f660 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -32,7 +32,9 @@
PeCoffLoaderLib|Include/Library/PeCoffLoaderLib.h
ResetSystemLib|Include/Library/ResetSystemLib.h
UdpIoLib|Include/Library/UdpIoLib.h
-
+ S3Lib|Include/Library/S3Lib.h
+ RecoveryLib|Include/Library/RecoveryLib.h
+
[Guids.common]
gPcdDataBaseHobGuid = { 0xEA296D92, 0x0B69, 0x423C, { 0x8C, 0x28, 0x33, 0xB4, 0xE0, 0xA9, 0x12, 0x68 }}
diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc
index ee3bc98..e80fa42 100644
--- a/MdeModulePkg/MdeModulePkg.dsc
+++ b/MdeModulePkg/MdeModulePkg.dsc
@@ -43,6 +43,8 @@
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
PeCoffLoaderLib|MdeModulePkg/Library/PeiDxePeCoffLoaderLib/PeCoffLoaderLib.inf
CustomDecompressLib|MdePkg/Library/BaseCustomDecompressLibNull/BaseCustomDecompressLibNull.inf
+ S3Lib|MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf
+ RecoveryLib|MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf
[LibraryClasses.IA32]
IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
@@ -376,11 +378,14 @@
MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
MdeModulePkg/Library/EdkDxePrintLib/EdkDxePrintLib.inf
-
+
MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
+ MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf
+ MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf
+
MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDxe.inf