summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/OvmfPkg.dec
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-08-15 10:47:51 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-09-10 08:23:27 +0000
commit477b5b7d55783f930a7741f4187ccd4f227ebc86 (patch)
tree6b9178d4a7623c1839cabfd63b0407f3404ee288 /OvmfPkg/OvmfPkg.dec
parent34969dd260b4ecaba8d4a58d32fc07bd0fee57f9 (diff)
downloadedk2-477b5b7d55783f930a7741f4187ccd4f227ebc86.tar.gz
edk2-477b5b7d55783f930a7741f4187ccd4f227ebc86.tar.bz2
edk2-477b5b7d55783f930a7741f4187ccd4f227ebc86.zip
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>
Diffstat (limited to 'OvmfPkg/OvmfPkg.dec')
-rw-r--r--OvmfPkg/OvmfPkg.dec4
1 files changed, 4 insertions, 0 deletions
diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec
index 6b1296b15a..6d689ecc5d 100644
--- a/OvmfPkg/OvmfPkg.dec
+++ b/OvmfPkg/OvmfPkg.dec
@@ -400,6 +400,10 @@
## The Tdx accept page size. 0x1000(4k),0x200000(2M)
gUefiOvmfPkgTokenSpaceGuid.PcdTdxAcceptPageSize|0x200000|UINT32|0x65
+ ## The QEMU fw_cfg variable that UefiDriverEntryPointFwCfgOverrideLib will
+ # check to decide whether to abort dispatch of the driver it is linked into.
+ gUefiOvmfPkgTokenSpaceGuid.PcdEntryPointOverrideFwCfgVarName|""|VOID*|0x68
+
[PcdsDynamic, PcdsDynamicEx]
gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent|0|UINT64|2
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable|FALSE|BOOLEAN|0x10