Platform: get addresses of memory regions based on linker symbols
Replaces the defines to linker symbols to get memory region's address:
- Linking TF-M to two different partitions requires this change,
because memory config is not static anymore, instead it is just
finalized during linking time.
- New load regions were added to linker config file to cover
non-secure partition and secondary image partition.
- Addresses of memory regions can be set only at linking time.
- Linker symbols are used during HW configuration.
Change-Id: I05645120a3a48ced578d1aec685d82a3a27823d3
Signed-off-by: Tamas Ban <tamas.ban@arm.com>
diff --git a/platform/include/tfm_spm_hal.h b/platform/include/tfm_spm_hal.h
index 24e987b..7c6a1d1 100644
--- a/platform/include/tfm_spm_hal.h
+++ b/platform/include/tfm_spm_hal.h
@@ -107,6 +107,28 @@
*/
void nvic_interrupt_enable(void);
+/**
+ * \brief Get the VTOR value of non-secure image
+ *
+ * \return Returns the address where the vector table of the non-secure image
+ * is located
+ */
+uint32_t tfm_spm_hal_get_ns_VTOR(void);
+
+/**
+ * \brief Get the initial address of non-secure image main stack
+ *
+ * \return Returns the initial non-secure MSP
+ */
+uint32_t tfm_spm_hal_get_ns_MSP(void);
+
+/**
+ * \brief Get the entry point of the non-secure image
+ *
+ * \return Returns the address of the non-secure image entry point
+ */
+uint32_t tfm_spm_hal_get_ns_entry_point(void);
+
#if TFM_LVL != 1
/**