mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/AtaAtapiPassThru: 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>
This commit is contained in:
parent
96c13c0117
commit
a2c9b0873a
|
@ -2259,6 +2259,24 @@ AhciModeInitialization (
|
||||||
AhciOrReg (PciIo, EFI_AHCI_GHC_OFFSET, EFI_AHCI_GHC_ENABLE);
|
AhciOrReg (PciIo, EFI_AHCI_GHC_OFFSET, EFI_AHCI_GHC_ENABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Enable 64-bit DMA support in the PCI layer if this controller
|
||||||
|
// supports it.
|
||||||
|
//
|
||||||
|
if ((Capability & EFI_AHCI_CAP_S64A) != 0) {
|
||||||
|
Status = PciIo->Attributes (
|
||||||
|
PciIo,
|
||||||
|
EfiPciIoAttributeOperationEnable,
|
||||||
|
EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
DEBUG ((EFI_D_WARN,
|
||||||
|
"AhciModeInitialization: failed to enable 64-bit DMA on 64-bit capable controller (%r)\n",
|
||||||
|
Status));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get the number of command slots per port supported by this HBA.
|
// Get the number of command slots per port supported by this HBA.
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue