From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from userp2120.oracle.com (userp2120.oracle.com [156.151.31.85]) by mx.groups.io with SMTP id smtpd.web10.14127.1585425538272886956 for ; Sat, 28 Mar 2020 12:58:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=WonyH6ni; spf=pass (domain: oracle.com, ip: 156.151.31.85, mailfrom: liran.alon@oracle.com) Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 02SJwv5U123616; Sat, 28 Mar 2020 19:58:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2020-01-29; bh=nBbcHMnPofRtqYdkP36/7AEjEgMReTZw725enc+8iDE=; b=WonyH6nik5CA9e90/3c05Mx3t3cN/tqzBFD4VvSTeBCyqnbaTrh4xg1l3N1W1zgLw1tU FTiYx1hsNa/rrYv8zE9vf9DHu73eu/r2VK+xm2r9L/HbuD9XIxUZNDbbA8LFeWXENeNy lKpkNgjw9aSs4VhO/hcWCgy6HK9GHWdaw1vSSI5igZWEKMRn5a6xRvE1p1+pn5PdIoHo IpIvF7A4IsjZrfAhIRTfksgEntFdCEEWlGRxmZORp2MUkNiaWU8ycyzESxlHPwbZrdxe ZxSMIegh/gu5WK+KF9hHNFq4Tirw0V9zLU+H3nURteQNjjLbnEAyjq8Ja1x3EhnS3ZPa Ug== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 301y7mhf8j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 28 Mar 2020 19:58:57 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 02SJo761031490; Sat, 28 Mar 2020 19:58:57 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 301vm90q4y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 28 Mar 2020 19:58:57 +0000 Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 02SJwutR017129; Sat, 28 Mar 2020 19:58:56 GMT Received: from spark.ravello.local (/213.57.127.2) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 28 Mar 2020 12:58:56 -0700 From: "Liran Alon" To: devel@edk2.groups.io, lersek@redhat.com Cc: nikita.leshchenko@oracle.com, aaron.young@oracle.com, jordan.l.justen@intel.com, ard.biesheuvel@linaro.org, Liran Alon Subject: [PATCH v3 10/17] OvmfPkg/PvScsiDxe: Enable MMIO-Space & Bus-Mastering in PCI attributes Date: Sat, 28 Mar 2020 23:00:53 +0300 Message-Id: <20200328200100.60786-11-liran.alon@oracle.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200328200100.60786-1-liran.alon@oracle.com> References: <20200328200100.60786-1-liran.alon@oracle.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9574 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 malwarescore=0 mlxscore=0 spamscore=0 mlxlogscore=999 phishscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003280189 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9574 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 phishscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 lowpriorityscore=0 adultscore=0 priorityscore=1501 bulkscore=0 clxscore=1015 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003280189 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Liran Alon --- OvmfPkg/PvScsiDxe/PvScsi.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/PvScsiDxe/PvScsi.c b/OvmfPkg/PvScsiDxe/PvScsi.c index 5566b4cce467..531bed4e5ab7 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; } -- 2.20.1