aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSummer Qin <summer.qin@arm.com>2019-11-20 15:28:04 +0800
committerSummer Qin <summer.qin@arm.com>2019-12-06 17:11:36 +0800
commit40db9eaa90324daa23ebff207103d15258887a45 (patch)
treea8a4ad037fe4d6d03cc63234c7d674dfa301aaab
parenta765f23063930df53338a1d90211f217d5310168 (diff)
downloadtrusted-firmware-m-40db9eaa90324daa23ebff207103d15258887a45.tar.gz
Core: Refine veneer function description
Refine the description and some paramaters for veneer functions. Change-Id: I6f22e9f2f6a419bb59f7b09a7c1d4756349ef7c0 Signed-off-by: Summer Qin <summer.qin@arm.com>
-rw-r--r--interface/include/tfm_api.h68
-rw-r--r--secure_fw/ns_callable/tfm_psa_api_veneers.c8
2 files changed, 39 insertions, 37 deletions
diff --git a/interface/include/tfm_api.h b/interface/include/tfm_api.h
index f3f3072c9f..af2b492c53 100644
--- a/interface/include/tfm_api.h
+++ b/interface/include/tfm_api.h
@@ -20,18 +20,20 @@ extern "C" {
/**
* \brief Checks if the provided client ID is a secure client ID.
*
- * \param[in] client_id Client ID to check
+ * \param[in] client_id Client ID to check.
*
- * \return Returns 1 if the client Id is secure. Otherwise, returns 0.
+ * \retval 1 Client ID is secure.
+ * \retval 0 Client ID is non-secure.
*/
#define TFM_CLIENT_ID_IS_S(client_id) ((client_id)>0)
/**
* \brief Checks if the provided client ID is a non-secure client ID.
*
- * \param[in] client_id Client ID to check
+ * \param[in] client_id Client ID to check.
*
- * \return Returns 1 if the client Id is non-secure. Otherwise, returns 0.
+ * \retval 1 Client ID is non-secure.
+ * \retval 0 Client ID is secure.
*/
#define TFM_CLIENT_ID_IS_NS(client_id) ((client_id)<0)
@@ -56,71 +58,71 @@ enum tfm_status_e
TFM_ERROR_GENERIC = 0x1F,
};
-//==================== Secure function declarations ==========================//
+/********************* Secure function declarations ***************************/
/**
- * \brief Assign client ID to the current TZ context
- *
- * \param[in] ns_client_id The client ID to be assigned to the current
- * context
- * \return TFM_SUCCESS if the client ID assigned successfully, an error code
- * according to \ref tfm_status_e in case of error.
+ * \brief Assign client ID to the current TZ context.
*
+ * \param[in] ns_client_id The client ID to be assigned to the current
+ * context.
+ * \retval TFM_SUCCESS The client ID assigned successfully.
+ * \retval error code The client ID assignment failed, an error code
+ * returned according to \ref tfm_status_e.
* \note This function have to be called from handler mode.
*/
enum tfm_status_e tfm_register_client_id (int32_t ns_client_id);
/**
- * \brief Retrieve the version of the PSA Framework API that is implemented
+ * \brief Retrieve the version of the PSA Framework API that is implemented.
*
- * \return The version of the PSA Framework
+ * \return The version of the PSA Framework.
*/
uint32_t tfm_psa_framework_version_veneer(void);
/**
- * \brief Return version of secure function provided by secure binary
+ * \brief Return version of secure function provided by secure binary.
*
- * \param[in] sid ID of secure service
+ * \param[in] sid ID of secure service.
*
- * \return Version number of secure function
+ * \return Version number of secure function.
*/
uint32_t tfm_psa_version_veneer(uint32_t sid);
/**
- * \brief Connect to secure function
+ * \brief Connect to secure function.
*
- * \param[in] sid ID of secure service
- * \param[in] version Version of SF requested by client
+ * \param[in] sid ID of secure service.
+ * \param[in] version Version of SF requested by client.
*
- * \return Returns handle to connection
+ * \return Returns handle to connection.
*/
psa_handle_t tfm_psa_connect_veneer(uint32_t sid, uint32_t version);
/**
- * \brief Call a secure function referenced by a connection handle
+ * \brief Call a secure function referenced by a connection handle.
*
- * \param[in] handle Handle to connection
- * \param[in] type The reuqest type. Must be zero(PSA_IPC_CALL) or
- * positive.
- * \param[in] in_vecs invec containing pointer/count of input vectors
- * \param[in] out_vecs invec containing pointer/count of output vectors
+ * \param[in] handle Handle to connection.
+ * \param[in] type The reuqest type. Must be zero(PSA_IPC_CALL) or
+ * positive.
+ * \param[in] in_vec Array of input \ref psa_invec structures.
+ * \param[in] out_vec Array of output \ref psa_invec structures.
*
- * \return Returns \ref psa_status_t status code
+ * \return Returns \ref psa_status_t status code.
*/
psa_status_t tfm_psa_call_veneer(psa_handle_t handle, int32_t type,
- const psa_invec *in_vecs,
- const psa_invec *out_vecs);
+ const psa_invec *in_vec,
+ const psa_invec *out_vec);
/**
- * \brief Close connection to secure function referenced by a connection handle
+ * \brief Close connection to secure function referenced by a connection handle.
*
- * \param[in] handle Handle to connection
+ * \param[in] handle Handle to connection
*
- * \return Returns \ref psa_status_t status code
+ * \return Returns \ref psa_status_t status code.
*/
psa_status_t tfm_psa_close_veneer(psa_handle_t handle);
-//================ End Secure function declarations ==========================//
+/***************** End Secure function declarations ***************************/
#ifdef __cplusplus
}
diff --git a/secure_fw/ns_callable/tfm_psa_api_veneers.c b/secure_fw/ns_callable/tfm_psa_api_veneers.c
index 4d8abc9b0c..a052c8df64 100644
--- a/secure_fw/ns_callable/tfm_psa_api_veneers.c
+++ b/secure_fw/ns_callable/tfm_psa_api_veneers.c
@@ -98,11 +98,11 @@ psa_handle_t tfm_psa_connect_veneer(uint32_t sid, uint32_t version)
__tfm_secure_gateway_attributes__
psa_status_t tfm_psa_call_veneer(psa_handle_t handle, int32_t type,
- const psa_invec *in_vecs,
- const psa_invec *out_vecs)
+ const psa_invec *in_vec,
+ const psa_invec *out_vec)
{
- TFM_CORE_NS_IPC_REQUEST_VENEER(tfm_svcall_psa_call, handle, type, in_vecs,
- out_vecs);
+ TFM_CORE_NS_IPC_REQUEST_VENEER(tfm_svcall_psa_call, handle, type, in_vec,
+ out_vec);
}
__tfm_secure_gateway_attributes__