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.69741.1584370810101679076 for ; Mon, 16 Mar 2020 08:00:10 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=PJ16miIU; spf=pass (domain: oracle.com, ip: 156.151.31.86, mailfrom: liran.alon@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 02GEqjQ6088869; Mon, 16 Mar 2020 15:00:09 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=Mmgyttw8TjQvC7rkMRYZbthkPpOHcff/fFiLEm4TBpY=; b=PJ16miIUBv4KPr5FIyKzC3ac0DpehZkqYAC8Mpbw8pAvZqwzf6QF+4hi3FuSTIkd5ZLt CY1WhUzcz0agaKlH5RzLreyaVIXoFtObLfaz8gVwn211btm4upCZypIsmXZuBJBOU2Hd 8PBa6f7wOH0dUxmOWjPafD3++QacNayPC7tc1ODa2MuiQ3O4ivXArRg+WsL0yXuM+7oj rcdC94VT8aZ0eCQbWlFt8zQ53SQ2Eze4cf/k4kqP4qOGfFPLeEevBMcoMRrQ9XwK1Afl 0JkHL3+a8ub004UPQH0s2iqLFtwiEOPUxbVtKEduS1cBo/6NDCcQFdngBbub6YMJwNR7 SA== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 2yrppqyfaf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 16 Mar 2020 15:00:09 +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 02GEqUMx113918; Mon, 16 Mar 2020 15:00:08 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3030.oracle.com with ESMTP id 2ys8tpw8wc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 16 Mar 2020 15:00:08 +0000 Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 02GF06o0011367; Mon, 16 Mar 2020 15:00:06 GMT Received: from spark.ravello.local (/213.57.127.2) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 16 Mar 2020 08:00:05 -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 01/17] OvmfPkg/PvScsiDxe: Create empty driver Date: Mon, 16 Mar 2020 17:00:57 +0200 Message-Id: <20200316150113.104630-2-liran.alon@oracle.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200316150113.104630-1-liran.alon@oracle.com> References: <20200316150113.104630-1-liran.alon@oracle.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9561 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 phishscore=0 mlxscore=0 malwarescore=0 suspectscore=0 mlxlogscore=696 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003160072 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9561 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 bulkscore=0 suspectscore=0 lowpriorityscore=0 phishscore=0 adultscore=0 clxscore=1015 impostorscore=0 priorityscore=1501 spamscore=0 mlxlogscore=757 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003160072 Content-Transfer-Encoding: 8bit In preparation for support booting from PvScsi devices, create a basic scaffolding for a driver. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2567 Reviewed-by: Nikita Leshenko Signed-off-by: Liran Alon --- OvmfPkg/OvmfPkgIa32.dsc | 8 ++++++++ OvmfPkg/OvmfPkgIa32.fdf | 3 +++ OvmfPkg/OvmfPkgIa32X64.dsc | 8 ++++++++ OvmfPkg/OvmfPkgIa32X64.fdf | 3 +++ OvmfPkg/OvmfPkgX64.dsc | 8 ++++++++ OvmfPkg/OvmfPkgX64.fdf | 3 +++ OvmfPkg/PvScsiDxe/PvScsi.c | 24 ++++++++++++++++++++++++ OvmfPkg/PvScsiDxe/PvScsi.inf | 27 +++++++++++++++++++++++++++ 8 files changed, 84 insertions(+) create mode 100644 OvmfPkg/PvScsiDxe/PvScsi.c create mode 100644 OvmfPkg/PvScsiDxe/PvScsi.inf diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index 19728f20b34e..79b8c58e54c3 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -44,6 +44,11 @@ !include NetworkPkg/NetworkDefines.dsc.inc + # + # Device drivers + # + DEFINE PVSCSI_ENABLE = TRUE + # # Flash size selection. Setting FD_SIZE_IN_KB on the command line directly to # one of the supported values, in place of any of the convenience macros, is @@ -718,6 +723,9 @@ OvmfPkg/XenIoPciDxe/XenIoPciDxe.inf OvmfPkg/XenBusDxe/XenBusDxe.inf OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf +!ifdef $(PVSCSI_ENABLE) + OvmfPkg/PvScsiDxe/PvScsiDxe.inf +!endif MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf index 63607551ed75..f59a58bc2689 100644 --- a/OvmfPkg/OvmfPkgIa32.fdf +++ b/OvmfPkg/OvmfPkgIa32.fdf @@ -227,6 +227,9 @@ INF OvmfPkg/VirtioRngDxe/VirtioRng.inf INF OvmfPkg/XenIoPciDxe/XenIoPciDxe.inf INF OvmfPkg/XenBusDxe/XenBusDxe.inf INF OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf +!if $(PVSCSI_ENABLE) == TRUE + INF OvmfPkg/PvScsiDxe/PvScsiDxe.inf +!endif !if $(SECURE_BOOT_ENABLE) == TRUE INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index 3c0c229e3a72..744f7eb05e12 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -44,6 +44,11 @@ !include NetworkPkg/NetworkDefines.dsc.inc + # + # Device drivers + # + DEFINE PVSCSI_ENABLE = TRUE + # # Flash size selection. Setting FD_SIZE_IN_KB on the command line directly to # one of the supported values, in place of any of the convenience macros, is @@ -731,6 +736,9 @@ OvmfPkg/XenIoPciDxe/XenIoPciDxe.inf OvmfPkg/XenBusDxe/XenBusDxe.inf OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf +!ifdef $(PVSCSI_ENABLE) + OvmfPkg/PvScsiDxe/PvScsiDxe.inf +!endif MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf index 0488e5d95ffe..5fd21ea1b2de 100644 --- a/OvmfPkg/OvmfPkgIa32X64.fdf +++ b/OvmfPkg/OvmfPkgIa32X64.fdf @@ -228,6 +228,9 @@ INF OvmfPkg/VirtioRngDxe/VirtioRng.inf INF OvmfPkg/XenIoPciDxe/XenIoPciDxe.inf INF OvmfPkg/XenBusDxe/XenBusDxe.inf INF OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf +!if $(PVSCSI_ENABLE) == TRUE + INF OvmfPkg/PvScsiDxe/PvScsiDxe.inf +!endif !if $(SECURE_BOOT_ENABLE) == TRUE INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index f6c1d8d228c6..64ed3d5ec18e 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -44,6 +44,11 @@ !include NetworkPkg/NetworkDefines.dsc.inc + # + # Device drivers + # + DEFINE PVSCSI_ENABLE = TRUE + # # Flash size selection. Setting FD_SIZE_IN_KB on the command line directly to # one of the supported values, in place of any of the convenience macros, is @@ -729,6 +734,9 @@ OvmfPkg/XenIoPciDxe/XenIoPciDxe.inf OvmfPkg/XenBusDxe/XenBusDxe.inf OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf +!ifdef $(PVSCSI_ENABLE) + OvmfPkg/PvScsiDxe/PvScsi.inf +!endif MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf index 0488e5d95ffe..c155993dc16f 100644 --- a/OvmfPkg/OvmfPkgX64.fdf +++ b/OvmfPkg/OvmfPkgX64.fdf @@ -228,6 +228,9 @@ INF OvmfPkg/VirtioRngDxe/VirtioRng.inf INF OvmfPkg/XenIoPciDxe/XenIoPciDxe.inf INF OvmfPkg/XenBusDxe/XenBusDxe.inf INF OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf +!if $(PVSCSI_ENABLE) == TRUE + INF OvmfPkg/PvScsiDxe/PvScsi.inf +!endif !if $(SECURE_BOOT_ENABLE) == TRUE INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf diff --git a/OvmfPkg/PvScsiDxe/PvScsi.c b/OvmfPkg/PvScsiDxe/PvScsi.c new file mode 100644 index 000000000000..a3f704d60d77 --- /dev/null +++ b/OvmfPkg/PvScsiDxe/PvScsi.c @@ -0,0 +1,24 @@ +/** @file + + This driver produces Extended SCSI Pass Thru Protocol instances for + pvscsi devices. + + Copyright (C) 2020, Oracle and/or its affiliates. + + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +// +// Entry Point +// + +EFI_STATUS +EFIAPI +PvScsiEntryPoint ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + return EFI_UNSUPPORTED; +} diff --git a/OvmfPkg/PvScsiDxe/PvScsi.inf b/OvmfPkg/PvScsiDxe/PvScsi.inf new file mode 100644 index 000000000000..093cc0171338 --- /dev/null +++ b/OvmfPkg/PvScsiDxe/PvScsi.inf @@ -0,0 +1,27 @@ +## @file +# +# This driver produces Extended SCSI Pass Thru Protocol instances for +# pvscsi devices. +# +# Copyright (C) 2020, Oracle and/or its affiliates. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION = 1.29 + BASE_NAME = PvScsiDxe + FILE_GUID = 30346B14-1580-4781-879D-BA0C55AE9BB2 + MODULE_TYPE = UEFI_DRIVER + VERSION_STRING = 1.0 + ENTRY_POINT = PvScsiEntryPoint + +[Sources] + PvScsi.c + +[Packages] + MdePkg/MdePkg.dec + +[LibraryClasses] + UefiDriverEntryPoint -- 2.20.1