OvmfPkg/PvScsiDxe: Enable device 64-bit DMA addresses

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>
This commit is contained in:
Liran Alon 2020-03-28 23:01:00 +03:00 committed by mergify[bot]
parent 7d8a04e9d2
commit f34c7645bd
1 changed files with 23 additions and 0 deletions

View File

@ -874,6 +874,29 @@ PvScsiSetPciAttributes (
return Status;
}
//
// Signal device supports 64-bit DMA addresses
//
Status = Dev->PciIo->Attributes (
Dev->PciIo,
EfiPciIoAttributeOperationEnable,
EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE,
NULL
);
if (EFI_ERROR (Status)) {
//
// Warn user that device will only be using 32-bit DMA addresses.
//
// Note that this does not prevent the device/driver from working
// and therefore we only warn and continue as usual.
//
DEBUG ((
DEBUG_WARN,
"%a: failed to enable 64-bit DMA addresses\n",
__FUNCTION__
));
}
return EFI_SUCCESS;
}