Lines Matching refs:msg_arg
174 struct optee_msg_arg **msg_arg, in get_msg_arg() argument
198 *msg_arg = ma; in get_msg_arg()
215 struct optee_msg_arg *msg_arg; in optee_open_session() local
220 shm = get_msg_arg(ctx, arg->num_params + 2, &msg_arg, &msg_parg); in optee_open_session()
224 msg_arg->cmd = OPTEE_MSG_CMD_OPEN_SESSION; in optee_open_session()
225 msg_arg->cancel_id = arg->cancel_id; in optee_open_session()
231 msg_arg->params[0].attr = OPTEE_MSG_ATTR_TYPE_VALUE_INPUT | in optee_open_session()
233 msg_arg->params[1].attr = OPTEE_MSG_ATTR_TYPE_VALUE_INPUT | in optee_open_session()
235 memcpy(&msg_arg->params[0].u.value, arg->uuid, sizeof(arg->uuid)); in optee_open_session()
236 memcpy(&msg_arg->params[1].u.value, arg->uuid, sizeof(arg->clnt_uuid)); in optee_open_session()
237 msg_arg->params[1].u.value.c = arg->clnt_login; in optee_open_session()
239 rc = optee_to_msg_param(msg_arg->params + 2, arg->num_params, param); in optee_open_session()
250 msg_arg->ret = TEEC_ERROR_COMMUNICATION; in optee_open_session()
251 msg_arg->ret_origin = TEEC_ORIGIN_COMMS; in optee_open_session()
254 if (msg_arg->ret == TEEC_SUCCESS) { in optee_open_session()
256 sess->session_id = msg_arg->session; in optee_open_session()
264 if (optee_from_msg_param(param, arg->num_params, msg_arg->params + 2)) { in optee_open_session()
268 optee_close_session(ctx, msg_arg->session); in optee_open_session()
270 arg->session = msg_arg->session; in optee_open_session()
271 arg->ret = msg_arg->ret; in optee_open_session()
272 arg->ret_origin = msg_arg->ret_origin; in optee_open_session()
284 struct optee_msg_arg *msg_arg; in optee_close_session() local
298 shm = get_msg_arg(ctx, 0, &msg_arg, &msg_parg); in optee_close_session()
302 msg_arg->cmd = OPTEE_MSG_CMD_CLOSE_SESSION; in optee_close_session()
303 msg_arg->session = session; in optee_close_session()
315 struct optee_msg_arg *msg_arg; in optee_invoke_func() local
327 shm = get_msg_arg(ctx, arg->num_params, &msg_arg, &msg_parg); in optee_invoke_func()
330 msg_arg->cmd = OPTEE_MSG_CMD_INVOKE_COMMAND; in optee_invoke_func()
331 msg_arg->func = arg->func; in optee_invoke_func()
332 msg_arg->session = arg->session; in optee_invoke_func()
333 msg_arg->cancel_id = arg->cancel_id; in optee_invoke_func()
335 rc = optee_to_msg_param(msg_arg->params, arg->num_params, param); in optee_invoke_func()
340 msg_arg->ret = TEEC_ERROR_COMMUNICATION; in optee_invoke_func()
341 msg_arg->ret_origin = TEEC_ORIGIN_COMMS; in optee_invoke_func()
344 if (optee_from_msg_param(param, arg->num_params, msg_arg->params)) { in optee_invoke_func()
345 msg_arg->ret = TEEC_ERROR_COMMUNICATION; in optee_invoke_func()
346 msg_arg->ret_origin = TEEC_ORIGIN_COMMS; in optee_invoke_func()
349 arg->ret = msg_arg->ret; in optee_invoke_func()
350 arg->ret_origin = msg_arg->ret_origin; in optee_invoke_func()
360 struct optee_msg_arg *msg_arg; in optee_cancel_req() local
371 shm = get_msg_arg(ctx, 0, &msg_arg, &msg_parg); in optee_cancel_req()
375 msg_arg->cmd = OPTEE_MSG_CMD_CANCEL; in optee_cancel_req()
376 msg_arg->session = session; in optee_cancel_req()
377 msg_arg->cancel_id = cancel_id; in optee_cancel_req()
570 struct optee_msg_arg *msg_arg; in optee_shm_register() local
586 shm_arg = get_msg_arg(ctx, 1, &msg_arg, &msg_parg); in optee_shm_register()
595 msg_arg->cmd = OPTEE_MSG_CMD_REGISTER_SHM; in optee_shm_register()
596 msg_arg->params->attr = OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT | in optee_shm_register()
598 msg_arg->params->u.tmem.shm_ref = (unsigned long)shm; in optee_shm_register()
599 msg_arg->params->u.tmem.size = tee_shm_get_size(shm); in optee_shm_register()
604 msg_arg->params->u.tmem.buf_ptr = virt_to_phys(pages_list) | in optee_shm_register()
608 msg_arg->ret != TEEC_SUCCESS) in optee_shm_register()
620 struct optee_msg_arg *msg_arg; in optee_shm_unregister() local
624 shm_arg = get_msg_arg(ctx, 1, &msg_arg, &msg_parg); in optee_shm_unregister()
628 msg_arg->cmd = OPTEE_MSG_CMD_UNREGISTER_SHM; in optee_shm_unregister()
630 msg_arg->params[0].attr = OPTEE_MSG_ATTR_TYPE_RMEM_INPUT; in optee_shm_unregister()
631 msg_arg->params[0].u.rmem.shm_ref = (unsigned long)shm; in optee_shm_unregister()
634 msg_arg->ret != TEEC_SUCCESS) in optee_shm_unregister()