OvmfPkg/QemuFwCfgLib: Implement SEV internal function for Dxe phase

When SEV is enabled, the DMA must be performed on unencrypted pages.
So when get asked to perfom FWCFG DMA read or write, we allocate a
intermediate (bounce buffer) unencrypted buffer and use this buffer
for DMA read or write.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
Brijesh Singh
2017-07-06 09:29:08 -04:00
committed by Jordan Justen
parent 5feae25392
commit 09719a01b1
2 changed files with 121 additions and 0 deletions

View File

@@ -39,6 +39,7 @@
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
OvmfPkg/OvmfPkg.dec
[LibraryClasses]
@@ -47,4 +48,10 @@
DebugLib
IoLib
MemoryAllocationLib
MemEncryptSevLib
[Protocols]
gEdkiiIoMmuProtocolGuid ## SOMETIMES_CONSUMES
[Depex]
gEdkiiIoMmuProtocolGuid OR gIoMmuAbsentProtocolGuid