mirror of
https://github.com/acidanthera/audk.git
synced 2025-08-18 08:08:09 +02:00
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>
52 lines
1.5 KiB
INI
52 lines
1.5 KiB
INI
## @file
|
|
# Nor Flash library for Kvmtool.
|
|
#
|
|
# Copyright (c) 2020 - 2023, Arm Ltd. All rights reserved.<BR>
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
#
|
|
##
|
|
|
|
[Defines]
|
|
INF_VERSION = 0x0001001B
|
|
BASE_NAME = NorFlashKvmtoolLib
|
|
FILE_GUID = E75F07A1-B160-4893-BDD4-09E32FF847DC
|
|
MODULE_TYPE = DXE_DRIVER
|
|
VERSION_STRING = 1.0
|
|
LIBRARY_CLASS = VirtNorFlashPlatformLib
|
|
CONSTRUCTOR = NorFlashPlatformLibConstructor
|
|
|
|
[Sources.common]
|
|
NorFlashKvmtool.c
|
|
|
|
[Packages]
|
|
ArmPkg/ArmPkg.dec
|
|
ArmVirtPkg/ArmVirtPkg.dec
|
|
EmbeddedPkg/EmbeddedPkg.dec
|
|
MdePkg/MdePkg.dec
|
|
MdeModulePkg/MdeModulePkg.dec
|
|
OvmfPkg/OvmfPkg.dec
|
|
|
|
[LibraryClasses]
|
|
BaseLib
|
|
DebugLib
|
|
PcdLib
|
|
UefiBootServicesTableLib
|
|
|
|
[Protocols]
|
|
gFdtClientProtocolGuid ## CONSUMES
|
|
|
|
[Pcd]
|
|
gArmTokenSpaceGuid.PcdFvBaseAddress
|
|
gArmTokenSpaceGuid.PcdFvSize
|
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
|
|
|
|
[Depex]
|
|
gFdtClientProtocolGuid
|