Lines Matching refs:ec

80 	return &(sp->ec[get_ec_index(sp)]);  in spmc_get_sp_ec()
122 __dead2 void spmc_sp_synchronous_exit(struct sp_exec_ctx *ec, uint64_t rc) in spmc_sp_synchronous_exit() argument
129 spm_secure_partition_exit(ec->c_rt_ctx, rc); in spmc_sp_synchronous_exit()
398 if (sp->ec[idx].rt_state != RT_STATE_WAITING) { in direct_req_smc_handler()
400 idx, sp->ec[idx].rt_model); in direct_req_smc_handler()
408 sp->ec[idx].rt_state = RT_STATE_RUNNING; in direct_req_smc_handler()
409 sp->ec[idx].rt_model = RT_MODEL_DIR_REQ; in direct_req_smc_handler()
410 sp->ec[idx].dir_req_origin_id = src_id; in direct_req_smc_handler()
467 assert(sp->ec[idx].rt_state == RT_STATE_RUNNING); in direct_resp_smc_handler()
470 if (sp->ec[idx].rt_model != RT_MODEL_DIR_REQ) { in direct_resp_smc_handler()
472 idx, sp->ec[idx].rt_model); in direct_resp_smc_handler()
476 if (sp->ec[idx].dir_req_origin_id != dst_id) { in direct_resp_smc_handler()
478 dst_id, sp->ec[idx].dir_req_origin_id, idx); in direct_resp_smc_handler()
483 sp->ec[idx].rt_state = RT_STATE_WAITING; in direct_resp_smc_handler()
486 sp->ec[idx].dir_req_origin_id = INV_SP_ID; in direct_resp_smc_handler()
493 spmc_sp_synchronous_exit(&sp->ec[idx], x4); in direct_resp_smc_handler()
541 if (sp->ec[idx].rt_model == RT_MODEL_DIR_REQ) { in msg_wait_handler()
546 assert(sp->ec[idx].rt_state == RT_STATE_RUNNING); in msg_wait_handler()
552 if (sp->ec[idx].rt_model == RT_MODEL_INIT) { in msg_wait_handler()
553 spmc_sp_synchronous_exit(&sp->ec[idx], x4); in msg_wait_handler()
559 sp->ec[idx].rt_state = RT_STATE_WAITING; in msg_wait_handler()
562 if (sp->ec[idx].rt_model == RT_MODEL_INTR) { in msg_wait_handler()
610 if (sp->ec[idx].rt_model == RT_MODEL_INIT) { in ffa_error_handler()
612 spmc_sp_synchronous_exit(&sp->ec[idx], x2); in ffa_error_handler()
1351 rt_state = &((sp->ec[idx]).rt_state); in ffa_run_handler()
1352 rt_model = &((sp->ec[idx]).rt_model); in ffa_run_handler()
1780 uint64_t spmc_sp_synchronous_entry(struct sp_exec_ctx *ec) in spmc_sp_synchronous_entry() argument
1784 assert(ec != NULL); in spmc_sp_synchronous_entry()
1787 cm_set_context(&(ec->cpu_ctx), SECURE); in spmc_sp_synchronous_entry()
1798 rc = spm_secure_partition_enter(&ec->c_rt_ctx); in spmc_sp_synchronous_entry()
1813 struct sp_exec_ctx *ec; in sp_init() local
1816 ec = spmc_get_sp_ec(sp); in sp_init()
1817 ec->rt_model = RT_MODEL_INIT; in sp_init()
1818 ec->rt_state = RT_STATE_RUNNING; in sp_init()
1822 rc = spmc_sp_synchronous_entry(ec); in sp_init()
1830 ec->rt_state = RT_STATE_WAITING; in sp_init()
2072 struct sp_exec_ctx *ec; in spmc_sp_interrupt_handler() local
2089 ec = spmc_get_sp_ec(sp); in spmc_sp_interrupt_handler()
2092 if (ec->rt_state != RT_STATE_WAITING) { in spmc_sp_interrupt_handler()
2094 linear_id, RT_STATE_WAITING, ec->rt_state); in spmc_sp_interrupt_handler()
2099 ec->rt_model = RT_MODEL_INTR; in spmc_sp_interrupt_handler()
2100 ec->rt_state = RT_STATE_RUNNING; in spmc_sp_interrupt_handler()