S3Resume.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /** @file
  2. This file declares S3 Resume PPI which accomplishes the firmware S3 resume boot path
  3. and transfers control to OS.
  4. This PPI is published by the S3 resume PEIM and can be used on the S3 resume boot path to
  5. restore the platform to its preboot configuration and transfer control to OS. The information that is
  6. required for an S3 resume can be saved during the normal boot path using
  7. EFI_ACPI_S3_SAVE_PROTOCOL. This presaved information can then be restored in the S3
  8. resume boot path using EFI_PEI_S3_RESUME_PPI. Architecturally, the S3 resume PEIM is the
  9. last PEIM to be dispatched in the S3 resume boot path.
  10. Before using this PPI, the caller must ensure the necessary information for the S3 resume, such as
  11. the following, is available for the S3 resume boot path:
  12. - EFI_ACPI_S3_RESUME_SCRIPT_TABLE script table. Type
  13. EFI_ACPI_S3_RESUME_SCRIPT_TABLE is defined in the Intel Platform Innovation
  14. Framework for EFI Boot Script Specification.
  15. - OS waking vector.
  16. - The reserved memory range to be used for the S3 resume.
  17. Otherwise, the S3 resume boot path may fail.
  18. Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
  19. SPDX-License-Identifier: BSD-2-Clause-Patent
  20. @par Revision Reference:
  21. This PPI is defined in Framework for EFI S3 Resume Boot Path spec.
  22. Version 0.9.
  23. **/
  24. #ifndef __PEI_S3_RESUME_PPI_H__
  25. #define __PEI_S3_RESUME_PPI_H__
  26. #define EFI_PEI_S3_RESUME_PPI_GUID \
  27. { \
  28. 0x4426CCB2, 0xE684, 0x4a8a, {0xAE, 0x40, 0x20, 0xD4, 0xB0, 0x25, 0xB7, 0x10 } \
  29. }
  30. typedef struct _EFI_PEI_S3_RESUME_PPI EFI_PEI_S3_RESUME_PPI;
  31. /**
  32. Restores the platform to its preboot configuration for an S3 resume and
  33. jumps to the OS waking vector.
  34. @param PeiServices The pointer to the PEI Services Table
  35. @retval EFI_ABORTED Execution of the S3 resume boot script table failed.
  36. @retval EFI_NOT_FOUND Could not be locate some necessary information that
  37. is used for the S3 resume boot path d.
  38. **/
  39. typedef
  40. EFI_STATUS
  41. (EFIAPI *EFI_PEI_S3_RESUME_PPI_RESTORE_CONFIG)(
  42. IN EFI_PEI_SERVICES **PeiServices
  43. );
  44. /**
  45. EFI_PEI_S3_RESUME_PPI accomplishes the firmware S3 resume boot
  46. path and transfers control to OS.
  47. **/
  48. struct _EFI_PEI_S3_RESUME_PPI {
  49. ///
  50. /// Restores the platform to its preboot configuration for an S3 resume and
  51. /// jumps to the OS waking vector.
  52. ///
  53. EFI_PEI_S3_RESUME_PPI_RESTORE_CONFIG S3RestoreConfig;
  54. };
  55. extern EFI_GUID gEfiPeiS3ResumePpiGuid;
  56. #endif