Lines Matching defs:shm

41 	struct tee_shm *shm;
61 struct tee_shm *shm = NULL;
68 shm = r->shm;
71 return shm;
74 static int optee_shm_add_ffa_handle(struct optee *optee, struct tee_shm *shm,
83 r->shm = shm;
126 struct tee_shm *shm = NULL;
135 shm = optee_shm_from_ffa_handle(optee, mp->u.fmem.global_id);
136 p->u.memref.shm = shm;
138 if (shm) {
192 struct tee_shm *shm = p->u.memref.shm;
197 if (shm) {
200 mp->u.fmem.internal_offs = shm->offset;
208 mp->u.fmem.global_id = shm->sec_world_id;
269 static int optee_ffa_shm_register(struct tee_context *ctx, struct tee_shm *shm,
302 rc = optee_shm_add_ffa_handle(optee, shm, args.g_handle);
308 shm->sec_world_id = args.g_handle;
314 struct tee_shm *shm)
320 u64 global_handle = shm->sec_world_id;
329 shm->sec_world_id = 0;
343 struct tee_shm *shm)
347 u64 global_handle = shm->sec_world_id;
362 shm->sec_world_id = 0;
375 struct tee_shm *shm, size_t size, size_t align)
377 return tee_dyn_shm_alloc_helper(shm, size, align,
382 struct tee_shm *shm)
384 tee_dyn_shm_free_helper(shm, optee_ffa_shm_unregister);
430 struct tee_shm *shm;
440 shm = optee_rpc_cmd_alloc_suppl(ctx, arg->params[0].u.value.b);
443 shm = tee_shm_alloc_priv_buf(optee->ctx,
451 if (IS_ERR(shm)) {
458 .u.fmem.size = tee_shm_get_size(shm),
459 .u.fmem.global_id = shm->sec_world_id,
460 .u.fmem.internal_offs = shm->offset,
470 struct tee_shm *shm;
476 shm = optee_shm_from_ffa_handle(optee, arg->params[0].u.value.b);
477 if (!shm)
481 optee_rpc_cmd_free_suppl(ctx, shm);
484 tee_shm_free(shm);
606 * @shm: shared memory holding the message to pass to secure world
607 * @offs: offset of the message in @shm
617 struct tee_shm *shm, u_int offs,
622 .data1 = (u32)shm->sec_world_id,
623 .data2 = (u32)(shm->sec_world_id >> 32),
632 * an argument struct. This is also what the shm pool allocator
636 if (shm->offset)
639 arg = tee_shm_get_va(shm, offs);
644 rpc_arg = tee_shm_get_va(shm, offs + rpc_arg_offs);