From 800c02fbe2da64ca83540151fc75a431df25aae7 Mon Sep 17 00:00:00 2001 From: Star Zeng Date: Thu, 7 Apr 2016 13:54:47 +0800 Subject: [PATCH] MdeModulePkg BootScriptExecutorDxe: Consume PcdAcpiS3Enable to control the code Cc: Feng Tian Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng Reviewed-by: Jiewen Yao Tested-by: Laszlo Ersek Reviewed-by: Laszlo Ersek --- .../Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf | 3 ++- .../Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf index c761f609b9..a1bdee8e4d 100644 --- a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf +++ b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf @@ -4,7 +4,7 @@ # This is a standalone Boot Script Executor. Standalone means it does not # depends on any PEI or DXE service. # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
# # This program and the accompanying materials are # licensed and made available under the terms and conditions of the BSD License @@ -82,6 +82,7 @@ [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable ## SOMETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMemoryProfilePropertyMask ## CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable ## CONSUMES [Depex] gEfiLockBoxProtocolGuid diff --git a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c index f8b2782244..10493bea02 100644 --- a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c +++ b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c @@ -4,7 +4,7 @@ This driver is dispatched by Dxe core and the driver will reload itself to ACPI reserved memory in the entry point. The functionality is to interpret and restore the S3 boot script -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -403,6 +403,10 @@ BootScriptExecutorEntryPoint ( UINT32 RegEax; UINT32 RegEdx; + if (!PcdGetBool (PcdAcpiS3Enable)) { + return EFI_UNSUPPORTED; + } + // // Test if the gEfiCallerIdGuid of this image is already installed. if not, the entry // point is loaded by DXE code which is the first time loaded. or else, it is already -- 2.39.2