summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Pci
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-09-05 09:51:32 +0100
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2016-09-06 15:40:49 +0100
commit4e28ea2c29e008e1390ea87c6e5a78d65ee33d5c (patch)
tree9610f36e6e22baf210bc6fa8bd62e68cf1d755a3 /MdeModulePkg/Bus/Pci
parent167c3fb45674c274219b3af0bc811992cd4d6116 (diff)
downloadedk2-4e28ea2c29e008e1390ea87c6e5a78d65ee33d5c.zip
edk2-4e28ea2c29e008e1390ea87c6e5a78d65ee33d5c.tar.gz
edk2-4e28ea2c29e008e1390ea87c6e5a78d65ee33d5c.tar.bz2
MdeModulePkg/NvmExpressDxe: enable 64-bit PCI DMA
PCI controller drivers must set the EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE attribute if the controller supports 64-bit DMA addressing. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Feng Tian <feng.tian@Intel.com>
Diffstat (limited to 'MdeModulePkg/Bus/Pci')
-rw-r--r--MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c
index a173504..51cff3c 100644
--- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c
+++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c
@@ -863,6 +863,19 @@ NvmeControllerInit (
}
//
+ // Enable 64-bit DMA support in the PCI layer.
+ //
+ Status = PciIo->Attributes (
+ PciIo,
+ EfiPciIoAttributeOperationEnable,
+ EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE,
+ NULL
+ );
+ if (EFI_ERROR (Status)) {
+ DEBUG ((EFI_D_WARN, "NvmeControllerInit: failed to enable 64-bit DMA (%r)\n", Status));
+ }
+
+ //
// Read the Controller Capabilities register and verify that the NVM command set is supported
//
Status = ReadNvmeControllerCapabilities (Private, &Private->Cap);