1) Add library classes of S3Lib and RecoveryLib in MdeModulePkg

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
This commit is contained in:
klu2
2007-09-26 09:35:36 +00:00
parent ba7c1a5056
commit 4fb31c2c58
17 changed files with 429 additions and 28 deletions

View File

@ -0,0 +1,46 @@
/**@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 <FrameworkPei.h>
#include <Library/PeiServicesLib.h>
#include <Library/PeiServicesTablePointerLib.h>
#include <Library/DebugLib.h>
#include <Ppi/RecoveryModule.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
)
{
EFI_STATUS Status;
EFI_PEI_RECOVERY_MODULE_PPI *PeiRecovery;
Status = PeiServicesLocatePpi (
&gEfiPeiRecoveryModulePpiGuid,
0,
NULL,
(VOID **)&PeiRecovery
);
ASSERT_EFI_ERROR (Status);
return PeiRecovery->LoadRecoveryCapsule (GetPeiServicesTablePointer(), PeiRecovery);
}

View File

@ -0,0 +1,50 @@
#/** @file
# Recovery Library 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 = PeiRecoveryLib
FILE_GUID = C0227547-0811-4cbb-ABEA-DECD22829122
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]
PeiRecoveryLib.c
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
IntelFrameworkPkg/IntelFrameworkPkg.dec
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
[LibraryClasses]
BaseLib
PeiServicesTablePointerLib
DebugLib
[Ppis]
gEfiPeiRecoveryModulePpiGuid # PPI ALWAYS_CONSUMED