summaryrefslogtreecommitdiffstats
path: root/OvmfPkg
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-08-15 11:17:12 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-09-10 08:23:27 +0000
commit970e26294905d2d27369cf4041c6778105754f5e (patch)
treef62bfbf875859caa6d50fd9914a782ffc2311e52 /OvmfPkg
parentd933ec115bdf9be1d8dfe6a818414a14973cc0d3 (diff)
downloadedk2-970e26294905d2d27369cf4041c6778105754f5e.tar.gz
edk2-970e26294905d2d27369cf4041c6778105754f5e.tar.bz2
edk2-970e26294905d2d27369cf4041c6778105754f5e.zip
OvmfPkg: Allow runtime control of IPv4 and IPv6 support on QEMU
Wire up the newly added UefiDriverEntrypoint in a way that ties dispatch of the Ip4Dxe and Ip6Dxe drivers to QEMU fw_cfg variables 'opt/org.tianocore/IPv4Support' and 'opt/org.tianocore/IPv6Support' respectively. Setting both variables to 'n' disables IP based networking entirely, without the need for additional code changes at the NIC driver or network boot protocol level. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'OvmfPkg')
-rw-r--r--OvmfPkg/NetworkComponents.dsc.inc18
1 files changed, 18 insertions, 0 deletions
diff --git a/OvmfPkg/NetworkComponents.dsc.inc b/OvmfPkg/NetworkComponents.dsc.inc
index 85a1653916..713eec7dd1 100644
--- a/OvmfPkg/NetworkComponents.dsc.inc
+++ b/OvmfPkg/NetworkComponents.dsc.inc
@@ -14,4 +14,22 @@
NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf
}
!endif
+
+ !if $(NETWORK_IP4_ENABLE) == TRUE
+ NetworkPkg/Ip4Dxe/Ip4Dxe.inf {
+ <LibraryClasses>
+ UefiDriverEntryPoint|OvmfPkg/Library/UefiDriverEntryPointFwCfgOverrideLib/UefiDriverEntryPointFwCfgOverrideLib.inf
+ <PcdsFixedAtBuild>
+ gUefiOvmfPkgTokenSpaceGuid.PcdEntryPointOverrideFwCfgVarName|"opt/org.tianocore/IPv4Support"
+ }
+ !endif
+
+ !if $(NETWORK_IP6_ENABLE) == TRUE
+ NetworkPkg/Ip6Dxe/Ip6Dxe.inf {
+ <LibraryClasses>
+ UefiDriverEntryPoint|OvmfPkg/Library/UefiDriverEntryPointFwCfgOverrideLib/UefiDriverEntryPointFwCfgOverrideLib.inf
+ <PcdsFixedAtBuild>
+ gUefiOvmfPkgTokenSpaceGuid.PcdEntryPointOverrideFwCfgVarName|"opt/org.tianocore/IPv6Support"
+ }
+ !endif
!endif