audk/ArmVirtPkg/KvmtoolPlatformDxe
Sami Mujawar 8e934ab956 ArmVirtPkg: Dispatch variable service if variable emulation is enabled
The VariableRuntimeDxe links with NvVarStoreFormattedLib which is
required to establish the dependency on OvmfPkg\VirtNorFlashDxe.
The VirtNorFlashDxe installs the gEdkiiNvVarStoreFormattedGuid to
indicate it has finished initialising the flash variable storage
and that the variable service can be dispatched.

However, the kvmtool guest firmware dynamically detects if CFI
flash is absent and sets PcdEmuVariableNvModeEnable to TRUE
indicating emulated runtime variable must be used. Therefore,
in this scenario install the gEdkiiNvVarStoreFormattedGuid so
that the variable service can be dispatched.

Also link the NorFlashKvmtoolLib as a NULL library so that
it can discover if the CFI flash is absent and setup the PCD
PcdEmuVariableNvModeEnable. This is required in case the
NorFlashDxe is not yet dispatched.

Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2023-05-29 15:14:00 +00:00
..
KvmtoolPlatformDxe.c ArmVirtPkg: Dispatch variable service if variable emulation is enabled 2023-05-29 15:14:00 +00:00
KvmtoolPlatformDxe.inf ArmVirtPkg: Dispatch variable service if variable emulation is enabled 2023-05-29 15:14:00 +00:00