From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Thu, 16 May 2019 07:21:36 -0700 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 978DC30C26B1; Thu, 16 May 2019 14:21:35 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-121-88.rdu2.redhat.com [10.10.121.88]) by smtp.corp.redhat.com (Postfix) with ESMTP id 321B060BE5; Thu, 16 May 2019 14:21:33 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v2 1/4] OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file. To: devel@edk2.groups.io, shenglei.zhang@intel.com Cc: Fu Siyuan , Jordan Justen , Ard Biesheuvel , Anthony Perard , Julien Grall References: <20190516081810.27840-1-shenglei.zhang@intel.com> <20190516081810.27840-2-shenglei.zhang@intel.com> From: "Laszlo Ersek" Message-ID: Date: Thu, 16 May 2019 16:21:32 +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: <20190516081810.27840-2-shenglei.zhang@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Thu, 16 May 2019 14:21:35 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 05/16/19 10:18, Zhang, Shenglei wrote: > From: Fu Siyuan > > 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. > > v2:1.Make the comments before Network definition align other parts. > 2.Set NETWORK_ALLOW_HTTP_CONNECTIONS true. > 3.Remove TcpIoLib in lib classes section. > 4.Withdraw the removal of [PcdsFixedAtBuild.X64]. > > Cc: Jordan Justen > Cc: Laszlo Ersek > Cc: Ard Biesheuvel > Cc: Anthony Perard > Cc: Julien Grall > Signed-off-by: Shenglei Zhang > --- > OvmfPkg/OvmfPkgIa32.dsc | 71 ++++++++++++++------------------------ > OvmfPkg/OvmfPkgIa32.fdf | 29 +--------------- > OvmfPkg/OvmfPkgIa32X64.dsc | 71 ++++++++++++++------------------------ > OvmfPkg/OvmfPkgIa32X64.fdf | 29 +--------------- > OvmfPkg/OvmfPkgX64.dsc | 71 ++++++++++++++------------------------ > OvmfPkg/OvmfPkgX64.fdf | 29 +--------------- > 6 files changed, 81 insertions(+), 219 deletions(-) > > diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc > index 64054e226f88..578fc6c98ec8 100644 > --- a/OvmfPkg/OvmfPkgIa32.dsc > +++ b/OvmfPkg/OvmfPkgIa32.dsc > @@ -29,14 +29,21 @@ [Defines] > # -D FLAG=VALUE > # > DEFINE SECURE_BOOT_ENABLE = FALSE > - DEFINE NETWORK_IP6_ENABLE = FALSE > - DEFINE HTTP_BOOT_ENABLE = FALSE > DEFINE SMM_REQUIRE = FALSE > - DEFINE TLS_ENABLE = FALSE > DEFINE TPM2_ENABLE = FALSE > DEFINE TPM2_CONFIG_ENABLE = FALSE > DEFINE USE_LEGACY_ISA_STACK = FALSE > > + # > + # Network definition > + # > + DEFINE NETWORK_TLS_ENABLE = FALSE > + DEFINE NETWORK_IP6_ENABLE = FALSE > + DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE > + DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE > + > +!include NetworkPkg/NetworkDefines.dsc.inc > + > # > # 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 > @@ -139,10 +146,6 @@ [LibraryClasses] > FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf > UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf > SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf > - NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf > - IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf > - UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf > - DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf > UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf > SerializeVariablesLib|OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.inf > QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxeLib.inf > @@ -168,7 +171,7 @@ [LibraryClasses] > DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf > > IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf > -!if $(TLS_ENABLE) == TRUE > +!if $(NETWORK_TLS_ENABLE) == TRUE > OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf > !else > OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > @@ -184,13 +187,13 @@ [LibraryClasses] > !endif > VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf > > - TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf > > -!if $(HTTP_BOOT_ENABLE) == TRUE > - HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf > -!endif > + # > + # Network libraries > + # > +!include NetworkPkg/NetworkLibs.dsc.inc > > -!if $(TLS_ENABLE) == TRUE > +!if $(NETWORK_TLS_ENABLE) == TRUE > TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf > !endif > > @@ -434,7 +437,7 @@ [PcdsFixedAtBuild] > !if ($(FD_SIZE_IN_KB) == 1024) || ($(FD_SIZE_IN_KB) == 2048) > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000 > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800 > -!if $(TLS_ENABLE) == FALSE > +!if $(NETWORK_TLS_ENABLE) == FALSE > # match PcdFlashNvStorageVariableSize purely for convenience > gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0xe000 > !endif > @@ -442,12 +445,12 @@ [PcdsFixedAtBuild] > !if $(FD_SIZE_IN_KB) == 4096 > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x8400 > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x8400 > -!if $(TLS_ENABLE) == FALSE > +!if $(NETWORK_TLS_ENABLE) == FALSE > # match PcdFlashNvStorageVariableSize purely for convenience > gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x40000 > !endif > !endif > -!if $(TLS_ENABLE) == TRUE > +!if $(NETWORK_TLS_ENABLE) == TRUE > gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x80000 > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize|0x40000 > !endif > @@ -496,9 +499,10 @@ [PcdsFixedAtBuild] > gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2 > !endif > > -!if $(HTTP_BOOT_ENABLE) == TRUE > - gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE > -!endif > + # > + # Network Pcds > + # > +!include NetworkPkg/NetworkPcds.dsc.inc > > gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile|{ 0x83, 0xA5, 0x04, 0x7C, 0x3E, 0x9E, 0x1C, 0x4F, 0xAD, 0x65, 0xE0, 0x52, 0x68, 0xD0, 0xB4, 0xD1 } > > @@ -777,32 +781,9 @@ [Components] > # > # Network Support > # > - MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf > - MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf > - MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf > - MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf > - MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf > - MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf > - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf > - MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf > - MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf > - NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf > - NetworkPkg/TcpDxe/TcpDxe.inf > - NetworkPkg/IScsiDxe/IScsiDxe.inf > -!if $(NETWORK_IP6_ENABLE) == TRUE > - NetworkPkg/Ip6Dxe/Ip6Dxe.inf > - NetworkPkg/Udp6Dxe/Udp6Dxe.inf > - NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf > - NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf > -!endif > -!if $(HTTP_BOOT_ENABLE) == TRUE > - NetworkPkg/DnsDxe/DnsDxe.inf > - NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf > - NetworkPkg/HttpDxe/HttpDxe.inf > - NetworkPkg/HttpBootDxe/HttpBootDxe.inf > -!endif > -!if $(TLS_ENABLE) == TRUE > - NetworkPkg/TlsDxe/TlsDxe.inf > +!include NetworkPkg/NetworkComponents.dsc.inc > + > +!if $(NETWORK_TLS_ENABLE) == TRUE > NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { > > NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf > diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf > index bc08bf224393..e428334702b8 100644 > --- a/OvmfPkg/OvmfPkgIa32.fdf > +++ b/OvmfPkg/OvmfPkgIa32.fdf > @@ -297,34 +297,7 @@ [FV.DXEFV] > # > # Network modules > # > - INF MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf > - INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf > - INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf > - INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.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/Mtftp4Dxe/Mtftp4Dxe.inf > - INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf > - INF NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf > - INF NetworkPkg/TcpDxe/TcpDxe.inf > - INF NetworkPkg/IScsiDxe/IScsiDxe.inf > -!if $(NETWORK_IP6_ENABLE) == TRUE > - INF NetworkPkg/Ip6Dxe/Ip6Dxe.inf > - INF NetworkPkg/Udp6Dxe/Udp6Dxe.inf > - INF NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf > - INF NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.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 > -!if $(TLS_ENABLE) == TRUE > - INF NetworkPkg/TlsDxe/TlsDxe.inf > - INF NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf > -!endif > +!include NetworkPkg/Network.fdf.inc > INF OvmfPkg/VirtioNetDxe/VirtioNet.inf > > # > diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc > index ca7c5aaeb7c0..eade8f62d3de 100644 > --- a/OvmfPkg/OvmfPkgIa32X64.dsc > +++ b/OvmfPkg/OvmfPkgIa32X64.dsc > @@ -29,14 +29,21 @@ [Defines] > # -D FLAG=VALUE > # > DEFINE SECURE_BOOT_ENABLE = FALSE > - DEFINE NETWORK_IP6_ENABLE = FALSE > - DEFINE HTTP_BOOT_ENABLE = FALSE > DEFINE SMM_REQUIRE = FALSE > - DEFINE TLS_ENABLE = FALSE > DEFINE TPM2_ENABLE = FALSE > DEFINE TPM2_CONFIG_ENABLE = FALSE > DEFINE USE_LEGACY_ISA_STACK = FALSE > > + # > + # Network definition > + # > + DEFINE NETWORK_TLS_ENABLE = FALSE > + DEFINE NETWORK_IP6_ENABLE = FALSE > + DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE > + DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE > + > +!include NetworkPkg/NetworkDefines.dsc.inc > + > # > # 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 > @@ -144,10 +151,6 @@ [LibraryClasses] > FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf > UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf > SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf > - NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf > - IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf > - UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf > - DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf > UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf > SerializeVariablesLib|OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.inf > QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxeLib.inf > @@ -173,7 +176,7 @@ [LibraryClasses] > DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf > > IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf > -!if $(TLS_ENABLE) == TRUE > +!if $(NETWORK_TLS_ENABLE) == TRUE > OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf > !else > OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > @@ -189,13 +192,13 @@ [LibraryClasses] > !endif > VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf > > - TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf > > -!if $(HTTP_BOOT_ENABLE) == TRUE > - HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf > -!endif > + # > + # Network libraries > + # > +!include NetworkPkg/NetworkLibs.dsc.inc > > -!if $(TLS_ENABLE) == TRUE > +!if $(NETWORK_TLS_ENABLE) == TRUE > TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf > !endif > > @@ -439,7 +442,7 @@ [PcdsFixedAtBuild] > !if ($(FD_SIZE_IN_KB) == 1024) || ($(FD_SIZE_IN_KB) == 2048) > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000 > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800 > -!if $(TLS_ENABLE) == FALSE > +!if $(NETWORK_TLS_ENABLE) == FALSE > # match PcdFlashNvStorageVariableSize purely for convenience > gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0xe000 > !endif > @@ -447,12 +450,12 @@ [PcdsFixedAtBuild] > !if $(FD_SIZE_IN_KB) == 4096 > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x8400 > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x8400 > -!if $(TLS_ENABLE) == FALSE > +!if $(NETWORK_TLS_ENABLE) == FALSE > # match PcdFlashNvStorageVariableSize purely for convenience > gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x40000 > !endif > !endif > -!if $(TLS_ENABLE) == TRUE > +!if $(NETWORK_TLS_ENABLE) == TRUE > gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x80000 > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize|0x40000 > !endif > @@ -502,9 +505,10 @@ [PcdsFixedAtBuild] > !endif > > [PcdsFixedAtBuild.X64] > -!if $(HTTP_BOOT_ENABLE) == TRUE > - gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE > -!endif > + # > + # Network Pcds > + # > +!include NetworkPkg/NetworkPcds.dsc.inc > > gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile|{ 0x83, 0xA5, 0x04, 0x7C, 0x3E, 0x9E, 0x1C, 0x4F, 0xAD, 0x65, 0xE0, 0x52, 0x68, 0xD0, 0xB4, 0xD1 } > > @@ -786,32 +790,9 @@ [Components.X64] > # > # Network Support > # > - MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf > - MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf > - MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf > - MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf > - MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf > - MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf > - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf > - MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf > - MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf > - NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf > - NetworkPkg/TcpDxe/TcpDxe.inf > - NetworkPkg/IScsiDxe/IScsiDxe.inf > -!if $(NETWORK_IP6_ENABLE) == TRUE > - NetworkPkg/Ip6Dxe/Ip6Dxe.inf > - NetworkPkg/Udp6Dxe/Udp6Dxe.inf > - NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf > - NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf > -!endif > -!if $(HTTP_BOOT_ENABLE) == TRUE > - NetworkPkg/DnsDxe/DnsDxe.inf > - NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf > - NetworkPkg/HttpDxe/HttpDxe.inf > - NetworkPkg/HttpBootDxe/HttpBootDxe.inf > -!endif > -!if $(TLS_ENABLE) == TRUE > - NetworkPkg/TlsDxe/TlsDxe.inf > +!include NetworkPkg/NetworkComponents.dsc.inc > + > +!if $(NETWORK_TLS_ENABLE) == TRUE > NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { > > NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf > diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf > index ccf36c5dd954..6ddffe75475b 100644 > --- a/OvmfPkg/OvmfPkgIa32X64.fdf > +++ b/OvmfPkg/OvmfPkgIa32X64.fdf > @@ -303,34 +303,7 @@ [FV.DXEFV] > SECTION PE32 = Intel3.5/EFIX64/E3522X2.EFI > } > !endif > - INF MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf > - INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf > - INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf > - INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.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/Mtftp4Dxe/Mtftp4Dxe.inf > - INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf > - INF NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf > - INF NetworkPkg/TcpDxe/TcpDxe.inf > - INF NetworkPkg/IScsiDxe/IScsiDxe.inf > -!if $(NETWORK_IP6_ENABLE) == TRUE > - INF NetworkPkg/Ip6Dxe/Ip6Dxe.inf > - INF NetworkPkg/Udp6Dxe/Udp6Dxe.inf > - INF NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf > - INF NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.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 > -!if $(TLS_ENABLE) == TRUE > - INF NetworkPkg/TlsDxe/TlsDxe.inf > - INF NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf > -!endif > +!include NetworkPkg/Network.fdf.inc > INF OvmfPkg/VirtioNetDxe/VirtioNet.inf > > # > diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc > index ff5b910fd4c2..733a4c9d8a43 100644 > --- a/OvmfPkg/OvmfPkgX64.dsc > +++ b/OvmfPkg/OvmfPkgX64.dsc > @@ -29,14 +29,21 @@ [Defines] > # -D FLAG=VALUE > # > DEFINE SECURE_BOOT_ENABLE = FALSE > - DEFINE NETWORK_IP6_ENABLE = FALSE > - DEFINE HTTP_BOOT_ENABLE = FALSE > DEFINE SMM_REQUIRE = FALSE > - DEFINE TLS_ENABLE = FALSE > DEFINE TPM2_ENABLE = FALSE > DEFINE TPM2_CONFIG_ENABLE = FALSE > DEFINE USE_LEGACY_ISA_STACK = FALSE > > + # > + # Network definition > + # > + DEFINE NETWORK_TLS_ENABLE = FALSE > + DEFINE NETWORK_IP6_ENABLE = FALSE > + DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE > + DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE > + > +!include NetworkPkg/NetworkDefines.dsc.inc > + > # > # 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 > @@ -144,10 +151,6 @@ [LibraryClasses] > FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf > UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf > SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf > - NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf > - IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf > - UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf > - DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf > UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf > SerializeVariablesLib|OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.inf > QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxeLib.inf > @@ -173,7 +176,7 @@ [LibraryClasses] > DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf > > IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf > -!if $(TLS_ENABLE) == TRUE > +!if $(NETWORK_TLS_ENABLE) == TRUE > OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf > !else > OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > @@ -189,13 +192,13 @@ [LibraryClasses] > !endif > VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf > > - TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf > > -!if $(HTTP_BOOT_ENABLE) == TRUE > - HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf > -!endif > + # > + # Network libraries > + # > +!include NetworkPkg/NetworkLibs.dsc.inc > > -!if $(TLS_ENABLE) == TRUE > +!if $(NETWORK_TLS_ENABLE) == TRUE > TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf > !endif > > @@ -439,7 +442,7 @@ [PcdsFixedAtBuild] > !if ($(FD_SIZE_IN_KB) == 1024) || ($(FD_SIZE_IN_KB) == 2048) > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000 > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800 > -!if $(TLS_ENABLE) == FALSE > +!if $(NETWORK_TLS_ENABLE) == FALSE > # match PcdFlashNvStorageVariableSize purely for convenience > gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0xe000 > !endif > @@ -447,12 +450,12 @@ [PcdsFixedAtBuild] > !if $(FD_SIZE_IN_KB) == 4096 > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x8400 > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x8400 > -!if $(TLS_ENABLE) == FALSE > +!if $(NETWORK_TLS_ENABLE) == FALSE > # match PcdFlashNvStorageVariableSize purely for convenience > gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x40000 > !endif > !endif > -!if $(TLS_ENABLE) == TRUE > +!if $(NETWORK_TLS_ENABLE) == TRUE > gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x80000 > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize|0x40000 > !endif > @@ -501,9 +504,10 @@ [PcdsFixedAtBuild] > gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2 > !endif > > -!if $(HTTP_BOOT_ENABLE) == TRUE > - gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE > -!endif > + # > + # Network Pcds > + # > +!include NetworkPkg/NetworkPcds.dsc.inc > > gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile|{ 0x83, 0xA5, 0x04, 0x7C, 0x3E, 0x9E, 0x1C, 0x4F, 0xAD, 0x65, 0xE0, 0x52, 0x68, 0xD0, 0xB4, 0xD1 } > > @@ -784,32 +788,9 @@ [Components] > # > # Network Support > # > - MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf > - MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf > - MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf > - MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf > - MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf > - MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf > - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf > - MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf > - MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf > - NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf > - NetworkPkg/TcpDxe/TcpDxe.inf > - NetworkPkg/IScsiDxe/IScsiDxe.inf > -!if $(NETWORK_IP6_ENABLE) == TRUE > - NetworkPkg/Ip6Dxe/Ip6Dxe.inf > - NetworkPkg/Udp6Dxe/Udp6Dxe.inf > - NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf > - NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf > -!endif > -!if $(HTTP_BOOT_ENABLE) == TRUE > - NetworkPkg/DnsDxe/DnsDxe.inf > - NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf > - NetworkPkg/HttpDxe/HttpDxe.inf > - NetworkPkg/HttpBootDxe/HttpBootDxe.inf > -!endif > -!if $(TLS_ENABLE) == TRUE > - NetworkPkg/TlsDxe/TlsDxe.inf > +!include NetworkPkg/NetworkComponents.dsc.inc > + > +!if $(NETWORK_TLS_ENABLE) == TRUE > NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { > > NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf > diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf > index ccf36c5dd954..6ddffe75475b 100644 > --- a/OvmfPkg/OvmfPkgX64.fdf > +++ b/OvmfPkg/OvmfPkgX64.fdf > @@ -303,34 +303,7 @@ [FV.DXEFV] > SECTION PE32 = Intel3.5/EFIX64/E3522X2.EFI > } > !endif > - INF MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf > - INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf > - INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf > - INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.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/Mtftp4Dxe/Mtftp4Dxe.inf > - INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf > - INF NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf > - INF NetworkPkg/TcpDxe/TcpDxe.inf > - INF NetworkPkg/IScsiDxe/IScsiDxe.inf > -!if $(NETWORK_IP6_ENABLE) == TRUE > - INF NetworkPkg/Ip6Dxe/Ip6Dxe.inf > - INF NetworkPkg/Udp6Dxe/Udp6Dxe.inf > - INF NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf > - INF NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.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 > -!if $(TLS_ENABLE) == TRUE > - INF NetworkPkg/TlsDxe/TlsDxe.inf > - INF NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf > -!endif > +!include NetworkPkg/Network.fdf.inc > INF OvmfPkg/VirtioNetDxe/VirtioNet.inf > > # > Reviewed-by: Laszlo Ersek