summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c
diff options
context:
space:
mode:
Diffstat (limited to 'UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c')
-rw-r--r--UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c b/UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c
index 7bd928f330..3489b9549c 100644
--- a/UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c
+++ b/UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c
@@ -133,6 +133,7 @@ CpuS3DataOnEndOfDxe (
@param[in] SystemTable A pointer to the EFI System Table.
@retval EFI_SUCCESS The entry point is executed successfully.
+ @retval EFI_UNSUPPORTED Do not support ACPI S3.
@retval other Some error occurs when executing this entry point.
**/
@@ -160,6 +161,10 @@ CpuS3DataInitialize (
VOID *Idt;
EFI_EVENT Event;
+ if (!PcdGetBool (PcdAcpiS3Enable)) {
+ return EFI_UNSUPPORTED;
+ }
+
//
// Allocate ACPI NVS memory below 4G memory for use on ACPI S3 resume.
//