Also add gEfiPeiMasterBootModePpiGuid to [Depex] in *.inf, that makes the producer of PcdAcpiS3Enable has more opportunity to set the PCD value before this module dispatched.
According to PI spec Vol 1, gEfiPeiMasterBootModePpiGuid is required, so it should be safe to add it. Cc: Jeff Fan <[email protected]> Cc: Jiewen Yao <[email protected]> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <[email protected]> --- UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c | 6 +++++- UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c index a79fc59bdfa6..cdcc392e253e 100644 --- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c +++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c @@ -4,7 +4,7 @@ This module will excute the boot script saved during last boot and after that, control is passed to OS waking up handler. - 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 @@ -1137,6 +1137,10 @@ PeimS3ResumeEntryPoint ( { EFI_STATUS Status; + if (!PcdGetBool (PcdAcpiS3Enable)) { + return EFI_UNSUPPORTED; + } + // // Install S3 Resume Ppi // diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf index da68e2f9369b..979b3b0c52fa 100644 --- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf +++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf @@ -5,7 +5,7 @@ # This module will excute the boot script saved during last boot and after that, # control is passed to OS waking up handler. # -# Copyright (c) 2010 - 2014, 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 of the BSD License @@ -89,9 +89,10 @@ [FeaturePcd] [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable ## SOMETIMES_CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable ## CONSUMES [Depex] - TRUE + gEfiPeiMasterBootModePpiGuid [UserExtensions.TianoCore."ExtraFiles"] S3Resume2PeiExtra.uni -- 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

