Lines Matching refs:msg_arg
458 struct optee_msg_arg *msg_arg; in optee_shm_register() local
488 msg_arg = tee_shm_get_va(shm_arg, 0); in optee_shm_register()
489 if (IS_ERR(msg_arg)) { in optee_shm_register()
490 rc = PTR_ERR(msg_arg); in optee_shm_register()
497 memset(msg_arg, 0, OPTEE_MSG_GET_ARG_SIZE(1)); in optee_shm_register()
498 msg_arg->num_params = 1; in optee_shm_register()
499 msg_arg->cmd = OPTEE_MSG_CMD_REGISTER_SHM; in optee_shm_register()
500 msg_arg->params->attr = OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT | in optee_shm_register()
502 msg_arg->params->u.tmem.shm_ref = (unsigned long)shm; in optee_shm_register()
503 msg_arg->params->u.tmem.size = tee_shm_get_size(shm); in optee_shm_register()
508 msg_arg->params->u.tmem.buf_ptr = virt_to_phys(pages_list) | in optee_shm_register()
512 msg_arg->ret != TEEC_SUCCESS) in optee_shm_register()
524 struct optee_msg_arg *msg_arg; in optee_shm_unregister() local
542 msg_arg = tee_shm_get_va(shm_arg, 0); in optee_shm_unregister()
543 if (IS_ERR(msg_arg)) { in optee_shm_unregister()
544 rc = PTR_ERR(msg_arg); in optee_shm_unregister()
548 memset(msg_arg, 0, sz); in optee_shm_unregister()
549 msg_arg->num_params = 1; in optee_shm_unregister()
550 msg_arg->cmd = OPTEE_MSG_CMD_UNREGISTER_SHM; in optee_shm_unregister()
551 msg_arg->params[0].attr = OPTEE_MSG_ATTR_TYPE_RMEM_INPUT; in optee_shm_unregister()
552 msg_arg->params[0].u.rmem.shm_ref = (unsigned long)shm; in optee_shm_unregister()
555 msg_arg->ret != TEEC_SUCCESS) in optee_shm_unregister()