diff options
author | Balint Dobszay <balint.dobszay@arm.com> | 2020-12-11 16:25:12 +0100 |
---|---|---|
committer | Jérôme Forissier <jerome@forissier.org> | 2021-01-05 17:56:19 +0100 |
commit | 36bb435f5be571b4b4c0792de1cea85013afa728 (patch) | |
tree | 936df21cd7e7abc6b4c207c33a4963c1dc16ff41 /core/arch | |
parent | 9c34c0c78f5e69de1c18dd644e724a848eee8e94 (diff) |
core: move user_ctx field to struct ts_session
The user_ctx field in struct tee_ta_session is used by PTAs to keep
track of session specific information. Move it to struct ts_session to
make it generic and reachable for all sessions, not just TAs. This
enables extracting ldelf related code from system PTA.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
Diffstat (limited to 'core/arch')
-rw-r--r-- | core/arch/arm/kernel/pseudo_ta.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/arch/arm/kernel/pseudo_ta.c b/core/arch/arm/kernel/pseudo_ta.c index 91960d7a..f82c226a 100644 --- a/core/arch/arm/kernel/pseudo_ta.c +++ b/core/arch/arm/kernel/pseudo_ta.c @@ -2,6 +2,7 @@ /* * Copyright (c) 2014, STMicroelectronics International N.V. * Copyright (c) 2015, Linaro Limited + * Copyright (c) 2020, Arm Limited */ #include <initcall.h> #include <kernel/linker.h> @@ -158,7 +159,7 @@ static TEE_Result pseudo_ta_enter_open_session(struct ts_session *s) } if (stc->pseudo_ta->open_session_entry_point) { - void **user_ctx = &ta_sess->user_ctx; + void **user_ctx = &s->user_ctx; uint32_t param_types = 0; if (ta_sess->param) { @@ -207,7 +208,7 @@ static TEE_Result pseudo_ta_enter_invoke_cmd(struct ts_session *s, uint32_t cmd) } ta_sess->err_origin = TEE_ORIGIN_TRUSTED_APP; - res = stc->pseudo_ta->invoke_command_entry_point(ta_sess->user_ctx, cmd, + res = stc->pseudo_ta->invoke_command_entry_point(s->user_ctx, cmd, param_types, tee_param); if (ta_sess->param) { @@ -222,7 +223,7 @@ out: static void pseudo_ta_enter_close_session(struct ts_session *s) { struct pseudo_ta_ctx *stc = to_pseudo_ta_ctx(s->ctx); - void *user_ctx = to_ta_session(s)->user_ctx; + void *user_ctx = s->user_ctx; ts_push_current_session(s); |