diff options
author | Star Zeng <star.zeng@intel.com> | 2016-04-07 18:19:28 +0800 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2016-04-07 17:32:03 +0200 |
commit | e96708de88378e407991ae0c58dd1fe6656bd1a1 (patch) | |
tree | dd1dad76e1f175fac1e188759fb3277135110c09 /IntelFrameworkModulePkg/Universal | |
parent | 0b5d1fb2ba3e3d3076b91384edf9365f76931f74 (diff) | |
download | edk2-platforms-e96708de88378e407991ae0c58dd1fe6656bd1a1.tar.xz |
IntelFrameworkModulePkg AcpiS3SaveDxe: Consume PcdAcpiS3Enable to control the code
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>
Diffstat (limited to 'IntelFrameworkModulePkg/Universal')
-rw-r--r-- | IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3Save.c | 8 | ||||
-rw-r--r-- | IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3SaveDxe.inf | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3Save.c b/IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3Save.c index 177a73bc78..7a7e7e3b44 100644 --- a/IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3Save.c +++ b/IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3Save.c @@ -605,8 +605,8 @@ S3Ready ( @param ImageHandle A handle for the image that is initializing this driver
@param SystemTable A pointer to the EFI system table
- @retval EFI_SUCCESS: Driver initialized successfully
- @retval EFI_LOAD_ERROR: Failed to Initialize or has been loaded
+ @retval EFI_SUCCESS Driver initialized successfully
+ @retval EFI_UNSUPPORTED Do not support ACPI S3
@retval EFI_OUT_OF_RESOURCES Could not allocate needed resources
**/
@@ -619,6 +619,10 @@ InstallAcpiS3Save ( {
EFI_STATUS Status;
+ if (!PcdGetBool (PcdAcpiS3Enable)) {
+ return EFI_UNSUPPORTED;
+ }
+
if (!FeaturePcdGet(PcdPlatformCsmSupport)) {
//
// More memory for no CSM tip, because GDT need relocation
diff --git a/IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3SaveDxe.inf b/IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3SaveDxe.inf index 366eb147b7..23ee7c6a7e 100644 --- a/IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3SaveDxe.inf +++ b/IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3SaveDxe.inf @@ -1,7 +1,7 @@ ## @file
# AcpiS3Save module installs ACPI S3 Save protocol to prepare S3 boot data.
#
-# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials are
# licensed and made available under the terms and conditions of the BSD License
@@ -77,6 +77,7 @@ gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdS3AcpiReservedMemorySize ## SOMETIMES_CONSUMES
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdS3BootScriptStackSize ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable ## CONSUMES
+ gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable ## CONSUMES
[Depex]
#
|