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