From 1db5895c3991bb2e810a0383bba5c4c31f36eba4 Mon Sep 17 00:00:00 2001 From: Aleksandr Goncharov Date: Thu, 5 Sep 2024 22:49:49 +0300 Subject: NetworkPkg: introduce include file for dynamic PCDs Introduce an include file with dynamic PCDs to simplify the usage of the network stage. This allows us to stop manually adding `PcdIPv4PXESupport` and `PcdIPv6PXESupport` to the DSC file. `NETWORK_IP4_ENABLE` and `NETWORK_IP6_ENABLE` are not used because PXEv4 and PXEv6 boot support can be controlled from the QEMU command line. Cc: Saloni Kasbekar Cc: Zachary Clark-williams Signed-off-by: Aleksandr Goncharov --- NetworkPkg/Network.dsc.inc | 3 +++ NetworkPkg/NetworkDynamicPcds.dsc.inc | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 NetworkPkg/NetworkDynamicPcds.dsc.inc (limited to 'NetworkPkg') diff --git a/NetworkPkg/Network.dsc.inc b/NetworkPkg/Network.dsc.inc index 04b515a0bb..42420866b7 100644 --- a/NetworkPkg/Network.dsc.inc +++ b/NetworkPkg/Network.dsc.inc @@ -28,6 +28,9 @@ [PcdsFixedAtBuild] !include NetworkPkg/NetworkPcds.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 0000000000..50bb4f9368 --- /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 -- cgit v1.2.3