Lines Matching refs:msg_arg
144 struct tee_shm **shmp, struct optee_msg_arg **msg_arg) in get_msg_arg() argument
158 *msg_arg = ma; in get_msg_arg()
337 struct optee_msg_arg *msg_arg; in optee_close_session() local
339 rc = get_msg_arg(dev, 0, &shm, &msg_arg); in optee_close_session()
343 msg_arg->cmd = OPTEE_MSG_CMD_CLOSE_SESSION; in optee_close_session()
344 msg_arg->session = session; in optee_close_session()
345 do_call_with_arg(dev, msg_arg); in optee_close_session()
358 struct optee_msg_arg *msg_arg; in optee_open_session() local
360 rc = get_msg_arg(dev, num_params + 2, &shm, &msg_arg); in optee_open_session()
364 msg_arg->cmd = OPTEE_MSG_CMD_OPEN_SESSION; in optee_open_session()
369 msg_arg->params[0].attr = OPTEE_MSG_ATTR_TYPE_VALUE_INPUT | in optee_open_session()
371 msg_arg->params[1].attr = OPTEE_MSG_ATTR_TYPE_VALUE_INPUT | in optee_open_session()
373 memcpy(&msg_arg->params[0].u.value, arg->uuid, sizeof(arg->uuid)); in optee_open_session()
374 memcpy(&msg_arg->params[1].u.value, arg->uuid, sizeof(arg->clnt_uuid)); in optee_open_session()
375 msg_arg->params[1].u.value.c = arg->clnt_login; in optee_open_session()
377 rc = to_msg_param(msg_arg->params + 2, num_params, params); in optee_open_session()
381 arg->ret = do_call_with_arg(dev, msg_arg); in optee_open_session()
387 if (from_msg_param(params, num_params, msg_arg->params + 2)) { in optee_open_session()
391 optee_close_session(dev, msg_arg->session); in optee_open_session()
395 arg->session = msg_arg->session; in optee_open_session()
396 arg->ret = msg_arg->ret; in optee_open_session()
397 arg->ret_origin = msg_arg->ret_origin; in optee_open_session()
408 struct optee_msg_arg *msg_arg; in optee_invoke_func() local
411 rc = get_msg_arg(dev, num_params, &shm, &msg_arg); in optee_invoke_func()
414 msg_arg->cmd = OPTEE_MSG_CMD_INVOKE_COMMAND; in optee_invoke_func()
415 msg_arg->func = arg->func; in optee_invoke_func()
416 msg_arg->session = arg->session; in optee_invoke_func()
418 rc = to_msg_param(msg_arg->params, num_params, params); in optee_invoke_func()
422 arg->ret = do_call_with_arg(dev, msg_arg); in optee_invoke_func()
428 if (from_msg_param(params, num_params, msg_arg->params)) { in optee_invoke_func()
434 arg->ret = msg_arg->ret; in optee_invoke_func()
435 arg->ret_origin = msg_arg->ret_origin; in optee_invoke_func()
444 struct optee_msg_arg *msg_arg; in optee_shm_register() local
449 rc = get_msg_arg(dev, 1, &shm_arg, &msg_arg); in optee_shm_register()
459 msg_arg->cmd = OPTEE_MSG_CMD_REGISTER_SHM; in optee_shm_register()
460 msg_arg->params->attr = OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT | in optee_shm_register()
462 msg_arg->params->u.tmem.buf_ptr = ph_ptr; in optee_shm_register()
463 msg_arg->params->u.tmem.shm_ref = (ulong)shm; in optee_shm_register()
464 msg_arg->params->u.tmem.size = shm->size; in optee_shm_register()
466 if (do_call_with_arg(dev, msg_arg) || msg_arg->ret) in optee_shm_register()
479 struct optee_msg_arg *msg_arg; in optee_shm_unregister() local
482 rc = get_msg_arg(dev, 1, &shm_arg, &msg_arg); in optee_shm_unregister()
486 msg_arg->cmd = OPTEE_MSG_CMD_UNREGISTER_SHM; in optee_shm_unregister()
487 msg_arg->params[0].attr = OPTEE_MSG_ATTR_TYPE_RMEM_INPUT; in optee_shm_unregister()
488 msg_arg->params[0].u.rmem.shm_ref = (ulong)shm; in optee_shm_unregister()
490 if (do_call_with_arg(dev, msg_arg) || msg_arg->ret) in optee_shm_unregister()