]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c
MdeModulePkg/NvmExpressDxe: enable 64-bit PCI DMA
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / NvmExpressDxe / NvmExpressHci.c
index a173504cdf4d3a46004df0c62a94816f8e705ed2..51cff3c96c29c0e9dbd2a57940135cf5f45920a4 100644 (file)
@@ -862,6 +862,19 @@ NvmeControllerInit (
     return Status;\r
   }\r
 \r
+  //\r
+  // Enable 64-bit DMA support in the PCI layer.\r
+  //\r
+  Status = PciIo->Attributes (\r
+                    PciIo,\r
+                    EfiPciIoAttributeOperationEnable,\r
+                    EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE,\r
+                    NULL\r
+                    );\r
+  if (EFI_ERROR (Status)) {\r
+    DEBUG ((EFI_D_WARN, "NvmeControllerInit: failed to enable 64-bit DMA (%r)\n", Status));\r
+  }\r
+\r
   //\r
   // Read the Controller Capabilities register and verify that the NVM command set is supported\r
   //\r