Enable PCI dual-address cycle attribute to signal device
supports 64-bit DMA addresses.
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2567
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Liran Alon <liran.alon@oracle.com>
Message-Id: <
20200328200100.60786-18-liran.alon@oracle.com>
Reviewed-by: Nikita Leshenko <nikita.leshchenko@oracle.com>
return Status;\r
}\r
\r
+ //\r
+ // Signal device supports 64-bit DMA addresses\r
+ //\r
+ Status = Dev->PciIo->Attributes (\r
+ Dev->PciIo,\r
+ EfiPciIoAttributeOperationEnable,\r
+ EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE,\r
+ NULL\r
+ );\r
+ if (EFI_ERROR (Status)) {\r
+ //\r
+ // Warn user that device will only be using 32-bit DMA addresses.\r
+ //\r
+ // Note that this does not prevent the device/driver from working\r
+ // and therefore we only warn and continue as usual.\r
+ //\r
+ DEBUG ((\r
+ DEBUG_WARN,\r
+ "%a: failed to enable 64-bit DMA addresses\n",\r
+ __FUNCTION__\r
+ ));\r
+ }\r
+\r
return EFI_SUCCESS;\r
}\r
\r