summaryrefslogtreecommitdiff
path: root/bl31/aarch64
diff options
context:
space:
mode:
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>2018-02-14 14:22:29 +0000
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>2018-02-15 15:04:34 +0000
commit4abd7fa71f3cf921aab7c2b59a838f9c5bb10bb2 (patch)
treea9a3e7253bd19b61e2a1358ed892f0e1e3690bd1 /bl31/aarch64
parent15e5958560e9d31e7357e3a0ada2289e78758839 (diff)
Redefine SMC_UNK as -1 instead of 0xFFFFFFFF
According to the SMC Calling Convention (ARM DEN0028B): The Unknown SMC Function Identifier is a sign-extended value of (-1) that is returned in R0, W0 or X0 register. The value wasn't sign-extended because it was defined as a 32-bit unsigned value (0xFFFFFFFF). SMC_PREEMPT has been redefined as -2 for the same reason. NOTE: This might be a compatibility break for some AArch64 platforms that don't follow the previous version of the SMCCC (ARM DEN0028A) correctly. That document specifies that only the bottom 32 bits of the returned value must be checked. If a platform relies on the top 32 bits of the result being 0 (so that SMC_UNK is 0x00000000FFFFFFFF), it will have to fix its code to comply with the SMCCC. Change-Id: I7f7b109f6b30c114fe570aa0ead3c335383cb54d Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'bl31/aarch64')
-rw-r--r--bl31/aarch64/runtime_exceptions.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/bl31/aarch64/runtime_exceptions.S b/bl31/aarch64/runtime_exceptions.S
index 57c065c6..60be9327 100644
--- a/bl31/aarch64/runtime_exceptions.S
+++ b/bl31/aarch64/runtime_exceptions.S
@@ -390,12 +390,12 @@ smc_unknown:
* content). Either way, we aren't leaking any secure information
* through them.
*/
- mov w0, #SMC_UNK
+ mov x0, #SMC_UNK
b restore_gp_registers_callee_eret
smc_prohibited:
ldr x30, [sp, #CTX_GPREGS_OFFSET + CTX_GPREG_LR]
- mov w0, #SMC_UNK
+ mov x0, #SMC_UNK
eret
rt_svc_fw_critical_error: