diff options
author | Star Zeng <star.zeng@intel.com> | 2016-04-07 13:47:52 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2016-04-11 08:48:29 +0800 |
commit | d2d38610603f6f621134c59e577e12a6e7385bc8 (patch) | |
tree | e686b80e610e65ffdacc43166ee73177eb6864ed /MdeModulePkg/Universal | |
parent | 364f4efa444150df3f074f563374dce1e153adc6 (diff) | |
download | edk2-platforms-d2d38610603f6f621134c59e577e12a6e7385bc8.tar.xz |
MdeModulePkg SmmS3SaveStateDxe: Consume PcdAcpiS3Enable to control the code
Cc: Feng Tian <feng.tian@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.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 'MdeModulePkg/Universal')
-rw-r--r-- | MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.c | 7 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.inf | 6 |
2 files changed, 10 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.c b/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.c index e4227282c9..a9bca311d4 100644 --- a/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.c +++ b/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.c @@ -1,7 +1,7 @@ /** @file
Implementation for S3 SMM Boot Script Saver state driver.
- Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions
@@ -905,7 +905,10 @@ InitializeSmmS3SaveState ( )
{
EFI_HANDLE Handle;
-
+
+ if (!PcdGetBool (PcdAcpiS3Enable)) {
+ return EFI_UNSUPPORTED;
+ }
Handle = NULL;
return gSmst->SmmInstallProtocolInterface (
diff --git a/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.inf b/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.inf index be9a5619fe..f1f264ec43 100644 --- a/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.inf +++ b/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.inf @@ -3,7 +3,7 @@ #
# It will install S3 SMM Save State protocol to store or record various IO operations to be replayed during an S3 resume.
#
-# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2009 - 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
@@ -47,10 +47,14 @@ BaseMemoryLib
BaseLib
S3BootScriptLib
+ PcdLib
[Protocols]
gEfiS3SmmSaveStateProtocolGuid ## PRODUCES
+[Pcd]
+ gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable ## CONSUMES
+
[Depex]
TRUE
|