Lines Matching refs:msg_arg
457 struct optee_msg_arg *msg_arg; in optee_shm_register() local
487 msg_arg = tee_shm_get_va(shm_arg, 0); in optee_shm_register()
488 if (IS_ERR(msg_arg)) { in optee_shm_register()
489 rc = PTR_ERR(msg_arg); in optee_shm_register()
496 memset(msg_arg, 0, OPTEE_MSG_GET_ARG_SIZE(1)); in optee_shm_register()
497 msg_arg->num_params = 1; in optee_shm_register()
498 msg_arg->cmd = OPTEE_MSG_CMD_REGISTER_SHM; in optee_shm_register()
499 msg_arg->params->attr = OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT | in optee_shm_register()
501 msg_arg->params->u.tmem.shm_ref = (unsigned long)shm; in optee_shm_register()
502 msg_arg->params->u.tmem.size = tee_shm_get_size(shm); in optee_shm_register()
507 msg_arg->params->u.tmem.buf_ptr = virt_to_phys(pages_list) | in optee_shm_register()
511 msg_arg->ret != TEEC_SUCCESS) in optee_shm_register()
523 struct optee_msg_arg *msg_arg; in optee_shm_unregister() local
541 msg_arg = tee_shm_get_va(shm_arg, 0); in optee_shm_unregister()
542 if (IS_ERR(msg_arg)) { in optee_shm_unregister()
543 rc = PTR_ERR(msg_arg); in optee_shm_unregister()
547 memset(msg_arg, 0, sz); in optee_shm_unregister()
548 msg_arg->num_params = 1; in optee_shm_unregister()
549 msg_arg->cmd = OPTEE_MSG_CMD_UNREGISTER_SHM; in optee_shm_unregister()
550 msg_arg->params[0].attr = OPTEE_MSG_ATTR_TYPE_RMEM_INPUT; in optee_shm_unregister()
551 msg_arg->params[0].u.rmem.shm_ref = (unsigned long)shm; in optee_shm_unregister()
554 msg_arg->ret != TEEC_SUCCESS) in optee_shm_unregister()
971 struct optee_msg_arg *msg_arg; in simple_call_with_arg() local
975 msg_arg = optee_get_msg_arg(ctx, 0, &entry, &shm, &offs); in simple_call_with_arg()
976 if (IS_ERR(msg_arg)) in simple_call_with_arg()
977 return PTR_ERR(msg_arg); in simple_call_with_arg()
979 msg_arg->cmd = cmd; in simple_call_with_arg()