Lines Matching refs:shm
14 struct tee_shm *shm; in tee_add_shm() local
32 shm = k_malloc(sizeof(struct tee_shm)); in tee_add_shm()
33 if (!shm) { in tee_add_shm()
38 shm->addr = p; in tee_add_shm()
39 shm->size = size; in tee_add_shm()
40 shm->flags = flags; in tee_add_shm()
41 shm->dev = dev; in tee_add_shm()
51 rc = api->shm_register(dev, shm); in tee_add_shm()
57 *shmp = shm; in tee_add_shm()
61 k_free(shm); in tee_add_shm()
69 int tee_rm_shm(const struct device *dev, struct tee_shm *shm) in tee_rm_shm() argument
73 if (!shm) { in tee_rm_shm()
77 if (shm->flags & TEE_SHM_REGISTER) { in tee_rm_shm()
85 rc = api->shm_unregister(dev, shm); in tee_rm_shm()
95 if (shm->flags & TEE_SHM_ALLOC) { in tee_rm_shm()
96 k_free(shm->addr); in tee_rm_shm()
99 k_free(shm); in tee_rm_shm()