* [PATCH 0/4] Add DSC/FDF include segment files for network stack @ 2019-05-14 7:39 Zhang, Shenglei 2019-05-14 7:39 ` [PATCH 1/4] OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file Zhang, Shenglei ` (4 more replies) 0 siblings, 5 replies; 14+ messages in thread From: Zhang, Shenglei @ 2019-05-14 7:39 UTC (permalink / raw) To: devel There is a patch to remove the redudant IP4 only iSCSI/PXE/TCP drivers from MdeModulePkg, which has been reviewed before edk2-stable201811 tag. And we also have plan to move all network related libraries/modules to NetworkPkg. In order to make these change more smoothly, 2 configuration fragment files are provided for platform to enable the network stack support, without directly reference the INF module path. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1293 Fu Siyuan (4): OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file. Nt32Pkg: Update DSC/FDF to use NetworkPkg's include fragment file. ArmVirtPkg: Update DSC/FDF to use NetworkPkg's include fragment file. EmulatorPkg: Update DSC/FDF to use NetworkPkg's include fragment file. ArmVirtPkg/ArmVirt.dsc.inc | 10 +--- ArmVirtPkg/ArmVirtQemu.dsc | 43 +++++----------- ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 25 +--------- ArmVirtPkg/ArmVirtQemuKernel.dsc | 43 +++++----------- EmulatorPkg/EmulatorPkg.dsc | 32 ++++++------ EmulatorPkg/EmulatorPkg.fdf | 10 +--- Nt32Pkg/Nt32Pkg.dsc | 75 +++------------------------- Nt32Pkg/Nt32Pkg.fdf | 27 +--------- OvmfPkg/OvmfPkgIa32.dsc | 70 ++++++++------------------ OvmfPkg/OvmfPkgIa32.fdf | 29 +---------- OvmfPkg/OvmfPkgIa32X64.dsc | 71 ++++++++------------------ OvmfPkg/OvmfPkgIa32X64.fdf | 29 +---------- OvmfPkg/OvmfPkgX64.dsc | 69 ++++++++----------------- OvmfPkg/OvmfPkgX64.fdf | 29 +---------- 14 files changed, 121 insertions(+), 441 deletions(-) -- 2.18.0.windows.1 ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/4] OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file. 2019-05-14 7:39 [PATCH 0/4] Add DSC/FDF include segment files for network stack Zhang, Shenglei @ 2019-05-14 7:39 ` Zhang, Shenglei 2019-05-14 12:55 ` [edk2-devel] " Liming Gao 2019-05-14 13:48 ` Laszlo Ersek 2019-05-14 7:39 ` [PATCH 2/4] Nt32Pkg: " Zhang, Shenglei ` (3 subsequent siblings) 4 siblings, 2 replies; 14+ messages in thread From: Zhang, Shenglei @ 2019-05-14 7:39 UTC (permalink / raw) To: devel Cc: Jordan Justen, Laszlo Ersek, Ard Biesheuvel, Anthony Perard, Julien Grall 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. This patch also rename the TLS_ENABLE flag to PLATFORM_TLS_ENABLE for the platform specific configuration for TLS support. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Anthony Perard <anthony.perard@citrix.com> Cc: Julien Grall <julien.grall@linaro.org> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> --- OvmfPkg/OvmfPkgIa32.dsc | 70 +++++++++++-------------------------- OvmfPkg/OvmfPkgIa32.fdf | 29 +--------------- OvmfPkg/OvmfPkgIa32X64.dsc | 71 +++++++++++--------------------------- OvmfPkg/OvmfPkgIa32X64.fdf | 29 +--------------- OvmfPkg/OvmfPkgX64.dsc | 69 +++++++++++------------------------- OvmfPkg/OvmfPkgX64.fdf | 29 +--------------- 6 files changed, 65 insertions(+), 232 deletions(-) diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index 36a0f87258..0977233b8b 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -29,14 +29,17 @@ # -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 + DEFINE NETWORK_TLS_ENABLE = FALSE + DEFINE NETWORK_IP6_ENABLE = FALSE + DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE + +!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 +142,6 @@ 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 +167,7 @@ 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 @@ -186,11 +185,12 @@ 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 @@ -438,7 +438,7 @@ !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 @@ -446,12 +446,12 @@ !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 @@ -500,9 +500,10 @@ 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 } @@ -781,37 +782,8 @@ # # 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 - NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { - <LibraryClasses> - NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf - } -!endif +!include NetworkPkg/NetworkComponents.dsc.inc + OvmfPkg/VirtioNetDxe/VirtioNet.inf # diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf index bc08bf2243..e428334702 100644 --- a/OvmfPkg/OvmfPkgIa32.fdf +++ b/OvmfPkg/OvmfPkgIa32.fdf @@ -297,34 +297,7 @@ INF MdeModulePkg/Logo/LogoDxe.inf # # 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 9b341e17d7..b28f412f84 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -29,14 +29,17 @@ # -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 + DEFINE NETWORK_TLS_ENABLE = FALSE + DEFINE NETWORK_IP6_ENABLE = FALSE + DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE + +!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 +147,6 @@ 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 +172,7 @@ 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 @@ -191,11 +190,12 @@ 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 @@ -443,7 +443,7 @@ !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 @@ -451,12 +451,12 @@ !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 @@ -505,10 +505,10 @@ gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2 !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 } @@ -790,37 +790,8 @@ # # 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 - NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { - <LibraryClasses> - NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf - } -!endif +!include NetworkPkg/NetworkComponents.dsc.inc + OvmfPkg/VirtioNetDxe/VirtioNet.inf # diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf index ccf36c5dd9..6ddffe7547 100644 --- a/OvmfPkg/OvmfPkgIa32X64.fdf +++ b/OvmfPkg/OvmfPkgIa32X64.fdf @@ -303,34 +303,7 @@ INF MdeModulePkg/Logo/LogoDxe.inf 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 a0f87f74da..c4cea5aaaa 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -29,14 +29,17 @@ # -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 + DEFINE NETWORK_TLS_ENABLE = FALSE + DEFINE NETWORK_IP6_ENABLE = FALSE + DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE + +!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 +147,6 @@ 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 +172,7 @@ 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 @@ -191,11 +190,12 @@ 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 @@ -443,7 +443,7 @@ !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 @@ -451,12 +451,12 @@ !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 @@ -505,9 +505,10 @@ 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 } @@ -788,37 +789,7 @@ # # 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 - NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { - <LibraryClasses> - NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf - } -!endif +!include NetworkPkg/NetworkComponents.dsc.inc OvmfPkg/VirtioNetDxe/VirtioNet.inf # diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf index ccf36c5dd9..6ddffe7547 100644 --- a/OvmfPkg/OvmfPkgX64.fdf +++ b/OvmfPkg/OvmfPkgX64.fdf @@ -303,34 +303,7 @@ INF MdeModulePkg/Logo/LogoDxe.inf 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 # -- 2.18.0.windows.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [edk2-devel] [PATCH 1/4] OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file. 2019-05-14 7:39 ` [PATCH 1/4] OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file Zhang, Shenglei @ 2019-05-14 12:55 ` Liming Gao 2019-05-14 13:48 ` Laszlo Ersek 1 sibling, 0 replies; 14+ messages in thread From: Liming Gao @ 2019-05-14 12:55 UTC (permalink / raw) To: devel@edk2.groups.io, Zhang, Shenglei Cc: Justen, Jordan L, Laszlo Ersek, Ard Biesheuvel, Anthony Perard, Julien Grall Shenglei: > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Zhang, Shenglei > Sent: Tuesday, May 14, 2019 3:40 PM > To: devel@edk2.groups.io > Cc: Justen, Jordan L <jordan.l.justen@intel.com>; Laszlo Ersek <lersek@redhat.com>; Ard Biesheuvel <ard.biesheuvel@linaro.org>; > Anthony Perard <anthony.perard@citrix.com>; Julien Grall <julien.grall@linaro.org> > Subject: [edk2-devel] [PATCH 1/4] OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file. > > 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. > > This patch also rename the TLS_ENABLE flag to PLATFORM_TLS_ENABLE for the > platform specific configuration for TLS support. > > Cc: Jordan Justen <jordan.l.justen@intel.com> > Cc: Laszlo Ersek <lersek@redhat.com> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> > Cc: Anthony Perard <anthony.perard@citrix.com> > Cc: Julien Grall <julien.grall@linaro.org> > Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> > --- > OvmfPkg/OvmfPkgIa32.dsc | 70 +++++++++++-------------------------- > OvmfPkg/OvmfPkgIa32.fdf | 29 +--------------- > OvmfPkg/OvmfPkgIa32X64.dsc | 71 +++++++++++--------------------------- > OvmfPkg/OvmfPkgIa32X64.fdf | 29 +--------------- > OvmfPkg/OvmfPkgX64.dsc | 69 +++++++++++------------------------- > OvmfPkg/OvmfPkgX64.fdf | 29 +--------------- > 6 files changed, 65 insertions(+), 232 deletions(-) > > diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc > index 36a0f87258..0977233b8b 100644 > --- a/OvmfPkg/OvmfPkgIa32.dsc > +++ b/OvmfPkg/OvmfPkgIa32.dsc > @@ -29,14 +29,17 @@ > # -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 > > + DEFINE NETWORK_TLS_ENABLE = FALSE > + DEFINE NETWORK_IP6_ENABLE = FALSE > + DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE > + > +!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 +142,6 @@ > 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 +167,7 @@ > 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 > @@ -186,11 +185,12 @@ > > 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 > > @@ -438,7 +438,7 @@ > !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 > @@ -446,12 +446,12 @@ > !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 > @@ -500,9 +500,10 @@ > 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 } > > @@ -781,37 +782,8 @@ > # > # 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 > - NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { > - <LibraryClasses> > - NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf > - } > -!endif > +!include NetworkPkg/NetworkComponents.dsc.inc > + Here, below INF are still required after !include for platform override setting. !if $(NETWORK_TLS_ENABLE) == TRUE NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { <LibraryClasses> NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf } !endif > OvmfPkg/VirtioNetDxe/VirtioNet.inf > > # > diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf > index bc08bf2243..e428334702 100644 > --- a/OvmfPkg/OvmfPkgIa32.fdf > +++ b/OvmfPkg/OvmfPkgIa32.fdf > @@ -297,34 +297,7 @@ INF MdeModulePkg/Logo/LogoDxe.inf > # > # 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 9b341e17d7..b28f412f84 100644 > --- a/OvmfPkg/OvmfPkgIa32X64.dsc > +++ b/OvmfPkg/OvmfPkgIa32X64.dsc > @@ -29,14 +29,17 @@ > # -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 > > + DEFINE NETWORK_TLS_ENABLE = FALSE > + DEFINE NETWORK_IP6_ENABLE = FALSE > + DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE > + > +!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 +147,6 @@ > 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 +172,7 @@ > 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 > @@ -191,11 +190,12 @@ > > 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 > > @@ -443,7 +443,7 @@ > !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 > @@ -451,12 +451,12 @@ > !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 > @@ -505,10 +505,10 @@ > gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2 > !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 } > > @@ -790,37 +790,8 @@ > # > # 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 > - NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { > - <LibraryClasses> > - NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf > - } > -!endif > +!include NetworkPkg/NetworkComponents.dsc.inc > + > OvmfPkg/VirtioNetDxe/VirtioNet.inf > > # > diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf > index ccf36c5dd9..6ddffe7547 100644 > --- a/OvmfPkg/OvmfPkgIa32X64.fdf > +++ b/OvmfPkg/OvmfPkgIa32X64.fdf > @@ -303,34 +303,7 @@ INF MdeModulePkg/Logo/LogoDxe.inf > 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 a0f87f74da..c4cea5aaaa 100644 > --- a/OvmfPkg/OvmfPkgX64.dsc > +++ b/OvmfPkg/OvmfPkgX64.dsc > @@ -29,14 +29,17 @@ > # -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 > > + DEFINE NETWORK_TLS_ENABLE = FALSE > + DEFINE NETWORK_IP6_ENABLE = FALSE > + DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE > + > +!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 +147,6 @@ > 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 +172,7 @@ > 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 > @@ -191,11 +190,12 @@ > > 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 > > @@ -443,7 +443,7 @@ > !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 > @@ -451,12 +451,12 @@ > !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 > @@ -505,9 +505,10 @@ > 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 } > > @@ -788,37 +789,7 @@ > # > # 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 > - NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { > - <LibraryClasses> > - NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf > - } > -!endif > +!include NetworkPkg/NetworkComponents.dsc.inc > OvmfPkg/VirtioNetDxe/VirtioNet.inf > > # > diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf > index ccf36c5dd9..6ddffe7547 100644 > --- a/OvmfPkg/OvmfPkgX64.fdf > +++ b/OvmfPkg/OvmfPkgX64.fdf > @@ -303,34 +303,7 @@ INF MdeModulePkg/Logo/LogoDxe.inf > 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 > > # > -- > 2.18.0.windows.1 > > > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [edk2-devel] [PATCH 1/4] OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file. 2019-05-14 7:39 ` [PATCH 1/4] OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file Zhang, Shenglei 2019-05-14 12:55 ` [edk2-devel] " Liming Gao @ 2019-05-14 13:48 ` Laszlo Ersek 2019-05-15 7:02 ` Zhang, Shenglei 1 sibling, 1 reply; 14+ messages in thread From: Laszlo Ersek @ 2019-05-14 13:48 UTC (permalink / raw) To: devel, shenglei.zhang Cc: Jordan Justen, Ard Biesheuvel, Anthony Perard, Julien Grall On 05/14/19 09:39, Zhang, Shenglei 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. > > This patch also rename the TLS_ENABLE flag to PLATFORM_TLS_ENABLE for the > platform specific configuration for TLS support. Originally I thought that would be the right approach. However, Liming explained that we don't need "PLATFORM_TLS_ENABLE", because the platform DSC can override [Components] entries that are included from "NetworkComponents.dsc.inc". Please see: https://bugzilla.tianocore.org/show_bug.cgi?id=1449 http://mid.mail-archive.com/4A89E2EF3DFEDB4C8BFDE51014F606A14E443D46@SHSMSX104.ccr.corp.intel.com ... Oh wait, this patch doesn't actually introduce PLATFORM_TLS_ENABLE! The patch could be correct in fact (I'll review it just below); however, the commit message is incorrect. (1) Please remove the PLATFORM_TLS_ENABLE paragraph from the commit message. > Cc: Jordan Justen <jordan.l.justen@intel.com> > Cc: Laszlo Ersek <lersek@redhat.com> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> > Cc: Anthony Perard <anthony.perard@citrix.com> > Cc: Julien Grall <julien.grall@linaro.org> > Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> > --- > OvmfPkg/OvmfPkgIa32.dsc | 70 +++++++++++-------------------------- > OvmfPkg/OvmfPkgIa32.fdf | 29 +--------------- > OvmfPkg/OvmfPkgIa32X64.dsc | 71 +++++++++++--------------------------- > OvmfPkg/OvmfPkgIa32X64.fdf | 29 +--------------- > OvmfPkg/OvmfPkgX64.dsc | 69 +++++++++++------------------------- > OvmfPkg/OvmfPkgX64.fdf | 29 +--------------- > 6 files changed, 65 insertions(+), 232 deletions(-) > > diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc > index 36a0f87258..0977233b8b 100644 > --- a/OvmfPkg/OvmfPkgIa32.dsc > +++ b/OvmfPkg/OvmfPkgIa32.dsc > @@ -29,14 +29,17 @@ > # -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 > > + DEFINE NETWORK_TLS_ENABLE = FALSE > + DEFINE NETWORK_IP6_ENABLE = FALSE > + DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE > + (2) You forgot: 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 +142,6 @@ (3) Please update your git configuration so that the diff hunk headers (@@) show what section you are modifying, in the INF, DSC, DEC, and FDF files: (3a) run the command $ git config diff.ini.xfuncname '^\[[A-Za-z0-9_., ]+]' from <https://github.com/tianocore/tianocore.github.io/wiki/Laszlo's-unkempt-git-guide-for-edk2-contributors-and-maintainers#contrib-05>. (3b) implement the settings from <https://github.com/tianocore/tianocore.github.io/wiki/Laszlo's-unkempt-git-guide-for-edk2-contributors-and-maintainers#contrib-09>. > 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 Unfortunately, the OVMF DSC files have a small wart that should be fixed up, before this patch. Namely, the above library class resolutions are duplicated between [LibraryClasses], and [LibraryClasses.common.DXE_DRIVER]. (4) Therefore, please *prepend* a patch to this series that eliminates the [LibraryClasses.common.DXE_DRIVER] resolutions altogether, at first. (5) You forgot to remove: TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf > @@ -168,7 +167,7 @@ > 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 > @@ -186,11 +185,12 @@ > > 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 > > @@ -438,7 +438,7 @@ > !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 > @@ -446,12 +446,12 @@ > !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 > @@ -500,9 +500,10 @@ > 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 } > > @@ -781,37 +782,8 @@ > # > # 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 > - NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { > - <LibraryClasses> > - NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf > - } > -!endif > +!include NetworkPkg/NetworkComponents.dsc.inc I have two comments on this part (the components): (6) Please be consistent with the comments that you add near the !include directives. In the current patch, you add comments for the libs and the PCDs, but not for the defines or the components. Please stick with one style -- either add zero comments, or add comments on all of the !includes. (7) The above change is a bug, for TlsAuthConfigDxe. This is where you shoud put the feature from TianoCore#1449 to use. Namely, after the !include directive, you have to *repeat* TlsAuthConfigDxe, preserving the <LibraryClasses> override, from the original code. Otherwise, the TlsAuthConfigLib instance would not be hooked into the driver via NULL class resolution. > + > OvmfPkg/VirtioNetDxe/VirtioNet.inf > > # OK, so this is where "OvmfPkgIa32.dsc" ends. Clearly, my comments (2) through (7) apply to the other two DSC files as well: "OvmfPkgIa32X64.dsc", "OvmfPkgX64.dsc". Below, I'm going to make two more comments that are specific to "OvmfPkgIa32X64.dsc" and "OvmfPkgX64.dsc", respectively (I've moved the FDF changes to the end of the email): > diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc > index 9b341e17d7..b28f412f84 100644 > --- a/OvmfPkg/OvmfPkgIa32X64.dsc > +++ b/OvmfPkg/OvmfPkgIa32X64.dsc [...] > @@ -505,10 +505,10 @@ > gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2 > !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 } > (8) We have a bug above: please do not remove the section header [PcdsFixedAtBuild.X64]. [...] > diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc > index a0f87f74da..c4cea5aaaa 100644 > --- a/OvmfPkg/OvmfPkgX64.dsc > +++ b/OvmfPkg/OvmfPkgX64.dsc [...] > @@ -788,37 +789,7 @@ > # > # 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 > - NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { > - <LibraryClasses> > - NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf > - } > -!endif > +!include NetworkPkg/NetworkComponents.dsc.inc > OvmfPkg/VirtioNetDxe/VirtioNet.inf > > # This is inconsistent with the other DSC file updates: in the IA32 and IA32X64 DSC files, you add an empty line after this !include directive, but you forgot it here. (9) Please add the empty line here as well. OK, let's see the FDF changes: > diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf > index bc08bf2243..e428334702 100644 > --- a/OvmfPkg/OvmfPkgIa32.fdf > +++ b/OvmfPkg/OvmfPkgIa32.fdf > @@ -297,34 +297,7 @@ INF MdeModulePkg/Logo/LogoDxe.inf > # > # 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.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf > index ccf36c5dd9..6ddffe7547 100644 > --- a/OvmfPkg/OvmfPkgIa32X64.fdf > +++ b/OvmfPkg/OvmfPkgIa32X64.fdf > @@ -303,34 +303,7 @@ INF MdeModulePkg/Logo/LogoDxe.inf > 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.fdf b/OvmfPkg/OvmfPkgX64.fdf > index ccf36c5dd9..6ddffe7547 100644 > --- a/OvmfPkg/OvmfPkgX64.fdf > +++ b/OvmfPkg/OvmfPkgX64.fdf > @@ -303,34 +303,7 @@ INF MdeModulePkg/Logo/LogoDxe.inf > 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 > > # > The FDF changes look fine. Thanks! Laszlo ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [edk2-devel] [PATCH 1/4] OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file. 2019-05-14 13:48 ` Laszlo Ersek @ 2019-05-15 7:02 ` Zhang, Shenglei 2019-05-15 8:10 ` Laszlo Ersek 0 siblings, 1 reply; 14+ messages in thread From: Zhang, Shenglei @ 2019-05-15 7:02 UTC (permalink / raw) To: devel@edk2.groups.io, lersek@redhat.com Cc: Justen, Jordan L, Ard Biesheuvel, Anthony Perard, Julien Grall Hi Laszlo: > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Laszlo Ersek > Sent: Tuesday, May 14, 2019 9:49 PM > To: devel@edk2.groups.io; Zhang, Shenglei <shenglei.zhang@intel.com> > Cc: Justen, Jordan L <jordan.l.justen@intel.com>; Ard Biesheuvel > <ard.biesheuvel@linaro.org>; Anthony Perard <anthony.perard@citrix.com>; > Julien Grall <julien.grall@linaro.org> > Subject: Re: [edk2-devel] [PATCH 1/4] OvmfPkg: Update DSC/FDF to use > NetworkPkg's include fragment file. > > On 05/14/19 09:39, Zhang, Shenglei 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. > > > > This patch also rename the TLS_ENABLE flag to PLATFORM_TLS_ENABLE for > the > > platform specific configuration for TLS support. > > Originally I thought that would be the right approach. However, Liming > explained that we don't need "PLATFORM_TLS_ENABLE", because the > platform > DSC can override [Components] entries that are included from > "NetworkComponents.dsc.inc". > > Please see: > > https://bugzilla.tianocore.org/show_bug.cgi?id=1449 > http://mid.mail- > archive.com/4A89E2EF3DFEDB4C8BFDE51014F606A14E443D46@SHSMSX104.c > cr.corp.intel.com > > ... Oh wait, this patch doesn't actually introduce PLATFORM_TLS_ENABLE! > The patch could be correct in fact (I'll review it just below); however, > the commit message is incorrect. > > (1) Please remove the PLATFORM_TLS_ENABLE paragraph from the commit > message. > > > > Cc: Jordan Justen <jordan.l.justen@intel.com> > > Cc: Laszlo Ersek <lersek@redhat.com> > > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> > > Cc: Anthony Perard <anthony.perard@citrix.com> > > Cc: Julien Grall <julien.grall@linaro.org> > > Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> > > --- > > OvmfPkg/OvmfPkgIa32.dsc | 70 +++++++++++-------------------------- > > OvmfPkg/OvmfPkgIa32.fdf | 29 +--------------- > > OvmfPkg/OvmfPkgIa32X64.dsc | 71 +++++++++++--------------------------- > > OvmfPkg/OvmfPkgIa32X64.fdf | 29 +--------------- > > OvmfPkg/OvmfPkgX64.dsc | 69 +++++++++++------------------------- > > OvmfPkg/OvmfPkgX64.fdf | 29 +--------------- > > 6 files changed, 65 insertions(+), 232 deletions(-) > > > > diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc > > index 36a0f87258..0977233b8b 100644 > > --- a/OvmfPkg/OvmfPkgIa32.dsc > > +++ b/OvmfPkg/OvmfPkgIa32.dsc > > @@ -29,14 +29,17 @@ > > # -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 > > > > + DEFINE NETWORK_TLS_ENABLE = FALSE > > + DEFINE NETWORK_IP6_ENABLE = FALSE > > + DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE > > + > > (2) You forgot: > > 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 +142,6 @@ > > (3) Please update your git configuration so that the diff hunk headers > (@@) show what section you are modifying, in the INF, DSC, DEC, and FDF > files: > > (3a) run the command > > $ git config diff.ini.xfuncname '^\[[A-Za-z0-9_., ]+]' > > from > <https://github.com/tianocore/tianocore.github.io/wiki/Laszlo's-unkempt- > git-guide-for-edk2-contributors-and-maintainers#contrib-05>. > > (3b) implement the settings from > <https://github.com/tianocore/tianocore.github.io/wiki/Laszlo's-unkempt- > git-guide-for-edk2-contributors-and-maintainers#contrib-09>. > > > > FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf > > UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf > > > SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementL > ib/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/SerializeVariable > sLib.inf > > QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxeLib.inf > > Unfortunately, the OVMF DSC files have a small wart that should be fixed > up, before this patch. > > Namely, the above library class resolutions are duplicated between > [LibraryClasses], and [LibraryClasses.common.DXE_DRIVER]. > > (4) Therefore, please *prepend* a patch to this series that eliminates > the [LibraryClasses.common.DXE_DRIVER] resolutions altogether, at first. Thanks for your comments! I'll send a patch first to solve the duplicated library classes about network in [LibraryClasses.common.DXE_DRIVER] section. > > > (5) You forgot to remove: > > TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf > > > > @@ -168,7 +167,7 @@ > > > DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/Bas > eDebugPrintErrorLevelLib.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 > > @@ -186,11 +185,12 @@ > > > > 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 > > > > @@ -438,7 +438,7 @@ > > !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 > > @@ -446,12 +446,12 @@ > > !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 > > @@ -500,9 +500,10 @@ > > > gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x > 2 > > !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 } > > > > @@ -781,37 +782,8 @@ > > # > > # 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 > > - NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { > > - <LibraryClasses> > > - NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf > > - } > > -!endif > > +!include NetworkPkg/NetworkComponents.dsc.inc > > I have two comments on this part (the components): > > (6) Please be consistent with the comments that you add near the > !include directives. In the current patch, you add comments for the libs > and the PCDs, but not for the defines or the components. Please stick > with one style -- either add zero comments, or add comments on all of > the !includes. Actually, for components I add "Network Support" in the comments, which looks like aligning with nearby components. Do you thinks it is acceptable? Thanks, Shenglei > > (7) The above change is a bug, for TlsAuthConfigDxe. This is where you > shoud put the feature from TianoCore#1449 to use. Namely, after the > !include directive, you have to *repeat* TlsAuthConfigDxe, preserving > the <LibraryClasses> override, from the original code. Otherwise, the > TlsAuthConfigLib instance would not be hooked into the driver via NULL > class resolution. > > > > + > > OvmfPkg/VirtioNetDxe/VirtioNet.inf > > > > # > > OK, so this is where "OvmfPkgIa32.dsc" ends. > > Clearly, my comments (2) through (7) apply to the other two DSC files as > well: "OvmfPkgIa32X64.dsc", "OvmfPkgX64.dsc". > > Below, I'm going to make two more comments that are specific to > "OvmfPkgIa32X64.dsc" and "OvmfPkgX64.dsc", respectively (I've moved the > FDF changes to the end of the email): > > > diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc > b/OvmfPkg/OvmfPkgIa32X64.dsc > > index 9b341e17d7..b28f412f84 100644 > > --- a/OvmfPkg/OvmfPkgIa32X64.dsc > > +++ b/OvmfPkg/OvmfPkgIa32X64.dsc > > [...] > > > @@ -505,10 +505,10 @@ > > > gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x > 2 > > !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 } > > > > (8) We have a bug above: please do not remove the section header > [PcdsFixedAtBuild.X64]. > > [...] > > > diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc > > index a0f87f74da..c4cea5aaaa 100644 > > --- a/OvmfPkg/OvmfPkgX64.dsc > > +++ b/OvmfPkg/OvmfPkgX64.dsc > > [...] > > > @@ -788,37 +789,7 @@ > > # > > # 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 > > - NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { > > - <LibraryClasses> > > - NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf > > - } > > -!endif > > +!include NetworkPkg/NetworkComponents.dsc.inc > > OvmfPkg/VirtioNetDxe/VirtioNet.inf > > > > # > > This is inconsistent with the other DSC file updates: in the IA32 and > IA32X64 DSC files, you add an empty line after this !include directive, > but you forgot it here. > > (9) Please add the empty line here as well. > > > OK, let's see the FDF changes: > > > diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf > > index bc08bf2243..e428334702 100644 > > --- a/OvmfPkg/OvmfPkgIa32.fdf > > +++ b/OvmfPkg/OvmfPkgIa32.fdf > > @@ -297,34 +297,7 @@ INF MdeModulePkg/Logo/LogoDxe.inf > > # > > # 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.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf > > index ccf36c5dd9..6ddffe7547 100644 > > --- a/OvmfPkg/OvmfPkgIa32X64.fdf > > +++ b/OvmfPkg/OvmfPkgIa32X64.fdf > > @@ -303,34 +303,7 @@ INF MdeModulePkg/Logo/LogoDxe.inf > > 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.fdf b/OvmfPkg/OvmfPkgX64.fdf > > index ccf36c5dd9..6ddffe7547 100644 > > --- a/OvmfPkg/OvmfPkgX64.fdf > > +++ b/OvmfPkg/OvmfPkgX64.fdf > > @@ -303,34 +303,7 @@ INF MdeModulePkg/Logo/LogoDxe.inf > > 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 > > > > # > > > > The FDF changes look fine. > > Thanks! > Laszlo > > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [edk2-devel] [PATCH 1/4] OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file. 2019-05-15 7:02 ` Zhang, Shenglei @ 2019-05-15 8:10 ` Laszlo Ersek 0 siblings, 0 replies; 14+ messages in thread From: Laszlo Ersek @ 2019-05-15 8:10 UTC (permalink / raw) To: Zhang, Shenglei, devel@edk2.groups.io Cc: Justen, Jordan L, Ard Biesheuvel, Anthony Perard, Julien Grall On 05/15/19 09:02, Zhang, Shenglei wrote: > Hi Laszlo: > >> -----Original Message----- >> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of >> Laszlo Ersek >> Sent: Tuesday, May 14, 2019 9:49 PM >> To: devel@edk2.groups.io; Zhang, Shenglei <shenglei.zhang@intel.com> >> Cc: Justen, Jordan L <jordan.l.justen@intel.com>; Ard Biesheuvel >> <ard.biesheuvel@linaro.org>; Anthony Perard <anthony.perard@citrix.com>; >> Julien Grall <julien.grall@linaro.org> >> Subject: Re: [edk2-devel] [PATCH 1/4] OvmfPkg: Update DSC/FDF to use >> NetworkPkg's include fragment file. >> (4) Therefore, please *prepend* a patch to this series that eliminates >> the [LibraryClasses.common.DXE_DRIVER] resolutions altogether, at first. > > Thanks for your comments! > I'll send a patch first to solve the duplicated library classes about network in > [LibraryClasses.common.DXE_DRIVER] section. Thanks for that, I'll review it soon. >> (6) Please be consistent with the comments that you add near the >> !include directives. In the current patch, you add comments for the libs >> and the PCDs, but not for the defines or the components. Please stick >> with one style -- either add zero comments, or add comments on all of >> the !includes. > > Actually, for components I add "Network Support" in the comments, which looks like > aligning with nearby components. Do you thinks it is acceptable? Sorry, I missed the pre-existent comment there, and the fact that you were preserving the comment. So yes, that is fine -- as long as all !include directives uniformly have a comment (newly added, or inherited from preexistent code), it's OK. Please note however that your network *defines* !include still lacks a comment! Please fix that, for consistency with the rest of the !include directives. Thanks Laszlo ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 2/4] Nt32Pkg: Update DSC/FDF to use NetworkPkg's include fragment file. 2019-05-14 7:39 [PATCH 0/4] Add DSC/FDF include segment files for network stack Zhang, Shenglei 2019-05-14 7:39 ` [PATCH 1/4] OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file Zhang, Shenglei @ 2019-05-14 7:39 ` Zhang, Shenglei 2019-05-14 12:44 ` Ni, Ray 2019-05-14 7:39 ` [PATCH 3/4] ArmVirtPkg: " Zhang, Shenglei ` (2 subsequent siblings) 4 siblings, 1 reply; 14+ messages in thread From: Zhang, Shenglei @ 2019-05-14 7:39 UTC (permalink / raw) To: devel; +Cc: Ruiyu Ni, Hao Wu 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 be updated to use the NetworkPkg's terms, and the value have been overridden with the original default value on this platform. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> --- Nt32Pkg/Nt32Pkg.dsc | 75 +++++---------------------------------------- Nt32Pkg/Nt32Pkg.fdf | 27 ++-------------- 2 files changed, 10 insertions(+), 92 deletions(-) diff --git a/Nt32Pkg/Nt32Pkg.dsc b/Nt32Pkg/Nt32Pkg.dsc index 306b7c7a2d..ed25fff12e 100644 --- a/Nt32Pkg/Nt32Pkg.dsc +++ b/Nt32Pkg/Nt32Pkg.dsc @@ -43,34 +43,14 @@ # located in CryptoPkg\Library\OpensslLib to enable the OpenSSL building first. # DEFINE SECURE_BOOT_ENABLE = FALSE - - # - # This flag is to enable or disable TLS feature. - # These can be changed on the command line. - # -D FLAG=VALUE - # - # Note: TLS feature highly depends on the OpenSSL building. To enable this - # feature, please follow the instructions found in the file "Patch-HOWTO.txt" - # located in CryptoPkg\Library\OpensslLib to enable the OpenSSL building first. - # - DEFINE TLS_ENABLE = FALSE - - # - # Indicates whether HTTP connections (i.e., unsecured) are permitted or not. - # -D FLAG=VALUE - # - # Note: If ALLOW_HTTP_CONNECTIONS is TRUE, HTTP connections are allowed. Both - # the "https://" and "http://" URI schemes are permitted. Otherwise, HTTP - # connections are denied. Only the "https://" URI scheme is permitted. - # - DEFINE ALLOW_HTTP_CONNECTIONS = TRUE # - # This flag is to enable or disable IPv6 network stack. - # These can be changed on the command line. - # -D FLAG=VALUE + # SnpNt32Dxe.inf will be used. # - DEFINE NETWORK_IP6_ENABLE = FALSE + DEFINE NETWORK_TLS_ENABLE = FALSE + DEFINE NETWORK_IP6_ENABLE = FALSE + DEFINE NETWORK_SNP_ENABLE = FALSE + DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE ################################################################################ # @@ -133,12 +113,6 @@ # UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf - NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf - IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf - UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf - TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf - HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf - DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf GenericBdsLib|IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf @@ -162,7 +136,7 @@ LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf ResetSystemLib|Nt32Pkg/Library/ResetSystemLib/ResetSystemLib.inf -!if $(TLS_ENABLE) == TRUE +!if $(NETWORK_TLS_ENABLE) == TRUE OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf !else OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf @@ -270,11 +244,6 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000 -!if $(ALLOW_HTTP_CONNECTIONS) == TRUE - gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE -!endif - - !if $(SECURE_BOOT_ENABLE) == TRUE # override the default values from SecurityPkg to ensure images from all sources are verified in secure boot gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x04 @@ -448,39 +417,11 @@ MdeModulePkg/Application/HelloWorld/HelloWorld.inf # - # Network stack drivers + # Network SNP drivers # To test network drivers, need network Io driver(SnpNt32Io.dll), please refer to NETWORK-IO Subproject. # - 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 - NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf - NetworkPkg/TcpDxe/TcpDxe.inf - NetworkPkg/IScsiDxe/IScsiDxe.inf +!include NetworkPkg/Network.dsc.inc Nt32Pkg/SnpNt32Dxe/SnpNt32Dxe.inf - -!if $(NETWORK_IP6_ENABLE) == TRUE - NetworkPkg/Ip6Dxe/Ip6Dxe.inf - NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf - NetworkPkg/Udp6Dxe/Udp6Dxe.inf - NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf -!endif - - NetworkPkg/HttpBootDxe/HttpBootDxe.inf - NetworkPkg/DnsDxe/DnsDxe.inf - NetworkPkg/HttpDxe/HttpDxe.inf - NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf - -!if $(TLS_ENABLE) == TRUE - NetworkPkg/TlsDxe/TlsDxe.inf - NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf -!endif - MdeModulePkg/Universal/BdsDxe/BdsDxe.inf MdeModulePkg/Application/UiApp/UiApp.inf{ <LibraryClasses> diff --git a/Nt32Pkg/Nt32Pkg.fdf b/Nt32Pkg/Nt32Pkg.fdf index 3a3e8fae23..7798d17923 100644 --- a/Nt32Pkg/Nt32Pkg.fdf +++ b/Nt32Pkg/Nt32Pkg.fdf @@ -243,32 +243,9 @@ INF Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystemDxe.inf INF MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatformDriOverrideDxe.inf INF MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf -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 -INF NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf -INF NetworkPkg/TcpDxe/TcpDxe.inf -INF NetworkPkg/IScsiDxe/IScsiDxe.inf INF Nt32Pkg/SnpNt32Dxe/SnpNt32Dxe.inf -!if $(NETWORK_IP6_ENABLE) == TRUE -INF NetworkPkg/Ip6Dxe/Ip6Dxe.inf -INF NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf -INF NetworkPkg/Udp6Dxe/Udp6Dxe.inf -INF NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf -!endif -INF NetworkPkg/HttpBootDxe/HttpBootDxe.inf -INF NetworkPkg/DnsDxe/DnsDxe.inf -INF NetworkPkg/HttpDxe/HttpDxe.inf -INF NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf -!if $(TLS_ENABLE) == TRUE -INF NetworkPkg/TlsDxe/TlsDxe.inf -INF NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf -!endif +!include NetworkPkg/Network.fdf.inc + INF MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf ################################################################################ # -- 2.18.0.windows.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 2/4] Nt32Pkg: Update DSC/FDF to use NetworkPkg's include fragment file. 2019-05-14 7:39 ` [PATCH 2/4] Nt32Pkg: " Zhang, Shenglei @ 2019-05-14 12:44 ` Ni, Ray 0 siblings, 0 replies; 14+ messages in thread From: Ni, Ray @ 2019-05-14 12:44 UTC (permalink / raw) To: Zhang, Shenglei, devel@edk2.groups.io; +Cc: Wu, Hao A Reviewed-by: Ray Ni <ray.ni@intel.com> > -----Original Message----- > From: Zhang, Shenglei > Sent: Tuesday, May 14, 2019 3:40 PM > To: devel@edk2.groups.io > Cc: Ni, Ray <ray.ni@intel.com>; Wu, Hao A <hao.a.wu@intel.com> > Subject: [PATCH 2/4] Nt32Pkg: Update DSC/FDF to use NetworkPkg's include > fragment file. > > 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 be updated to use the > NetworkPkg's terms, and the value have been overridden with the original > default value on this platform. > > Cc: Ruiyu Ni <ruiyu.ni@intel.com> > Cc: Hao Wu <hao.a.wu@intel.com> > Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> > --- > Nt32Pkg/Nt32Pkg.dsc | 75 +++++---------------------------------------- > Nt32Pkg/Nt32Pkg.fdf | 27 ++-------------- > 2 files changed, 10 insertions(+), 92 deletions(-) > > diff --git a/Nt32Pkg/Nt32Pkg.dsc b/Nt32Pkg/Nt32Pkg.dsc index > 306b7c7a2d..ed25fff12e 100644 > --- a/Nt32Pkg/Nt32Pkg.dsc > +++ b/Nt32Pkg/Nt32Pkg.dsc > @@ -43,34 +43,14 @@ > # located in CryptoPkg\Library\OpensslLib to enable the OpenSSL > building first. > # > DEFINE SECURE_BOOT_ENABLE = FALSE > - > - # > - # This flag is to enable or disable TLS feature. > - # These can be changed on the command line. > - # -D FLAG=VALUE > - # > - # Note: TLS feature highly depends on the OpenSSL building. To enable this > - # feature, please follow the instructions found in the file "Patch- > HOWTO.txt" > - # located in CryptoPkg\Library\OpensslLib to enable the OpenSSL > building first. > - # > - DEFINE TLS_ENABLE = FALSE > - > - # > - # Indicates whether HTTP connections (i.e., unsecured) are permitted or > not. > - # -D FLAG=VALUE > - # > - # Note: If ALLOW_HTTP_CONNECTIONS is TRUE, HTTP connections are > allowed. Both > - # the "https://" and "http://" URI schemes are permitted. Otherwise, > HTTP > - # connections are denied. Only the "https://" URI scheme is permitted. > - # > - DEFINE ALLOW_HTTP_CONNECTIONS = TRUE > > # > - # This flag is to enable or disable IPv6 network stack. > - # These can be changed on the command line. > - # -D FLAG=VALUE > + # SnpNt32Dxe.inf will be used. > # > - DEFINE NETWORK_IP6_ENABLE = FALSE > + DEFINE NETWORK_TLS_ENABLE = FALSE > + DEFINE NETWORK_IP6_ENABLE = FALSE > + DEFINE NETWORK_SNP_ENABLE = FALSE > + DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE > > > ############################################################### > ################# > # > @@ -133,12 +113,6 @@ > # > UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf > UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf > - NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf > - IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf > - UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf > - TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf > - HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf > - DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf > > OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNu > ll/OemHookStatusCodeLibNull.inf > > GenericBdsLib|IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBd > sLib.inf > > CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/Custo > mizedDisplayLib.inf > @@ -162,7 +136,7 @@ > LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf > IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf > ResetSystemLib|Nt32Pkg/Library/ResetSystemLib/ResetSystemLib.inf > -!if $(TLS_ENABLE) == TRUE > +!if $(NETWORK_TLS_ENABLE) == TRUE > OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf > !else > OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > @@ -270,11 +244,6 @@ > > gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationCh > ange|FALSE > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000 > > -!if $(ALLOW_HTTP_CONNECTIONS) == TRUE > - gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE > -!endif > - > - > !if $(SECURE_BOOT_ENABLE) == TRUE > # override the default values from SecurityPkg to ensure images from all > sources are verified in secure boot > > gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x04 > @@ -448,39 +417,11 @@ > MdeModulePkg/Application/HelloWorld/HelloWorld.inf > > # > - # Network stack drivers > + # Network SNP drivers > # To test network drivers, need network Io driver(SnpNt32Io.dll), please > refer to NETWORK-IO Subproject. > # > - 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 > - NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf > - NetworkPkg/TcpDxe/TcpDxe.inf > - NetworkPkg/IScsiDxe/IScsiDxe.inf > +!include NetworkPkg/Network.dsc.inc > Nt32Pkg/SnpNt32Dxe/SnpNt32Dxe.inf > - > -!if $(NETWORK_IP6_ENABLE) == TRUE > - NetworkPkg/Ip6Dxe/Ip6Dxe.inf > - NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf > - NetworkPkg/Udp6Dxe/Udp6Dxe.inf > - NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf > -!endif > - > - NetworkPkg/HttpBootDxe/HttpBootDxe.inf > - NetworkPkg/DnsDxe/DnsDxe.inf > - NetworkPkg/HttpDxe/HttpDxe.inf > - NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf > - > -!if $(TLS_ENABLE) == TRUE > - NetworkPkg/TlsDxe/TlsDxe.inf > - NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf > -!endif > - > MdeModulePkg/Universal/BdsDxe/BdsDxe.inf > MdeModulePkg/Application/UiApp/UiApp.inf{ > <LibraryClasses> > diff --git a/Nt32Pkg/Nt32Pkg.fdf b/Nt32Pkg/Nt32Pkg.fdf index > 3a3e8fae23..7798d17923 100644 > --- a/Nt32Pkg/Nt32Pkg.fdf > +++ b/Nt32Pkg/Nt32Pkg.fdf > @@ -243,32 +243,9 @@ INF > Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystemDxe.inf > INF > MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatformDriOverrideDxe.i > nf > INF MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf > > -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 > -INF NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf > -INF NetworkPkg/TcpDxe/TcpDxe.inf > -INF NetworkPkg/IScsiDxe/IScsiDxe.inf > INF Nt32Pkg/SnpNt32Dxe/SnpNt32Dxe.inf > -!if $(NETWORK_IP6_ENABLE) == TRUE > -INF NetworkPkg/Ip6Dxe/Ip6Dxe.inf > -INF NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf > -INF NetworkPkg/Udp6Dxe/Udp6Dxe.inf > -INF NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf > -!endif > -INF NetworkPkg/HttpBootDxe/HttpBootDxe.inf > -INF NetworkPkg/DnsDxe/DnsDxe.inf > -INF NetworkPkg/HttpDxe/HttpDxe.inf > -INF NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf > -!if $(TLS_ENABLE) == TRUE > -INF NetworkPkg/TlsDxe/TlsDxe.inf > -INF NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf > -!endif > +!include NetworkPkg/Network.fdf.inc > + > INF > MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp > .inf > > ############################################################### > ################# > # > -- > 2.18.0.windows.1 ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 3/4] ArmVirtPkg: Update DSC/FDF to use NetworkPkg's include fragment file. 2019-05-14 7:39 [PATCH 0/4] Add DSC/FDF include segment files for network stack Zhang, Shenglei 2019-05-14 7:39 ` [PATCH 1/4] OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file Zhang, Shenglei 2019-05-14 7:39 ` [PATCH 2/4] Nt32Pkg: " Zhang, Shenglei @ 2019-05-14 7:39 ` Zhang, Shenglei 2019-05-14 14:22 ` [edk2-devel] " Laszlo Ersek 2019-05-14 7:39 ` [PATCH 4/4] EmulatorPkg: " Zhang, Shenglei 2019-05-14 12:43 ` [edk2-devel] [PATCH 0/4] Add DSC/FDF include segment files for network stack Laszlo Ersek 4 siblings, 1 reply; 14+ messages in thread From: Zhang, Shenglei @ 2019-05-14 7:39 UTC (permalink / raw) To: devel; +Cc: Laszlo Ersek, Ard Biesheuvel, Julien Grall 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 <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> --- ArmVirtPkg/ArmVirt.dsc.inc | 10 ++----- ArmVirtPkg/ArmVirtQemu.dsc | 43 +++++++++------------------- ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 25 ++-------------- ArmVirtPkg/ArmVirtQemuKernel.dsc | 43 +++++++++------------------- 4 files changed, 30 insertions(+), 91 deletions(-) diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc index 1848d20531..20bf011617 100644 --- a/ArmVirtPkg/ArmVirt.dsc.inc +++ b/ArmVirtPkg/ArmVirt.dsc.inc @@ -70,14 +70,8 @@ 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 - TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf -!if $(HTTP_BOOT_ENABLE) == TRUE - HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf -!endif +!include NetworkPkg/NetworkLibs.dsc.inc + # # It is not possible to prevent the ARM compiler from inserting calls to intrinsic functions. diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index 28c8fd5513..54fd069c75 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -27,10 +27,14 @@ # Defines for default states. These can be changed on the command line. # -D FLAG=VALUE # - DEFINE TTY_TERMINAL = FALSE - DEFINE SECURE_BOOT_ENABLE = FALSE - DEFINE NETWORK_IP6_ENABLE = FALSE - DEFINE HTTP_BOOT_ENABLE = FALSE + DEFINE TTY_TERMINAL = FALSE + DEFINE SECURE_BOOT_ENABLE = FALSE + DEFINE NETWORK_IP6_ENABLE = FALSE + DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE + DEFINE NETWORK_SNP_ENABLE = FALSE + DEFINE NETWORK_TLS_ENABLE = FALSE + +!include NetworkPkg/NetworkDefines.dsc.inc !include ArmVirtPkg/ArmVirt.dsc.inc @@ -122,9 +126,10 @@ # gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0 -!if $(HTTP_BOOT_ENABLE) == TRUE - gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE -!endif + # + # Network Pcds + # +!include NetworkPkg/NetworkPcds.dsc.inc # System Memory Base -- fixed at 0x4000_0000 gArmTokenSpaceGuid.PcdSystemMemoryBase|0x40000000 @@ -353,29 +358,7 @@ # # 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 - NetworkPkg/TcpDxe/TcpDxe.inf - NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.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 +!include NetworkPkg/NetworkComponents.dsc.inc # # SCSI Bus and Disk Driver diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc index a9a980aefc..31f615a9d0 100644 --- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc +++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc @@ -117,29 +117,8 @@ READ_LOCK_STATUS = TRUE # # 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 - INF NetworkPkg/TcpDxe/TcpDxe.inf - INF NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.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 +!include NetworkPkg/Network.fdf.inc + # # SCSI Bus and Disk Driver diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc index 2a83c74694..320b4d5024 100644 --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc @@ -27,10 +27,14 @@ # Defines for default states. These can be changed on the command line. # -D FLAG=VALUE # - DEFINE TTY_TERMINAL = FALSE - DEFINE SECURE_BOOT_ENABLE = FALSE - DEFINE NETWORK_IP6_ENABLE = FALSE - DEFINE HTTP_BOOT_ENABLE = FALSE + DEFINE TTY_TERMINAL = FALSE + DEFINE SECURE_BOOT_ENABLE = FALSE + DEFINE NETWORK_IP6_ENABLE = FALSE + DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE + DEFINE NETWORK_SNP_ENABLE = FALSE + DEFINE NETWORK_TLS_ENABLE = FALSE + +!include NetworkPkg/NetworkDefines.dsc.inc !include ArmVirtPkg/ArmVirt.dsc.inc @@ -127,9 +131,10 @@ # gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0 -!if $(HTTP_BOOT_ENABLE) == TRUE - gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE -!endif + # + # Network Pcds + # +!include NetworkPkg/NetworkPcds.dsc.inc gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 } @@ -337,29 +342,7 @@ # # 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 - NetworkPkg/TcpDxe/TcpDxe.inf - NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.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 +!include NetworkPkg/NetworkComponents.dsc.inc # # SCSI Bus and Disk Driver -- 2.18.0.windows.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [edk2-devel] [PATCH 3/4] ArmVirtPkg: Update DSC/FDF to use NetworkPkg's include fragment file. 2019-05-14 7:39 ` [PATCH 3/4] ArmVirtPkg: " Zhang, Shenglei @ 2019-05-14 14:22 ` Laszlo Ersek 0 siblings, 0 replies; 14+ messages in thread From: Laszlo Ersek @ 2019-05-14 14:22 UTC (permalink / raw) To: devel, shenglei.zhang; +Cc: Ard Biesheuvel, Julien Grall On 05/14/19 09:39, Zhang, Shenglei 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 <lersek@redhat.com> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> > Cc: Julien Grall <julien.grall@linaro.org> > Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> > --- > ArmVirtPkg/ArmVirt.dsc.inc | 10 ++----- > ArmVirtPkg/ArmVirtQemu.dsc | 43 +++++++++------------------- > ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 25 ++-------------- > ArmVirtPkg/ArmVirtQemuKernel.dsc | 43 +++++++++------------------- > 4 files changed, 30 insertions(+), 91 deletions(-) > > diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc > index 1848d20531..20bf011617 100644 > --- a/ArmVirtPkg/ArmVirt.dsc.inc > +++ b/ArmVirtPkg/ArmVirt.dsc.inc > @@ -70,14 +70,8 @@ > 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 > - TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf > -!if $(HTTP_BOOT_ENABLE) == TRUE > - HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf > -!endif > +!include NetworkPkg/NetworkLibs.dsc.inc > + > > # > # It is not possible to prevent the ARM compiler from inserting calls to intrinsic functions. This looks OK. > diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc > index 28c8fd5513..54fd069c75 100644 > --- a/ArmVirtPkg/ArmVirtQemu.dsc > +++ b/ArmVirtPkg/ArmVirtQemu.dsc > @@ -27,10 +27,14 @@ > # Defines for default states. These can be changed on the command line. > # -D FLAG=VALUE > # > - DEFINE TTY_TERMINAL = FALSE > - DEFINE SECURE_BOOT_ENABLE = FALSE > - DEFINE NETWORK_IP6_ENABLE = FALSE > - DEFINE HTTP_BOOT_ENABLE = FALSE > + DEFINE TTY_TERMINAL = FALSE > + DEFINE SECURE_BOOT_ENABLE = FALSE (1) This change is not consistent with the OvmfPkg change. Please use the same approach in both patches: either re-align the DEFINEs that are not related to NetworkPkg in both patches, or re-align those DEFINEs in neither patch. Pesonally I like the style that you used in OvmfPkg better -- keep the network DEFINEs in a separate group. > + DEFINE NETWORK_IP6_ENABLE = FALSE > + DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE > + DEFINE NETWORK_SNP_ENABLE = FALSE > + DEFINE NETWORK_TLS_ENABLE = FALSE > + (2) You forgot: DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE (3) The above change (with the introduction of NETWORK_SNP_ENABLE to this DSC file) suggests that NETWORK_SNP_ENABLE=TRUE is a valid end-user setting. It is not; SnpDxe is IA32, X64, and EBC only. Therefore, please add an !if check, and invoke !error, if the user sets NETWORK_SNP_ENABLE to TRUE on the "build" command line. (4) A similar comment applies to NETWORK_TLS_ENABLE. The above change suggests that it is enough for a user to set NETWORK_TLS_ENABLE=TRUE in order to get the intended functionality. This is not the case. We have a separate BZ about that: <https://bugzilla.tianocore.org/show_bug.cgi?id=1009>. Therefore, please add an !if check against NETWORK_TLS_ENABLE=TRUE (from the "build" command line), and use !error to abort the build, if the user attempts to request TLS. The error message should make a reference to <https://bugzilla.tianocore.org/show_bug.cgi?id=1009>. > +!include NetworkPkg/NetworkDefines.dsc.inc > > !include ArmVirtPkg/ArmVirt.dsc.inc > > @@ -122,9 +126,10 @@ > # > gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0 > > -!if $(HTTP_BOOT_ENABLE) == TRUE > - gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE > -!endif > + # > + # Network Pcds > + # > +!include NetworkPkg/NetworkPcds.dsc.inc > > # System Memory Base -- fixed at 0x4000_0000 > gArmTokenSpaceGuid.PcdSystemMemoryBase|0x40000000 (5) Please add comments to the !include directives uniformly -- either comment on all of them, or none of them. > @@ -353,29 +358,7 @@ > # > # 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 > - NetworkPkg/TcpDxe/TcpDxe.inf > - NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.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 > +!include NetworkPkg/NetworkComponents.dsc.inc > > # > # SCSI Bus and Disk Driver Looks good. > diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc > index a9a980aefc..31f615a9d0 100644 > --- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc > +++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc > @@ -117,29 +117,8 @@ READ_LOCK_STATUS = TRUE > # > # 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 > - INF NetworkPkg/TcpDxe/TcpDxe.inf > - INF NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.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 > +!include NetworkPkg/Network.fdf.inc > + > > # > # SCSI Bus and Disk Driver This seems fine as well. > diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc > index 2a83c74694..320b4d5024 100644 > --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc > +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc (6) Please refresh "ArmVirtQemuKernel.dsc", after updating "ArmVirtQemu.dsc" like requested above. Thank you! Laszlo ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 4/4] EmulatorPkg: Update DSC/FDF to use NetworkPkg's include fragment file. 2019-05-14 7:39 [PATCH 0/4] Add DSC/FDF include segment files for network stack Zhang, Shenglei ` (2 preceding siblings ...) 2019-05-14 7:39 ` [PATCH 3/4] ArmVirtPkg: " Zhang, Shenglei @ 2019-05-14 7:39 ` Zhang, Shenglei 2019-05-14 12:44 ` [edk2-devel] " Ni, Ray 2019-05-14 12:43 ` [edk2-devel] [PATCH 0/4] Add DSC/FDF include segment files for network stack Laszlo Ersek 4 siblings, 1 reply; 14+ messages in thread From: Zhang, Shenglei @ 2019-05-14 7:39 UTC (permalink / raw) To: devel; +Cc: Jordan Justen, Andrew Fish, Ruiyu Ni 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: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> --- EmulatorPkg/EmulatorPkg.dsc | 32 +++++++++++++++----------------- EmulatorPkg/EmulatorPkg.fdf | 10 +--------- 2 files changed, 16 insertions(+), 26 deletions(-) diff --git a/EmulatorPkg/EmulatorPkg.dsc b/EmulatorPkg/EmulatorPkg.dsc index de20f81046..f63e7166a4 100644 --- a/EmulatorPkg/EmulatorPkg.dsc +++ b/EmulatorPkg/EmulatorPkg.dsc @@ -23,6 +23,19 @@ SKUID_IDENTIFIER = DEFAULT FLASH_DEFINITION = EmulatorPkg/EmulatorPkg.fdf + # + # Network stack drivers + # + + # + # EmuSnpDxe.inf will be used. + # + DEFINE NETWORK_SNP_ENABLE = FALSE + DEFINE NETWORK_IP6_ENABLE = FALSE + DEFINE NETWORK_TLS_ENABLE = FALSE + DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE + DEFINE NETWORK_ISCSI_ENABLE = FALSE + [SkuIds] 0|DEFAULT @@ -68,10 +81,6 @@ # Generic Modules # UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.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 OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf @@ -357,19 +366,6 @@ MdeModulePkg/Application/HelloWorld/HelloWorld.inf - # - # Network stack drivers - # - 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 - NetworkPkg/TcpDxe/TcpDxe.inf - MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf @@ -412,6 +408,8 @@ !endif +!include NetworkPkg/Network.dsc.inc + [BuildOptions] MSFT:DEBUG_*_*_CC_FLAGS = /Od /Oy- MSFT:NOOPT_*_*_CC_FLAGS = /Od /Oy- diff --git a/EmulatorPkg/EmulatorPkg.fdf b/EmulatorPkg/EmulatorPkg.fdf index 94a060c999..ec411e82b4 100644 --- a/EmulatorPkg/EmulatorPkg.fdf +++ b/EmulatorPkg/EmulatorPkg.fdf @@ -190,15 +190,7 @@ INF MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf !if $(NETWORK_SUPPORT) INF EmulatorPkg/EmuSnpDxe/EmuSnpDxe.inf !endif -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 NetworkPkg/TcpDxe/TcpDxe.inf -INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf +!include NetworkPkg/Network.fdf.inc INF FatPkg/EnhancedFatDxe/Fat.inf -- 2.18.0.windows.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [edk2-devel] [PATCH 4/4] EmulatorPkg: Update DSC/FDF to use NetworkPkg's include fragment file. 2019-05-14 7:39 ` [PATCH 4/4] EmulatorPkg: " Zhang, Shenglei @ 2019-05-14 12:44 ` Ni, Ray 0 siblings, 0 replies; 14+ messages in thread From: Ni, Ray @ 2019-05-14 12:44 UTC (permalink / raw) To: devel@edk2.groups.io, Zhang, Shenglei; +Cc: Justen, Jordan L, Andrew Fish Reviewed-by: Ray Ni <ray.ni@intel.com> > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Zhang, Shenglei > Sent: Tuesday, May 14, 2019 3:40 PM > To: devel@edk2.groups.io > Cc: Justen, Jordan L <jordan.l.justen@intel.com>; Andrew Fish > <afish@apple.com>; Ni, Ray <ray.ni@intel.com> > Subject: [edk2-devel] [PATCH 4/4] EmulatorPkg: Update DSC/FDF to use > NetworkPkg's include fragment file. > > 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: Jordan Justen <jordan.l.justen@intel.com> > Cc: Andrew Fish <afish@apple.com> > Cc: Ruiyu Ni <ruiyu.ni@intel.com> > Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> > --- > EmulatorPkg/EmulatorPkg.dsc | 32 +++++++++++++++----------------- > EmulatorPkg/EmulatorPkg.fdf | 10 +--------- > 2 files changed, 16 insertions(+), 26 deletions(-) > > diff --git a/EmulatorPkg/EmulatorPkg.dsc b/EmulatorPkg/EmulatorPkg.dsc > index de20f81046..f63e7166a4 100644 > --- a/EmulatorPkg/EmulatorPkg.dsc > +++ b/EmulatorPkg/EmulatorPkg.dsc > @@ -23,6 +23,19 @@ > SKUID_IDENTIFIER = DEFAULT > FLASH_DEFINITION = EmulatorPkg/EmulatorPkg.fdf > > + # > + # Network stack drivers > + # > + > + # > + # EmuSnpDxe.inf will be used. > + # > + DEFINE NETWORK_SNP_ENABLE = FALSE > + DEFINE NETWORK_IP6_ENABLE = FALSE > + DEFINE NETWORK_TLS_ENABLE = FALSE > + DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE > + DEFINE NETWORK_ISCSI_ENABLE = FALSE > + > [SkuIds] > 0|DEFAULT > > @@ -68,10 +81,6 @@ > # Generic Modules > # > UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.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 > > OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNu > ll/OemHookStatusCodeLibNull.inf > BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf > FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf > @@ -357,19 +366,6 @@ > > MdeModulePkg/Application/HelloWorld/HelloWorld.inf > > - # > - # Network stack drivers > - # > - 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 > - NetworkPkg/TcpDxe/TcpDxe.inf > - > MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf > MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf > MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf > @@ -412,6 +408,8 @@ > > !endif > > +!include NetworkPkg/Network.dsc.inc > + > [BuildOptions] > MSFT:DEBUG_*_*_CC_FLAGS = /Od /Oy- > MSFT:NOOPT_*_*_CC_FLAGS = /Od /Oy- > diff --git a/EmulatorPkg/EmulatorPkg.fdf b/EmulatorPkg/EmulatorPkg.fdf > index 94a060c999..ec411e82b4 100644 > --- a/EmulatorPkg/EmulatorPkg.fdf > +++ b/EmulatorPkg/EmulatorPkg.fdf > @@ -190,15 +190,7 @@ INF > MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf > !if $(NETWORK_SUPPORT) > INF EmulatorPkg/EmuSnpDxe/EmuSnpDxe.inf > !endif > -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 NetworkPkg/TcpDxe/TcpDxe.inf > -INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf > +!include NetworkPkg/Network.fdf.inc > > INF FatPkg/EnhancedFatDxe/Fat.inf > > -- > 2.18.0.windows.1 > > > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [edk2-devel] [PATCH 0/4] Add DSC/FDF include segment files for network stack 2019-05-14 7:39 [PATCH 0/4] Add DSC/FDF include segment files for network stack Zhang, Shenglei ` (3 preceding siblings ...) 2019-05-14 7:39 ` [PATCH 4/4] EmulatorPkg: " Zhang, Shenglei @ 2019-05-14 12:43 ` Laszlo Ersek 2019-05-14 12:59 ` Liming Gao 4 siblings, 1 reply; 14+ messages in thread From: Laszlo Ersek @ 2019-05-14 12:43 UTC (permalink / raw) To: devel, shenglei.zhang On 05/14/19 09:39, Zhang, Shenglei wrote: > There is a patch to remove the redudant IP4 only iSCSI/PXE/TCP drivers > from MdeModulePkg, which has been reviewed before edk2-stable201811 tag. > And we also have plan to move all network related libraries/modules to > NetworkPkg. In order to make these change more smoothly, 2 configuration > fragment files are provided for platform to enable the network stack > support, without directly reference the INF module path. > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1293 > > Fu Siyuan (4): > OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file. > Nt32Pkg: Update DSC/FDF to use NetworkPkg's include fragment file. > ArmVirtPkg: Update DSC/FDF to use NetworkPkg's include fragment file. > EmulatorPkg: Update DSC/FDF to use NetworkPkg's include fragment file. > > ArmVirtPkg/ArmVirt.dsc.inc | 10 +--- > ArmVirtPkg/ArmVirtQemu.dsc | 43 +++++----------- > ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 25 +--------- > ArmVirtPkg/ArmVirtQemuKernel.dsc | 43 +++++----------- > EmulatorPkg/EmulatorPkg.dsc | 32 ++++++------ > EmulatorPkg/EmulatorPkg.fdf | 10 +--- > Nt32Pkg/Nt32Pkg.dsc | 75 +++------------------------- > Nt32Pkg/Nt32Pkg.fdf | 27 +--------- > OvmfPkg/OvmfPkgIa32.dsc | 70 ++++++++------------------ > OvmfPkg/OvmfPkgIa32.fdf | 29 +---------- > OvmfPkg/OvmfPkgIa32X64.dsc | 71 ++++++++------------------ > OvmfPkg/OvmfPkgIa32X64.fdf | 29 +---------- > OvmfPkg/OvmfPkgX64.dsc | 69 ++++++++----------------- > OvmfPkg/OvmfPkgX64.fdf | 29 +---------- > 14 files changed, 121 insertions(+), 441 deletions(-) > Two general comments: (1) We have 4 (not 2) include fragments for the DSC (Defines, Libs, Pcds, Components). This is not really relevant for any of the patches, but it could help with clarifying the blurb, if a v2 is needed. (2) The blurb states that the patches were originally authored by Fu Siyuan. However, the patches themselves don't start with "From: Fu Siyuan ...". This makes me think that the blurb is out of sync with the patches themselves, to some extent. Thanks Laszlo ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [edk2-devel] [PATCH 0/4] Add DSC/FDF include segment files for network stack 2019-05-14 12:43 ` [edk2-devel] [PATCH 0/4] Add DSC/FDF include segment files for network stack Laszlo Ersek @ 2019-05-14 12:59 ` Liming Gao 0 siblings, 0 replies; 14+ messages in thread From: Liming Gao @ 2019-05-14 12:59 UTC (permalink / raw) To: devel@edk2.groups.io, lersek@redhat.com, Zhang, Shenglei Laszlo: > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Laszlo Ersek > Sent: Tuesday, May 14, 2019 8:43 PM > To: devel@edk2.groups.io; Zhang, Shenglei <shenglei.zhang@intel.com> > Subject: Re: [edk2-devel] [PATCH 0/4] Add DSC/FDF include segment files for network stack > > On 05/14/19 09:39, Zhang, Shenglei wrote: > > There is a patch to remove the redudant IP4 only iSCSI/PXE/TCP drivers > > from MdeModulePkg, which has been reviewed before edk2-stable201811 tag. > > And we also have plan to move all network related libraries/modules to > > NetworkPkg. In order to make these change more smoothly, 2 configuration > > fragment files are provided for platform to enable the network stack > > support, without directly reference the INF module path. > > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1293 > > > > Fu Siyuan (4): > > OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file. > > Nt32Pkg: Update DSC/FDF to use NetworkPkg's include fragment file. > > ArmVirtPkg: Update DSC/FDF to use NetworkPkg's include fragment file. > > EmulatorPkg: Update DSC/FDF to use NetworkPkg's include fragment file. > > > > ArmVirtPkg/ArmVirt.dsc.inc | 10 +--- > > ArmVirtPkg/ArmVirtQemu.dsc | 43 +++++----------- > > ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 25 +--------- > > ArmVirtPkg/ArmVirtQemuKernel.dsc | 43 +++++----------- > > EmulatorPkg/EmulatorPkg.dsc | 32 ++++++------ > > EmulatorPkg/EmulatorPkg.fdf | 10 +--- > > Nt32Pkg/Nt32Pkg.dsc | 75 +++------------------------- > > Nt32Pkg/Nt32Pkg.fdf | 27 +--------- > > OvmfPkg/OvmfPkgIa32.dsc | 70 ++++++++------------------ > > OvmfPkg/OvmfPkgIa32.fdf | 29 +---------- > > OvmfPkg/OvmfPkgIa32X64.dsc | 71 ++++++++------------------ > > OvmfPkg/OvmfPkgIa32X64.fdf | 29 +---------- > > OvmfPkg/OvmfPkgX64.dsc | 69 ++++++++----------------- > > OvmfPkg/OvmfPkgX64.fdf | 29 +---------- > > 14 files changed, 121 insertions(+), 441 deletions(-) > > > > Two general comments: > > (1) We have 4 (not 2) include fragments for the DSC (Defines, Libs, > Pcds, Components). > > This is not really relevant for any of the patches, but it could help > with clarifying the blurb, if a v2 is needed. > > (2) The blurb states that the patches were originally authored by Fu > Siyuan. However, the patches themselves don't start with "From: Fu > Siyuan ...". > > This makes me think that the blurb is out of sync with the patches > themselves, to some extent. > Yes. The patch (Ovmf and ArmVirtPkg) refer to original Siyuan patches. He should keep Siyuan as the author of these two patches. He can add SignOffBy. > Thanks > Laszlo > > ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2019-05-15 8:10 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-05-14 7:39 [PATCH 0/4] Add DSC/FDF include segment files for network stack Zhang, Shenglei 2019-05-14 7:39 ` [PATCH 1/4] OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file Zhang, Shenglei 2019-05-14 12:55 ` [edk2-devel] " Liming Gao 2019-05-14 13:48 ` Laszlo Ersek 2019-05-15 7:02 ` Zhang, Shenglei 2019-05-15 8:10 ` Laszlo Ersek 2019-05-14 7:39 ` [PATCH 2/4] Nt32Pkg: " Zhang, Shenglei 2019-05-14 12:44 ` Ni, Ray 2019-05-14 7:39 ` [PATCH 3/4] ArmVirtPkg: " Zhang, Shenglei 2019-05-14 14:22 ` [edk2-devel] " Laszlo Ersek 2019-05-14 7:39 ` [PATCH 4/4] EmulatorPkg: " Zhang, Shenglei 2019-05-14 12:44 ` [edk2-devel] " Ni, Ray 2019-05-14 12:43 ` [edk2-devel] [PATCH 0/4] Add DSC/FDF include segment files for network stack Laszlo Ersek 2019-05-14 12:59 ` Liming Gao
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox