]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: S3 Resume: fake LockBox protocol for BootScriptExecutorDxe
authorLaszlo Ersek <lersek@redhat.com>
Tue, 4 Mar 2014 08:04:04 +0000 (08:04 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 4 Mar 2014 08:04:04 +0000 (08:04 +0000)
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

OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.c
OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf

index 684ddb70114a3890ffcb49022fb0add79c923e0d..a4de911d41debef8b9f9f7398cd6c159e2823c81 100644 (file)
@@ -30,6 +30,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/AcpiS3Save.h>\r
 #include <Protocol/S3SaveState.h>\r
 #include <Protocol/DxeSmmReadyToLock.h>\r
+#include <Protocol/LockBox.h>\r
 #include <IndustryStandard/Acpi.h>\r
 \r
 #include "AcpiS3Save.h"\r
@@ -594,11 +595,11 @@ InstallAcpiS3Save (
     mLegacyRegionSize = 0x100;\r
   }\r
 \r
-  Status = gBS->InstallProtocolInterface (\r
+  Status = gBS->InstallMultipleProtocolInterfaces (\r
                   &ImageHandle,\r
-                  &gEfiAcpiS3SaveProtocolGuid,\r
-                  EFI_NATIVE_INTERFACE,\r
-                  &mS3Save\r
+                  &gEfiAcpiS3SaveProtocolGuid, &mS3Save,\r
+                  &gEfiLockBoxProtocolGuid, NULL,\r
+                  NULL\r
                   );\r
   ASSERT_EFI_ERROR (Status);\r
   return Status;\r
index 159cdb82feab54ed8964dfced0a7e00a9cfe7031..fd26a05d368bb0f1a63155b62791074b9de510a2 100644 (file)
@@ -59,6 +59,7 @@
 \r
 [Protocols]\r
   gEfiAcpiS3SaveProtocolGuid                    # PROTOCOL ALWAYS_PRODUCED\r
+  gEfiLockBoxProtocolGuid                       # PROTOCOL ALWAYS_PRODUCED\r
   gEfiLegacyBiosProtocolGuid                    # PROTOCOL ALWAYS_CONSUMED\r
   gEfiLegacyRegion2ProtocolGuid                 # PROTOCOL SOMETIMES_CONSUMED\r
   gFrameworkEfiMpServiceProtocolGuid            # PROTOCOL SOMETIMES_CONSUMED\r