diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/el3_runtime/aarch64/context_mgmt.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/lib/el3_runtime/aarch64/context_mgmt.c b/lib/el3_runtime/aarch64/context_mgmt.c index 21e86de05..c8232df96 100644 --- a/lib/el3_runtime/aarch64/context_mgmt.c +++ b/lib/el3_runtime/aarch64/context_mgmt.c @@ -13,6 +13,7 @@ #include <interrupt_mgmt.h> #include <platform.h> #include <platform_def.h> +#include <pubsub_events.h> #include <smcc_helpers.h> #include <string.h> #include <utils.h> @@ -421,9 +422,8 @@ void cm_prepare_el3_exit(uint32_t security_state) } } - el1_sysregs_context_restore(get_sysregs_ctx(ctx)); - - cm_set_next_context(ctx); + cm_el1_sysregs_context_restore(security_state); + cm_set_next_eret_context(security_state); } /******************************************************************************* @@ -440,6 +440,13 @@ void cm_el1_sysregs_context_save(uint32_t security_state) el1_sysregs_context_save(get_sysregs_ctx(ctx)); el1_sysregs_context_save_post_ops(); + +#if IMAGE_BL31 + if (security_state == SECURE) + PUBLISH_EVENT(cm_exited_secure_world); + else + PUBLISH_EVENT(cm_exited_normal_world); +#endif } void cm_el1_sysregs_context_restore(uint32_t security_state) @@ -450,6 +457,13 @@ void cm_el1_sysregs_context_restore(uint32_t security_state) assert(ctx); el1_sysregs_context_restore(get_sysregs_ctx(ctx)); + +#if IMAGE_BL31 + if (security_state == SECURE) + PUBLISH_EVENT(cm_entering_secure_world); + else + PUBLISH_EVENT(cm_entering_normal_world); +#endif } /******************************************************************************* |