Commit d6b532b5 authored by Antonio Nino Diaz's avatar Antonio Nino Diaz
Browse files

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: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
parent 9efd6e5c
...@@ -431,12 +431,14 @@ uint64_t spm_smc_handler(uint32_t smc_fid, ...@@ -431,12 +431,14 @@ uint64_t spm_smc_handler(uint32_t smc_fid,
cm_el1_sysregs_context_restore(SECURE); cm_el1_sysregs_context_restore(SECURE);
cm_set_next_eret_context(SECURE); cm_set_next_eret_context(SECURE);
if (x2 != 0) { /* Cookie. Reserved for future use. It must be zero. */
VERBOSE("SP_COMMUNICATE_AARCH32/64: X2 is not 0 as recommended."); 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_RET4(&sp_ctx.cpu_ctx, smc_fid, x1, x2, x3);
smc_fid, x2, x3, plat_my_core_pos());
case SP_MEM_ATTRIBUTES_GET_AARCH64: case SP_MEM_ATTRIBUTES_GET_AARCH64:
case SP_MEM_ATTRIBUTES_SET_AARCH64: case SP_MEM_ATTRIBUTES_SET_AARCH64:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment