]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/PvScsiDxe/PvScsi.c
OvmfPkg/PvScsiDxe: Enable device 64-bit DMA addresses
[mirror_edk2.git] / OvmfPkg / PvScsiDxe / PvScsi.c
index d7f0d3c8790c93e465947c3e67d2a268c52c69d1..0a66c98421a91a96c543e3ec913cb46b8201d9b9 100644 (file)
@@ -874,6 +874,29 @@ PvScsiSetPciAttributes (
     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