summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/PlatformPei
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2016-04-07 18:19:23 +0800
committerLaszlo Ersek <lersek@redhat.com>2016-04-07 17:31:31 +0200
commita1726e30890342f3932b7f6e580c0cbbe033e338 (patch)
tree54a98f3522368a9116c9bd4753632f51b74ab4fa /OvmfPkg/PlatformPei
parent11a291a4d2794e1c6e27613f8e3f0ef1af4c8506 (diff)
downloadedk2-a1726e30890342f3932b7f6e580c0cbbe033e338.tar.gz
edk2-a1726e30890342f3932b7f6e580c0cbbe033e338.tar.bz2
edk2-a1726e30890342f3932b7f6e580c0cbbe033e338.zip
OvmfPkg: Set PcdAcpiS3Enable according to QemuFwCfgS3Enabled()
Also need to declare PcdAcpiS3Enable as DynamicDefault in *.dsc. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Jordan Justen <jordan.l.justen@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> Tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'OvmfPkg/PlatformPei')
-rw-r--r--OvmfPkg/PlatformPei/Platform.c6
-rw-r--r--OvmfPkg/PlatformPei/PlatformPei.inf3
2 files changed, 7 insertions, 2 deletions
diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c
index 509343e0be..ef654c4579 100644
--- a/OvmfPkg/PlatformPei/Platform.c
+++ b/OvmfPkg/PlatformPei/Platform.c
@@ -1,7 +1,7 @@
/**@file
Platform PEI driver
- Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2011, Andrei Warkentin <andreiw@motorola.com>
This program and the accompanying materials
@@ -576,6 +576,8 @@ InitializePlatform (
IN CONST EFI_PEI_SERVICES **PeiServices
)
{
+ EFI_STATUS Status;
+
DEBUG ((EFI_D_ERROR, "Platform PEIM Loaded\n"));
DebugDumpCmos ();
@@ -585,6 +587,8 @@ InitializePlatform (
if (QemuFwCfgS3Enabled ()) {
DEBUG ((EFI_D_INFO, "S3 support was detected on QEMU\n"));
mS3Supported = TRUE;
+ Status = PcdSetBoolS (PcdAcpiS3Enable, TRUE);
+ ASSERT_EFI_ERROR (Status);
}
S3Verification ();
diff --git a/OvmfPkg/PlatformPei/PlatformPei.inf b/OvmfPkg/PlatformPei/PlatformPei.inf
index 5b643a358f..ed31b1f724 100644
--- a/OvmfPkg/PlatformPei/PlatformPei.inf
+++ b/OvmfPkg/PlatformPei/PlatformPei.inf
@@ -2,7 +2,7 @@
# Platform PEI driver
#
# This module provides platform specific function to detect boot mode.
-# Copyright (c) 2006 - 2014, 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 of the BSD License
@@ -94,6 +94,7 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable
gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack
gEfiMdeModulePkgTokenSpaceGuid.PcdPropertiesTableEnable
+ gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable
gUefiCpuPkgTokenSpaceGuid.PcdCpuLocalApicBaseAddress
[FixedPcd]