diff options
Diffstat (limited to 'OvmfPkg/AcpiS3SaveDxe')
-rw-r--r-- | OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.c | 5 | ||||
-rw-r--r-- | OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.c b/OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.c index a4de911d41..f322981b53 100644 --- a/OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.c +++ b/OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.c @@ -24,6 +24,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Library/LockBoxLib.h>
#include <Library/PcdLib.h>
#include <Library/DebugLib.h>
+#include <Library/QemuFwCfgLib.h>
#include <Guid/AcpiVariableCompatibility.h>
#include <Guid/AcpiS3Context.h>
#include <Guid/Acpi.h>
@@ -586,6 +587,10 @@ InstallAcpiS3Save ( {
EFI_STATUS Status;
+ if (!QemuFwCfgS3Enabled()) {
+ return EFI_LOAD_ERROR;
+ }
+
if (!FeaturePcdGet(PcdPlatformCsmSupport)) {
//
// More memory for no CSM tip, because GDT need relocation
diff --git a/OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf b/OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf index fd26a05d36..b53e7850e3 100644 --- a/OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf +++ b/OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf @@ -38,6 +38,7 @@ MdeModulePkg/MdeModulePkg.dec
IntelFrameworkPkg/IntelFrameworkPkg.dec
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
+ OvmfPkg/OvmfPkg.dec
[LibraryClasses]
PcdLib
@@ -50,6 +51,7 @@ LockBoxLib
DebugLib
DxeServicesLib
+ QemuFwCfgLib
[Guids]
gEfiAcpiVariableGuid # ALWAYS_CONSUMED
|