Core: Use the stack region in the linker file

Using array to store stack will consume lots of memory. To let all
platforms have enough RAM space, change to use every partition's own
stack from linker script.
 - Use tfm_spm_partition_memory_data_t to store memory information
   instead of unified stack size in level 1.
 - Initialize partition thread stack range with its own size.
 - Remove the unified stack size member from the spm_partition_desc_t
   structure for level 1.
 - Make tfm_spm_partition_get_stack_bottom() and
   tfm_spm_partition_get_stack_top() functions available for all levels.
 - Remove tfm_spm_partition_get_stack_base_ext() and
   tfm_spm_partition_get_stack_limit_ext() functions.

Change-Id: I2025a49957d60df47e693049fc04146a7ed97b62
Signed-off-by: Summer Qin <summer.qin@arm.com>
diff --git a/secure_fw/spm/spm_api.h b/secure_fw/spm/spm_api.h
index c78836d..c0122d6 100644
--- a/secure_fw/spm/spm_api.h
+++ b/secure_fw/spm/spm_api.h
@@ -87,6 +87,28 @@
  */
 uint32_t get_partition_idx(uint32_t partition_id);
 
+/**
+ * \brief Get bottom of stack region for a partition
+ *
+ * \param[in] partition_idx     Partition index
+ *
+ * \return Stack region bottom value
+ *
+ * \note This function doesn't check if partition_idx is valid.
+ */
+uint32_t tfm_spm_partition_get_stack_bottom(uint32_t partition_idx);
+
+/**
+ * \brief Get top of stack region for a partition
+ *
+ * \param[in] partition_idx     Partition index
+ *
+ * \return Stack region top value
+ *
+ * \note This function doesn't check if partition_idx is valid.
+ */
+uint32_t tfm_spm_partition_get_stack_top(uint32_t partition_idx);
+
 #if TFM_LVL != 1
 /**
  * \brief Configure isolated sandbox for a partition
@@ -111,28 +133,6 @@
 enum spm_err_t tfm_spm_partition_sandbox_deconfig(uint32_t partition_idx);
 
 /**
- * \brief Get bottom of stack region for a partition
- *
- * \param[in] partition_idx     Partition index
- *
- * \return Stack region bottom value
- *
- * \note This function doesn't check if partition_idx is valid.
- */
-uint32_t tfm_spm_partition_get_stack_bottom(uint32_t partition_idx);
-
-/**
- * \brief Get top of stack region for a partition
- *
- * \param[in] partition_idx     Partition index
- *
- * \return Stack region top value
- *
- * \note This function doesn't check if partition_idx is valid.
- */
-uint32_t tfm_spm_partition_get_stack_top(uint32_t partition_idx);
-
-/**
  * \brief Get the start of the zero-initialised region for a partition
  *
  * \param[in] partition_idx     Partition idx