From 1f4619796af5baf4b41b5723bbf708355f8597fa Mon Sep 17 00:00:00 2001 From: Justin Chadwell Date: Tue, 20 Aug 2019 11:01:52 +0100 Subject: Add UBSAN support and handlers This patch adds support for the Undefined Behaviour sanitizer. There are two types of support offered - minimalistic trapping support which essentially immediately crashes on undefined behaviour and full support with full debug messages. The full support relies on ubsan.c which has been adapted from code used by OPTEE. Change-Id: I417c810f4fc43dcb56db6a6a555bfd0b38440727 Signed-off-by: Justin Chadwell --- include/arch/aarch64/arch.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/arch/aarch64/arch.h b/include/arch/aarch64/arch.h index 5f84eced..0a26fab1 100644 --- a/include/arch/aarch64/arch.h +++ b/include/arch/aarch64/arch.h @@ -598,6 +598,8 @@ #define ESR_EC_SHIFT U(26) #define ESR_EC_MASK U(0x3f) #define ESR_EC_LENGTH U(6) +#define ESR_ISS_SHIFT U(0) +#define ESR_ISS_LENGTH U(25) #define EC_UNKNOWN U(0x0) #define EC_WFE_WFI U(0x1) #define EC_AARCH32_CP15_MRC_MCR U(0x3) @@ -624,6 +626,7 @@ #define EC_AARCH32_FP U(0x28) #define EC_AARCH64_FP U(0x2c) #define EC_SERROR U(0x2f) +#define EC_BRK U(0x3c) /* * External Abort bit in Instruction and Data Aborts synchronous exception -- cgit v1.2.3