From 0e5aecfed12da337c766a152a47c35ac1ec35818 Mon Sep 17 00:00:00 2001 From: Sami Mujawar Date: Fri, 12 May 2023 11:14:04 +0100 Subject: 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 ' 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 Reviewed-by: Ard Biesheuvel --- ArmVirtPkg/ArmVirtKvmTool.dsc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ArmVirtPkg') 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 -- cgit v1.2.3