mirror of
https://github.com/CTCaer/switch-l4t-atf.git
synced 2025-01-19 08:52:17 +00:00
SPM: Fix SP_COMMUNICATE_AARCH32/64 parameters
The parameters passed to the Secure world from the Secure Partition Manager when invoking SP_COMMUNICATE_AARCH32/64 were incorrect, as well as the checks done on them. Change-Id: I26e8c80cad0b83437db7aaada3d0d9add1c53a78 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
This commit is contained in:
parent
9efd6e5cf3
commit
d6b532b50f
@ -431,12 +431,14 @@ uint64_t spm_smc_handler(uint32_t smc_fid,
|
||||
cm_el1_sysregs_context_restore(SECURE);
|
||||
cm_set_next_eret_context(SECURE);
|
||||
|
||||
if (x2 != 0) {
|
||||
VERBOSE("SP_COMMUNICATE_AARCH32/64: X2 is not 0 as recommended.");
|
||||
/* Cookie. Reserved for future use. It must be zero. */
|
||||
assert(x1 == 0);
|
||||
|
||||
if (x3 != 0) {
|
||||
VERBOSE("SP_COMMUNICATE_AARCH32/64: X3 is not 0 as recommended.\n");
|
||||
}
|
||||
|
||||
SMC_RET4(&sp_ctx.cpu_ctx,
|
||||
smc_fid, x2, x3, plat_my_core_pos());
|
||||
SMC_RET4(&sp_ctx.cpu_ctx, smc_fid, x1, x2, x3);
|
||||
|
||||
case SP_MEM_ATTRIBUTES_GET_AARCH64:
|
||||
case SP_MEM_ATTRIBUTES_SET_AARCH64:
|
||||
|
Loading…
x
Reference in New Issue
Block a user