Home
last modified time | relevance | path

Searched refs:ts_ctx (Results 1 – 25 of 27) sorted by relevance

12

/optee_os/core/include/kernel/
H A Dts_manager.h14 struct ts_ctx { struct
22 struct ts_ctx *ctx; /* Generic TS context */ argument
66 void (*dump_state)(struct ts_ctx *ctx);
67 void (*dump_ftrace)(struct ts_ctx *ctx);
68 void (*release_state)(struct ts_ctx *ctx);
69 void (*destroy)(struct ts_ctx *ctx);
70 uint32_t (*get_instance_id)(struct ts_ctx *ctx);
H A Duser_ta.h44 bool is_user_ta_ctx(struct ts_ctx *ctx);
46 static inline bool __noprof is_user_ta_ctx(struct ts_ctx *ctx __unused) in is_user_ta_ctx()
52 static inline struct user_ta_ctx *to_user_ta_ctx(struct ts_ctx *ctx) in to_user_ta_ctx()
55 return container_of(ctx, struct user_ta_ctx, ta_ctx.ts_ctx); in to_user_ta_ctx()
H A Dtee_ta_manager.h71 struct ts_ctx ts_ctx; member
162 bool is_ta_ctx(struct ts_ctx *ctx);
166 static inline struct tee_ta_ctx *__noprof to_ta_ctx(struct ts_ctx *ctx) in to_ta_ctx()
169 return container_of(ctx, struct tee_ta_ctx, ts_ctx); in to_ta_ctx()
H A Dpseudo_ta.h54 bool is_pseudo_ta_ctx(struct ts_ctx *ctx);
56 static inline struct pseudo_ta_ctx *to_pseudo_ta_ctx(struct ts_ctx *ctx) in to_pseudo_ta_ctx()
59 return container_of(ctx, struct pseudo_ta_ctx, ctx.ts_ctx); in to_pseudo_ta_ctx()
H A Duser_mode_ctx.h17 static inline bool is_user_mode_ctx(struct ts_ctx *ctx) in is_user_mode_ctx()
22 static inline struct user_mode_ctx *to_user_mode_ctx(struct ts_ctx *ctx) in to_user_mode_ctx()
H A Duser_mode_ctx_struct.h44 struct ts_ctx *ts_ctx; member
H A Dthread.h33 struct ts_ctx *ctx;
/optee_os/core/kernel/
H A Dtee_ta_manager.c116 static struct tee_ta_ctx *ts_to_ta_ctx(struct ts_ctx *ctx) in ts_to_ta_ctx()
301 struct ts_ctx *ts_ctx = s->ts_sess.ctx; in dump_ftrace() local
303 if (ts_ctx && ts_ctx->ops->dump_ftrace) { in dump_ftrace()
305 ts_ctx->ops->dump_ftrace(ts_ctx); in dump_ftrace()
328 ctx->ts_ctx.ops->destroy(&ctx->ts_ctx); in destroy_context()
340 if (memcmp(&ctx->ts_ctx.uuid, uuid, sizeof(TEE_UUID)) == 0) in tee_ta_context_find()
464 struct ts_ctx *ts_ctx = NULL; in tee_ta_close_session() local
489 ts_ctx = sess->ts_sess.ctx; in tee_ta_close_session()
490 if (!ts_ctx) { in tee_ta_close_session()
495 ctx = ts_to_ta_ctx(ts_ctx); in tee_ta_close_session()
[all …]
H A Duser_ta.c265 static void user_ta_dump_state(struct ts_ctx *ctx) in user_ta_dump_state()
288 static void user_ta_dump_ftrace(struct ts_ctx *ctx) in user_ta_dump_ftrace()
405 static void user_ta_release_state(struct ts_ctx *ctx) in user_ta_release_state()
410 static void user_ta_ctx_destroy(struct ts_ctx *ctx) in user_ta_ctx_destroy()
415 static uint32_t user_ta_get_instance_id(struct ts_ctx *ctx) in user_ta_get_instance_id()
446 ctx->ts_ctx.ops = &user_ta_ops; in set_ta_ctx_ops()
449 bool __noprof is_user_ta_ctx(struct ts_ctx *ctx) in is_user_ta_ctx()
502 utc->ta_ctx.ts_ctx.uuid = *uuid; in tee_ta_init_user_ta_session()
503 res = vm_info_init(&utc->uctx, &utc->ta_ctx.ts_ctx); in tee_ta_init_user_ta_session()
514 s->ts_sess.ctx = &utc->ta_ctx.ts_ctx; in tee_ta_init_user_ta_session()
H A Dpseudo_ta.c237 static void pseudo_ta_destroy(struct ts_ctx *ctx) in pseudo_ta_destroy()
249 bool __noprof is_pseudo_ta_ctx(struct ts_ctx *ctx) in is_pseudo_ta_ctx()
324 ctx->ts_ctx.uuid = ta->uuid; in tee_ta_init_pseudo_ta_session()
325 ctx->ts_ctx.ops = &pseudo_ta_ops; in tee_ta_init_pseudo_ta_session()
327 s->ts_sess.ctx = &ctx->ts_ctx; in tee_ta_init_pseudo_ta_session()
330 DMSG("%s : %pUl", stc->pseudo_ta->name, (void *)&ctx->ts_ctx.uuid); in tee_ta_init_pseudo_ta_session()
H A Dts_manager.c18 struct ts_ctx *ctx = NULL; in update_current_ctx()
H A Dldelf_loader.c92 vm_set_ctx(uctx->ts_ctx); in ldelf_load_ldelf()
134 res = PUT_USER_SCALAR(uctx->ts_ctx->uuid, &arg->uuid); in ldelf_init_with_ldelf()
160 if (is_user_ta_ctx(uctx->ts_ctx)) { in ldelf_init_with_ldelf()
168 to_user_ta_ctx(uctx->ts_ctx)->ta_ctx.flags = arg_bbuf->flags; in ldelf_init_with_ldelf()
H A Dldelf_syscalls.c365 vm_set_ctx(uctx->ts_ctx); in ldelf_syscall_map_bin()
433 vm_set_ctx(uctx->ts_ctx); in ldelf_syscall_map_bin()
457 vm_set_ctx(uctx->ts_ctx); in ldelf_syscall_map_bin()
/optee_os/core/arch/riscv/include/kernel/
H A Dsecure_partition.h16 struct ts_ctx ts_ctx; member
19 static inline bool is_sp_ctx(struct ts_ctx *ctx __unused) in is_sp_ctx()
31 static inline struct sp_ctx *to_sp_ctx(struct ts_ctx *ctx __unused) in to_sp_ctx()
H A Dstmm_sp.h20 static inline bool is_stmm_ctx(struct ts_ctx *ctx __unused) in is_stmm_ctx()
25 static inline struct stmm_ctx *to_stmm_ctx(struct ts_ctx *ctx __unused) in to_stmm_ctx()
/optee_os/core/arch/arm/include/kernel/
H A Dsecure_partition.h45 struct ts_ctx ts_ctx; member
54 bool is_sp_ctx(struct ts_ctx *ctx);
56 static inline bool is_sp_ctx(struct ts_ctx *ctx __unused) in is_sp_ctx()
69 static inline struct sp_ctx *to_sp_ctx(struct ts_ctx *ctx) in to_sp_ctx()
72 return container_of(ctx, struct sp_ctx, ts_ctx); in to_sp_ctx()
H A Dstmm_sp.h144 static inline bool is_stmm_ctx(struct ts_ctx *ctx __maybe_unused) in is_stmm_ctx()
149 static inline struct stmm_ctx *to_stmm_ctx(struct ts_ctx *ctx) in to_stmm_ctx()
152 return container_of(ctx, struct stmm_ctx, ta_ctx.ts_ctx); in to_stmm_ctx()
/optee_os/core/include/mm/
H A Dpgt_cache.h22 struct ts_ctx;
28 struct ts_ctx *ctx;
75 struct ts_ctx *ctx __unused) in pgt_pop_from_cache_list()
79 struct pgt *pgt_pop_from_cache_list(vaddr_t vabase, struct ts_ctx *ctx);
H A Dvm.h13 TEE_Result vm_info_init(struct user_mode_ctx *uctx, struct ts_ctx *ts_ctx);
96 void vm_set_ctx(struct ts_ctx *ctx);
/optee_os/core/mm/
H A Dpgt_cache.c612 struct ts_ctx *ctx = uctx->ts_ctx; in pgt_flush()
721 struct ts_ctx *ctx = uctx->ts_ctx; in pgt_flush_range()
763 struct ts_ctx *ctx = uctx->ts_ctx; in pgt_clear_range()
773 static bool pgt_alloc_unlocked(struct pgt_cache *pgt_cache, struct ts_ctx *ctx, in pgt_alloc_unlocked()
834 while (!pgt_alloc_unlocked(pgt_cache, uctx->ts_ctx, vm_info)) { in pgt_get_all()
859 struct pgt *pgt_pop_from_cache_list(vaddr_t vabase, struct ts_ctx *ctx) in pgt_pop_from_cache_list()
H A Dvm.c122 if (uctx->ts_ctx == tsd->ctx) { in alloc_pgt()
226 p = pgt_pop_from_cache_list(ti.va_base, uctx->ts_ctx); in set_um_region()
357 if (thread_get_tsd()->ctx == uctx->ts_ctx) in vm_map_pad()
358 vm_set_ctx(uctx->ts_ctx); in vm_map_pad()
569 assert(thread_get_tsd()->ctx == uctx->ts_ctx); in vm_remap()
597 vm_set_ctx(uctx->ts_ctx); in vm_remap()
658 vm_set_ctx(uctx->ts_ctx); in vm_remap()
682 vm_set_ctx(uctx->ts_ctx); in vm_remap()
751 assert(thread_get_tsd()->ctx == uctx->ts_ctx); in vm_set_prot()
822 assert(thread_get_tsd()->ctx == uctx->ts_ctx); in vm_unmap()
[all …]
/optee_os/core/arch/arm/kernel/
H A Dstmm_sp.c100 spc->ta_ctx.ts_ctx.ops = &stmm_sp_ops; in stmm_alloc_ctx()
101 spc->ta_ctx.ts_ctx.uuid = *uuid; in stmm_alloc_ctx()
105 res = vm_info_init(&spc->uctx, &spc->ta_ctx.ts_ctx); in stmm_alloc_ctx()
388 vm_set_ctx(&spc->ta_ctx.ts_ctx); in load_stmm()
434 sess->ts_sess.ctx = &spc->ta_ctx.ts_ctx; in stmm_init_session()
451 spc->ta_ctx.ts_ctx.ops->destroy(&spc->ta_ctx.ts_ctx); in stmm_complete_session()
577 static void stmm_dump_state(struct ts_ctx *ctx) in stmm_dump_state()
583 static uint32_t stmm_get_instance_id(struct ts_ctx *ctx) in stmm_get_instance_id()
588 static void stmm_ctx_destroy(struct ts_ctx *ctx) in stmm_ctx_destroy()
H A Dsecure_partition.c109 bool is_sp_ctx(struct ts_ctx *ctx) in is_sp_ctx()
114 static void set_sp_ctx_ops(struct ts_ctx *ctx) in set_sp_ctx_ops()
232 s->ts_sess.ctx = &spc->ts_ctx; in sp_create_ctx()
233 spc->ts_ctx.uuid = *bin_uuid; in sp_create_ctx()
235 res = vm_info_init(&spc->uctx, &spc->ts_ctx); in sp_create_ctx()
239 set_sp_ctx_ops(&spc->ts_ctx); in sp_create_ctx()
513 DMSG("Loading raw binary format SP %pUl", &uctx->ts_ctx->uuid); in load_binary_sp()
530 vm_set_ctx(uctx->ts_ctx); in load_binary_sp()
533 res = sp_binary_open(&uctx->ts_ctx->uuid, &store_ops, &handle); in load_binary_sp()
1888 static void sp_dump_state(struct ts_ctx *ctx) in sp_dump_state()
/optee_os/core/pta/stm32mp/
H A Dremoteproc_pta.c353 struct ts_ctx *ctx = NULL; in rproc_pta_open_session()
/optee_os/core/pta/
H A Dsystem.c108 memcpy(data, &uctx->ts_ctx->uuid, sizeof(TEE_UUID)); in system_derive_ta_unique_key()

12