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>
This commit is contained in:
Star Zeng 2016-04-07 13:47:52 +08:00
parent 364f4efa44
commit d2d3861060
2 changed files with 10 additions and 3 deletions

View File

@ -1,7 +1,7 @@
/** @file /** @file
Implementation for S3 SMM Boot Script Saver state driver. 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 This program and the accompanying materials
are licensed and made available under the terms and conditions are licensed and made available under the terms and conditions
@ -905,7 +905,10 @@ InitializeSmmS3SaveState (
) )
{ {
EFI_HANDLE Handle; EFI_HANDLE Handle;
if (!PcdGetBool (PcdAcpiS3Enable)) {
return EFI_UNSUPPORTED;
}
Handle = NULL; Handle = NULL;
return gSmst->SmmInstallProtocolInterface ( return gSmst->SmmInstallProtocolInterface (

View File

@ -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. # 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 # This program and the accompanying materials are
# licensed and made available under the terms and conditions of the BSD License # licensed and made available under the terms and conditions of the BSD License
@ -47,10 +47,14 @@
BaseMemoryLib BaseMemoryLib
BaseLib BaseLib
S3BootScriptLib S3BootScriptLib
PcdLib
[Protocols] [Protocols]
gEfiS3SmmSaveStateProtocolGuid ## PRODUCES gEfiS3SmmSaveStateProtocolGuid ## PRODUCES
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable ## CONSUMES
[Depex] [Depex]
TRUE TRUE