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