aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchin Gupta <achin.gupta@arm.com>2019-10-11 14:46:57 +0100
committerAchin Gupta <achin.gupta@arm.com>2019-10-28 14:23:35 +0000
commit076c4f9c9484b3bdf14143c637afb78b64bba8e8 (patch)
treed5ad23a834721757406f1ff8b7b408104151978b
parent637bf73678373b234a8802655f1259dd7581f217 (diff)
downloadtrusted-firmware-a-076c4f9c9484b3bdf14143c637afb78b64bba8e8.tar.gz
SMCCC: fix mask of function number field in FID
As per the SMCCC, the function number field is 16-bits wide (bits[15:0]). This patch uses the correct mask to isolate these bits. The old mask assumed that this field is 8-bits wide. Signed-off-by: Achin Gupta <achin.gupta@arm.com>
-rw-r--r--include/lib/smccc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/lib/smccc.h b/include/lib/smccc.h
index 76e60231f0..011be8f0d1 100644
--- a/include/lib/smccc.h
+++ b/include/lib/smccc.h
@@ -103,7 +103,7 @@
#define is_arm_arch_svc_call(_fid) (GET_SMC_OEN(_fid) == OEN_ARM_START)
/* The macro below is used to identify a valid Fast SMC call */
-#define is_valid_fast_smc(_fid) ((!(((_fid) >> 16) & U(0xff))) && \
+#define is_valid_fast_smc(_fid) ((!(((_fid) >> 16) & U(0xffff))) && \
(GET_SMC_TYPE(_fid) == SMC_TYPE_FAST))
/*