]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg: Introduce alternate UefiDriverEntrypoint to inhibit driver load
authorArd Biesheuvel <ardb@kernel.org>
Mon, 15 Aug 2022 08:47:51 +0000 (10:47 +0200)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sat, 10 Sep 2022 08:23:27 +0000 (08:23 +0000)
commit477b5b7d55783f930a7741f4187ccd4f227ebc86
tree6b9178d4a7623c1839cabfd63b0407f3404ee288
parent34969dd260b4ecaba8d4a58d32fc07bd0fee57f9
OvmfPkg: Introduce alternate UefiDriverEntrypoint to inhibit driver load

Add a new library that can be incorporated into any driver built from
source, and which permits loading of the driver to be inhibited based on
the value of a QEMU fw_cfg boolean variable. This will be used in a
subsequent patch to allow dispatch of the IPv4 and IPv6 network protocol
driver to be controlled from the QEMU command line.

This approach is based on the notion that all UEFI and DXE drivers share
a single UefiDriverEntryPoint implementation, which we can easily swap
out at build time with one that will abort execution based on the value
of some QEMU fw_cfg variable.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
OvmfPkg/Library/UefiDriverEntryPointFwCfgOverrideLib/UefiDriverEntryPointFwCfgOverrideLib.c [new file with mode: 0644]
OvmfPkg/Library/UefiDriverEntryPointFwCfgOverrideLib/UefiDriverEntryPointFwCfgOverrideLib.inf [new file with mode: 0644]
OvmfPkg/OvmfPkg.dec