]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg SmmS3SaveStateDxe: Consume PcdAcpiS3Enable to control the code
authorStar Zeng <star.zeng@intel.com>
Thu, 7 Apr 2016 05:47:52 +0000 (13:47 +0800)
committerStar Zeng <star.zeng@intel.com>
Mon, 11 Apr 2016 00:48:29 +0000 (08:48 +0800)
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>
MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.c
MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.inf

index e4227282c9924c4bba772b13093a7a44db2698ca..a9bca311d4a1cdfb6178efbfce9785514bc18b92 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implementation for S3 SMM Boot Script Saver state driver.\r
 \r
-  Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions\r
@@ -905,7 +905,10 @@ InitializeSmmS3SaveState (
   )\r
 {\r
   EFI_HANDLE   Handle;\r
-  \r
+\r
+  if (!PcdGetBool (PcdAcpiS3Enable)) {\r
+    return EFI_UNSUPPORTED;\r
+  }\r
 \r
   Handle  = NULL;\r
   return  gSmst->SmmInstallProtocolInterface (\r
index be9a5619fe7ebb6a2fa96ad74921116fb2100224..f1f264ec43b51f5018459e91b6387e08901ff4fb 100644 (file)
@@ -3,7 +3,7 @@
 #\r
 # It will install S3 SMM Save State protocol to store or record various IO operations to be replayed during an S3 resume.\r
 #\r
-# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 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
   BaseMemoryLib\r
   BaseLib\r
   S3BootScriptLib\r
+  PcdLib\r
 \r
 [Protocols]\r
   gEfiS3SmmSaveStateProtocolGuid                ## PRODUCES\r
 \r
+[Pcd]\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable     ## CONSUMES\r
+\r
 [Depex]\r
   TRUE\r
 \r