]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c
UefiCpuPkg/CpuS3DataDxe: Consume PcdAcpiS3Enable to control the code
[mirror_edk2.git] / UefiCpuPkg / CpuS3DataDxe / CpuS3Data.c
index 7bd928f33063536ddf89644f2dd7eff05819d770..3489b9549ce0a3a5c9139c2ef7032b68df4fca1b 100644 (file)
@@ -133,6 +133,7 @@ CpuS3DataOnEndOfDxe (
    @param[in] SystemTable  A pointer to the EFI System Table.\r
 \r
    @retval EFI_SUCCESS     The entry point is executed successfully.\r
+   @retval EFI_UNSUPPORTED Do not support ACPI S3.\r
    @retval other           Some error occurs when executing this entry point.\r
 \r
 **/\r
@@ -160,6 +161,10 @@ CpuS3DataInitialize (
   VOID                       *Idt;\r
   EFI_EVENT                  Event;\r
 \r
+  if (!PcdGetBool (PcdAcpiS3Enable)) {\r
+    return EFI_UNSUPPORTED;\r
+  }\r
+\r
   //\r
   // Allocate ACPI NVS memory below 4G memory for use on ACPI S3 resume.\r
   //\r