Lines Matching refs:msg_arg

288 	struct optee_msg_arg *msg_arg;  in optee_open_session()  local
295 msg_arg = optee_get_msg_arg(ctx, arg->num_params + 2, in optee_open_session()
297 if (IS_ERR(msg_arg)) in optee_open_session()
298 return PTR_ERR(msg_arg); in optee_open_session()
300 msg_arg->cmd = OPTEE_MSG_CMD_OPEN_SESSION; in optee_open_session()
301 msg_arg->cancel_id = arg->cancel_id; in optee_open_session()
307 msg_arg->params[0].attr = OPTEE_MSG_ATTR_TYPE_VALUE_INPUT | in optee_open_session()
309 msg_arg->params[1].attr = OPTEE_MSG_ATTR_TYPE_VALUE_INPUT | in optee_open_session()
311 memcpy(&msg_arg->params[0].u.value, arg->uuid, sizeof(arg->uuid)); in optee_open_session()
312 msg_arg->params[1].u.value.c = arg->clnt_login; in optee_open_session()
318 export_uuid(msg_arg->params[1].u.octets, &client_uuid); in optee_open_session()
320 rc = optee->ops->to_msg_param(optee, msg_arg->params + 2, in optee_open_session()
332 msg_arg->ret = TEEC_ERROR_COMMUNICATION; in optee_open_session()
333 msg_arg->ret_origin = TEEC_ORIGIN_COMMS; in optee_open_session()
336 if (msg_arg->ret == TEEC_SUCCESS) { in optee_open_session()
338 sess->session_id = msg_arg->session; in optee_open_session()
347 msg_arg->params + 2)) { in optee_open_session()
351 optee_close_session(ctx, msg_arg->session); in optee_open_session()
353 arg->session = msg_arg->session; in optee_open_session()
354 arg->ret = msg_arg->ret; in optee_open_session()
355 arg->ret_origin = msg_arg->ret_origin; in optee_open_session()
367 struct optee_msg_arg *msg_arg; in optee_close_session_helper() local
371 msg_arg = optee_get_msg_arg(ctx, 0, &entry, &shm, &offs); in optee_close_session_helper()
372 if (IS_ERR(msg_arg)) in optee_close_session_helper()
373 return PTR_ERR(msg_arg); in optee_close_session_helper()
375 msg_arg->cmd = OPTEE_MSG_CMD_CLOSE_SESSION; in optee_close_session_helper()
376 msg_arg->session = session; in optee_close_session_helper()
408 struct optee_msg_arg *msg_arg; in optee_invoke_func() local
421 msg_arg = optee_get_msg_arg(ctx, arg->num_params, in optee_invoke_func()
423 if (IS_ERR(msg_arg)) in optee_invoke_func()
424 return PTR_ERR(msg_arg); in optee_invoke_func()
425 msg_arg->cmd = OPTEE_MSG_CMD_INVOKE_COMMAND; in optee_invoke_func()
426 msg_arg->func = arg->func; in optee_invoke_func()
427 msg_arg->session = arg->session; in optee_invoke_func()
428 msg_arg->cancel_id = arg->cancel_id; in optee_invoke_func()
430 rc = optee->ops->to_msg_param(optee, msg_arg->params, arg->num_params, in optee_invoke_func()
436 msg_arg->ret = TEEC_ERROR_COMMUNICATION; in optee_invoke_func()
437 msg_arg->ret_origin = TEEC_ORIGIN_COMMS; in optee_invoke_func()
441 msg_arg->params)) { in optee_invoke_func()
442 msg_arg->ret = TEEC_ERROR_COMMUNICATION; in optee_invoke_func()
443 msg_arg->ret_origin = TEEC_ORIGIN_COMMS; in optee_invoke_func()
446 arg->ret = msg_arg->ret; in optee_invoke_func()
447 arg->ret_origin = msg_arg->ret_origin; in optee_invoke_func()
458 struct optee_msg_arg *msg_arg; in optee_cancel_req() local
470 msg_arg = optee_get_msg_arg(ctx, 0, &entry, &shm, &offs); in optee_cancel_req()
471 if (IS_ERR(msg_arg)) in optee_cancel_req()
472 return PTR_ERR(msg_arg); in optee_cancel_req()
474 msg_arg->cmd = OPTEE_MSG_CMD_CANCEL; in optee_cancel_req()
475 msg_arg->session = session; in optee_cancel_req()
476 msg_arg->cancel_id = cancel_id; in optee_cancel_req()