diff options
author | Dimitris Papastamos <dimitris.papastamos@arm.com> | 2018-05-25 09:47:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-25 09:47:11 +0100 |
commit | edcd266e6a9276ac0b2927301c8deec3798a6b1c (patch) | |
tree | d17687cd5c3d825812b94a382417fad29785822a /lib | |
parent | 0d018306d41a36582830e58761cba9d5b647f05b (diff) | |
parent | e829a3796fb2e66a68b60a22ebce6dca05c80a71 (diff) | |
download | platform_external_arm-trusted-firmware-edcd266e6a9276ac0b2927301c8deec3798a6b1c.tar.gz platform_external_arm-trusted-firmware-edcd266e6a9276ac0b2927301c8deec3798a6b1c.tar.bz2 platform_external_arm-trusted-firmware-edcd266e6a9276ac0b2927301c8deec3798a6b1c.zip |
Merge pull request #1395 from antonio-nino-diaz-arm/an/spm-refactor
SPM: Refactor codebase
Diffstat (limited to 'lib')
-rw-r--r-- | lib/el3_runtime/aarch32/context_mgmt.c | 9 | ||||
-rw-r--r-- | lib/el3_runtime/aarch64/context_mgmt.c | 9 |
2 files changed, 8 insertions, 10 deletions
diff --git a/lib/el3_runtime/aarch32/context_mgmt.c b/lib/el3_runtime/aarch32/context_mgmt.c index c784c225a..11ef6e5f4 100644 --- a/lib/el3_runtime/aarch32/context_mgmt.c +++ b/lib/el3_runtime/aarch32/context_mgmt.c @@ -41,8 +41,7 @@ void cm_init(void) * entry_point_info structure. * * The security state to initialize is determined by the SECURE attribute - * of the entry_point_info. The function returns a pointer to the initialized - * context and sets this as the next context to return to. + * of the entry_point_info. * * The EE and ST attributes are used to configure the endianness and secure * timer availability for the new execution context. @@ -51,7 +50,7 @@ void cm_init(void) * el3_exit(). For Secure-EL1 cm_prepare_el3_exit() is equivalent to * cm_e1_sysreg_context_restore(). ******************************************************************************/ -static void cm_init_context_common(cpu_context_t *ctx, const entry_point_info_t *ep) +void cm_setup_context(cpu_context_t *ctx, const entry_point_info_t *ep) { unsigned int security_state; uint32_t scr, sctlr; @@ -149,7 +148,7 @@ void cm_init_context_by_index(unsigned int cpu_idx, { cpu_context_t *ctx; ctx = cm_get_context_by_index(cpu_idx, GET_SECURITY_STATE(ep->h.attr)); - cm_init_context_common(ctx, ep); + cm_setup_context(ctx, ep); } /******************************************************************************* @@ -161,7 +160,7 @@ void cm_init_my_context(const entry_point_info_t *ep) { cpu_context_t *ctx; ctx = cm_get_context(GET_SECURITY_STATE(ep->h.attr)); - cm_init_context_common(ctx, ep); + cm_setup_context(ctx, ep); } /******************************************************************************* diff --git a/lib/el3_runtime/aarch64/context_mgmt.c b/lib/el3_runtime/aarch64/context_mgmt.c index d8267e29c..f389368d4 100644 --- a/lib/el3_runtime/aarch64/context_mgmt.c +++ b/lib/el3_runtime/aarch64/context_mgmt.c @@ -49,8 +49,7 @@ void cm_init(void) * entry_point_info structure. * * The security state to initialize is determined by the SECURE attribute - * of the entry_point_info. The function returns a pointer to the initialized - * context and sets this as the next context to return to. + * of the entry_point_info. * * The EE and ST attributes are used to configure the endianess and secure * timer availability for the new execution context. @@ -59,7 +58,7 @@ void cm_init(void) * el3_exit(). For Secure-EL1 cm_prepare_el3_exit() is equivalent to * cm_e1_sysreg_context_restore(). ******************************************************************************/ -static void cm_init_context_common(cpu_context_t *ctx, const entry_point_info_t *ep) +void cm_setup_context(cpu_context_t *ctx, const entry_point_info_t *ep) { unsigned int security_state; uint32_t scr_el3, pmcr_el0; @@ -258,7 +257,7 @@ void cm_init_context_by_index(unsigned int cpu_idx, { cpu_context_t *ctx; ctx = cm_get_context_by_index(cpu_idx, GET_SECURITY_STATE(ep->h.attr)); - cm_init_context_common(ctx, ep); + cm_setup_context(ctx, ep); } /******************************************************************************* @@ -270,7 +269,7 @@ void cm_init_my_context(const entry_point_info_t *ep) { cpu_context_t *ctx; ctx = cm_get_context(GET_SECURITY_STATE(ep->h.attr)); - cm_init_context_common(ctx, ep); + cm_setup_context(ctx, ep); } /******************************************************************************* |