summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSami Mujawar <sami.mujawar@arm.com>2023-05-12 11:14:04 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-05-29 15:14:00 +0000
commit0e5aecfed12da337c766a152a47c35ac1ec35818 (patch)
tree55bb253f1a74e6ff086fde6e7f80523355313e05
parent86cc2749418af2f52702972ab5db0ca52cb12caa (diff)
downloadedk2-0e5aecfed12da337c766a152a47c35ac1ec35818.tar.gz
edk2-0e5aecfed12da337c766a152a47c35ac1ec35818.tar.bz2
edk2-0e5aecfed12da337c766a152a47c35ac1ec35818.zip
ArmVirtPkg: Define variables for emulating runtime variables
Kvmtool allows guest VMs to be launched with or without a CFI flash device. When the kvmtool option '--flash <flash filename>' is used to launch a guest VM a CFI flash device maps the flash file that was specified at the command line. The NorFlash driver uses this flash as the variable storage backend. However, when the above option is not specified, a CFI flash device is not present. In such cases, the firmware can fallback to use emulated runtime variables (which uses the VMs DRAM as the storage backend). Therefore, define the PCD PcdEmuVariableNvModeEnable required to enable the emulated runtime variable support, but do not enable it by default. The firmware is expected to dynamically discover if the CFI flash is present and subsequently enable NorFlash or emulate the runtime variables. Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
-rw-r--r--ArmVirtPkg/ArmVirtKvmTool.dsc6
1 files changed, 5 insertions, 1 deletions
diff --git a/ArmVirtPkg/ArmVirtKvmTool.dsc b/ArmVirtPkg/ArmVirtKvmTool.dsc
index d0afe1b49e..25920ab4ae 100644
--- a/ArmVirtPkg/ArmVirtKvmTool.dsc
+++ b/ArmVirtPkg/ArmVirtKvmTool.dsc
@@ -1,7 +1,7 @@
# @file
# Workspace file for KVMTool virtual platform.
#
-# Copyright (c) 2018 - 2022, ARM Limited. All rights reserved.
+# Copyright (c) 2018 - 2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -219,6 +219,10 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x40000
+ # Define PCD for emulating Runtime Variable storage when
+ # CFI flash is absent.
+ gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|FALSE
+
## RTC Register address in MMIO space.
gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister64|0x0
gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister64|0x0