aarch64: smccc: Retrieve up to 8 64-bit values

The most common secure monitor firmware in the ARM world is TF-A. The
current release allows up to 8 64-bit values to be returned from a
SMC64 call from AArch64 state.

Extend the number of possible return values from 4 to 8.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
This commit is contained in:
Carlo Caione 2021-02-03 12:10:45 +01:00 committed by Anas Nashif
commit eb72b2d72a
3 changed files with 9 additions and 1 deletions

View file

@ -21,6 +21,8 @@
ldr x4, [sp]
stp x0, x1, [x4, __arm_smccc_res_t_a0_a1_OFFSET]
stp x2, x3, [x4, __arm_smccc_res_t_a2_a3_OFFSET]
stp x4, x5, [x4, __arm_smccc_res_t_a4_a5_OFFSET]
stp x6, x7, [x4, __arm_smccc_res_t_a6_a7_OFFSET]
ret
.endm

View file

@ -58,6 +58,8 @@ GEN_ABSOLUTE_SYM(___esf_t_SIZEOF, sizeof(_esf_t));
GEN_NAMED_OFFSET_SYM(arm_smccc_res_t, a0, a0_a1);
GEN_NAMED_OFFSET_SYM(arm_smccc_res_t, a2, a2_a3);
GEN_NAMED_OFFSET_SYM(arm_smccc_res_t, a4, a4_a5);
GEN_NAMED_OFFSET_SYM(arm_smccc_res_t, a6, a6_a7);
#endif /* CONFIG_HAS_ARM_SMCCC */

View file

@ -9,13 +9,17 @@
/*
* Result from SMC/HVC call
* @a0-a3 result values from registers 0 to 3
* @a0-a7 result values from registers 0 to 7
*/
struct arm_smccc_res {
unsigned long a0;
unsigned long a1;
unsigned long a2;
unsigned long a3;
unsigned long a4;
unsigned long a5;
unsigned long a6;
unsigned long a7;
};
typedef struct arm_smccc_res arm_smccc_res_t;