OvmfPkg/PvScsiDxe: Enable MMIO-Space & Bus-Mastering in PCI attributes

Enable MMIO-Space & Bus-Mastering PCI attributes when device is started.
Note that original PCI attributes are restored when device is stopped.

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-11-liran.alon@oracle.com>
Reviewed-by: Nikita Leshenko <nikita.leshchenko@oracle.com>
This commit is contained in:
Liran Alon 2020-03-28 23:00:53 +03:00 committed by mergify[bot]
parent 45098e8a9a
commit 6672b3cff2
1 changed files with 11 additions and 1 deletions

View File

@ -305,8 +305,18 @@ PvScsiSetPciAttributes (
}
//
// TODO: Change PCI Attributes
// Enable MMIO-Space & Bus-Mastering
//
Status = Dev->PciIo->Attributes (
Dev->PciIo,
EfiPciIoAttributeOperationEnable,
(EFI_PCI_IO_ATTRIBUTE_MEMORY |
EFI_PCI_IO_ATTRIBUTE_BUS_MASTER),
NULL
);
if (EFI_ERROR (Status)) {
return Status;
}
return EFI_SUCCESS;
}