Core: PSA APIs alignment

Update PSA Client and Secure Partition APIs and some related files:
 - Add psa_panic() to indicate an internal fault in a secure partition.
 - Introduce a message type parameter to the psa_call() function which
   is delivered as part of the psa_msg_t data to the RoT Service.
 - Change 'minor version' to 'version'.
 - Add PSA_HANDLE_IS_VALID() and PSA_HANDLE_TO_ERROR() macros.
 - Move the definition of PSA_MAX_IOVEC and PSA_IPC_CALL from
   psa/service.h to psa/client.h.
 - Change the error code returned by psa_get() when the message could
   not be delivered. It now returns PSA_ERROR_DOES_NOT_EXIST.

Change-Id: Ia717f591c80484699f4f491d1ed6dbc4fd7c050f
Signed-off-by: Summer Qin <summer.qin@arm.com>
diff --git a/interface/include/tfm_api.h b/interface/include/tfm_api.h
index 5a56ec7..650fe52 100644
--- a/interface/include/tfm_api.h
+++ b/interface/include/tfm_api.h
@@ -35,9 +35,6 @@
  */
 #define TFM_CLIENT_ID_IS_NS(client_id) ((client_id)<0)
 
-/* Maximum number of input and output vectors */
-#define PSA_MAX_IOVEC    (4)
-
 /* The mask used for timeout values */
 #define PSA_TIMEOUT_MASK        PSA_BLOCK
 
@@ -102,22 +99,24 @@
  * \brief Connect to secure function
  *
  * \param[in]  sid              ID of secure service
- * \param[in]  minor_version    Minor version of SF requested by client
+ * \param[in]  version          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);
+psa_handle_t tfm_psa_connect_veneer(uint32_t sid, uint32_t version);
 
 /**
  * \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
  *
  * \return Returns \ref psa_status_t status code
  */
-psa_status_t tfm_psa_call_veneer(psa_handle_t handle,
+psa_status_t tfm_psa_call_veneer(psa_handle_t handle, int32_t type,
                                  const psa_invec *in_vecs,
                                  const psa_invec *out_vecs);