Core: add PSA client API functions
NS client infrastructure for PSA API created in
conformance with v8M secure gateway call restrictions
and TF-M rules.
Note:
- S SVC handlers TBD
- Buffer read/write funtions TBD
- Sanity checks in S SVC handlers TBD
Change-Id: Ia2947c28247af699d337754db2f22e2e25235c41
Signed-off-by: Miklos Balint <miklos.balint@arm.com>
diff --git a/interface/include/tfm_api.h b/interface/include/tfm_api.h
index fea137a..527a433 100644
--- a/interface/include/tfm_api.h
+++ b/interface/include/tfm_api.h
@@ -13,6 +13,7 @@
#endif
#include <stdint.h>
+#include "interface/include/psa_client.h"
#define TFM_INVALID_CLIENT_ID 0
@@ -73,6 +74,47 @@
*/
enum tfm_status_e tfm_register_client_id (int32_t ns_client_id);
+/**
+ * \brief Return version of secure function provided by secure binary
+ *
+ * \param[in] sid ID of secure service
+ *
+ * \return Version number of secure function
+ */
+uint32_t tfm_psa_version_veneer(uint32_t sid);
+
+/**
+ * \brief Connect to secure function
+ *
+ * \param[in] sid ID of secure service
+ * \param[in] minor_version Minor version of SF requested by client
+ *
+ * \return Returns handle to connection
+ */
+psa_handle_t tfm_psa_connect_veneer(uint32_t sid, uint32_t minor_version);
+
+/**
+ * \brief Call a secure function referenced by a connection handle
+ *
+ * \param[in] handle Handle to connection
+ * \param[in] in_vecs invec containing pointer/count of input vectors
+ * \param[in] out_vecs invec containing pointer/count of output vectors
+ *
+ * \return Returns \ref psa_error_t error code
+ */
+psa_error_t tfm_psa_call_veneer(psa_handle_t handle,
+ const psa_invec *in_vecs,
+ const psa_invec *out_vecs);
+
+/**
+ * \brief Close connection to secure function referenced by a connection handle
+ *
+ * \param[in] handle Handle to connection
+ *
+ * \return Returns \ref psa_error_t error code
+ */
+psa_error_t tfm_psa_close_veneer(psa_handle_t handle);
+
//================ End Secure function declarations ==========================//
#ifdef __cplusplus