From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 08F8021B02822 for ; Wed, 21 Nov 2018 03:26:52 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8360F4E938; Wed, 21 Nov 2018 11:26:51 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-240.rdu2.redhat.com [10.10.120.240]) by smtp.corp.redhat.com (Postfix) with ESMTP id 919CE7E38B; Wed, 21 Nov 2018 11:26:50 +0000 (UTC) To: Fu Siyuan , edk2-devel@lists.01.org References: <20181121052819.15744-1-siyuan.fu@intel.com> <20181121052819.15744-4-siyuan.fu@intel.com> From: Laszlo Ersek Message-ID: <5c2cca69-1f8e-3d72-09e6-8ca776e70a90@redhat.com> Date: Wed, 21 Nov 2018 12:26:49 +0100 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: <20181121052819.15744-4-siyuan.fu@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 21 Nov 2018 11:26:51 +0000 (UTC) Subject: Re: [PATCH 3/6] ArmVirtPkg: Update DSC/FDF to use NetworkPkg's include fragment file. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Nov 2018 11:26:52 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit some light comments for now: On 11/21/18 06:28, Fu Siyuan wrote: > This patch updates the platform DSC/FDF files to use the include fragment > files provided by NetworkPkg. > The feature enabling flags in [Defines] section have been updated to use > the NetworkPkg's terms, and the value has been overridden with the original > default value on this platform. > > Cc: Laszlo Ersek > Cc: Ard Biesheuvel > Cc: Julien Grall > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Fu Siyuan > --- > ArmVirtPkg/ArmVirt.dsc.inc | 12 ------ > ArmVirtPkg/ArmVirtQemu.dsc | 44 ++++---------------- > ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 28 +------------ > ArmVirtPkg/ArmVirtQemuKernel.dsc | 38 +++-------------- > 4 files changed, 14 insertions(+), 108 deletions(-) > > diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc > index 70a0ac4d786c..24a064198b5e 100644 > --- a/ArmVirtPkg/ArmVirt.dsc.inc > +++ b/ArmVirtPkg/ArmVirt.dsc.inc > @@ -75,18 +75,6 @@ [LibraryClasses.common] > # use the accelerated BaseMemoryLibOptDxe by default, overrides for SEC/PEI below > BaseMemoryLib|MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf > > - # Networking Requirements > - NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf > - DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf > - UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf > - IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf > -!if $(NETWORK_IP6_ENABLE) == TRUE > - TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf > -!endif > -!if $(HTTP_BOOT_ENABLE) == TRUE > - HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf > -!endif > - > # > # It is not possible to prevent the ARM compiler from inserting calls to intrinsic functions. > # This library provides the instrinsic functions such a compiler may generate calls to. > diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc > index 885c6b14b844..5a1b6b0f0519 100644 > --- a/ArmVirtPkg/ArmVirtQemu.dsc > +++ b/ArmVirtPkg/ArmVirtQemu.dsc > @@ -35,9 +35,14 @@ [Defines] > # > DEFINE SECURE_BOOT_ENABLE = FALSE > DEFINE NETWORK_IP6_ENABLE = FALSE > - DEFINE HTTP_BOOT_ENABLE = FALSE > - > + DEFINE NETWORK_HTTP_BOOT_ENABLE= FALSE > + DEFINE NETWORK_SNP_ENABLE = FALSE > + DEFINE NETWORK_TLS_ENABLE = FALSE > + DEFINE NETWORK_IPSEC_ENABLE = FALSE > + DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE > + (1) Please keep these nicely aligned (I should have mentioned the same for OvmfPkg too). > !include ArmVirtPkg/ArmVirt.dsc.inc > +!include NetworkPkg/Network.dsc.inc > > [LibraryClasses.common] > ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf > @@ -123,10 +128,6 @@ [PcdsFixedAtBuild.common] > # > gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0 > > -!if $(HTTP_BOOT_ENABLE) == TRUE > - gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE > -!endif > - > # System Memory Base -- fixed at 0x4000_0000 > gArmTokenSpaceGuid.PcdSystemMemoryBase|0x40000000 > > @@ -335,37 +336,6 @@ [Components.common] > NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf > } > > - # > - # Networking stack > - # > - MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf > - MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf > - MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf > - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf > - MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf > - MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf > - MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf > - MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf > -!if $(NETWORK_IP6_ENABLE) == TRUE > - NetworkPkg/Ip6Dxe/Ip6Dxe.inf > - NetworkPkg/TcpDxe/TcpDxe.inf > - NetworkPkg/Udp6Dxe/Udp6Dxe.inf > - NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf > - NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf > - NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf > - NetworkPkg/IScsiDxe/IScsiDxe.inf > -!else > - MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf > - MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf > - MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf > -!endif > -!if $(HTTP_BOOT_ENABLE) == TRUE > - NetworkPkg/DnsDxe/DnsDxe.inf > - NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf > - NetworkPkg/HttpDxe/HttpDxe.inf > - NetworkPkg/HttpBootDxe/HttpBootDxe.inf > -!endif > - > # > # SCSI Bus and Disk Driver > # > diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc > index a6390bd4b841..560651e49e0b 100644 > --- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc > +++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc > @@ -118,33 +118,7 @@ [FV.FvMain] > # > # Networking stack > # > - INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf > - INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf > - INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf > - INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf > - INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf > - INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf > - INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf > - INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf > -!if $(NETWORK_IP6_ENABLE) == TRUE > - INF NetworkPkg/Ip6Dxe/Ip6Dxe.inf > - INF NetworkPkg/TcpDxe/TcpDxe.inf > - INF NetworkPkg/Udp6Dxe/Udp6Dxe.inf > - INF NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf > - INF NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf > - INF NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf > - INF NetworkPkg/IScsiDxe/IScsiDxe.inf > -!else > - INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf > - INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf > - INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf > -!endif > -!if $(HTTP_BOOT_ENABLE) == TRUE > - INF NetworkPkg/DnsDxe/DnsDxe.inf > - INF NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf > - INF NetworkPkg/HttpDxe/HttpDxe.inf > - INF NetworkPkg/HttpBootDxe/HttpBootDxe.inf > -!endif > +!include NetworkPkg/Network.fdf.inc > > # > # SCSI Bus and Disk Driver > diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc > index 434d6861a56f..a5c3e957ac82 100644 > --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc > +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc > @@ -35,9 +35,14 @@ [Defines] > # > DEFINE SECURE_BOOT_ENABLE = FALSE > DEFINE NETWORK_IP6_ENABLE = FALSE > - DEFINE HTTP_BOOT_ENABLE = FALSE > + DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE > + DEFINE NETWORK_SNP_ENABLE = FALSE > + DEFINE NETWORK_TLS_ENABLE = FALSE > + DEFINE NETWORK_IPSEC_ENABLE = FALSE > + DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE (2) Same as (1). > > !include ArmVirtPkg/ArmVirt.dsc.inc > +!include NetworkPkg/Network.dsc.inc > > [LibraryClasses.common] > ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf > @@ -324,37 +329,6 @@ [Components.common] > NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf > } > > - # > - # Networking stack > - # > - MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf > - MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf > - MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf > - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf > - MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf > - MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf > - MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf > - MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf > -!if $(NETWORK_IP6_ENABLE) == TRUE > - NetworkPkg/Ip6Dxe/Ip6Dxe.inf > - NetworkPkg/TcpDxe/TcpDxe.inf > - NetworkPkg/Udp6Dxe/Udp6Dxe.inf > - NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf > - NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf > - NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf > - NetworkPkg/IScsiDxe/IScsiDxe.inf > -!else > - MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf > - MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf > - MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf > -!endif > -!if $(HTTP_BOOT_ENABLE) == TRUE > - NetworkPkg/DnsDxe/DnsDxe.inf > - NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf > - NetworkPkg/HttpDxe/HttpDxe.inf > - NetworkPkg/HttpBootDxe/HttpBootDxe.inf > -!endif > - > # > # SCSI Bus and Disk Driver > # > (3) Whatever we end up doing about "PcdAllowHttpConnections", it should be consistent between "ArmVirtQemu.dsc" and "ArmVirtQemuKernel.dsc". The patch curently removes PcdAllowHttpConnections only from the former, however. Thanks Laszlo