diff options
author | davidcunado-arm <david.cunado@arm.com> | 2018-02-20 09:02:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-20 09:02:24 +0000 |
commit | 5ff5a6d9c33fdf8b626a4e61066f467f2b5c75a9 (patch) | |
tree | 42ab9acd054ee0820b962cfc9fcec0d6ba42df38 | |
parent | 601abdba4aaa8db1f085d0a61960c64bafc22337 (diff) | |
parent | 4abd7fa71f3cf921aab7c2b59a838f9c5bb10bb2 (diff) |
Merge pull request #1270 from antonio-nino-diaz-arm/an/smc-unknown
Redefine SMC_UNK as -1 instead of 0xFFFFFFFF
-rw-r--r-- | bl31/aarch64/runtime_exceptions.S | 4 | ||||
-rw-r--r-- | include/lib/smcc.h | 6 |
2 files changed, 5 insertions, 5 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: diff --git a/include/lib/smcc.h b/include/lib/smcc.h index a273b3af..0a2d9277 100644 --- a/include/lib/smcc.h +++ b/include/lib/smcc.h @@ -35,13 +35,13 @@ #define SMC_64 U(1) #define SMC_32 U(0) #define SMC_OK U(0) -#define SMC_UNK U(0xffffffff) +#define SMC_UNK -1 #define SMC_TYPE_FAST ULL(1) #if !ERROR_DEPRECATED #define SMC_TYPE_STD ULL(0) #endif #define SMC_TYPE_YIELD U(0) -#define SMC_PREEMPTED U(0xfffffffe) +#define SMC_PREEMPTED -2 /******************************************************************************* * Owning entity number definitions inside the function id as per the SMC * calling convention @@ -99,7 +99,7 @@ */ #define DEFINE_SVC_UUID(_name, _tl, _tm, _th, _cl, _ch, \ _n0, _n1, _n2, _n3, _n4, _n5) \ - CASSERT(_tl != SMC_UNK, invalid_svc_uuid);\ + CASSERT((uint32_t)(_tl) != (uint32_t) SMC_UNK, invalid_svc_uuid);\ static const uuid_t _name = { \ _tl, _tm, _th, _cl, _ch, \ { _n0, _n1, _n2, _n3, _n4, _n5 } \ |