diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index 10e4541b3e01..1ba63d2e1679 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -190,7 +190,7 @@ # # Network Pcds # -!include NetworkPkg/NetworkPcds.dsc.inc +!include NetworkPkg/NetworkFixedPcds.dsc.inc # System Memory Base -- fixed at 0x4000_0000 gArmTokenSpaceGuid.PcdSystemMemoryBase|0x40000000 @@ -297,13 +297,7 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0 gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|FALSE -!if $(NETWORK_ENABLE) == TRUE - # - # IPv4 and IPv6 PXE Boot support. - # - gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01 - gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01 -!endif +!include NetworkPkg/NetworkDynamicPcds.dsc.inc # # TPM2 support diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc index c5fdcfd9c72a..9927bdae0e64 100644 --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc @@ -159,7 +159,7 @@ # # Network Pcds # -!include NetworkPkg/NetworkPcds.dsc.inc +!include NetworkPkg/NetworkFixedPcds.dsc.inc gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 } @@ -260,13 +260,7 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0 gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|FALSE -!if $(NETWORK_ENABLE) == TRUE - # - # IPv4 and IPv6 PXE Boot support. - # - gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01 - gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01 -!endif +!include NetworkPkg/NetworkDynamicPcds.dsc.inc ################################################################################ # diff --git a/NetworkPkg/Network.dsc.inc b/NetworkPkg/Network.dsc.inc index 04b515a0bb55..89db8b7d038a 100644 --- a/NetworkPkg/Network.dsc.inc +++ b/NetworkPkg/Network.dsc.inc @@ -26,7 +26,10 @@ !endif [PcdsFixedAtBuild] -!include NetworkPkg/NetworkPcds.dsc.inc +!include NetworkPkg/NetworkFixedPcds.dsc.inc + +[PcdsDynamicDefault] +!include NetworkPkg/NetworkDynamicPcds.dsc.inc [LibraryClasses] !include NetworkPkg/NetworkLibs.dsc.inc diff --git a/NetworkPkg/NetworkDynamicPcds.dsc.inc b/NetworkPkg/NetworkDynamicPcds.dsc.inc new file mode 100644 index 000000000000..50bb4f9368f2 --- /dev/null +++ b/NetworkPkg/NetworkDynamicPcds.dsc.inc @@ -0,0 +1,20 @@ +## @file +# Network DSC include file for [PcdsDynamic*] section of all Architectures. +# +# This file can be included to the [PcdsDynamic*] section(s) of a platform DSC file +# by using "!include NetworkPkg/NetworkDynamicPcds.dsc.inc" to specify PCD settings +# according to the value of flags described in "NetworkDefines.dsc.inc". +# +# Copyright (c) 2024, Aleksandr Goncharov. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +# +# IPv4 and IPv6 PXE Boot support. +# +!if $(NETWORK_ENABLE) == TRUE + gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01 + gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01 +!endif diff --git a/NetworkPkg/NetworkPcds.dsc.inc b/NetworkPkg/NetworkFixedPcds.dsc.inc similarity index 58% rename from NetworkPkg/NetworkPcds.dsc.inc rename to NetworkPkg/NetworkFixedPcds.dsc.inc index c6299ad6ed0f..08c8e32de802 100644 --- a/NetworkPkg/NetworkPcds.dsc.inc +++ b/NetworkPkg/NetworkFixedPcds.dsc.inc @@ -1,8 +1,8 @@ ## @file -# Network DSC include file for [Pcds*] section of all Architectures. +# Network DSC include file for [PcdsFixed*] section of all Architectures. # -# This file can be included to the [Pcds*] section(s) of a platform DSC file -# by using "!include NetworkPkg/NetworkPcds.dsc.inc" to specify PCD settings +# This file can be included to the [PcdsFixed*] section(s) of a platform DSC file +# by using "!include NetworkPkg/NetworkFixedPcds.dsc.inc" to specify PCD settings # according to the value of flags described in "NetworkDefines.dsc.inc". # # Copyright (c) 2019, Intel Corporation. All rights reserved.
diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve/BhyveX64.dsc index 2f5fb46a2e67..f32ce1755eac 100644 --- a/OvmfPkg/Bhyve/BhyveX64.dsc +++ b/OvmfPkg/Bhyve/BhyveX64.dsc @@ -509,7 +509,7 @@ # # Network Pcds # -!include NetworkPkg/NetworkPcds.dsc.inc +!include NetworkPkg/NetworkFixedPcds.dsc.inc # Point to the MdeModulePkg/Application/UiApp/UiApp.inf gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 } diff --git a/OvmfPkg/CloudHv/CloudHvX64.dsc b/OvmfPkg/CloudHv/CloudHvX64.dsc index 1a8d3c4911cf..b970c0748fa8 100644 --- a/OvmfPkg/CloudHv/CloudHvX64.dsc +++ b/OvmfPkg/CloudHv/CloudHvX64.dsc @@ -560,7 +560,7 @@ # # Network Pcds # -!include NetworkPkg/NetworkPcds.dsc.inc +!include NetworkPkg/NetworkFixedPcds.dsc.inc gEfiShellPkgTokenSpaceGuid.PcdShellFileOperationSize|0x20000 @@ -635,11 +635,7 @@ !include OvmfPkg/Include/Dsc/OvmfTpmPcds.dsc.inc -!if $(NETWORK_ENABLE) == TRUE - # IPv4 and IPv6 PXE Boot support. - gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01 - gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01 -!endif +!include NetworkPkg/NetworkDynamicPcds.dsc.inc # Set ConfidentialComputing defaults gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr|0 diff --git a/OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc b/OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc index 755892737b12..b5b36adbb6f9 100644 --- a/OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc +++ b/OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc @@ -373,7 +373,7 @@ # # Network Pcds # -!include NetworkPkg/NetworkPcds.dsc.inc +!include NetworkPkg/NetworkFixedPcds.dsc.inc gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize | 0x40000 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize | 0x40000 @@ -414,13 +414,7 @@ # PCD and PcdPciDisableBusEnumeration above have not been assigned yet gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress |0xFFFFFFFFFFFFFFFF - # - # IPv4 and IPv6 PXE Boot support. - # -!if $(NETWORK_ENABLE) == TRUE - gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport | 0x01 - gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport | 0x01 -!endif +!include NetworkPkg/NetworkDynamicPcds.dsc.inc # # SMBIOS entry point version diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/MicrovmX64.dsc index 6fe8dfd2880e..241c9307bf00 100644 --- a/OvmfPkg/Microvm/MicrovmX64.dsc +++ b/OvmfPkg/Microvm/MicrovmX64.dsc @@ -563,7 +563,7 @@ # # Network Pcds # -!include NetworkPkg/NetworkPcds.dsc.inc +!include NetworkPkg/NetworkFixedPcds.dsc.inc gEfiShellPkgTokenSpaceGuid.PcdShellFileOperationSize|0x20000 @@ -650,11 +650,7 @@ gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x00 -!if $(NETWORK_ENABLE) == TRUE - # IPv4 and IPv6 PXE Boot support. - gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01 - gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01 -!endif +!include NetworkPkg/NetworkDynamicPcds.dsc.inc # Set ConfidentialComputing defaults gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr|0 diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index 34f7b9958bda..07c10db53660 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -571,7 +571,7 @@ # # Network Pcds # -!include NetworkPkg/NetworkPcds.dsc.inc +!include NetworkPkg/NetworkFixedPcds.dsc.inc gEfiShellPkgTokenSpaceGuid.PcdShellFileOperationSize|0x20000 @@ -659,11 +659,7 @@ !include OvmfPkg/Include/Dsc/OvmfTpmPcds.dsc.inc -!if $(NETWORK_ENABLE) == TRUE - # IPv4 and IPv6 PXE Boot support. - gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01 - gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01 -!endif +!include NetworkPkg/NetworkDynamicPcds.dsc.inc # Set ConfidentialComputing defaults gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr|0 diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index ef04ae21a734..aabe96b4b886 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -589,7 +589,7 @@ # # Network Pcds # -!include NetworkPkg/NetworkPcds.dsc.inc +!include NetworkPkg/NetworkFixedPcds.dsc.inc gEfiShellPkgTokenSpaceGuid.PcdShellFileOperationSize|0x20000 @@ -676,11 +676,7 @@ gEfiMdePkgTokenSpaceGuid.PcdFSBClock|1000000000 [PcdsDynamicDefault.X64] -!if $(NETWORK_ENABLE) == TRUE - # IPv4 and IPv6 PXE Boot support. - gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01 - gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01 -!endif +!include NetworkPkg/NetworkDynamicPcds.dsc.inc [PcdsDynamicHii] !include OvmfPkg/Include/Dsc/OvmfTpmPcdsHii.dsc.inc diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index e7fc7a9410f2..0f570582597c 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -600,7 +600,7 @@ # # Network Pcds # -!include NetworkPkg/NetworkPcds.dsc.inc +!include NetworkPkg/NetworkFixedPcds.dsc.inc gEfiShellPkgTokenSpaceGuid.PcdShellFileOperationSize|0x20000 @@ -690,11 +690,7 @@ !include OvmfPkg/Include/Dsc/OvmfTpmPcds.dsc.inc -!if $(NETWORK_ENABLE) == TRUE - # IPv4 and IPv6 PXE Boot support. - gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01 - gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01 -!endif +!include NetworkPkg/NetworkDynamicPcds.dsc.inc # Set ConfidentialComputing defaults gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr|0 diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc index ac7d18196909..806ff3dc8cc6 100644 --- a/OvmfPkg/OvmfXen.dsc +++ b/OvmfPkg/OvmfXen.dsc @@ -441,7 +441,7 @@ # # Network Pcds # -!include NetworkPkg/NetworkPcds.dsc.inc +!include NetworkPkg/NetworkFixedPcds.dsc.inc !ifdef $(DEBUG_ON_HYPERVISOR_CONSOLE) ## Set Xen's debug IO port for PlatformDebugLibIoPort diff --git a/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc b/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc index 63d896587b4a..0904f3b4a547 100644 --- a/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc +++ b/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc @@ -217,13 +217,7 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0 -!if $(NETWORK_ENABLE) == TRUE - # - # IPv4 and IPv6 PXE Boot support. - # - gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01 - gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01 -!endif +!include NetworkPkg/NetworkDynamicPcds.dsc.inc # # TPM2 support