From 85e93ba0933d8f2d3f832f8a64602eaabb520c1f Mon Sep 17 00:00:00 2001 From: dp-arm Date: Wed, 8 Feb 2017 11:51:50 +0000 Subject: Disable secure self-hosted debug via MDCR_EL3/SDCR Trusted Firmware currently has no support for secure self-hosted debug. To avoid unexpected exceptions, disable software debug exceptions, other than software breakpoint instruction exceptions, from all exception levels in secure state. This applies to both AArch32 and AArch64 EL3 initialization. Change-Id: Id097e54a6bbcd0ca6a2be930df5d860d8d09e777 Signed-off-by: dp-arm --- include/common/aarch32/el3_common_macros.S | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/common/aarch32') diff --git a/include/common/aarch32/el3_common_macros.S b/include/common/aarch32/el3_common_macros.S index 463a0806..f6b7527e 100644 --- a/include/common/aarch32/el3_common_macros.S +++ b/include/common/aarch32/el3_common_macros.S @@ -98,6 +98,11 @@ orr r0, r0, #FPEXC_EN_BIT vmsr FPEXC, r0 isb + + /* Disable secure self-hosted invasive debug. */ + ldr r0, =SDCR_DEF_VAL + stcopr r0, SDCR + .endm /* ----------------------------------------------------------------------------- -- cgit v1.2.3