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 <a...@kernel.org> --- OvmfPkg/NetworkComponents.dsc.inc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/OvmfPkg/NetworkComponents.dsc.inc b/OvmfPkg/NetworkComponents.dsc.inc index 85a165391655..713eec7dd1ce 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 -- 2.35.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#93217): https://edk2.groups.io/g/devel/message/93217 Mute This Topic: https://groups.io/mt/93498691/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-