27 #ifndef __OTZ_SECURE_API_H_
28 #define __OTZ_SECURE_API_H_
159 void get_api_context(
int *svc_id,
int *task_id,
int *cmd_id,
int *cmd_type);
186 int *type,
int *offset,
int *pos,
187 int *mapped,
void **out_data,
int *out_len);
283 int ipc_send(
int src_svc_id,
int src_context,
int svc_id,
284 int session_id,
int cmd_id,
333 int *type,
int *offset,
int *pos,
334 void **out_data,
int *out_len);
370 int ipc_api(
int src_svc_id,
int src_session_id,
int target_svc_id,
371 int target_cmd_id,
void *req_buf,
int req_buf_len,
372 void* res_buf,
int res_buf_len,
int *ret_res_buf_len);
433 #ifdef OTZONE_ASYNC_NOTIFY_SUPPORT
441 void notify_ns(
int task_id);
456 int register_notify_data_api(
void *param);
470 int unregister_notify_data_api(
void);
void * req_addr
Definition: secure_api.h:47
Task local storage.
Definition: task.h:79
void ipc_test_echo(int src_svc_id, int src_session_id)
Test IPC command for echo operation.
Definition: secure_api.c:1179
Encode command structure.
Definition: secure_api.h:37
unsigned int res_len
Definition: secure_api.h:50
int ipc_send(int src_svc_id, int src_context, int svc_id, int session_id, int cmd_id, struct otz_secure_encode_ctx *enc_ctx, struct otzc_encode_meta *meta_data)
Send the data between two tasks.
Definition: secure_api.c:860
Secure API configuration details for task.
Definition: task.h:40
int sa_create_entry_point(int svc_id, sa_config_t *psa_config)
Invokes the init function of the service task.
Definition: secure_api.c:291
u32 enc_req_pos
Definition: secure_api.h:54
int ipc_connect(int svc_id, int *session_id)
Establish session between two tasks.
Definition: secure_api.c:817
void otz_ipi_return(struct otz_smc_cmd *smc_cmd, int ret_val)
Return for IPI.
Definition: cpu_ipi.c:70
void otz_ipi(struct otz_smc_cmd *smc_cmd)
Invoke IPI.
Definition: cpu_ipi.c:44
int sa_open_session(sa_config_t *psa_config, void *session_context)
Open Session.
Definition: secure_api.c:397
int decode_ipi_out_data(void *data, struct otzc_encode_meta *meta_data, int *type, int *offset, int *pos, void **out_data, int *out_len)
Helper function to decode the response data for IPI.
Definition: secure_api.c:572
int sa_close_session(void *session_context)
Close Session.
Definition: secure_api.c:419
SMC command structure.
Definition: otz_common.h:107
Encode context.
Definition: secure_api.h:46
u32 enc_res_offset
Definition: secure_api.h:53
u32 enc_res_pos
Definition: secure_api.h:55
int ipc_disconnect(int svc_id, int session_id)
Disconnect the previously established session between two tasks.
Definition: secure_api.c:835
u8 * data
Definition: fat32.c:40
u32 enc_req_offset
Definition: secure_api.h:52
int sa_destroy_entry_point(int svc_id, void *data, int elf_flag)
Invokes the exit function of the service task.
Definition: secure_api.c:349
int close_session_from_ns(void *param)
Dispatcher command function to handle the Close session request from non-secure world.
Definition: secure_api.c:156
int close_session_from_secure(int svc_id, int session_id)
Close session request which is got initiated from secure task.
Definition: secure_api.c:269
int decode_data(void *data, struct otzc_encode_meta *meta_data, int *type, int *offset, int *pos, int *mapped, void **out_data, int *out_len)
Helper function to decode the data which got passed from non-secure world.
Definition: secure_api.c:501
int open_session_from_ns(void *param)
Dispatcher command function to handle the Open session request from non-secure world.
Definition: secure_api.c:70
int update_response_len(struct otzc_encode_meta *meta_data, int pos, int len)
Helper function to update the response length.
Definition: secure_api.c:615
unsigned int len
Definition: secure_api.h:38
void otz_release_data(struct otz_secure_encode_ctx *enc_context, struct otzc_encode_meta *meta_data)
Release the encoded data.
Definition: secure_api.c:785
void handle_task_return(int task_id, sw_tls *tls)
Helper function to handle the task return.
Definition: secure_api.c:1207
int open_session_from_secure(int svc_id, int *session_id)
Open session request from secure application task.
Definition: secure_api.c:229
void * res_addr
Definition: secure_api.h:49
int otz_encode_data(struct otz_secure_encode_cmd *enc, struct otzc_encode_meta **pmeta_data, struct otz_secure_encode_ctx **penc_context, int encode_type)
Helper function to encode the data which originate from secure application.
Definition: secure_api.c:643
unsigned int req_len
Definition: secure_api.h:48
int ipc_api(int src_svc_id, int src_session_id, int target_svc_id, int target_cmd_id, void *req_buf, int req_buf_len, void *res_buf, int res_buf_len, int *ret_res_buf_len)
Helper function to send the data between two tasks for single request and single response buffer...
Definition: secure_api.c:919
void ipc_test_crypto(int src_svc_id, int src_session_id)
: Test IPC command for crypto operation
Definition: secure_api.c:1006
int param_type
Definition: secure_api.h:40
void * data
Definition: secure_api.h:39
void get_api_context(int *svc_id, int *task_id, int *cmd_id, int *cmd_type)
Helper function to return the service id, session id and command id from the smc command parameter...
Definition: secure_api.c:436