feat(plat/arm): read device memory info from Boot manifest
- Update Boot manifest to v0.4 with entries for PCIe IO
memory regions to match corresponding TF-A patch
https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/31696
- Read device memory regions information from Boot
manifest to arm_dev structure
- Rename arm_dram.h to arm_memory.h and structures
that used to describe DRAM layout and now describe
both DRAM or device memory regions:
- ns_dram_bank -> memory_bank
- ns_dram_info -> memory_info
- arm_dram_layout -> arm_memory_layout
- Rename PLAT_ARM_MAX_DRAM_BANKS to PLAT_ARM_MAX_MEM_BANKS,
which sets the maximum supported number for DRAM banks and
device memory regions
- Add RMM_MAX_DEV_GRANULES - maximum supported number of
device granules.
Change-Id: I8380dc83f6b73edaba64dadef7f2b696fef51418
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
diff --git a/cmake/CommonConfigs.cmake b/cmake/CommonConfigs.cmake
index 7a33e92..44dd760 100644
--- a/cmake/CommonConfigs.cmake
+++ b/cmake/CommonConfigs.cmake
@@ -22,11 +22,29 @@
DEFAULT 12)
#
-# RMM_MAX_GRANULES. Maximum number of granules supported.
+# RMM_MAX_GRANULES. Maximum number of memory granules supported.
#
arm_config_option(
NAME RMM_MAX_GRANULES
- HELP "Maximum number of granules supported"
+ HELP "Maximum number of memory granules supported"
+ TYPE STRING
+ DEFAULT 0x0)
+
+#
+# RMM_MAX_COH_GRANULES. Maximum number of coherent device granules supported.
+#
+arm_config_option(
+ NAME RMM_MAX_COH_GRANULES
+ HELP "Maximum number of coherent device granules supported"
+ TYPE STRING
+ DEFAULT 0x0)
+
+#
+# RMM_MAX_NCOH_GRANULES. Maximum number of non-coherent device granules supported.
+#
+arm_config_option(
+ NAME RMM_MAX_NCOH_GRANULES
+ HELP "Maximum number of non-coherent device granules supported"
TYPE STRING
DEFAULT 0x0)
@@ -104,6 +122,16 @@
INTERFACE "RMM_MAX_GRANULES=U(${RMM_MAX_GRANULES})")
target_compile_definitions(rmm-common
+ INTERFACE "RMM_MAX_COH_GRANULES=U(${RMM_MAX_COH_GRANULES})")
+
+if (RMM_MAX_NCOH_GRANULES EQUAL 0x0)
+ message (FATAL_ERROR "RMM_MAX_NCOH_GRANULES not configured")
+endif()
+
+target_compile_definitions(rmm-common
+ INTERFACE "RMM_MAX_NCOH_GRANULES=U(${RMM_MAX_NCOH_GRANULES})")
+
+target_compile_definitions(rmm-common
INTERFACE "RMM_NUM_PAGES_PER_STACK=UL(${RMM_NUM_PAGES_PER_STACK})")
if(RMM_FPU_USE_AT_REL2 AND RMM_ARCH STREQUAL aarch64)