summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/Universal
diff options
context:
space:
mode:
authorDun Tan <dun.tan@intel.com>2023-12-18 12:21:08 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-06-04 07:40:27 +0000
commit669291db5a326928b4ab048524eb0ffa7d9a619f (patch)
treecc3b5b16b228c356200eaa6a72e0667365b828a5 /UefiCpuPkg/Universal
parentfcd09b1edbd377c174e98bf33ace4fc905d4cf29 (diff)
downloadedk2-669291db5a326928b4ab048524eb0ffa7d9a619f.tar.gz
edk2-669291db5a326928b4ab048524eb0ffa7d9a619f.tar.bz2
edk2-669291db5a326928b4ab048524eb0ffa7d9a619f.zip
UefiCpuPkg: Install gEdkiiEndOfS3ResumeGuid in S3Resume
Install gEdkiiEndOfS3ResumeGuid in S3Resume to trigger callback registered by PeiMpLib. The callback is to relocate Ap to new safe memory before jump to OS waking vector in S3 boot flow. Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Diffstat (limited to 'UefiCpuPkg/Universal')
-rw-r--r--UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
index 078ae2d72d..e6dfa09c71 100644
--- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
+++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
@@ -260,6 +260,12 @@ EFI_PEI_PPI_DESCRIPTOR mPpiListS3SmmInitDoneTable = {
0
};
+EFI_PEI_PPI_DESCRIPTOR mPpiListEndOfS3ResumeTable = {
+ (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
+ &gEdkiiEndOfS3ResumeGuid,
+ 0
+};
+
//
// Global Descriptor Table (GDT)
//
@@ -490,6 +496,13 @@ S3ResumeBootOs (
PERF_INMODULE_BEGIN ("EndOfS3Resume");
DEBUG ((DEBUG_INFO, "Signal EndOfS3Resume\n"));
+
+ //
+ // Install EndOfS3Resume.
+ //
+ Status = PeiServicesInstallPpi (&mPpiListEndOfS3ResumeTable);
+ ASSERT_EFI_ERROR (Status);
+
//
// Signal EndOfS3Resume to SMM.
//