Core: Remove the index member in runtime data structure
Remove the index member in runtime data structure to minimize
the memory usage. Refine the implementation of
tfm_spm_partition_get_privileged_mode by passing partition
flags instead of partition index.
Change-Id: I6d2bc92dccfb8fe79ca282e5648625ff6c780ef2
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 aebcc5a..b9b344a 100644
--- a/secure_fw/spm/spm_api.h
+++ b/secure_fw/spm/spm_api.h
@@ -108,7 +108,6 @@
* Service signal mask passed by
* psa_wait()
*/
- uint32_t index; /* Partition index */
};
#ifdef TFM_PSA_API
@@ -415,12 +414,12 @@
/**
* \brief Get the current partition mode.
*
- * \param[in] partition_idx Index of current partition
+ * \param[in] partition_flags Flags of current partition
*
* \retval TFM_PARTITION_PRIVILEGED_MODE Privileged mode
* \retval TFM_PARTITION_UNPRIVILEGED_MODE Unprivileged mode
*/
-uint32_t tfm_spm_partition_get_privileged_mode(uint32_t partition_idx);
+uint32_t tfm_spm_partition_get_privileged_mode(uint32_t partition_flags);
/******************** Service handle management functions ********************/