Lines Matching refs:shm
105 static int __enum_services(struct udevice *dev, struct tee_shm *shm, size_t *shm_size, u32 tee_sess,
117 param.u.memref.shm = shm;
131 static int enum_services(struct udevice *dev, struct tee_shm **shm, size_t *count, u32 tee_sess,
146 ret = tee_shm_alloc(dev, shm_size, 0, shm);
152 ret = __enum_services(dev, *shm, &shm_size, tee_sess, pta_cmd);
361 mp->u.rmem.shm_ref = (ulong)p->u.memref.shm;
376 struct tee_shm *shm;
403 shm = (struct tee_shm *)(ulong)mp->u.rmem.shm_ref;
405 if (!shm) {
407 p->u.memref.shm = NULL;
411 p->u.memref.shm = shm;
423 struct tee_shm *shm;
429 &shm)) {
431 virt_to_phys(shm->addr));
433 reg_pair_from_64(¶m->a4, ¶m->a5, (ulong)shm);
442 shm = reg_pair_to_ptr(param->a1, param->a2);
443 tee_shm_free(shm);
448 shm = reg_pair_to_ptr(param->a1, param->a2);
449 optee_suppl_cmd(dev, shm, page_list);
524 struct tee_shm *shm;
527 rc = get_msg_arg(dev, 0, &shm, &msg_arg);
535 tee_shm_free(shm);
545 struct tee_shm *shm;
548 rc = get_msg_arg(dev, num_params + 2, &shm, &msg_arg);
587 tee_shm_free(shm);
595 struct tee_shm *shm;
599 rc = get_msg_arg(dev, num_params, &shm, &msg_arg);
625 tee_shm_free(shm);
629 static int optee_shm_register(struct udevice *dev, struct tee_shm *shm)
641 pl = optee_alloc_and_init_page_list(shm->addr, shm->size, &ph_ptr);
651 msg_arg->params->u.tmem.shm_ref = (ulong)shm;
652 msg_arg->params->u.tmem.size = shm->size;
664 static int optee_shm_unregister(struct udevice *dev, struct tee_shm *shm)
676 msg_arg->params[0].u.rmem.shm_ref = (ulong)shm;