From: "Laszlo Ersek" <lersek@redhat.com>
To: "Brian J. Johnson" <brian.johnson@hpe.com>,
devel@edk2.groups.io, Ard Biesheuvel <ardb@kernel.org>
Cc: Yuan Yu <yuanyu@google.com>, Gerd Hoffmann <kraxel@redhat.com>,
Pawel Polawski <ppolawsk@redhat.com>,
Oliver Steffen <osteffen@redhat.com>,
Jiewen Yao <jiewen.yao@intel.com>
Subject: Re: [edk2-devel] [PATCH 1/2] OvmfPkg: Introduce NULL class library to inhibit driver load
Date: Wed, 17 Aug 2022 10:53:29 +0200 [thread overview]
Message-ID: <8c46d455-cd23-d24b-c91e-1ea6e877a80b@redhat.com> (raw)
In-Reply-To: <8a033ba8-967e-002d-2d39-6d19273403d2@hpe.com>
On 08/16/22 23:08, Brian J. Johnson wrote:
> On 8/16/22 07:30, Laszlo Ersek wrote:
>> On physical machines, I've seen firmware options for disabling the IP
>> stack entirely; I wonder how those firmwares do it...
>
> I don't know how any physical machine handles that particular option.
> But one approach would be to add a GUID to the depex of the module you
> want to control, and install it only when you want the module to be
> dispatched. That's pretty straightforward, although it does result in
> "Driver %g was discovered but not loaded!!" messages from
> CoreDisplayDiscoveredNotDispatched() if sufficient debugging is enabled.
Indeed, thanks for the reminder! ArmVirtPkg and OvmfPkg uses this
pattern with several core drivers:
PlatformHasIoMmuLib:
- depex: gEdkiiIoMmuProtocolGuid OR gIoMmuAbsentProtocolGuid
- hooked into: PciHostBridgeDxe
PlatformHasAcpiLib:
- depex: gEdkiiPlatformHasAcpiGuid
- hooked into: AcpiTableDxe
NvVarStoreFormattedLib:
- depex: gEdkiiNvVarStoreFormattedGuid
- hooked into: VariableRuntimeDxe
>From these, the first and third examples are not full matches, as the
depexes injected via PlatformHasIoMmuLib and NvVarStoreFormattedLib are
always supposed to be satisfied *eventually* -- the drivers that the
dependencies are injected into are always required; the dependencies
ensure some platform specific ordering requirements.
But PlatformHasAcpiLib seems like a 100% match; it *is* meant to block
AcpiTableDxe indefinitely, if the platform chooses so (dynamically).
Thanks!
Laszlo
next prev parent reply other threads:[~2022-08-17 8:53 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 [this message]
2022-08-15 9:40 ` [PATCH 2/2] OvmfPkg/OvmfPkgX64: Allow runtime control of IPv4 and IPv6 support Ard Biesheuvel
2022-08-15 14:06 ` 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=8c46d455-cd23-d24b-c91e-1ea6e877a80b@redhat.com \
--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