From: "Ard Biesheuvel" <ardb@kernel.org>
To: devel@edk2.groups.io
Cc: Ard Biesheuvel <ardb@kernel.org>, Yuan Yu <yuanyu@google.com>,
Laszlo Ersek <lersek@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>,
Pawel Polawski <ppolawsk@redhat.com>,
Oliver Steffen <osteffen@redhat.com>,
Jiewen Yao <jiewen.yao@intel.com>
Subject: [PATCH 2/2] OvmfPkg/OvmfPkgX64: Allow runtime control of IPv4 and IPv6 support
Date: Mon, 15 Aug 2022 11:40:30 +0200 [thread overview]
Message-ID: <20220815094030.465587-3-ardb@kernel.org> (raw)
In-Reply-To: <20220815094030.465587-1-ardb@kernel.org>
Wire up the newly added DriverLoadInhibitorLib 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>
---
OvmfPkg/OvmfPkgX64.dsc | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
index 6e68f60dc90f..0c0ded88f86e 100644
--- a/OvmfPkg/OvmfPkgX64.dsc
+++ b/OvmfPkg/OvmfPkgX64.dsc
@@ -947,6 +947,20 @@ [Components]
NULL|OvmfPkg/Library/PxeBcPcdProducerLib/PxeBcPcdProducerLib.inf
}
+ NetworkPkg/Ip4Dxe/Ip4Dxe.inf {
+ <LibraryClasses>
+ NULL|OvmfPkg/Library/DriverLoadInhibitorLib/DriverLoadInhibitorLib.inf
+ <PcdsFixedAtBuild>
+ gUefiOvmfPkgTokenSpaceGuid.PcdDriverInhibitorFwCfgVarName|"opt/org.tianocore/IPv4Support"
+ }
+
+ NetworkPkg/Ip6Dxe/Ip6Dxe.inf {
+ <LibraryClasses>
+ NULL|OvmfPkg/Library/DriverLoadInhibitorLib/DriverLoadInhibitorLib.inf
+ <PcdsFixedAtBuild>
+ gUefiOvmfPkgTokenSpaceGuid.PcdDriverInhibitorFwCfgVarName|"opt/org.tianocore/IPv6Support"
+ }
+
!if $(NETWORK_TLS_ENABLE) == TRUE
NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf {
<LibraryClasses>
--
2.35.1
next prev parent reply other threads:[~2022-08-15 9:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-15 9:40 [PATCH 0/2] Ovmf: Allow IPv4 and IPv6 to be disabled at runtime Ard Biesheuvel
2022-08-15 9:40 ` [PATCH 1/2] OvmfPkg: Introduce NULL class library to inhibit driver load Ard Biesheuvel
2022-08-16 12:30 ` Laszlo Ersek
2022-08-16 21:08 ` [edk2-devel] " Brian J. Johnson
2022-08-17 8:39 ` Ard Biesheuvel
2022-08-17 9:22 ` Laszlo Ersek
2022-08-17 15:07 ` Ard Biesheuvel
2022-08-17 8:53 ` Laszlo Ersek
2022-08-15 9:40 ` Ard Biesheuvel [this message]
2022-08-15 14:06 ` [PATCH 2/2] OvmfPkg/OvmfPkgX64: Allow runtime control of IPv4 and IPv6 support Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220815094030.465587-3-ardb@kernel.org \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox