From aaaf00a257488d2b6fbf8a4e842e1333529c704c Mon Sep 17 00:00:00 2001 From: Jerome Forissier Date: Thu, 8 Jun 2017 15:51:45 +0200 Subject: core: arm: make alignment check configurable We occasionally get reports from people stumbling upon data abort exceptions caused by alignment faults in TAs. The recommended fix is to change the code so that the unaligned access won't occur. But it is sometimes difficult to achieve. Therefore we provide a compile-time option to disable alignment checks. For AArch64 it applies to both SEL1 and SEL0. Signed-off-by: Jerome Forissier Tested-by: Jerome Forissier (HiKey) Acked-by: Jens Wiklander --- core/arch/arm/arm.mk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/arch/arm/arm.mk') diff --git a/core/arch/arm/arm.mk b/core/arch/arm/arm.mk index 13361d8a..40253d06 100644 --- a/core/arch/arm/arm.mk +++ b/core/arch/arm/arm.mk @@ -31,6 +31,8 @@ CFG_CORE_RODATA_NOEXEC ?= n ifeq ($(CFG_CORE_RODATA_NOEXEC),y) $(call force,CFG_CORE_RWDATA_NOEXEC,y) endif +# 'y' to set the Alignment Check Enable bit in SCTLR/SCTLR_EL1, 'n' to clear it +CFG_SCTLR_ALIGNMENT_CHECK ?= y ifeq ($(CFG_WITH_PAGER),y) ifeq ($(CFG_CORE_SANITIZE_KADDRESS),y) -- cgit v1.2.3