diff options
Diffstat (limited to 'services/spd')
-rw-r--r-- | services/spd/opteed/opteed_main.c | 14 | ||||
-rw-r--r-- | services/spd/opteed/opteed_pm.c | 24 | ||||
-rw-r--r-- | services/spd/opteed/opteed_private.h | 2 |
3 files changed, 20 insertions, 20 deletions
diff --git a/services/spd/opteed/opteed_main.c b/services/spd/opteed/opteed_main.c index ac58e047..01ec2a26 100644 --- a/services/spd/opteed/opteed_main.c +++ b/services/spd/opteed/opteed_main.c @@ -34,7 +34,7 @@ * Address of the entrypoint vector table in OPTEE. It is * initialised once on the primary core after a cold boot. ******************************************************************************/ -optee_vectors_t *optee_vectors; +optee_vectors_t *optee_vector_table; /******************************************************************************* * Array to keep track of per-cpu OPTEE state @@ -71,7 +71,7 @@ static uint64_t opteed_sel1_interrupt_handler(uint32_t id, optee_ctx = &opteed_sp_context[linear_id]; assert(&optee_ctx->cpu_ctx == cm_get_context(SECURE)); - cm_set_elr_el3(SECURE, (uint64_t)&optee_vectors->fiq_entry); + cm_set_elr_el3(SECURE, (uint64_t)&optee_vector_table->fiq_entry); cm_el1_sysregs_context_restore(SECURE); cm_set_next_eret_context(SECURE); @@ -236,10 +236,10 @@ static uintptr_t opteed_smc_handler(uint32_t smc_fid, */ if (GET_SMC_TYPE(smc_fid) == SMC_TYPE_FAST) { cm_set_elr_el3(SECURE, (uint64_t) - &optee_vectors->fast_smc_entry); + &optee_vector_table->fast_smc_entry); } else { cm_set_elr_el3(SECURE, (uint64_t) - &optee_vectors->yield_smc_entry); + &optee_vector_table->yield_smc_entry); } cm_el1_sysregs_context_restore(SECURE); @@ -279,10 +279,10 @@ static uintptr_t opteed_smc_handler(uint32_t smc_fid, * Stash the OPTEE entry points information. This is done * only once on the primary cpu */ - assert(optee_vectors == NULL); - optee_vectors = (optee_vectors_t *) x1; + assert(optee_vector_table == NULL); + optee_vector_table = (optee_vectors_t *) x1; - if (optee_vectors) { + if (optee_vector_table) { set_optee_pstate(optee_ctx->state, OPTEE_PSTATE_ON); /* diff --git a/services/spd/opteed/opteed_pm.c b/services/spd/opteed/opteed_pm.c index 7efc234b..bdacf986 100644 --- a/services/spd/opteed/opteed_pm.c +++ b/services/spd/opteed/opteed_pm.c @@ -30,11 +30,11 @@ static int32_t opteed_cpu_off_handler(u_register_t unused) uint32_t linear_id = plat_my_core_pos(); optee_context_t *optee_ctx = &opteed_sp_context[linear_id]; - assert(optee_vectors); + assert(optee_vector_table); assert(get_optee_pstate(optee_ctx->state) == OPTEE_PSTATE_ON); /* Program the entry point and enter OPTEE */ - cm_set_elr_el3(SECURE, (uint64_t) &optee_vectors->cpu_off_entry); + cm_set_elr_el3(SECURE, (uint64_t) &optee_vector_table->cpu_off_entry); rc = opteed_synchronous_sp_entry(optee_ctx); /* @@ -63,11 +63,11 @@ static void opteed_cpu_suspend_handler(u_register_t max_off_pwrlvl) uint32_t linear_id = plat_my_core_pos(); optee_context_t *optee_ctx = &opteed_sp_context[linear_id]; - assert(optee_vectors); + assert(optee_vector_table); assert(get_optee_pstate(optee_ctx->state) == OPTEE_PSTATE_ON); /* Program the entry point and enter OPTEE */ - cm_set_elr_el3(SECURE, (uint64_t) &optee_vectors->cpu_suspend_entry); + cm_set_elr_el3(SECURE, (uint64_t) &optee_vector_table->cpu_suspend_entry); rc = opteed_synchronous_sp_entry(optee_ctx); /* @@ -94,11 +94,11 @@ static void opteed_cpu_on_finish_handler(u_register_t unused) optee_context_t *optee_ctx = &opteed_sp_context[linear_id]; entry_point_info_t optee_on_entrypoint; - assert(optee_vectors); + assert(optee_vector_table); assert(get_optee_pstate(optee_ctx->state) == OPTEE_PSTATE_OFF); opteed_init_optee_ep_state(&optee_on_entrypoint, opteed_rw, - (uint64_t)&optee_vectors->cpu_on_entry, + (uint64_t)&optee_vector_table->cpu_on_entry, 0, 0, 0, optee_ctx); /* Initialise this cpu's secure context */ @@ -129,14 +129,14 @@ static void opteed_cpu_suspend_finish_handler(u_register_t max_off_pwrlvl) uint32_t linear_id = plat_my_core_pos(); optee_context_t *optee_ctx = &opteed_sp_context[linear_id]; - assert(optee_vectors); + assert(optee_vector_table); assert(get_optee_pstate(optee_ctx->state) == OPTEE_PSTATE_SUSPEND); /* Program the entry point, max_off_pwrlvl and enter the SP */ write_ctx_reg(get_gpregs_ctx(&optee_ctx->cpu_ctx), CTX_GPREG_X0, max_off_pwrlvl); - cm_set_elr_el3(SECURE, (uint64_t) &optee_vectors->cpu_resume_entry); + cm_set_elr_el3(SECURE, (uint64_t) &optee_vector_table->cpu_resume_entry); rc = opteed_synchronous_sp_entry(optee_ctx); /* @@ -168,11 +168,11 @@ static void opteed_system_off(void) uint32_t linear_id = plat_my_core_pos(); optee_context_t *optee_ctx = &opteed_sp_context[linear_id]; - assert(optee_vectors); + assert(optee_vector_table); assert(get_optee_pstate(optee_ctx->state) == OPTEE_PSTATE_ON); /* Program the entry point */ - cm_set_elr_el3(SECURE, (uint64_t) &optee_vectors->system_off_entry); + cm_set_elr_el3(SECURE, (uint64_t) &optee_vector_table->system_off_entry); /* Enter OPTEE. We do not care about the return value because we * must continue the shutdown anyway */ @@ -188,11 +188,11 @@ static void opteed_system_reset(void) uint32_t linear_id = plat_my_core_pos(); optee_context_t *optee_ctx = &opteed_sp_context[linear_id]; - assert(optee_vectors); + assert(optee_vector_table); assert(get_optee_pstate(optee_ctx->state) == OPTEE_PSTATE_ON); /* Program the entry point */ - cm_set_elr_el3(SECURE, (uint64_t) &optee_vectors->system_reset_entry); + cm_set_elr_el3(SECURE, (uint64_t) &optee_vector_table->system_reset_entry); /* Enter OPTEE. We do not care about the return value because we * must continue the reset anyway */ diff --git a/services/spd/opteed/opteed_private.h b/services/spd/opteed/opteed_private.h index 6cda2c8e..b77b6d34 100644 --- a/services/spd/opteed/opteed_private.h +++ b/services/spd/opteed/opteed_private.h @@ -154,7 +154,7 @@ void opteed_init_optee_ep_state(struct entry_point_info *optee_ep, extern optee_context_t opteed_sp_context[OPTEED_CORE_COUNT]; extern uint32_t opteed_rw; -extern struct optee_vectors *optee_vectors; +extern struct optee_vectors *optee_vector_table; #endif /*__ASSEMBLY__*/ #endif /* __OPTEED_PRIVATE_H__ */ |