]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.c
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8613 6f19259b...
[mirror_edk2.git] / IntelFrameworkModulePkg / Library / PeiS3Lib / PeiS3Lib.c
1 /** @file
2 This library provides API to invoke the S3 resume vector in the APCI Table in S3 resume mode.
3 This library instance is only for PEI phase use and the APIs in this instance
4
5 Copyright (c) 2006 - 2008 Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15 #include <FrameworkPei.h>
16 #include <Library/PeiServicesLib.h>
17 #include <Library/PeiServicesTablePointerLib.h>
18 #include <Library/DebugLib.h>
19
20 #include <Ppi/S3Resume.h>
21
22 /**
23 This function is responsible for calling the S3 resume vector in the ACPI Tables.
24
25 @retval EFI_SUCESS Sucess to restore config from S3.
26 @retval Others Fail to restore config from S3.
27 **/
28 EFI_STATUS
29 EFIAPI
30 AcpiS3ResumeOs (
31 VOID
32 )
33 {
34 EFI_STATUS Status;
35 EFI_PEI_S3_RESUME_PPI *S3Resume;
36
37 Status = PeiServicesLocatePpi (
38 &gEfiPeiS3ResumePpiGuid,
39 0,
40 NULL,
41 (VOID **)&S3Resume
42 );
43 ASSERT_EFI_ERROR (Status);
44
45 return S3Resume->S3RestoreConfig ((EFI_PEI_SERVICES **) GetPeiServicesTablePointer());
46 }
47