diff options
author | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2017-11-15 10:36:21 +0000 |
---|---|---|
committer | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2017-11-15 13:27:43 +0000 |
commit | d6b532b50f83b5fe353792fb4b8d91b2191c1850 (patch) | |
tree | 39aff9ff3fcaedb941d6f367eb6deedb98bd67ea /services | |
parent | 9efd6e5cf3c8409a4ac7ad8fdfdb4393654d4f8a (diff) |
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>
Diffstat (limited to 'services')
-rw-r--r-- | services/std_svc/spm/spm_main.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/services/std_svc/spm/spm_main.c b/services/std_svc/spm/spm_main.c index 1b40d81d..de657a2f 100644 --- a/services/std_svc/spm/spm_main.c +++ b/services/std_svc/spm/spm_main.c @@ -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: |