81 if (!connect_handle) {
102 client_id, NULL, 0, NULL, 0, NULL);
116 bool ns_caller, uint32_t privileged)
144 service = conn_handle->
service;
194 for (i = 0; i < in_num; i++) {
206 for (i = 0; i + 1 < in_num; i++) {
207 for (j = i+1; j < in_num; j++) {
208 if (!((
char *) invecs[j].base + invecs[j].len <=
209 (
char *) invecs[i].base ||
210 (
char *) invecs[j].base >=
211 (
char *) invecs[i].base + invecs[i].len)) {
221 for (i = 0; i < out_num; i++) {
239 invecs, in_num, outvecs, out_num, outptr);
278 service = conn_handle->
service;
297 NULL, 0, NULL, 0, NULL);
#define PSA_ERROR_CONNECTION_BUSY
#define PSA_FRAMEWORK_VERSION
uint32_t tfm_spm_client_psa_framework_version(void)
handler for psa_framework_version.
#define TFM_HANDLE_STATUS_CONNECT_ERROR
#define TFM_HANDLE_STATUS_ACTIVE
struct tfm_spm_service_t service[]
int32_t tfm_spm_check_authorization(uint32_t sid, struct tfm_spm_service_t *service, bool ns_caller)
Check the client access authorization.
struct tfm_spm_service_t * service
psa_status_t tfm_spm_client_psa_call(psa_handle_t handle, int32_t type, const psa_invec *inptr, size_t in_num, psa_outvec *outptr, size_t out_num, bool ns_caller, uint32_t privileged)
handler for psa_call.
int32_t tfm_spm_validate_conn_handle(const struct tfm_conn_handle_t *conn_handle, int32_t client_id)
Validate connection handle for client connect.
void tfm_spm_client_psa_close(psa_handle_t handle, bool ns_caller)
handler for psa_close.
struct tfm_conn_handle_t * tfm_spm_create_conn_handle(struct tfm_spm_service_t *service, int32_t client_id)
Create connection handle for client connect.
void tfm_core_panic(void)
int32_t tfm_memory_check(const void *buffer, size_t len, bool ns_caller, enum tfm_memory_access_e access, uint32_t privileged)
Check the memory reference is valid.
psa_handle_t tfm_spm_to_user_handle(struct tfm_conn_handle_t *handle_instance)
Converts a handle instance into a corresponded user handle.
#define PSA_IPC_DISCONNECT
int32_t tfm_nspm_get_current_client_id(void)
Get the client ID of the current NS client.
void * spm_memcpy(void *dest, const void *src, size_t n)
Memory copy function for TF-M core.
void * spm_memset(void *s, int c, size_t n)
Memory set function for TF-M core.
#define PSA_ERROR_PROGRAMMER_ERROR
struct tfm_msg_body_t * tfm_spm_get_msg_buffer_from_conn_handle(struct tfm_conn_handle_t *conn_handle)
Get message context by connect handle.
int32_t tfm_spm_check_client_version(struct tfm_spm_service_t *service, uint32_t version)
Check the client version according to version policy.
struct tfm_spm_service_t * tfm_spm_get_service_by_sid(uint32_t sid)
Get the service context by service ID.
psa_status_t tfm_spm_client_psa_connect(uint32_t sid, uint32_t version, bool ns_caller)
handler for psa_connect.
uint32_t tfm_spm_client_psa_version(uint32_t sid, bool ns_caller)
handler for psa_version.
int32_t tfm_spm_send_event(struct tfm_spm_service_t *service, struct tfm_msg_body_t *msg)
Send message and wake up the SP who is waiting on message queue, block the current thread and schedul...
const struct tfm_spm_service_db_t * service_db
int32_t psa_status_t
Function return status.
struct tfm_conn_handle_t * tfm_spm_to_handle_instance(psa_handle_t user_handle)
Converts a user handle into a corresponded handle instance.
void tfm_spm_fill_msg(struct tfm_msg_body_t *msg, struct tfm_spm_service_t *service, 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, psa_outvec *caller_outvec)
Fill the message for PSA client call.
uint32_t tfm_spm_partition_get_running_partition_id(void)
Get the running partition ID.