Lines Matching defs:shm
42 struct tee_shm *shm;
62 struct tee_shm *shm = NULL;
69 shm = r->shm;
72 return shm;
75 static int optee_shm_add_ffa_handle(struct optee *optee, struct tee_shm *shm,
84 r->shm = shm;
127 struct tee_shm *shm = NULL;
136 shm = optee_shm_from_ffa_handle(optee, mp->u.fmem.global_id);
137 p->u.memref.shm = shm;
139 if (shm) {
193 struct tee_shm *shm = p->u.memref.shm;
198 if (shm) {
201 mp->u.fmem.internal_offs = shm->offset;
209 mp->u.fmem.global_id = shm->sec_world_id;
270 static int optee_ffa_shm_register(struct tee_context *ctx, struct tee_shm *shm,
303 rc = optee_shm_add_ffa_handle(optee, shm, args.g_handle);
309 shm->sec_world_id = args.g_handle;
315 struct tee_shm *shm)
321 u64 global_handle = shm->sec_world_id;
330 shm->sec_world_id = 0;
344 struct tee_shm *shm)
348 u64 global_handle = shm->sec_world_id;
363 shm->sec_world_id = 0;
376 struct tee_shm *shm, size_t size, size_t align)
378 return tee_dyn_shm_alloc_helper(shm, size, align,
383 struct tee_shm *shm)
385 tee_dyn_shm_free_helper(shm, optee_ffa_shm_unregister);
431 struct tee_shm *shm;
441 shm = optee_rpc_cmd_alloc_suppl(ctx, arg->params[0].u.value.b);
444 shm = tee_shm_alloc_priv_buf(optee->ctx,
452 if (IS_ERR(shm)) {
459 .u.fmem.size = tee_shm_get_size(shm),
460 .u.fmem.global_id = shm->sec_world_id,
461 .u.fmem.internal_offs = shm->offset,
471 struct tee_shm *shm;
477 shm = optee_shm_from_ffa_handle(optee, arg->params[0].u.value.b);
478 if (!shm)
482 optee_rpc_cmd_free_suppl(ctx, shm);
485 tee_shm_free(shm);
607 * @shm: shared memory holding the message to pass to secure world
608 * @offs: offset of the message in @shm
618 struct tee_shm *shm, u_int offs,
623 .data1 = (u32)shm->sec_world_id,
624 .data2 = (u32)(shm->sec_world_id >> 32),
633 * an argument struct. This is also what the shm pool allocator
637 if (shm->offset)
640 arg = tee_shm_get_va(shm, offs);
645 rpc_arg = tee_shm_get_va(shm, offs + rpc_arg_offs);