[edk2-devel] [PATCH v2 17/17] OvmfPkg/PvScsiDxe: Enable device 64-bit DMA addresses
Laszlo Ersek
lersek at redhat.com
Thu Mar 26 22:29:05 UTC 2020
On 03/25/20 17:10, Liran Alon wrote:
> Enable PCI dual-address cycle attribute to signal device
> supports 64-bit DMA addresses.
>
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2567
> Signed-off-by: Liran Alon <liran.alon at oracle.com>
> ---
> OvmfPkg/PvScsiDxe/PvScsi.c | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> diff --git a/OvmfPkg/PvScsiDxe/PvScsi.c b/OvmfPkg/PvScsiDxe/PvScsi.c
> index 42a18494efb7..3aea5c7f8eda 100644
> --- a/OvmfPkg/PvScsiDxe/PvScsi.c
> +++ b/OvmfPkg/PvScsiDxe/PvScsi.c
> @@ -836,6 +836,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;
> }
>
>
Reviewed-by: Laszlo Ersek <lersek at redhat.com>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#56426): https://edk2.groups.io/g/devel/message/56426
Mute This Topic: https://groups.io/mt/72544182/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list