From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) by mx.groups.io with SMTP id smtpd.web11.15685.1588626160290908930 for ; Mon, 04 May 2020 14:02:40 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=ldw8eDAg; spf=pass (domain: oracle.com, ip: 156.151.31.86, mailfrom: nikita.leshchenko@oracle.com) Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 044KvXEv165585; Mon, 4 May 2020 21:02:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=corp-2020-01-29; bh=qWrTNLs14kR9jwpYfh90Hl97bu8HXeNtPnxvX7dlRNw=; b=ldw8eDAgNHDRRPsfK7p87ljqdgv7qrAkL0txk0PNM/hkNeu38L7bG89jm6JASi3fXsl4 QmGkhwyUD0ABmP3GqQjwNz7+jwAFHzFIQbSqlBVl0gPoKvGwLnC3TXBpfdg/O/zzdOOh vlGhxsZ3mkzOlqOyLejN0KTiJOQuuU9liD7e9a04w15Wgb3ihsCwxfENRRxqyZBTCUNd i/zVnKR64hYPkYT2Q5CTiTaoE8oL9cMar08kboCoBvgjzCUti9+9KfvpjbiTqd5WXI26 e9YMZvm7DvGY6+xlMBxBNBdpqvy1P6eKsyOtaWeThh2OS3GTbQMSyUd9Dt2G0TPpq3RZ zQ== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 30s09r1d11-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 04 May 2020 21:02:35 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 044L1M8E020500; Mon, 4 May 2020 21:02:35 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3020.oracle.com with ESMTP id 30sjnbx8fm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 04 May 2020 21:02:35 +0000 Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 044L2XII019308; Mon, 4 May 2020 21:02:33 GMT Received: from spark.ravello.local (/213.57.127.2) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 04 May 2020 14:02:32 -0700 From: "Nikita Leshenko" To: devel@edk2.groups.io Cc: Nikita Leshenko , liran.alon@oracle.com, aaron.young@oracle.com, Jordan Justen , Laszlo Ersek , Ard Biesheuvel Subject: [PATCH v6 00/12] OvmfPkg: Support booting from Fusion-MPT SCSI controllers Date: Tue, 5 May 2020 00:05:55 +0300 Message-Id: <20200504210607.144434-1-nikita.leshchenko@oracle.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9611 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 adultscore=0 phishscore=0 mlxlogscore=999 bulkscore=0 malwarescore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005040164 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9611 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxscore=0 lowpriorityscore=0 spamscore=0 adultscore=0 clxscore=1015 suspectscore=0 priorityscore=1501 malwarescore=0 mlxlogscore=999 phishscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005040163 Content-Transfer-Encoding: 8bit This series adds driver support for: - LSI53C1030 - SAS1068 - SAS1068E These controllers are widely supported by QEMU, VirtualBox and VMWare. This work is part of the more general agenda of enhancing OVMF boot device support to have feature parity with SeaBIOS. I pushed a copy of these patches to https://github.com/nikital/edk2/tree/mptscsi_v6 Previous versions: https://github.com/nikital/edk2/tree/mptscsi_v5 https://github.com/nikital/edk2/tree/mptscsi_v4 https://github.com/nikital/edk2/tree/mptscsi_v3 https://github.com/nikital/edk2/tree/mptscsi (v2) v5->v6: - Use for "other" error ReportHostAdapterError - Add alignment for init request - Add PcdLib - Use RShiftU64 - Use Pages for FreeBuffer - Use STATIC_ASSERT for ReplyWord - Code convention fixes v4->v5: - Sort maintainers and protocols - Fix bug when restoring PCI attributes (Use Set instead of Enable) - Separate packed structs and aligned unions - STATIC_ASSERT for init request size - Add support for multiple targets from the beginning - Use PCI_BAR_IDX0 in door bell - Code convention improvements - Add DEBUG_VERBOSE message seen in PvScsiExitBoot - Return EFI_INVALID_PARAMETER in GetNextTarget - STATIC_ASSERT for MaxTarget - Move PCD near PvScsi - A lot of fixes for PassThru (comments, error handling, casting) - Support 64-bit DMA v3->v4: - Add ExitBootServices - Rework error handling in PassThru - SPDX license - Made compilation conditional - Squash GetTargetLun and BuildDevicePath commits - Added #include - Use PCI_BAR_IDX0 - Code convention improvements v2->v3: - Change error handling style - Add comments about target size and zero unused target bytes - Remove internal Reviewed-by - Fix problems reported by PatchCheck.py - Use SetupGit.py v1->v2: - Map() DMAed buffers - Fixed various code convention issues - Newer debug macros - Updated INF version Thanks, Nikita Nikita Leshenko (12): OvmfPkg/MptScsiDxe: Create empty driver OvmfPkg/MptScsiDxe: Install DriverBinding Protocol OvmfPkg/MptScsiDxe: Report name of driver OvmfPkg/MptScsiDxe: Probe PCI devices and look for MptScsi OvmfPkg/MptScsiDxe: Install stubbed EXT_SCSI_PASS_THRU OvmfPkg/MptScsiDxe: Report targets and one LUN OvmfPkg/MptScsiDxe: Build and decode DevicePath OvmfPkg/MptScsiDxe: Open PciIo protocol for later use OvmfPkg/MptScsiDxe: Set and restore PCI attributes OvmfPkg/MptScsiDxe: Initialize hardware OvmfPkg/MptScsiDxe: Implement the PassThru method OvmfPkg/MptScsiDxe: Reset device on ExitBootServices() Maintainers.txt | 3 +- .../Include/IndustryStandard/FusionMptScsi.h | 160 +++ OvmfPkg/MptScsiDxe/MptScsi.c | 1211 +++++++++++++++++ OvmfPkg/MptScsiDxe/MptScsiDxe.inf | 44 + OvmfPkg/OvmfPkg.dec | 7 + OvmfPkg/OvmfPkgIa32.dsc | 4 + OvmfPkg/OvmfPkgIa32.fdf | 3 + OvmfPkg/OvmfPkgIa32X64.dsc | 4 + OvmfPkg/OvmfPkgIa32X64.fdf | 3 + OvmfPkg/OvmfPkgX64.dsc | 4 + OvmfPkg/OvmfPkgX64.fdf | 3 + 11 files changed, 1445 insertions(+), 1 deletion(-) create mode 100644 OvmfPkg/Include/IndustryStandard/FusionMptScsi.h create mode 100644 OvmfPkg/MptScsiDxe/MptScsi.c create mode 100644 OvmfPkg/MptScsiDxe/MptScsiDxe.inf -- 2.20.1