diff options
author | Alexei Fedorov <Alexei.Fedorov@arm.com> | 2020-11-13 12:36:49 +0000 |
---|---|---|
committer | Alexei Fedorov <Alexei.Fedorov@arm.com> | 2020-11-13 18:47:58 +0000 |
commit | caff3c87245cab1c95c4f2958144d8f78f42685e (patch) | |
tree | 4d44fc1577dc3ebe2d7a5a6e6e6fead7602ee509 /bl32/tsp/tsp_private.h | |
parent | d01f31c0366fa7b0aa8f0eee8daeee5385c88ce5 (diff) | |
download | platform_external_arm-trusted-firmware-caff3c87245cab1c95c4f2958144d8f78f42685e.tar.gz platform_external_arm-trusted-firmware-caff3c87245cab1c95c4f2958144d8f78f42685e.tar.bz2 platform_external_arm-trusted-firmware-caff3c87245cab1c95c4f2958144d8f78f42685e.zip |
TSP: Fix GCC 11.0.0 compilation error.
This patch fixes the following compilation error
reported by aarch64-none-elf-gcc 11.0.0:
bl32/tsp/tsp_main.c: In function 'tsp_smc_handler':
bl32/tsp/tsp_main.c:393:9: error: 'tsp_get_magic'
accessing 32 bytes in a region of size 16
[-Werror=stringop-overflow=]
393 | tsp_get_magic(service_args);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
bl32/tsp/tsp_main.c:393:9: note: referencing argument 1
of type 'uint64_t *' {aka 'long long unsigned int *'}
In file included from bl32/tsp/tsp_main.c:19:
bl32/tsp/tsp_private.h:64:6: note: in a call to function 'tsp_get_magic'
64 | void tsp_get_magic(uint64_t args[4]);
| ^~~~~~~~~~~~~
by changing declaration of tsp_get_magic function from
void tsp_get_magic(uint64_t args[4]);
to
uint128_t tsp_get_magic(void);
which returns arguments directly in x0 and x1 registers.
In bl32\tsp\tsp_main.c the current tsp_smc_handler()
implementation calls tsp_get_magic(service_args);
, where service_args array is declared as
uint64_t service_args[2];
and tsp_get_magic() in bl32\tsp\aarch64\tsp_request.S
copies only 2 registers in output buffer:
/* Store returned arguments to the array */
stp x0, x1, [x4, #0]
Change-Id: Ib34759fc5d7bb803e6c734540d91ea278270b330
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Diffstat (limited to 'bl32/tsp/tsp_private.h')
-rw-r--r-- | bl32/tsp/tsp_private.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bl32/tsp/tsp_private.h b/bl32/tsp/tsp_private.h index cbd527f37..38d9732f5 100644 --- a/bl32/tsp/tsp_private.h +++ b/bl32/tsp/tsp_private.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2018, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2014-2020, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -61,7 +61,7 @@ typedef struct tsp_args { */ CASSERT(TSP_ARGS_SIZE == sizeof(tsp_args_t), assert_sp_args_size_mismatch); -void tsp_get_magic(uint64_t args[4]); +uint128_t tsp_get_magic(void); tsp_args_t *tsp_cpu_resume_main(uint64_t max_off_pwrlvl, uint64_t arg1, |