Lines Matching refs:tsp_ctx

114 	tsp_context_t *tsp_ctx;  in tspd_sel1_interrupt_handler()  local
118 tsp_ctx = &tspd_sp_context[linear_id]; in tspd_sel1_interrupt_handler()
158 tsp_ctx->preempted_by_sel1_intr = false; in tspd_sel1_interrupt_handler()
167 tsp_ctx->preempted_by_sel1_intr = true; in tspd_sel1_interrupt_handler()
180 assert(&tsp_ctx->cpu_ctx == cm_get_context(SECURE)); in tspd_sel1_interrupt_handler()
192 if (get_yield_smc_active_flag(tsp_ctx->state)) { in tspd_sel1_interrupt_handler()
193 tsp_ctx->saved_spsr_el3 = (uint32_t)SMC_GET_EL3(&tsp_ctx->cpu_ctx, in tspd_sel1_interrupt_handler()
195 tsp_ctx->saved_elr_el3 = SMC_GET_EL3(&tsp_ctx->cpu_ctx, in tspd_sel1_interrupt_handler()
198 memcpy(&tsp_ctx->sp_ctx, &tsp_ctx->cpu_ctx, TSPD_SP_CTX_SIZE); in tspd_sel1_interrupt_handler()
215 SMC_RET2(&tsp_ctx->cpu_ctx, TSP_HANDLE_SEL1_INTR_AND_RETURN, read_elr_el3()); in tspd_sel1_interrupt_handler()
309 tsp_context_t *tsp_ctx = &tspd_sp_context[linear_id]; in tspd_init() local
326 rc = tspd_synchronous_sp_entry(tsp_ctx); in tspd_init()
352 tsp_context_t *tsp_ctx = &tspd_sp_context[linear_id]; in tspd_smc_handler() local
390 if (get_yield_smc_active_flag(tsp_ctx->state)) { in tspd_smc_handler()
391 SMC_SET_EL3(&tsp_ctx->cpu_ctx, in tspd_smc_handler()
393 tsp_ctx->saved_spsr_el3); in tspd_smc_handler()
394 SMC_SET_EL3(&tsp_ctx->cpu_ctx, in tspd_smc_handler()
396 tsp_ctx->saved_elr_el3); in tspd_smc_handler()
402 memcpy(&tsp_ctx->cpu_ctx, &tsp_ctx->sp_ctx, in tspd_smc_handler()
421 if (tsp_ctx->preempted_by_sel1_intr) { in tspd_smc_handler()
423 tsp_ctx->preempted_by_sel1_intr = false; in tspd_smc_handler()
450 set_tsp_pstate(tsp_ctx->state, TSP_PSTATE_ON); in tspd_smc_handler()
496 assert(cm_get_context(SECURE) == &tsp_ctx->cpu_ctx); in tspd_smc_handler()
515 tspd_synchronous_sp_exit(tsp_ctx, x1); in tspd_smc_handler()
556 tspd_synchronous_sp_exit(tsp_ctx, x1); in tspd_smc_handler()
583 if (get_yield_smc_active_flag(tsp_ctx->state)) in tspd_smc_handler()
589 store_tsp_args(tsp_ctx, x1, x2); in tspd_smc_handler()
603 assert(&tsp_ctx->cpu_ctx == cm_get_context(SECURE)); in tspd_smc_handler()
613 set_yield_smc_active_flag(tsp_ctx->state); in tspd_smc_handler()
641 SMC_RET3(&tsp_ctx->cpu_ctx, smc_fid, x1, x2); in tspd_smc_handler()
660 clr_yield_smc_active_flag(tsp_ctx->state); in tspd_smc_handler()
690 if (!tspd_abort_preempted_smc(tsp_ctx)) { in tspd_smc_handler()
726 if (!get_yield_smc_active_flag(tsp_ctx->state)) in tspd_smc_handler()
757 SMC_RET0(&tsp_ctx->cpu_ctx); in tspd_smc_handler()
769 get_tsp_args(tsp_ctx, x1, x2); in tspd_smc_handler()