LockBoxLib has two sets of implementations. The Null implementation (which
is the OVMF default) is not useful for us any longer; we need the library
instances that back the LockBox structure with SMRAM -- the SmmLockBoxLib
variants.

These variants (library instances) are for:
- DXE_DRIVER, DXE_RUNTIME_DRIVER, UEFI_DRIVER, UEFI_APPLICATION: usable
  from "untrusted", 3rd party drivers; communicates with the SmmLockBox
  driver (which is trusted and runs in SMM).
- PEIM: same purpose but for PEIMs.
- DXE_SMM_DRIVER: this is the low level driver that runs inside the
  trusted SmmLockBox driver, and manipulates SMRAM.

  LockBoxLib [SmmLockBoxDxeLib]
    EFI_SMM_COMMUNICATION_PROTOCOL [PiSmmCore]
      EFI_SMM_ACCESS2_PROTOCOL [EmuSmmDxe]
      EFI_SMM_CONTROL2_PROTOCOL [EmuSmmDxe]
    gEfiSmmLockBoxCommunicationGuid [SmmLockBox]
      EFI_SMM_ACCESS2_PROTOCOL [EmuSmmDxe]
      gEfiSmmSwDispatch2ProtocolGuid [unneeded / EmuSmmDxe]
      LockBoxLib [SmmLockBoxSmmLib]

In this patch, we resolve the library class only for DXE_RUNTIME_DRIVER
and DXE_SMM_DRIVER (which is sufficient to build and run OvmfPkg). We'll
add the other resolutions when we need them.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <ler...@redhat.com>
---
 OvmfPkg/OvmfPkgX64.dsc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
index 62a660d..2a8c625 100644
--- a/OvmfPkg/OvmfPkgX64.dsc
+++ b/OvmfPkg/OvmfPkgX64.dsc
@@ -104,7 +104,6 @@
   QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf
   VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
   LoadLinuxLib|OvmfPkg/Library/LoadLinuxLib/LoadLinuxLib.inf
-  LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf
   
CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
 
 !ifdef $(SOURCE_DEBUG_ENABLE)
@@ -217,6 +216,7 @@
 !if $(SECURE_BOOT_ENABLE) == TRUE
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
 !endif
+  LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf
 
 [LibraryClasses.common.UEFI_DRIVER]
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
@@ -275,6 +275,7 @@
 !else
   DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
 !endif
+  LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.inf
 
 
################################################################################
 #
-- 
1.8.3.1



------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to