]>
Commit | Line | Data |
---|---|---|
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 | 5 | Copyright (c) 2006 - 2008 Intel Corporation\r |
4fb31c2c | 6 | All rights reserved. This program and the accompanying materials\r |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT 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 | |
28 | EFI_STATUS\r | |
29 | EFIAPI\r | |
e8da1266 | 30 | AcpiS3ResumeOs (\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 |