summaryrefslogtreecommitdiff
path: root/include/lib/aarch64
diff options
context:
space:
mode:
authordp-arm <dimitris.papastamos@arm.com>2017-02-08 11:51:50 +0000
committerdp-arm <dimitris.papastamos@arm.com>2017-02-15 09:37:33 +0000
commit85e93ba0933d8f2d3f832f8a64602eaabb520c1f (patch)
tree8e99b71db73bedab047bc700ad1ecb4c066e760b /include/lib/aarch64
parent4d07e7821e19dc1ebc640f5264c2a769354c8b2d (diff)
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 <dimitris.papastamos@arm.com>
Diffstat (limited to 'include/lib/aarch64')
-rw-r--r--include/lib/aarch64/arch.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/lib/aarch64/arch.h b/include/lib/aarch64/arch.h
index 3f718248..5876ce81 100644
--- a/include/lib/aarch64/arch.h
+++ b/include/lib/aarch64/arch.h
@@ -195,6 +195,15 @@
#define SCR_NS_BIT (1 << 0)
#define SCR_VALID_BIT_MASK 0x2f8f
+/* MDCR definitions */
+#define MDCR_SPD32(x) ((x) << 14)
+#define MDCR_SPD32_LEGACY 0x0
+#define MDCR_SPD32_DISABLE 0x2
+#define MDCR_SPD32_ENABLE 0x3
+#define MDCR_SDD_BIT (1 << 16)
+
+#define MDCR_DEF_VAL (MDCR_SDD_BIT | MDCR_SPD32(MDCR_SPD32_DISABLE))
+
/* HCR definitions */
#define HCR_RW_BIT (1ull << 31)
#define HCR_AMO_BIT (1 << 5)