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