aboutsummaryrefslogtreecommitdiff
path: root/plat/imx
diff options
context:
space:
mode:
authorJustin Chadwell <justin.chadwell@arm.com>2019-07-03 14:14:22 +0100
committerJustin Chadwell <justin.chadwell@arm.com>2019-07-12 09:12:19 +0100
commitdc5baeb3c2d519cc2d9f964dad5f3be1984fb2c2 (patch)
tree8dde806924058443eee2a6fd87c7e07f2ff87f96 /plat/imx
parent621d5f2a5b28bd897fbad21645b86d72d76b4863 (diff)
downloadtrusted-firmware-a-dc5baeb3c2d519cc2d9f964dad5f3be1984fb2c2.tar.gz
Update imx platform to not rely on undefined overflow behaviour
This consists of ensuring that the left operand of each shift is unsigned when the operation might overflow into the sign bit. Change-Id: Ia0a10b4a30e63c0cbf1d0f8dfe5768e0a93ae1c7 Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
Diffstat (limited to 'plat/imx')
-rw-r--r--plat/imx/common/sci/imx8_mu.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/plat/imx/common/sci/imx8_mu.h b/plat/imx/common/sci/imx8_mu.h
index edcac7bf3d..7885219b70 100644
--- a/plat/imx/common/sci/imx8_mu.h
+++ b/plat/imx/common/sci/imx8_mu.h
@@ -13,7 +13,7 @@
#define MU_TR_COUNT1 4
#define MU_RR_COUNT1 4
-#define MU_CR_GIEn_MASK1 (0xF << 28)
+#define MU_CR_GIEn_MASK1 (0xFu << 28)
#define MU_CR_RIEn_MASK1 (0xF << 24)
#define MU_CR_TIEn_MASK1 (0xF << 20)
#define MU_CR_GIRn_MASK1 (0xF << 16)
@@ -23,7 +23,7 @@
#define MU_SR_TE0_MASK1 (1 << 23)
#define MU_SR_RF0_MASK1 (1 << 27)
#define MU_CR_RIE0_MASK1 (1 << 27)
-#define MU_CR_GIE0_MASK1 (1 << 31)
+#define MU_CR_GIE0_MASK1 (1U << 31)
#define MU_TR_COUNT 4
#define MU_RR_COUNT 4