]> git.proxmox.com Git - mirror_edk2.git/commitdiff
IntelFrameworkModulePkg AcpiS3SaveDxe: Consume PcdAcpiS3Enable to control the code
authorStar Zeng <star.zeng@intel.com>
Thu, 7 Apr 2016 10:19:28 +0000 (18:19 +0800)
committerLaszlo Ersek <lersek@redhat.com>
Thu, 7 Apr 2016 15:32:03 +0000 (17:32 +0200)
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3Save.c
IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3SaveDxe.inf

index 177a73bc78b1735d40340d750d26335f2fcb50a1..7a7e7e3b44cecae7fce363dd1b69e5346be90fbb 100644 (file)
@@ -605,8 +605,8 @@ S3Ready (
   @param ImageHandle   A handle for the image that is initializing this driver\r
   @param SystemTable   A pointer to the EFI system table\r
 \r
-  @retval EFI_SUCCESS:              Driver initialized successfully\r
-  @retval EFI_LOAD_ERROR:           Failed to Initialize or has been loaded\r
+  @retval EFI_SUCCESS               Driver initialized successfully\r
+  @retval EFI_UNSUPPORTED           Do not support ACPI S3\r
   @retval EFI_OUT_OF_RESOURCES      Could not allocate needed resources\r
 \r
 **/\r
@@ -619,6 +619,10 @@ InstallAcpiS3Save (
 {\r
   EFI_STATUS        Status;\r
 \r
+  if (!PcdGetBool (PcdAcpiS3Enable)) {\r
+    return EFI_UNSUPPORTED;\r
+  }\r
+\r
   if (!FeaturePcdGet(PcdPlatformCsmSupport)) {\r
     //\r
     // More memory for no CSM tip, because GDT need relocation\r
index 366eb147b7656353ee46ac64f6ed9ed3d47ff2e8..23ee7c6a7e163a808e0ec6f01759628926272021 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # AcpiS3Save module installs ACPI S3 Save protocol to prepare S3 boot data.\r
 #\r
-# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
 #\r
 # This program and the accompanying materials are\r
 # licensed and made available under the terms and conditions of the BSD License\r
@@ -77,6 +77,7 @@
   gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdS3AcpiReservedMemorySize    ## SOMETIMES_CONSUMES\r
   gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdS3BootScriptStackSize       ## CONSUMES\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable                         ## CONSUMES\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable                           ## CONSUMES\r
 \r
 [Depex]\r
   #\r