audk/ArmVirtPkg/Library/NorFlashKvmtoolLib
Sami Mujawar 84d0b21d18 ArmVirtPkg: Fallback to variable emulation if no CFI is found
The kvmtool option '--flash <flash filename>' is used to launch
a guests VM with a CFI flash device that maps the flash file
specified at the command line.
However, kvmtool allows guest VMs to be launched without a CFI
flash device. In such scenarios the firmware can utilize the
emulated variable storage for UEFI variables. To support this
the PCD gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable
must be set to TRUE.

Therefore, update the NorFlashKvmtoolLib to fallback to variable
emulation if a CFI device is not detected. Also improve the error
logging.

Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2023-05-29 15:14:00 +00:00
..
NorFlashKvmtool.c ArmVirtPkg: Fallback to variable emulation if no CFI is found 2023-05-29 15:14:00 +00:00
NorFlashKvmtoolLib.inf ArmVirtPkg: Fallback to variable emulation if no CFI is found 2023-05-29 15:14:00 +00:00