diff options
author | Laszlo Ersek <lersek@redhat.com> | 2015-11-30 18:42:01 +0000 |
---|---|---|
committer | lersek <lersek@Edk2> | 2015-11-30 18:42:01 +0000 |
commit | b7c14f1e43ada836e7c9c4e89829faefd7b8c879 (patch) | |
tree | 39e3cd710af309505464f605da81d2e66dd927d5 /OvmfPkg | |
parent | 8dbe742d17071f81392923e67fda45696438a831 (diff) | |
download | edk2-b7c14f1e43ada836e7c9c4e89829faefd7b8c879.zip edk2-b7c14f1e43ada836e7c9c4e89829faefd7b8c879.tar.gz edk2-b7c14f1e43ada836e7c9c4e89829faefd7b8c879.tar.bz2 |
OvmfPkg: AcpiS3SaveDxe: don't fake LockBox protocol if SMM_REQUIRE
In SVN r15306 (git commit d4ba06df), "OvmfPkg: S3 Resume: fake LockBox
protocol for BootScriptExecutorDxe", we installed a fake LockBox protocol
in OVMF's AcpiS3SaveDxe clone. While our other AcpiS3SaveDxe
customizations remain valid (or harmless), said change is invalid when
OVMF is built with -D SMM_REQUIRE and includes the real protocol provider,
"MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf".
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19045 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg')
-rw-r--r-- | OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.c | 14 | ||||
-rw-r--r-- | OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf | 3 |
2 files changed, 10 insertions, 7 deletions
diff --git a/OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.c b/OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.c index f20560f..e3ff234 100644 --- a/OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.c +++ b/OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.c @@ -538,12 +538,14 @@ InstallEndOfDxeCallback ( return EFI_LOAD_ERROR;
}
- Status = gBS->InstallMultipleProtocolInterfaces (
- &ImageHandle,
- &gEfiLockBoxProtocolGuid, NULL,
- NULL
- );
- ASSERT_EFI_ERROR (Status);
+ if (!FeaturePcdGet (PcdSmmSmramRequire)) {
+ Status = gBS->InstallMultipleProtocolInterfaces (
+ &ImageHandle,
+ &gEfiLockBoxProtocolGuid, NULL,
+ NULL
+ );
+ ASSERT_EFI_ERROR (Status);
+ }
Status = gBS->CreateEventEx (
EVT_NOTIFY_SIGNAL,
diff --git a/OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf b/OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf index 4cc0713..a288b95 100644 --- a/OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf +++ b/OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf @@ -59,7 +59,7 @@ gEfiEndOfDxeEventGroupGuid ## CONSUMES ## Event
[Protocols]
- gEfiLockBoxProtocolGuid # PROTOCOL ALWAYS_PRODUCED
+ gEfiLockBoxProtocolGuid # PROTOCOL SOMETIMES_PRODUCED
gEfiLegacyBiosProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiLegacyRegion2ProtocolGuid # PROTOCOL SOMETIMES_CONSUMED
gFrameworkEfiMpServiceProtocolGuid # PROTOCOL SOMETIMES_CONSUMED
@@ -71,6 +71,7 @@ gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdS3AcpiReservedMemorySize ## CONSUMES
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdS3BootScriptStackSize ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable
+ gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire ## CONSUMES
[Depex]
gEfiVariableArchProtocolGuid AND gEfiVariableWriteArchProtocolGuid
|