summaryrefslogtreecommitdiff
path: root/OvmfPkg
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2014-03-04 08:04:04 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2014-03-04 08:04:04 +0000
commitd4ba06dfdc3a0c2f6519d3dcaf4437e164d4ac91 (patch)
tree83a6b01a2919df5493d45307daaeccea64d78175 /OvmfPkg
parent5a217a0649b31db2f0e7a65e42f92fbebc3bef96 (diff)
downloadedk2-platforms-d4ba06dfdc3a0c2f6519d3dcaf4437e164d4ac91.tar.xz
OvmfPkg: S3 Resume: fake LockBox protocol for BootScriptExecutorDxe
BootScriptExecutorDxe, to be pulled in in the next patch, was written with the SMM implementation of LockBox in mind. That implementation is split in the following three parts: - client side (DXE/PEI) library, - SMM driver producing gEfiLockBoxProtocolGuid, - driver side (SMM) library. BootScriptExecutorDxe includes the client side LockBoxLib. So that the library can communicate with the SMM LockBox driver, BootScriptExecutorDxe has a Depex on gEfiLockBoxProtocolGuid, normally installed by the SMM LockBox driver. This is actually not a hard dependency, it just ensures correct load order between BootScriptExecutorDxe and MdeModulePkg/Universal/LockBox/SmmLockBox. The (client side) LockBox library instance in OVMF doesn't depend on a separate driver that produces gEfiLockBoxProtocolGuid. Nothing produces that GUID right now in OVMF. This prevents BootScriptExecutorDxe from loading. Install gEfiLockBoxProtocolGuid in our only S3-specific, custom DXE driver, in order to enable loading of BootScriptExecutorDxe. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15306 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg')
-rw-r--r--OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.c9
-rw-r--r--OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf1
2 files changed, 6 insertions, 4 deletions
diff --git a/OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.c b/OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.c
index 684ddb7011..a4de911d41 100644
--- a/OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.c
+++ b/OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.c
@@ -30,6 +30,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Protocol/AcpiS3Save.h>
#include <Protocol/S3SaveState.h>
#include <Protocol/DxeSmmReadyToLock.h>
+#include <Protocol/LockBox.h>
#include <IndustryStandard/Acpi.h>
#include "AcpiS3Save.h"
@@ -594,11 +595,11 @@ InstallAcpiS3Save (
mLegacyRegionSize = 0x100;
}
- Status = gBS->InstallProtocolInterface (
+ Status = gBS->InstallMultipleProtocolInterfaces (
&ImageHandle,
- &gEfiAcpiS3SaveProtocolGuid,
- EFI_NATIVE_INTERFACE,
- &mS3Save
+ &gEfiAcpiS3SaveProtocolGuid, &mS3Save,
+ &gEfiLockBoxProtocolGuid, NULL,
+ NULL
);
ASSERT_EFI_ERROR (Status);
return Status;
diff --git a/OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf b/OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf
index 159cdb82fe..fd26a05d36 100644
--- a/OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf
+++ b/OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf
@@ -59,6 +59,7 @@
[Protocols]
gEfiAcpiS3SaveProtocolGuid # PROTOCOL ALWAYS_PRODUCED
+ gEfiLockBoxProtocolGuid # PROTOCOL ALWAYS_PRODUCED
gEfiLegacyBiosProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiLegacyRegion2ProtocolGuid # PROTOCOL SOMETIMES_CONSUMED
gFrameworkEfiMpServiceProtocolGuid # PROTOCOL SOMETIMES_CONSUMED