Core: separate IPC and veneer fn-based code
Improve separation of IPC and veneer function-based code in the
source tree for memory optimization and better readability of source:
- Do not compile unused SVC handler functions if using IPC messaging
- Avoid activation of MPU regions not needed in selected build
configuration
- Flag error if a service veneer function is called when running IPC
messaging
- Do not include memory bounds for partitions in SPM database if
level 1 isolation and veneer functions are used to save memory
Signed-off-by: Miklos Balint <miklos.balint@arm.com>
Change-Id: Iaef91e69061b639a71ec8cb638b6393762d10761
diff --git a/secure_fw/spm/spm_db_setup.h b/secure_fw/spm/spm_db_setup.h
index 1e91271..db06154 100644
--- a/secure_fw/spm/spm_db_setup.h
+++ b/secure_fw/spm/spm_db_setup.h
@@ -38,6 +38,9 @@
data.partition_priority = TFM_PRIORITY(priority); \
} while (0)
+#if (TFM_LVL == 1) && !defined(TFM_PSA_API)
+#define PARTITION_INIT_MEMORY_DATA(data, partition)
+#else
#define PARTITION_INIT_MEMORY_DATA(data, partition) \
do { \
data.code_start = PART_REGION_ADDR(partition, $$Base); \
@@ -51,7 +54,7 @@
data.stack_bottom = PART_REGION_ADDR(partition, _STACK$$ZI$$Base); \
data.stack_top = PART_REGION_ADDR(partition, _STACK$$ZI$$Limit); \
} while (0)
-
+#endif
#if TFM_LVL == 1
#define PARTITION_INIT_RUNTIME_DATA(data, partition) \