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_api.h b/secure_fw/spm/spm_api.h
index c0122d6..106b29f 100644
--- a/secure_fw/spm/spm_api.h
+++ b/secure_fw/spm/spm_api.h
@@ -87,6 +87,7 @@
  */
 uint32_t get_partition_idx(uint32_t partition_id);
 
+#if (TFM_LVL != 1) || defined(TFM_PSA_API)
 /**
  * \brief Get bottom of stack region for a partition
  *
@@ -108,8 +109,9 @@
  * \note This function doesn't check if partition_idx is valid.
  */
 uint32_t tfm_spm_partition_get_stack_top(uint32_t partition_idx);
+#endif
 
-#if TFM_LVL != 1
+#if (TFM_LVL != 1) && !defined(TFM_PSA_API)
 /**
  * \brief Configure isolated sandbox for a partition
  *