Core: Create the privileged mode change function
Create the privileged mode change function to change the
privileged status for partition thread mode.
Change-Id: I68698bb99ef063655b70817364a0c60c19d5e5d0
Signed-off-by: Edison Ai <edison.ai@arm.com>
diff --git a/secure_fw/spm/spm_api.h b/secure_fw/spm/spm_api.h
index 87cc4e2..c78836d 100644
--- a/secure_fw/spm/spm_api.h
+++ b/secure_fw/spm/spm_api.h
@@ -334,4 +334,18 @@
*/
void tfm_spm_partition_cleanup_context(uint32_t partition_idx);
+/**
+ * \brief Change the privilege mode for partition thread mode.
+ *
+ * \param[in] privileged Privileged mode,
+ * \ref TFM_PARTITION_PRIVILEGED_MODE
+ * and \ref TFM_PARTITION_UNPRIVILEGED_MODE
+ *
+ * \note Barrier instructions are not called by this function, and if
+ * it is called in thread mode, it might be necessary to call
+ * them after this function returns (just like it is done in
+ * jump_to_ns_code()).
+ */
+void tfm_spm_partition_change_privilege(uint32_t privileged);
+
#endif /*__SPM_API_H__ */