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:
46
IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.c
Normal file
46
IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.c
Normal file
@ -0,0 +1,46 @@
|
||||
/**@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 <FrameworkPei.h>
|
||||
#include <Library/PeiServicesLib.h>
|
||||
#include <Library/PeiServicesTablePointerLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
|
||||
#include <Ppi/S3Resume.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
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_PEI_S3_RESUME_PPI *S3Resume;
|
||||
|
||||
Status = PeiServicesLocatePpi (
|
||||
&gEfiPeiS3ResumePpiGuid,
|
||||
0,
|
||||
NULL,
|
||||
(VOID **)&S3Resume
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
return S3Resume->S3RestoreConfig (GetPeiServicesTablePointer());
|
||||
}
|
||||
|
Reference in New Issue
Block a user