diff options
author | Liran Alon <liran.alon@oracle.com> | 2020-03-28 23:00:53 +0300 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-03-30 16:45:07 +0000 |
commit | 6672b3cff2e164093ebc120ef8304472b9a7d23f (patch) | |
tree | dcdb5e4093e2b36bfd78cbfed4b5fbcf7a2feaa7 /OvmfPkg | |
parent | 45098e8a9aeefaf8405e4b772ffa2694efe507a0 (diff) | |
download | edk2-6672b3cff2e164093ebc120ef8304472b9a7d23f.zip edk2-6672b3cff2e164093ebc120ef8304472b9a7d23f.tar.gz edk2-6672b3cff2e164093ebc120ef8304472b9a7d23f.tar.bz2 |
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>
Diffstat (limited to 'OvmfPkg')
-rw-r--r-- | OvmfPkg/PvScsiDxe/PvScsi.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/OvmfPkg/PvScsiDxe/PvScsi.c b/OvmfPkg/PvScsiDxe/PvScsi.c index 5566b4c..531bed4 100644 --- a/OvmfPkg/PvScsiDxe/PvScsi.c +++ b/OvmfPkg/PvScsiDxe/PvScsi.c @@ -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;
}
|