]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.c
IntelFrameworkModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / IntelFrameworkModulePkg / Library / PeiS3Lib / PeiS3Lib.c
CommitLineData
0f13d71c 1/** @file\r
0a6f4824 2 This library provides API to invoke the S3 resume vector in the APCI Table in S3 resume mode.\r
7db60f82 3\r
4 This library instance is no longer used and module using this library\r
5 class should update to directly locate EFI_PEI_S3_RESUME_PPI defined\r
0a6f4824 6 in PI 1.2 specification.\r
4fb31c2c 7\r
0a6f4824 8Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
c0a00b14 9SPDX-License-Identifier: BSD-2-Clause-Patent\r
4fb31c2c 10\r
11**/\r
7db60f82 12\r
13#include <PiPei.h>\r
4fb31c2c 14#include <Library/PeiServicesLib.h>\r
15#include <Library/PeiServicesTablePointerLib.h>\r
16#include <Library/DebugLib.h>\r
17\r
18#include <Ppi/S3Resume.h>\r
19\r
20/**\r
e8da1266 21 This function is responsible for calling the S3 resume vector in the ACPI Tables.\r
0a6f4824 22\r
7db60f82 23 @retval EFI_SUCESS Success to restore config from S3.\r
4fb31c2c 24 @retval Others Fail to restore config from S3.\r
25**/\r
26EFI_STATUS\r
27EFIAPI\r
e8da1266 28AcpiS3ResumeOs (\r
4fb31c2c 29 VOID\r
30 )\r
31{\r
32 EFI_STATUS Status;\r
33 EFI_PEI_S3_RESUME_PPI *S3Resume;\r
0a6f4824 34\r
4fb31c2c 35 Status = PeiServicesLocatePpi (\r
36 &gEfiPeiS3ResumePpiGuid,\r
37 0,\r
38 NULL,\r
39 (VOID **)&S3Resume\r
40 );\r
41 ASSERT_EFI_ERROR (Status);\r
42\r
0a6f4824 43 return S3Resume->S3RestoreConfig ((EFI_PEI_SERVICES **) GetPeiServicesTablePointer());\r
4fb31c2c 44}\r
45\r