Lines Matching defs:optee_ctx
25 uint64_t dt_addr, optee_context_t *optee_ctx)
30 assert(optee_ctx);
35 optee_ctx->mpidr = read_mpidr_el1();
36 optee_ctx->state = 0;
37 set_optee_pstate(optee_ctx->state, OPTEE_PSTATE_OFF);
39 cm_set_context(&optee_ctx->cpu_ctx, SECURE);
64 * 1. Applies the S-EL1 system register context from optee_ctx->cpu_ctx.
68 * from the optee_ctx->cpu_ctx are used to enter the OPTEE image.
70 uint64_t opteed_synchronous_sp_entry(optee_context_t *optee_ctx)
74 assert(optee_ctx != NULL);
75 assert(optee_ctx->c_rt_ctx == 0);
78 assert(cm_get_context(SECURE) == &optee_ctx->cpu_ctx);
82 rc = opteed_enter_sp(&optee_ctx->c_rt_ctx);
84 optee_ctx->c_rt_ctx = 0;
93 * 1. Saves the S-EL1 system register context tp optee_ctx->cpu_ctx.
99 void opteed_synchronous_sp_exit(optee_context_t *optee_ctx, uint64_t ret)
101 assert(optee_ctx != NULL);
103 assert(cm_get_context(SECURE) == &optee_ctx->cpu_ctx);
106 assert(optee_ctx->c_rt_ctx != 0);
107 opteed_exit_sp(optee_ctx->c_rt_ctx, ret);