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>
---
OvmfPkg/OvmfPkgX64.dsc | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
index 6e68f60dc90f..2cbe35c95824 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>
+ UefiDriverEntryPoint|OvmfPkg/Library/UefiDriverEntryPointFwCfgOverrideLib/UefiDriverEntryPointFwCfgOverrideLib.inf
+ <PcdsFixedAtBuild>
+ gUefiOvmfPkgTokenSpaceGuid.PcdEntryPointOverrideFwCfgVarName|"opt/org.tianocore/IPv4Support"
+ }
+
+ NetworkPkg/Ip6Dxe/Ip6Dxe.inf {
+ <LibraryClasses>
+ UefiDriverEntryPoint|OvmfPkg/Library/UefiDriverEntryPointFwCfgOverrideLib/UefiDriverEntryPointFwCfgOverrideLib.inf
+ <PcdsFixedAtBuild>
+ gUefiOvmfPkgTokenSpaceGuid.PcdEntryPointOverrideFwCfgVarName|"opt/org.tianocore/IPv6Support"
+ }
+
!if $(NETWORK_TLS_ENABLE) == TRUE
NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf {
<LibraryClasses>
--
2.35.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92524): https://edk2.groups.io/g/devel/message/92524
Mute This Topic: https://groups.io/mt/93083126/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
On 08/17/22 17:11, Ard Biesheuvel wrote:
> 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>
> ---
> OvmfPkg/OvmfPkgX64.dsc | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
> index 6e68f60dc90f..2cbe35c95824 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>
> + UefiDriverEntryPoint|OvmfPkg/Library/UefiDriverEntryPointFwCfgOverrideLib/UefiDriverEntryPointFwCfgOverrideLib.inf
> + <PcdsFixedAtBuild>
> + gUefiOvmfPkgTokenSpaceGuid.PcdEntryPointOverrideFwCfgVarName|"opt/org.tianocore/IPv4Support"
> + }
> +
> + NetworkPkg/Ip6Dxe/Ip6Dxe.inf {
> + <LibraryClasses>
> + UefiDriverEntryPoint|OvmfPkg/Library/UefiDriverEntryPointFwCfgOverrideLib/UefiDriverEntryPointFwCfgOverrideLib.inf
> + <PcdsFixedAtBuild>
> + gUefiOvmfPkgTokenSpaceGuid.PcdEntryPointOverrideFwCfgVarName|"opt/org.tianocore/IPv6Support"
> + }
> +
> !if $(NETWORK_TLS_ENABLE) == TRUE
> NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf {
> <LibraryClasses>
>
Looks good to me, but should be reflected to the other DSC files, and
perhaps (see Gerd's comments) factored out to some common include snippet.
Laszlo
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92542): https://edk2.groups.io/g/devel/message/92542
Mute This Topic: https://groups.io/mt/93083126/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
On Thu, 18 Aug 2022 at 08:00, Laszlo Ersek <lersek@redhat.com> wrote:
>
> On 08/17/22 17:11, Ard Biesheuvel wrote:
> > 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>
> > ---
> > OvmfPkg/OvmfPkgX64.dsc | 14 ++++++++++++++
> > 1 file changed, 14 insertions(+)
> >
> > diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
> > index 6e68f60dc90f..2cbe35c95824 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>
> > + UefiDriverEntryPoint|OvmfPkg/Library/UefiDriverEntryPointFwCfgOverrideLib/UefiDriverEntryPointFwCfgOverrideLib.inf
> > + <PcdsFixedAtBuild>
> > + gUefiOvmfPkgTokenSpaceGuid.PcdEntryPointOverrideFwCfgVarName|"opt/org.tianocore/IPv4Support"
> > + }
> > +
> > + NetworkPkg/Ip6Dxe/Ip6Dxe.inf {
> > + <LibraryClasses>
> > + UefiDriverEntryPoint|OvmfPkg/Library/UefiDriverEntryPointFwCfgOverrideLib/UefiDriverEntryPointFwCfgOverrideLib.inf
> > + <PcdsFixedAtBuild>
> > + gUefiOvmfPkgTokenSpaceGuid.PcdEntryPointOverrideFwCfgVarName|"opt/org.tianocore/IPv6Support"
> > + }
> > +
> > !if $(NETWORK_TLS_ENABLE) == TRUE
> > NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf {
> > <LibraryClasses>
> >
>
> Looks good to me, but should be reflected to the other DSC files, and
> perhaps (see Gerd's comments) factored out to some common include snippet.
>
Fair enough, although I'm not sure where to look for Gerd's comments?
Did they make it to the list?
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92623): https://edk2.groups.io/g/devel/message/92623
Mute This Topic: https://groups.io/mt/93083126/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Hi,
> > Looks good to me, but should be reflected to the other DSC files, and
> > perhaps (see Gerd's comments) factored out to some common include snippet.
>
> Fair enough, although I'm not sure where to look for Gerd's comments?
> Did they make it to the list?
Was a reply to v1 series.
Summary: We have alot of duplication in the Ovmf*.{dsc,fdf} files, I think
moving stuff to include files make sense (similar to OvmfTpm*.inc already in
tree) to reduce duplication, simplify maintainance and keep the build
configs in sync.
With more and more include snippets it possibly makes sense to move them
all into a subdirectory.
take care,
Gerd
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92651): https://edk2.groups.io/g/devel/message/92651
Mute This Topic: https://groups.io/mt/93083126/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
On Tue, 23 Aug 2022 at 09:04, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> Hi,
>
> > > Looks good to me, but should be reflected to the other DSC files, and
> > > perhaps (see Gerd's comments) factored out to some common include snippet.
> >
> > Fair enough, although I'm not sure where to look for Gerd's comments?
> > Did they make it to the list?
>
> Was a reply to v1 series.
>
> Summary: We have alot of duplication in the Ovmf*.{dsc,fdf} files, I think
> moving stuff to include files make sense (similar to OvmfTpm*.inc already in
> tree) to reduce duplication, simplify maintainance and keep the build
> configs in sync.
>
> With more and more include snippets it possibly makes sense to move them
> all into a subdirectory.
>
OK, that is a good point. i will take this into account for the next revision.
Thanks,
Ard.
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92747): https://edk2.groups.io/g/devel/message/92747
Mute This Topic: https://groups.io/mt/93083126/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2026 Red Hat, Inc.