diff options
| author | Pierre Gondois <pierre.gondois@arm.com> | 2026-07-22 11:06:58 +0200 |
|---|---|---|
| committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2026-08-28 09:36:27 +0000 |
| commit | 0751cee3c4b35145eda0b24e18415df94ea972f6 (patch) | |
| tree | be7672bd812d6884dd493631f6e9ef1f3304ecf0 /ArmVirtPkg | |
| parent | 27bd6f3f973beea443fb091d06697348f12180ed (diff) | |
| download | edk2-0751cee3c4b35145eda0b24e18415df94ea972f6.tar.gz edk2-0751cee3c4b35145eda0b24e18415df94ea972f6.zip | |
ArmVirtPkg: Move flash variable support to ArmVirt.dsc.inc
The following platforms support flash backed variable support:
- ArmVirtKvmTool.dsc
- ArmVirtQemu.dsc
- ArmVirtQemuKernel.dsc
Make this build time option generic to all ArmVirtPkg platforms
while preventing Xen/CloudHv platforms from enabling it.
No functional change.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Diffstat (limited to 'ArmVirtPkg')
| -rw-r--r-- | ArmVirtPkg/ArmVirt.dsc.inc | 30 | ||||
| -rw-r--r-- | ArmVirtPkg/ArmVirtKvmTool.dsc | 15 | ||||
| -rw-r--r-- | ArmVirtPkg/ArmVirtQemu.dsc | 16 | ||||
| -rw-r--r-- | ArmVirtPkg/ArmVirtQemuKernel.dsc | 16 |
4 files changed, 30 insertions, 47 deletions
diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc index 89ac4daa37..5a2e8fef18 100644 --- a/ArmVirtPkg/ArmVirt.dsc.inc +++ b/ArmVirtPkg/ArmVirt.dsc.inc @@ -28,6 +28,12 @@ DEFINE ENABLE_PCI = TRUE
!endif
+!if $(PLAT_CLOUD_HV) == TRUE || $(PLAT_XEN) == TRUE
+ DEFINE FLASH_BACKED_RUNTIME_VARIABLE = FALSE
+!else
+ DEFINE FLASH_BACKED_RUNTIME_VARIABLE = TRUE
+!endif
+
#
# Catch invalid MACRO configurations from .dsc files
#
@@ -468,6 +474,19 @@ DEFINE FD_SIZE_IN_MB = 3 gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0
+!if $(FLASH_BACKED_RUNTIME_VARIABLE)
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|0
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0
+
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x40000
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x40000
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x40000
+!endif
+
#
# PCI settings
#
@@ -538,6 +557,17 @@ DEFINE FD_SIZE_IN_MB = 3 }
#
+ # Runtime variable
+ #
+!if $(FLASH_BACKED_RUNTIME_VARIABLE)
+ OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf {
+ <LibraryClasses>
+ # don't use unaligned CopyMem () on the UEFI varstore NOR flash region
+ BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
+ }
+!endif
+
+ #
# Multiple Console IO support
#
MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
diff --git a/ArmVirtPkg/ArmVirtKvmTool.dsc b/ArmVirtPkg/ArmVirtKvmTool.dsc index 8409609d7d..4491c8ad8c 100644 --- a/ArmVirtPkg/ArmVirtKvmTool.dsc +++ b/ArmVirtPkg/ArmVirtKvmTool.dsc @@ -171,14 +171,6 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|640
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480
- # Setup Flash storage variables
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x40000
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x40000
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x40000
-
# Define PCD for emulating Runtime Variable storage when
# CFI flash is absent.
gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|FALSE
@@ -228,13 +220,6 @@ NULL|ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.inf
}
- OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf {
- <LibraryClasses>
- # don't use unaligned CopyMem () on the UEFI varstore NOR flash region
- BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
- }
-
-
#
# Platform Driver
#
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index cd4a8db2b5..03456bef37 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -215,10 +215,6 @@ # System Memory Size -- 128 MB initially, actual size will be fetched from DT
gArmTokenSpaceGuid.PcdSystemMemorySize|0x8000000
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize | 0x40000
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize | 0x40000
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize | 0x40000
-
[PcdsFixedAtBuild.AARCH64]
# Clearing BIT0 in this PCD prevents installing a 32-bit SMBIOS entry point,
# if the entry point version is >= 3.0. AARCH64 OSes cannot assume the
@@ -231,13 +227,6 @@ [PcdsDynamicDefault.common]
gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase | 0
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64 | 0
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 | 0
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase | 0
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase | 0
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64 | 0
-
## PL031 RealTimeClock
gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0
@@ -369,11 +358,6 @@ NULL|ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.inf
}
- OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf {
- <LibraryClasses>
- # don't use unaligned CopyMem () on the UEFI varstore NOR flash region
- BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
- }
SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
#
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc index ed0cfc31db..1428126115 100644 --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc @@ -160,10 +160,6 @@ gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|3
gEfiShellPkgTokenSpaceGuid.PcdShellFileOperationSize|0x20000
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize | 0x40000
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize | 0x40000
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize | 0x40000
-
[PcdsPatchableInModule.common]
# we need to provide a resolution for this PCD that supports PcdSet64()
# being called from ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.c,
@@ -189,13 +185,6 @@ [PcdsDynamicDefault.common]
gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase | 0
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64 | 0
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 | 0
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase | 0
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase | 0
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64 | 0
-
## PL031 RealTimeClock
gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0
@@ -262,11 +251,6 @@ NULL|ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.inf
}
- OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf {
- <LibraryClasses>
- # don't use unaligned CopyMem () on the UEFI varstore NOR flash region
- BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
- }
SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
#
|
