feat: force ns/s ranges to be defined in SPMC manifest
Fail to initialize if the SPMC manifest doesn't contain the memory
range nodes for secure and non-secure memory.
The definition of these memory ranges are used to confain the physical
memory that can be accessed by SPs in runtime.
BREAKING CHANGE: This patch requires reconfiguration of the SPMC's
manifest.
Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: Iabec435d724c135b0f9341b96010af2f359dddd9
diff --git a/src/manifest.c b/src/manifest.c
index d4cd848..9a87ed4 100644
--- a/src/manifest.c
+++ b/src/manifest.c
@@ -1232,6 +1232,11 @@
size_t i = 0;
bool found_primary_vm = false;
+ if (boot_params->mem_ranges_count == 0 &&
+ boot_params->ns_mem_ranges_count == 0) {
+ return MANIFEST_ERROR_MEMORY_MISSING;
+ }
+
dump_memory_ranges(boot_params->mem_ranges,
boot_params->mem_ranges_count, false);
dump_memory_ranges(boot_params->ns_mem_ranges,