]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1) Add library classes of S3Lib and RecoveryLib in MdeModulePkg
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 26 Sep 2007 09:35:36 +0000 (09:35 +0000)
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 26 Sep 2007 09:35:36 +0000 (09:35 +0000)
2) Add NULL instance for above library classes in MdeModulePkg
3) Add Framework implement library instance for above two library classes in IntelFrameworkModulePkg.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3930 6f19259b-4bc3-4df7-8a09-765794883524

17 files changed:
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
IntelFrameworkModulePkg/Library/PeiRecoveryLib/PeiRecoveryLib.c [new file with mode: 0644]
IntelFrameworkModulePkg/Library/PeiRecoveryLib/PeiRecoveryLib.inf [new file with mode: 0644]
IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.c [new file with mode: 0644]
IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.inf [new file with mode: 0644]
MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
MdeModulePkg/Include/Library/RecoveryLib.h [new file with mode: 0644]
MdeModulePkg/Include/Library/S3Lib.h [new file with mode: 0644]
MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.c [new file with mode: 0644]
MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf [new file with mode: 0644]
MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.c [new file with mode: 0644]
MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf [new file with mode: 0644]
MdeModulePkg/MdeModulePkg.dec
MdeModulePkg/MdeModulePkg.dsc
Nt32Pkg/Nt32Pkg.dsc

index a94f8363b721a7f45a191f6ea8949872e8d19c1f..ebe0bceefa292bc92d677a62112eea78a576104e 100644 (file)
@@ -52,7 +52,9 @@
   UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf\r
   OemHookStatusCodeLib|IntelFrameworkModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf\r
   SerialPortLib|MdePkg/Library/SerialPortLibNull/SerialPortLibNull.inf\r
-\r
+  S3Lib|IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.inf\r
+  RecoveryLib|IntelFrameworkModulePkg/Library/PeiRecoveryLib/PeiRecoveryLib.inf\r
+  \r
 [LibraryClasses.common.PEIM]\r
   HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf\r
   PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf\r
   IntelFrameworkModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf\r
   IntelFrameworkModulePkg/Library/PciIncompatibleDeviceSupportLib/PciIncompatibleDeviceSupportLib.inf\r
   IntelFrameworkModulePkg/Library/GraphicsLib/GraphicsLib.inf\r
+\r
+  IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.inf\r
+  IntelFrameworkModulePkg/Library/PeiRecoveryLib/PeiRecoveryLib.inf\r
\r
   IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf\r
   IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBusDxe.inf\r
   IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf\r
diff --git a/IntelFrameworkModulePkg/Library/PeiRecoveryLib/PeiRecoveryLib.c b/IntelFrameworkModulePkg/Library/PeiRecoveryLib/PeiRecoveryLib.c
new file mode 100644 (file)
index 0000000..0538312
--- /dev/null
@@ -0,0 +1,46 @@
+/**@file\r
+  Recovery Library. This library class defines a set of methods related do recovery.\r
+\r
+Copyright (c) 2006 - 2007 Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+#include <FrameworkPei.h>\r
+#include <Library/PeiServicesLib.h>\r
+#include <Library/PeiServicesTablePointerLib.h>\r
+#include <Library/DebugLib.h>\r
+\r
+#include <Ppi/RecoveryModule.h>\r
+\r
+/**\r
+  Calling this function causes the system do recovery.\r
+  \r
+  @retval EFI_SUCESS   Sucess to do recovery.\r
+  @retval Others       Fail to do recovery.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+Recovery (\r
+  VOID\r
+  )\r
+{\r
+  EFI_STATUS                      Status;\r
+  EFI_PEI_RECOVERY_MODULE_PPI     *PeiRecovery;\r
+  \r
+  Status = PeiServicesLocatePpi (\r
+             &gEfiPeiRecoveryModulePpiGuid,\r
+             0,\r
+             NULL,\r
+             (VOID **)&PeiRecovery\r
+             );\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  return PeiRecovery->LoadRecoveryCapsule (GetPeiServicesTablePointer(), PeiRecovery);\r
+}\r
+\r
diff --git a/IntelFrameworkModulePkg/Library/PeiRecoveryLib/PeiRecoveryLib.inf b/IntelFrameworkModulePkg/Library/PeiRecoveryLib/PeiRecoveryLib.inf
new file mode 100644 (file)
index 0000000..90fcbac
--- /dev/null
@@ -0,0 +1,50 @@
+#/** @file\r
+# Recovery Library for PEIM\r
+#\r
+# Copyright (c) 2006 - 2007, Intel Corporation.\r
+#\r
+#  All rights reserved. This program and the accompanying materials\r
+#  are licensed and made available under the terms and conditions of the BSD License\r
+#  which accompanies this distribution. The full text of the license may be found at\r
+#  http://opensource.org/licenses/bsd-license.php\r
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+#\r
+#**/\r
+\r
+[Defines]\r
+  INF_VERSION                    = 0x00010005\r
+  BASE_NAME                      = PeiRecoveryLib\r
+  FILE_GUID                      = C0227547-0811-4cbb-ABEA-DECD22829122\r
+  MODULE_TYPE                    = PEIM\r
+  VERSION_STRING                 = 1.0\r
+  LIBRARY_CLASS                  = RecoveryLib|PEIM\r
+  EDK_RELEASE_VERSION            = 0x00020000\r
+  EFI_SPECIFICATION_VERSION      = 0x00020000\r
+\r
+\r
+#\r
+# The following information is for reference only and not required by the build tools.\r
+#\r
+#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC\r
+#\r
+\r
+[Sources.common]\r
+  PeiRecoveryLib.c\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+  MdeModulePkg/MdeModulePkg.dec\r
+  IntelFrameworkPkg/IntelFrameworkPkg.dec\r
+  IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec\r
+\r
+[LibraryClasses]\r
+  BaseLib\r
+  PeiServicesTablePointerLib\r
+  DebugLib\r
+\r
+[Ppis]\r
+  gEfiPeiRecoveryModulePpiGuid            # PPI ALWAYS_CONSUMED\r
+  \r
+  
\ No newline at end of file
diff --git a/IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.c b/IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.c
new file mode 100644 (file)
index 0000000..875e116
--- /dev/null
@@ -0,0 +1,46 @@
+/**@file\r
+  S3 Library. This library class defines a set of methods related do S3 mode\r
+\r
+Copyright (c) 2006 - 2007 Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+#include <FrameworkPei.h>\r
+#include <Library/PeiServicesLib.h>\r
+#include <Library/PeiServicesTablePointerLib.h>\r
+#include <Library/DebugLib.h>\r
+\r
+#include <Ppi/S3Resume.h>\r
+\r
+/**\r
+  Calling this function causes the system restore config from S3.\r
+  \r
+  @retval EFI_SUCESS   Sucess to restore config from S3.\r
+  @retval Others       Fail to restore config from S3.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+S3RestoreConfig (\r
+  VOID\r
+  )\r
+{\r
+  EFI_STATUS              Status;\r
+  EFI_PEI_S3_RESUME_PPI   *S3Resume;\r
+  \r
+  Status = PeiServicesLocatePpi (\r
+             &gEfiPeiS3ResumePpiGuid,\r
+             0,\r
+             NULL,\r
+             (VOID **)&S3Resume\r
+             );\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  return S3Resume->S3RestoreConfig (GetPeiServicesTablePointer()); \r
+}\r
+\r
diff --git a/IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.inf b/IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.inf
new file mode 100644 (file)
index 0000000..929e230
--- /dev/null
@@ -0,0 +1,51 @@
+#/** @file\r
+# Graphics Library for UEFI drivers\r
+#\r
+# This library provides supports for basic graphic functions.\r
+# Copyright (c) 2006 - 2007, Intel Corporation.\r
+#\r
+#  All rights reserved. This program and the accompanying materials\r
+#  are licensed and made available under the terms and conditions of the BSD License\r
+#  which accompanies this distribution. The full text of the license may be found at\r
+#  http://opensource.org/licenses/bsd-license.php\r
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+#\r
+#**/\r
+\r
+[Defines]\r
+  INF_VERSION                    = 0x00010005\r
+  BASE_NAME                      = PeiS3Lib\r
+  FILE_GUID                      = EFB7D3A8-DEB9-4bed-B6D6-3B09BEEB835A\r
+  MODULE_TYPE                    = PEIM\r
+  VERSION_STRING                 = 1.0\r
+  LIBRARY_CLASS                  = S3Lib|PEIM\r
+  EDK_RELEASE_VERSION            = 0x00020000\r
+  EFI_SPECIFICATION_VERSION      = 0x00020000\r
+\r
+\r
+#\r
+# The following information is for reference only and not required by the build tools.\r
+#\r
+#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC\r
+#\r
+\r
+[Sources.common]\r
+  PeiS3Lib.c\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+  MdeModulePkg/MdeModulePkg.dec\r
+  IntelFrameworkPkg/IntelFrameworkPkg.dec\r
+  IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec\r
+\r
+[LibraryClasses]\r
+  BaseLib\r
+  PeiServicesTablePointerLib\r
+  DebugLib\r
+\r
+[Ppis]\r
+  gEfiPeiS3ResumePpiGuid                # PPI ALWAYS_CONSUMED\r
+\r
+\r
index 3cd9ebac4ca6cf5d309c00b4054a37c8f66bba09..9df5745e306aa3610528729f9cca402f4addc8e3 100644 (file)
@@ -22,7 +22,6 @@ Abstract:
 \r
 #include <PiPei.h>\r
 #include <Ppi/DxeIpl.h>\r
-#include <Ppi/S3Resume.h>\r
 #include <Protocol/EdkDecompress.h>\r
 #include <Ppi/EndOfPeiPhase.h>\r
 #include <Protocol/CustomizedDecompress.h>\r
@@ -30,7 +29,6 @@ Abstract:
 #include <Ppi/Security.h>\r
 #include <Ppi/SectionExtraction.h>\r
 #include <Ppi/FvLoadFile.h>\r
-#include <Ppi/RecoveryModule.h>\r
 #include <Ppi/MemoryDiscovered.h>\r
 #include <Ppi/Decompress.h>\r
 #include <Ppi/FirmwareVolumeInfo.h>\r
@@ -52,7 +50,8 @@ Abstract:
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/PcdLib.h>\r
 #include <Library/PeCoffLib.h>\r
-\r
+#include <Library/S3Lib.h>\r
+#include <Library/RecoveryLib.h>\r
 \r
 #define STACK_SIZE      0x20000\r
 #define BSP_STORE_SIZE  0x4000\r
index ff003e114b14fd73148541d9dffd4569a46cd356..820350316b86ecc3b06f944adc5bb25de91804f4 100644 (file)
@@ -75,7 +75,8 @@
   BaseLib\r
   PeimEntryPoint\r
   DebugLib\r
-\r
+  S3Lib\r
+  RecoveryLib\r
 \r
 [Protocols]\r
   gEfiCustomizedDecompressProtocolGuid          # PROTOCOL SOMETIMES_PRODUCED\r
index 089e3bff66be44538ec8b53f1ee443ac03f0dcb7..2042efae6dd697ee91c0585e0d0dc4f6fdd372b4 100644 (file)
@@ -185,8 +185,6 @@ DxeLoadCore (
   EFI_PHYSICAL_ADDRESS                      DxeCoreEntryPoint;\r
   EFI_PEI_PE_COFF_LOADER_PROTOCOL           *PeiEfiPeiPeCoffLoader;\r
   EFI_BOOT_MODE                             BootMode;\r
-  EFI_PEI_RECOVERY_MODULE_PPI               *PeiRecovery;\r
-  EFI_PEI_S3_RESUME_PPI                     *S3Resume;\r
   EFI_PEI_FV_HANDLE                         VolumeHandle;\r
   EFI_PEI_FILE_HANDLE                       FileHandle;\r
   UINTN                                     Instance;\r
@@ -198,27 +196,10 @@ DxeLoadCore (
   ASSERT_EFI_ERROR(Status);\r
 \r
   if (BootMode == BOOT_ON_S3_RESUME) {\r
-    Status = PeiServicesLocatePpi (\r
-               &gEfiPeiS3ResumePpiGuid,\r
-               0,\r
-               NULL,\r
-               (VOID **)&S3Resume\r
-               );\r
-    ASSERT_EFI_ERROR (Status);\r
-\r
-    Status = S3Resume->S3RestoreConfig (PeiServices);\r
+    Status = S3RestoreConfig();\r
     ASSERT_EFI_ERROR (Status);\r
   } else if (BootMode == BOOT_IN_RECOVERY_MODE) {\r
-\r
-    Status = PeiServicesLocatePpi (\r
-               &gEfiPeiRecoveryModulePpiGuid,\r
-               0,\r
-               NULL,\r
-               (VOID **)&PeiRecovery\r
-               );\r
-    ASSERT_EFI_ERROR (Status);\r
-\r
-    Status = PeiRecovery->LoadRecoveryCapsule (PeiServices, PeiRecovery);\r
+    Status = Recovery ();\r
     if (EFI_ERROR (Status)) {\r
       DEBUG ((EFI_D_ERROR, "Load Recovery Capsule Failed.(Status = %r)\n", Status));\r
       CpuDeadLoop ();\r
diff --git a/MdeModulePkg/Include/Library/RecoveryLib.h b/MdeModulePkg/Include/Library/RecoveryLib.h
new file mode 100644 (file)
index 0000000..6ec4c58
--- /dev/null
@@ -0,0 +1,33 @@
+/** @file\r
+  Recovery Library. This library class defines a set of methods related recovery mode.\r
+\r
+  Copyright (c) 2005 - 2007, Intel Corporation\r
+  All rights reserved. This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution.  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
+  \r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef __RECOVERY_LIB_H__\r
+#define __RECOVERY_LIB_H__\r
+\r
+/**\r
+  Calling this function causes the system do recovery.\r
+  \r
+  @retval EFI_SUCESS   Sucess to do recovery.\r
+  @retval Others       Fail to do recovery.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+Recovery (\r
+  VOID\r
+  )\r
+;\r
+\r
+#endif\r
+\r
+\r
diff --git a/MdeModulePkg/Include/Library/S3Lib.h b/MdeModulePkg/Include/Library/S3Lib.h
new file mode 100644 (file)
index 0000000..0059e01
--- /dev/null
@@ -0,0 +1,32 @@
+/** @file\r
+  S3 Library. This library class defines a set of methods related do S3 mode.\r
+\r
+  Copyright (c) 2005 - 2007, Intel Corporation\r
+  All rights reserved. This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution.  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
+  \r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef __S3_LIB_H__\r
+#define __S3_LIB_H__\r
+\r
+/**\r
+  Calling this function causes the system restore config from S3.\r
+  \r
+  @retval EFI_SUCESS   Sucess to restore config from S3.\r
+  @retval Others       Fail to restore config from S3.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+S3RestoreConfig (\r
+  VOID\r
+  )\r
+;\r
+\r
+#endif\r
+\r
diff --git a/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.c b/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.c
new file mode 100644 (file)
index 0000000..2638955
--- /dev/null
@@ -0,0 +1,30 @@
+/**@file\r
+  Recovery Library. This library class defines a set of methods related do recovery.\r
+\r
+Copyright (c) 2006 - 2007 Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+#include <PiPei.h>\r
+\r
+/**\r
+  Calling this function causes the system do recovery.\r
+  \r
+  @retval EFI_SUCESS   Sucess to do recovery.\r
+  @retval Others       Fail to do recovery.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+Recovery (\r
+  VOID\r
+  )\r
+{\r
+  return EFI_UNSUPPORTED;\r
+}\r
+\r
diff --git a/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf b/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf
new file mode 100644 (file)
index 0000000..51a7e20
--- /dev/null
@@ -0,0 +1,44 @@
+#/** @file\r
+# Recovery for PEIM\r
+#\r
+# Copyright (c) 2006 - 2007, Intel Corporation.\r
+#\r
+#  All rights reserved. This program and the accompanying materials\r
+#  are licensed and made available under the terms and conditions of the BSD License\r
+#  which accompanies this distribution. The full text of the license may be found at\r
+#  http://opensource.org/licenses/bsd-license.php\r
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+#\r
+#**/\r
+\r
+[Defines]\r
+  INF_VERSION                    = 0x00010005\r
+  BASE_NAME                      = PeiRecoveryLibNull\r
+  FILE_GUID                      = 41789FB9-02AC-4484-BD40-A3147D7EDA25\r
+  MODULE_TYPE                    = PEIM\r
+  VERSION_STRING                 = 1.0\r
+  LIBRARY_CLASS                  = RecoveryLib|PEIM\r
+  EDK_RELEASE_VERSION            = 0x00020000\r
+  EFI_SPECIFICATION_VERSION      = 0x00020000\r
+\r
+\r
+#\r
+# The following information is for reference only and not required by the build tools.\r
+#\r
+#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC\r
+#\r
+\r
+[Sources.common]\r
+  PeiRecoveryLibNull.c\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+  MdeModulePkg/MdeModulePkg.dec\r
+\r
+[LibraryClasses]\r
+  BaseLib\r
+\r
+  \r
+  
\ No newline at end of file
diff --git a/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.c b/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.c
new file mode 100644 (file)
index 0000000..5bf65f9
--- /dev/null
@@ -0,0 +1,30 @@
+/**@file\r
+  S3 Library. This library class defines a set of methods related do S3 mode\r
+\r
+Copyright (c) 2006 - 2007 Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+#include <PiPei.h>\r
+\r
+/**\r
+  Calling this function causes the system restore config from S3.\r
+  \r
+  @retval EFI_SUCESS   Sucess to restore config from S3.\r
+  @retval Others       Fail to restore config from S3.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+S3RestoreConfig (\r
+  VOID\r
+  )\r
+{\r
+  return EFI_UNSUPPORTED;\r
+}\r
+\r
diff --git a/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf b/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf
new file mode 100644 (file)
index 0000000..9b7166f
--- /dev/null
@@ -0,0 +1,43 @@
+#/** @file\r
+# Graphics Library for UEFI drivers\r
+#\r
+# This library provides supports for basic graphic functions.\r
+# Copyright (c) 2006 - 2007, Intel Corporation.\r
+#\r
+#  All rights reserved. This program and the accompanying materials\r
+#  are licensed and made available under the terms and conditions of the BSD License\r
+#  which accompanies this distribution. The full text of the license may be found at\r
+#  http://opensource.org/licenses/bsd-license.php\r
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+#\r
+#**/\r
+\r
+[Defines]\r
+  INF_VERSION                    = 0x00010005\r
+  BASE_NAME                      = PeiS3LibNull\r
+  FILE_GUID                      = EFB7D3A8-DEB9-4bed-B6D6-3B09BEEB835A\r
+  MODULE_TYPE                    = PEIM\r
+  VERSION_STRING                 = 1.0\r
+  LIBRARY_CLASS                  = S3Lib|PEIM\r
+  EDK_RELEASE_VERSION            = 0x00020000\r
+  EFI_SPECIFICATION_VERSION      = 0x00020000\r
+\r
+\r
+#\r
+# The following information is for reference only and not required by the build tools.\r
+#\r
+#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC\r
+#\r
+\r
+[Sources.common]\r
+  PeiS3LibNull.c\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+  MdeModulePkg/MdeModulePkg.dec\r
+\r
+[LibraryClasses]\r
+  BaseLib\r
+\r
index 7d9f5a871c38e4f8698a10552e411bede370e190..7b0f6607f532600a20b82fd8f89c4fa40b4dfe55 100644 (file)
@@ -32,7 +32,9 @@
   PeCoffLoaderLib|Include/Library/PeCoffLoaderLib.h  \r
   ResetSystemLib|Include/Library/ResetSystemLib.h  \r
   UdpIoLib|Include/Library/UdpIoLib.h\r
-\r
+  S3Lib|Include/Library/S3Lib.h\r
+  RecoveryLib|Include/Library/RecoveryLib.h\r
+  \r
 [Guids.common]\r
 \r
   gPcdDataBaseHobGuid            = { 0xEA296D92, 0x0B69, 0x423C, { 0x8C, 0x28, 0x33, 0xB4, 0xE0, 0xA9, 0x12, 0x68 }}\r
index ee3bc9803a1c2c04b610284491c1a5f8d83f5c6e..e80fa4240fa93d91a3a11644d7ffc4ab4d75a0f4 100644 (file)
@@ -43,6 +43,8 @@
   UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf\r
   PeCoffLoaderLib|MdeModulePkg/Library/PeiDxePeCoffLoaderLib/PeCoffLoaderLib.inf\r
   CustomDecompressLib|MdePkg/Library/BaseCustomDecompressLibNull/BaseCustomDecompressLibNull.inf\r
+  S3Lib|MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf\r
+  RecoveryLib|MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf\r
 \r
 [LibraryClasses.IA32]\r
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf\r
   MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf\r
   MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf\r
   MdeModulePkg/Library/EdkDxePrintLib/EdkDxePrintLib.inf\r
-\r
+  \r
   MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf\r
   MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf\r
   MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf\r
 \r
+  MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf\r
+  MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf\r
+\r
   MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf\r
   MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf\r
   MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDxe.inf\r
index 98ed118f8b31acb6d83073562bd4fe2096aa0353..63d0b495b4005f08b65a0d9e61da5fdc8d3039ab 100644 (file)
@@ -77,6 +77,8 @@
   CustomDecompressLib|IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf\r
   UefiDecompressLib|IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf\r
   HiiLibFramework|IntelFrameworkPkg/Library/HiiLibFramework/HiiLib.inf\r
+  S3Lib|MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf\r
+  RecoveryLib|MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf\r
 \r
 [LibraryClasses.common.BASE]\r
   DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf\r