Lines Matching refs:marg
733 struct optee_msg_arg *marg; in optee_close_session() local
743 marg = shm->addr; in optee_close_session()
744 marg->num_params = 0; in optee_close_session()
745 marg->cmd = OPTEE_MSG_CMD_CLOSE_SESSION; in optee_close_session()
746 marg->session = session_id; in optee_close_session()
748 rc = optee_call(dev, marg); in optee_close_session()
763 struct optee_msg_arg *marg; in optee_open_session() local
777 marg = shm->addr; in optee_open_session()
778 memset(marg, 0, OPTEE_MSG_GET_ARG_SIZE(num_param + 2)); in optee_open_session()
780 marg->num_params = num_param + 2; in optee_open_session()
781 marg->cmd = OPTEE_MSG_CMD_OPEN_SESSION; in optee_open_session()
782 marg->params[0].attr = OPTEE_MSG_ATTR_TYPE_VALUE_INPUT | OPTEE_MSG_ATTR_META; in optee_open_session()
783 marg->params[1].attr = OPTEE_MSG_ATTR_TYPE_VALUE_INPUT | OPTEE_MSG_ATTR_META; in optee_open_session()
785 memcpy(&marg->params[0].u.value, arg->uuid, sizeof(arg->uuid)); in optee_open_session()
786 memcpy(&marg->params[1].u.value, arg->uuid, sizeof(arg->clnt_uuid)); in optee_open_session()
788 marg->params[1].u.value.c = arg->clnt_login; in optee_open_session()
790 rc = param_to_msg_param(param, num_param, marg->params + 2); in optee_open_session()
795 arg->ret = optee_call(dev, marg); in optee_open_session()
801 rc = msg_param_to_param(param, num_param, marg->params); in optee_open_session()
809 ret = optee_close_session(dev, marg->session); in optee_open_session()
816 *session_id = marg->session; in optee_open_session()
818 arg->ret = marg->ret; in optee_open_session()
819 arg->ret_origin = marg->ret_origin; in optee_open_session()
833 struct optee_msg_arg *marg; in optee_cancel() local
843 marg = shm->addr; in optee_cancel()
844 marg->num_params = 0; in optee_cancel()
845 marg->cmd = OPTEE_MSG_CMD_CANCEL; in optee_cancel()
846 marg->cancel_id = cancel_id; in optee_cancel()
847 marg->session = session_id; in optee_cancel()
849 rc = optee_call(dev, marg); in optee_cancel()
863 struct optee_msg_arg *marg; in optee_invoke_func() local
877 marg = shm->addr; in optee_invoke_func()
878 memset(marg, 0, OPTEE_MSG_GET_ARG_SIZE(num_param)); in optee_invoke_func()
880 marg->num_params = num_param; in optee_invoke_func()
881 marg->cmd = OPTEE_MSG_CMD_INVOKE_COMMAND; in optee_invoke_func()
882 marg->func = arg->func; in optee_invoke_func()
883 marg->session = arg->session; in optee_invoke_func()
885 rc = param_to_msg_param(param, num_param, marg->params); in optee_invoke_func()
890 arg->ret = optee_call(dev, marg); in optee_invoke_func()
896 rc = msg_param_to_param(param, num_param, marg->params); in optee_invoke_func()
903 arg->ret = marg->ret; in optee_invoke_func()
904 arg->ret_origin = marg->ret_origin; in optee_invoke_func()