SPM: Use connection handle as the message handle
One connection has one message only, do not bother using message
pointer as message handles. The connection handle can be used to
identify the message.
Change-Id: I99d12bc3fb17431633e2f94f77cef9254a31b830
Signed-off-by: Ken Liu <ken.liu@arm.com>
diff --git a/secure_fw/spm/include/spm_api.h b/secure_fw/spm/include/spm_api.h
index 16da007..1102804 100644
--- a/secure_fw/spm/include/spm_api.h
+++ b/secure_fw/spm/include/spm_api.h
@@ -558,7 +558,7 @@
*/
void tfm_spm_fill_msg(struct tfm_msg_body_t *msg,
struct tfm_spm_service_t *service,
- struct tfm_conn_handle_t *handle,
+ psa_handle_t handle,
int32_t type, int32_t client_id,
psa_invec *invec, size_t in_len,
psa_outvec *outvec, size_t out_len,
@@ -952,6 +952,11 @@
void tfm_spm_psa_panic(void);
/**
+ * \brief Converts a handle instance into a corresponded user handle.
+ */
+psa_handle_t tfm_spm_to_user_handle(struct tfm_conn_handle_t *handle_instance);
+
+/**
* \brief Converts a user handle into a corresponded handle instance.
*/
struct tfm_conn_handle_t *tfm_spm_to_handle_instance(psa_handle_t user_handle);