From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mx.groups.io with SMTP id smtpd.web10.2989.1662465583859862007 for ; Tue, 06 Sep 2022 04:59:44 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fVYcSkBD; spf=pass (domain: kernel.org, ip: 145.40.68.75, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 92575B81889; Tue, 6 Sep 2022 11:59:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77290C4347C; Tue, 6 Sep 2022 11:59:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662465580; bh=v3c7wvtShF+89CdInT/r61GUraf4cQ9vXfD6Wgc/Jes=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fVYcSkBD6418z0Obbo2cKxT8TWOsuMm8dNtoo3oNVDtiueYtclzdBZA+mjqlsivpj 6zdG0Z6y82yTOqQEDlTz2MwDQvMxe6zWVMQ6CbQmGfV9wplSshGv7T9uGUXMYqjJ0O BRgqnRU3286/pw4Tkv3cSHOTltVQdIGrDywDn7vYECn5sq2qjeTnpyeS8gDXe75Vj0 CP/himrmpuQWniftKV4l/7R9LbJ0B9VdUyZEuyE3nHdsgbU9MsbdI4Ty4HWPfHBh2U 5upeqmA7pc3YUeQXNyHwjVNMAi38uudZQkn8xqFRvIjxaTBTnch/ozwNSf8lft2CWA E+U+lSCakWKXA== From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Yuan Yu , Laszlo Ersek , Gerd Hoffmann , Pawel Polawski , Oliver Steffen , Jiewen Yao , "Brian J . Johnson" Subject: [PATCH v3 3/3] OvmfPkg: Allow runtime control of IPv4 and IPv6 support on QEMU Date: Tue, 6 Sep 2022 13:59:26 +0200 Message-Id: <20220906115926.115493-4-ardb@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220906115926.115493-1-ardb@kernel.org> References: <20220906115926.115493-1-ardb@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 --- 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=0D }=0D !endif=0D +=0D + !if $(NETWORK_IP4_ENABLE) =3D=3D TRUE=0D + NetworkPkg/Ip4Dxe/Ip4Dxe.inf {=0D + =0D + UefiDriverEntryPoint|OvmfPkg/Library/UefiDriverEntryPointFwCfgOver= rideLib/UefiDriverEntryPointFwCfgOverrideLib.inf=0D + =0D + gUefiOvmfPkgTokenSpaceGuid.PcdEntryPointOverrideFwCfgVarName|"opt/= org.tianocore/IPv4Support"=0D + }=0D + !endif=0D +=0D + !if $(NETWORK_IP6_ENABLE) =3D=3D TRUE=0D + NetworkPkg/Ip6Dxe/Ip6Dxe.inf {=0D + =0D + UefiDriverEntryPoint|OvmfPkg/Library/UefiDriverEntryPointFwCfgOver= rideLib/UefiDriverEntryPointFwCfgOverrideLib.inf=0D + =0D + gUefiOvmfPkgTokenSpaceGuid.PcdEntryPointOverrideFwCfgVarName|"opt/= org.tianocore/IPv6Support"=0D + }=0D + !endif=0D !endif=0D --=20 2.35.1