diff options
author | Pascal Brand <pascal.brand@st.com> | 2016-02-22 15:56:13 +0100 |
---|---|---|
committer | Pascal Brand <pascal.brand@st.com> | 2016-03-14 13:54:43 +0100 |
commit | 1d283b911bc9a7ef3157347acb1e1dfb271e824d (patch) | |
tree | ef31404f4346edffc8bb1d66331b2a9195fe7a11 /ta | |
parent | 7823a7b521fbd0928b08dad55dd1fc377a7a526a (diff) |
arm: fix stack size
According to GP Internal API, TA_STACK_SIZE corresponds to the stack
size used by the TA code itself and does not include stack space
possibly used by the Trusted Core Framework.
Hence, stack_size which is the size of the stack to use,
must be enlarged.
Without this patch, on FVP, xtest 1012, based on ta/sims, fails because
TA_STACK_SIZE is defined as 1024, which is too low.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Pascal Brand <pascal.brand@st.com>
Diffstat (limited to 'ta')
-rw-r--r-- | ta/arch/arm/user_ta_header.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/ta/arch/arm/user_ta_header.c b/ta/arch/arm/user_ta_header.c index 77515159..b256fa90 100644 --- a/ta/arch/arm/user_ta_header.c +++ b/ta/arch/arm/user_ta_header.c @@ -54,10 +54,27 @@ void __utee_entry(unsigned long func, unsigned long session_id, struct utee_params *up, unsigned long cmd_id) __noreturn; +/* + * According to GP Internal API, TA_STACK_SIZE corresponds to the stack + * size used by the TA code itself and does not include stack space + * possibly used by the Trusted Core Framework. + * Hence, stack_size which is the size of the stack to use, + * must be enlarged + * It has been set to 2048 to include trace framework and invoke commands + */ +#define TA_FRAMEWORK_STACK_SIZE 2048 + const struct ta_head ta_head __section(".ta_head") = { /* UUID, unique to each TA */ .uuid = TA_UUID, - .stack_size = TA_STACK_SIZE, + /* + * According to GP Internal API, TA_FRAMEWORK_STACK_SIZE corresponds to + * the stack size used by the TA code itself and does not include stack + * space possibly used by the Trusted Core Framework. + * Hence, stack_size which is the size of the stack to use, + * must be enlarged + */ + .stack_size = TA_STACK_SIZE + TA_FRAMEWORK_STACK_SIZE, .flags = TA_FLAG_USER_MODE | TA_FLAGS, #ifdef __ILP32__ /* |