From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.61]) by mx.groups.io with SMTP id smtpd.web11.9728.1586932316899913155 for ; Tue, 14 Apr 2020 23:31:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XuMPyBEf; spf=pass (domain: redhat.com, ip: 205.139.110.61, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586932316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ws2sYHDMGBgHo/wfjqEZfUQBXXMWrW8LrtER+MM4jWg=; b=XuMPyBEfPwdiMii8DJdt5LoV2Ki9DJXxMkrohqR1cwYGwWccs6qnbpF+POXgGcFyC6LxhN ZR6E19u4sqAuxyzNzeV2J7mB1yBr5+pArTYyr3x80nKy2PkLmnWpJgslRbxD3eF19SuFY2 KIw7Ymz8d0LQTvKOwa1FfOuaK7+38j4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-242-x-C5_mX7Mp2dNcMgwi45jw-1; Wed, 15 Apr 2020 02:31:48 -0400 X-MC-Unique: x-C5_mX7Mp2dNcMgwi45jw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4C75A801F7B; Wed, 15 Apr 2020 06:31:47 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-112-155.ams2.redhat.com [10.36.112.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id B35DAA0983; Wed, 15 Apr 2020 06:31:45 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v4 01/13] OvmfPkg/MptScsiDxe: Create empty driver To: devel@edk2.groups.io, nikita.leshchenko@oracle.com Cc: liran.alon@oracle.com, aaron.young@oracle.com, Jordan Justen , Ard Biesheuvel References: <20200414173813.7715-1-nikita.leshchenko@oracle.com> <20200414173813.7715-2-nikita.leshchenko@oracle.com> From: "Laszlo Ersek" Message-ID: Date: Wed, 15 Apr 2020 08:31:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200414173813.7715-2-nikita.leshchenko@oracle.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 04/14/20 19:38, Nikita Leshenko wrote: > In preparation for implementing LSI Fusion MPT SCSI devices, create a > basic scaffolding for a driver. > > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2390 > Signed-off-by: Nikita Leshenko > Reviewed-by: Liran Alon > --- > Maintainers.txt | 3 ++- > OvmfPkg/MptScsiDxe/MptScsi.c | 26 ++++++++++++++++++++++++++ > OvmfPkg/MptScsiDxe/MptScsiDxe.inf | 26 ++++++++++++++++++++++++++ > OvmfPkg/OvmfPkgIa32.dsc | 4 ++++ > OvmfPkg/OvmfPkgIa32.fdf | 3 +++ > OvmfPkg/OvmfPkgIa32X64.dsc | 4 ++++ > OvmfPkg/OvmfPkgIa32X64.fdf | 3 +++ > OvmfPkg/OvmfPkgX64.dsc | 4 ++++ > OvmfPkg/OvmfPkgX64.fdf | 3 +++ > 9 files changed, 75 insertions(+), 1 deletion(-) > create mode 100644 OvmfPkg/MptScsiDxe/MptScsi.c > create mode 100644 OvmfPkg/MptScsiDxe/MptScsiDxe.inf > > diff --git a/Maintainers.txt b/Maintainers.txt > index 1733225722b6..01b5b8188158 100644 > --- a/Maintainers.txt > +++ b/Maintainers.txt > @@ -435,8 +435,9 @@ OvmfPkg: CSM modules > F: OvmfPkg/Csm/ > R: David Woodhouse > > -OvmfPkg: PVSCSI driver > +OvmfPkg: PVSCSI and MptScsi driver > F: OvmfPkg/PvScsiDxe/ > +F: OvmfPkg/MptScsiDxe/ (1) Please keep the "F:" lines sorted. With that: Reviewed-by: Laszlo Ersek Thanks Laszlo > R: Liran Alon > R: Nikita Leshenko > > diff --git a/OvmfPkg/MptScsiDxe/MptScsi.c b/OvmfPkg/MptScsiDxe/MptScsi.c > new file mode 100644 > index 000000000000..c6c8142dfde6 > --- /dev/null > +++ b/OvmfPkg/MptScsiDxe/MptScsi.c > @@ -0,0 +1,26 @@ > +/** @file > + > + This driver produces Extended SCSI Pass Thru Protocol instances for > + LSI Fusion MPT SCSI devices. > + > + Copyright (C) 2020, Oracle and/or its affiliates. > + > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#include > + > +// > +// Entry Point > +// > + > +EFI_STATUS > +EFIAPI > +MptScsiEntryPoint ( > + IN EFI_HANDLE ImageHandle, > + IN EFI_SYSTEM_TABLE *SystemTable > + ) > +{ > + return EFI_UNSUPPORTED; > +} > diff --git a/OvmfPkg/MptScsiDxe/MptScsiDxe.inf b/OvmfPkg/MptScsiDxe/MptScsiDxe.inf > new file mode 100644 > index 000000000000..b4006a7c2d97 > --- /dev/null > +++ b/OvmfPkg/MptScsiDxe/MptScsiDxe.inf > @@ -0,0 +1,26 @@ > +## @file > +# This driver produces Extended SCSI Pass Thru Protocol instances for > +# LSI Fusion MPT SCSI devices. > +# > +# Copyright (C) 2020, Oracle and/or its affiliates. > +# > +# SPDX-License-Identifier: BSD-2-Clause-Patent > +# > +## > + > +[Defines] > + INF_VERSION = 1.29 > + BASE_NAME = MptScsiDxe > + FILE_GUID = 2B3DB5DD-B315-4961-8454-0AFF3C811B19 > + MODULE_TYPE = UEFI_DRIVER > + VERSION_STRING = 1.0 > + ENTRY_POINT = MptScsiEntryPoint > + > +[Sources] > + MptScsi.c > + > +[Packages] > + MdePkg/MdePkg.dec > + > +[LibraryClasses] > + UefiDriverEntryPoint > diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc > index cbc5f0e583bc..158a5e9f39bd 100644 > --- a/OvmfPkg/OvmfPkgIa32.dsc > +++ b/OvmfPkg/OvmfPkgIa32.dsc > @@ -49,6 +49,7 @@ [Defines] > # Device drivers > # > DEFINE PVSCSI_ENABLE = TRUE > + DEFINE MPT_SCSI_ENABLE = TRUE > > # > # Flash size selection. Setting FD_SIZE_IN_KB on the command line directly to > @@ -744,6 +745,9 @@ [Components] > OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf > !if $(PVSCSI_ENABLE) == TRUE > OvmfPkg/PvScsiDxe/PvScsiDxe.inf > +!endif > +!if $(MPT_SCSI_ENABLE) == TRUE > + OvmfPkg/MptScsiDxe/MptScsiDxe.inf > !endif > MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf > MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf > diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf > index 8e43f4264ecc..fd81b6fa8bed 100644 > --- a/OvmfPkg/OvmfPkgIa32.fdf > +++ b/OvmfPkg/OvmfPkgIa32.fdf > @@ -233,6 +233,9 @@ [FV.DXEFV] > !if $(PVSCSI_ENABLE) == TRUE > INF OvmfPkg/PvScsiDxe/PvScsiDxe.inf > !endif > +!if $(MPT_SCSI_ENABLE) == TRUE > +INF OvmfPkg/MptScsiDxe/MptScsiDxe.inf > +!endif > > !if $(SECURE_BOOT_ENABLE) == TRUE > INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf > diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc > index 6d69cc6cb56f..a6c5a1d9d050 100644 > --- a/OvmfPkg/OvmfPkgIa32X64.dsc > +++ b/OvmfPkg/OvmfPkgIa32X64.dsc > @@ -48,6 +48,7 @@ [Defines] > # Device drivers > # > DEFINE PVSCSI_ENABLE = TRUE > + DEFINE MPT_SCSI_ENABLE = TRUE > > # > # Flash size selection. Setting FD_SIZE_IN_KB on the command line directly to > @@ -756,6 +757,9 @@ [Components.X64] > OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf > !if $(PVSCSI_ENABLE) == TRUE > OvmfPkg/PvScsiDxe/PvScsiDxe.inf > +!endif > +!if $(MPT_SCSI_ENABLE) == TRUE > + OvmfPkg/MptScsiDxe/MptScsiDxe.inf > !endif > MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf > MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf > diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf > index 25af9fbed48a..f71134a65931 100644 > --- a/OvmfPkg/OvmfPkgIa32X64.fdf > +++ b/OvmfPkg/OvmfPkgIa32X64.fdf > @@ -234,6 +234,9 @@ [FV.DXEFV] > !if $(PVSCSI_ENABLE) == TRUE > INF OvmfPkg/PvScsiDxe/PvScsiDxe.inf > !endif > +!if $(MPT_SCSI_ENABLE) == TRUE > +INF OvmfPkg/MptScsiDxe/MptScsiDxe.inf > +!endif > > !if $(SECURE_BOOT_ENABLE) == TRUE > INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf > diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc > index 5ad4f461ce52..9aa8dd9e5fe1 100644 > --- a/OvmfPkg/OvmfPkgX64.dsc > +++ b/OvmfPkg/OvmfPkgX64.dsc > @@ -48,6 +48,7 @@ [Defines] > # Device drivers > # > DEFINE PVSCSI_ENABLE = TRUE > + DEFINE MPT_SCSI_ENABLE = TRUE > > # > # Flash size selection. Setting FD_SIZE_IN_KB on the command line directly to > @@ -754,6 +755,9 @@ [Components] > OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf > !if $(PVSCSI_ENABLE) == TRUE > OvmfPkg/PvScsiDxe/PvScsiDxe.inf > +!endif > +!if $(MPT_SCSI_ENABLE) == TRUE > + OvmfPkg/MptScsiDxe/MptScsiDxe.inf > !endif > MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf > MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf > diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf > index 25af9fbed48a..f71134a65931 100644 > --- a/OvmfPkg/OvmfPkgX64.fdf > +++ b/OvmfPkg/OvmfPkgX64.fdf > @@ -234,6 +234,9 @@ [FV.DXEFV] > !if $(PVSCSI_ENABLE) == TRUE > INF OvmfPkg/PvScsiDxe/PvScsiDxe.inf > !endif > +!if $(MPT_SCSI_ENABLE) == TRUE > +INF OvmfPkg/MptScsiDxe/MptScsiDxe.inf > +!endif > > !if $(SECURE_BOOT_ENABLE) == TRUE > INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf >