Lines Matching refs:msg_arg

370 	struct optee_msg_arg *msg_arg;  in optee_open_session()  local
377 msg_arg = optee_get_msg_arg(ctx, arg->num_params + 2, in optee_open_session()
379 if (IS_ERR(msg_arg)) in optee_open_session()
380 return PTR_ERR(msg_arg); in optee_open_session()
382 msg_arg->cmd = OPTEE_MSG_CMD_OPEN_SESSION; in optee_open_session()
383 msg_arg->cancel_id = arg->cancel_id; in optee_open_session()
389 msg_arg->params[0].attr = OPTEE_MSG_ATTR_TYPE_VALUE_INPUT | in optee_open_session()
391 msg_arg->params[1].attr = OPTEE_MSG_ATTR_TYPE_VALUE_INPUT | in optee_open_session()
393 memcpy(&msg_arg->params[0].u.value, arg->uuid, sizeof(arg->uuid)); in optee_open_session()
394 msg_arg->params[1].u.value.c = arg->clnt_login; in optee_open_session()
400 export_uuid(msg_arg->params[1].u.octets, &client_uuid); in optee_open_session()
402 rc = optee->ops->to_msg_param(optee, msg_arg->params + 2, in optee_open_session()
415 msg_arg->ret = TEEC_ERROR_COMMUNICATION; in optee_open_session()
416 msg_arg->ret_origin = TEEC_ORIGIN_COMMS; in optee_open_session()
419 if (msg_arg->ret == TEEC_SUCCESS) { in optee_open_session()
421 sess->session_id = msg_arg->session; in optee_open_session()
430 msg_arg->params + 2)) { in optee_open_session()
434 optee_close_session(ctx, msg_arg->session); in optee_open_session()
436 arg->session = msg_arg->session; in optee_open_session()
437 arg->ret = msg_arg->ret; in optee_open_session()
438 arg->ret_origin = msg_arg->ret_origin; in optee_open_session()
472 struct optee_msg_arg *msg_arg; in optee_close_session_helper() local
476 msg_arg = optee_get_msg_arg(ctx, 0, &entry, &shm, &offs); in optee_close_session_helper()
477 if (IS_ERR(msg_arg)) in optee_close_session_helper()
478 return PTR_ERR(msg_arg); in optee_close_session_helper()
480 msg_arg->cmd = OPTEE_MSG_CMD_CLOSE_SESSION; in optee_close_session_helper()
481 msg_arg->session = session; in optee_close_session_helper()
518 struct optee_msg_arg *msg_arg; in optee_invoke_func() local
534 msg_arg = optee_get_msg_arg(ctx, arg->num_params, in optee_invoke_func()
536 if (IS_ERR(msg_arg)) in optee_invoke_func()
537 return PTR_ERR(msg_arg); in optee_invoke_func()
538 msg_arg->cmd = OPTEE_MSG_CMD_INVOKE_COMMAND; in optee_invoke_func()
539 msg_arg->func = arg->func; in optee_invoke_func()
540 msg_arg->session = arg->session; in optee_invoke_func()
541 msg_arg->cancel_id = arg->cancel_id; in optee_invoke_func()
543 rc = optee->ops->to_msg_param(optee, msg_arg->params, arg->num_params, in optee_invoke_func()
549 msg_arg->ret = TEEC_ERROR_COMMUNICATION; in optee_invoke_func()
550 msg_arg->ret_origin = TEEC_ORIGIN_COMMS; in optee_invoke_func()
554 msg_arg->params)) { in optee_invoke_func()
555 msg_arg->ret = TEEC_ERROR_COMMUNICATION; in optee_invoke_func()
556 msg_arg->ret_origin = TEEC_ORIGIN_COMMS; in optee_invoke_func()
559 arg->ret = msg_arg->ret; in optee_invoke_func()
560 arg->ret_origin = msg_arg->ret_origin; in optee_invoke_func()
571 struct optee_msg_arg *msg_arg; in optee_cancel_req() local
586 msg_arg = optee_get_msg_arg(ctx, 0, &entry, &shm, &offs); in optee_cancel_req()
587 if (IS_ERR(msg_arg)) in optee_cancel_req()
588 return PTR_ERR(msg_arg); in optee_cancel_req()
590 msg_arg->cmd = OPTEE_MSG_CMD_CANCEL; in optee_cancel_req()
591 msg_arg->session = session; in optee_cancel_req()
592 msg_arg->cancel_id = cancel_id; in optee_cancel_req()
648 struct optee_msg_arg *msg_arg; in simple_call_with_arg() local
652 msg_arg = optee_get_msg_arg(ctx, 0, &entry, &shm, &offs); in simple_call_with_arg()
653 if (IS_ERR(msg_arg)) in simple_call_with_arg()
654 return PTR_ERR(msg_arg); in simple_call_with_arg()
656 msg_arg->cmd = cmd; in simple_call_with_arg()