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 - 2008, Intel Corporation. All rights reserved.<BR> 9 This program and the accompanying materials 10 are licensed and made available under the terms and conditions of the BSD License 11 which accompanies this distribution. The full text of the license may be found at 12 http://opensource.org/licenses/bsd-license.php 13 14 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 15 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 16 17 **/ 18 19 #include <PiPei.h> 20 #include <Library/PeiServicesLib.h> 21 #include <Library/PeiServicesTablePointerLib.h> 22 #include <Library/DebugLib.h> 23 24 #include <Ppi/S3Resume.h> 25 26 /** 27 This function is responsible for calling the S3 resume vector in the ACPI Tables. 28 29 @retval EFI_SUCESS Success to restore config from S3. 30 @retval Others Fail to restore config from S3. 31 **/ 32 EFI_STATUS 33 EFIAPI 34 AcpiS3ResumeOs ( 35 VOID 36 ) 37 { 38 EFI_STATUS Status; 39 EFI_PEI_S3_RESUME_PPI *S3Resume; 40 41 Status = PeiServicesLocatePpi ( 42 &gEfiPeiS3ResumePpiGuid, 43 0, 44 NULL, 45 (VOID **)&S3Resume 46 ); 47 ASSERT_EFI_ERROR (Status); 48 49 return S3Resume->S3RestoreConfig ((EFI_PEI_SERVICES **) GetPeiServicesTablePointer()); 50 } 51 52