aboutsummaryrefslogtreecommitdiff
path: root/services/spd/opteed
diff options
context:
space:
mode:
authorDaniel Boulby <daniel.boulby@arm.com>2018-05-15 11:41:55 +0100
committerDaniel Boulby <daniel.boulby@arm.com>2018-06-12 13:21:36 +0100
commit776ff52a8daa0eb35870638de536951e0d256a84 (patch)
treecff979beabb65cdb4322f522ddae85550e624417 /services/spd/opteed
parenta138f7687159685175ee8f249dbe7ea1c22e90e1 (diff)
downloadtrusted-firmware-a-776ff52a8daa0eb35870638de536951e0d256a84.tar.gz
Fix MISRA Rule 5.7 Part 3
Rule 5.7: A tag name shall be a unique identifier Follow convention of shorter names for smaller scope to fix violations of MISRA rule 5.7 Fixed For: make ARM_TSP_RAM_LOCATION=tdram LOG_LEVEL=50 PLAT=fvp SPD=opteed Change-Id: I5fbb5d6ebddf169550eddb07ed880f5c8076bb76 Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
Diffstat (limited to 'services/spd/opteed')
-rw-r--r--services/spd/opteed/opteed_main.c14
-rw-r--r--services/spd/opteed/opteed_pm.c24
-rw-r--r--services/spd/opteed/opteed_private.h2
3 files changed, 20 insertions, 20 deletions
diff --git a/services/spd/opteed/opteed_main.c b/services/spd/opteed/opteed_main.c
index ac58e047c9..01ec2a26d1 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 7efc234b29..bdacf98645 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 6cda2c8e98..b77b6d3421 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__ */