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:
@ -874,6 +874,29 @@ PvScsiSetPciAttributes (
|
|||||||
return Status;
|
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;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user