diff mbox

[edk2,v2,09/15] OvmfPkg: PciHostBridgeLib: clear RootBus->DmaAbove4G

Message ID 1457000154-23081-10-git-send-email-lersek@redhat.com
State Accepted
Commit c789d61dcb6b1990133a947351f67751cf0c4e31
Headers show

Commit Message

Laszlo Ersek March 3, 2016, 10:15 a.m. UTC
When this BOOLEAN member is FALSE, and the caller tries to set up a DMA
transfer between a PCI device and a host buffer not entirely under 4GB,
then "MdeModulePkg/Bus/Pci/PciHostBridgeDxe" sets up a bounce buffer under
4GB, in the implementation of EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.Map().

Since that's exactly what RootBridgeIoMap() does in
"OvmfPkg/PciHostBridgeDxe/PciRootBridgeIo.c", stick with it in this
conversion.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Marcel Apfelbaum <marcel@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

---
 OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c | 2 ++
 1 file changed, 2 insertions(+)

-- 
1.8.3.1


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

diff --git a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
index db260291b822..f1cefe416996 100644
--- a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
+++ b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
@@ -82,6 +82,8 @@  InitRootBridge (
                         EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO_16;
   RootBus->Attributes = RootBus->Supports;
 
+  RootBus->DmaAbove4G = FALSE;
+
   return EFI_OUT_OF_RESOURCES;
 }