diff options
author | Christopher Covington <cov@codeaurora.org> | 2014-01-29 16:01:31 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-02-10 06:48:05 -0500 |
commit | 5b61d4a5d6676b5bb4c3c101683d3c7fd0df2a38 (patch) | |
tree | f1c40d311e09ca9bee983ba1cd8fe0f0c27ad479 | |
parent | 889f172d920b6f275408199ec836df62979bcd52 (diff) |
ARM: 7948/1: hw_breakpoint: Add ARMv8 support
Add the trivial support necessary to get hardware breakpoints
working for GDB on ARMv8 simulators running in AArch32 mode.
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Christopher Covington <cov@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/include/asm/hw_breakpoint.h | 1 | ||||
-rw-r--r-- | arch/arm/kernel/hw_breakpoint.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/include/asm/hw_breakpoint.h b/arch/arm/include/asm/hw_breakpoint.h index eef55ea9ef00..8e427c7b4425 100644 --- a/arch/arm/include/asm/hw_breakpoint.h +++ b/arch/arm/include/asm/hw_breakpoint.h | |||
@@ -51,6 +51,7 @@ static inline void decode_ctrl_reg(u32 reg, | |||
51 | #define ARM_DEBUG_ARCH_V7_ECP14 3 | 51 | #define ARM_DEBUG_ARCH_V7_ECP14 3 |
52 | #define ARM_DEBUG_ARCH_V7_MM 4 | 52 | #define ARM_DEBUG_ARCH_V7_MM 4 |
53 | #define ARM_DEBUG_ARCH_V7_1 5 | 53 | #define ARM_DEBUG_ARCH_V7_1 5 |
54 | #define ARM_DEBUG_ARCH_V8 6 | ||
54 | 55 | ||
55 | /* Breakpoint */ | 56 | /* Breakpoint */ |
56 | #define ARM_BREAKPOINT_EXECUTE 0 | 57 | #define ARM_BREAKPOINT_EXECUTE 0 |
diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c index 3d446605cbf8..9da35c6d3411 100644 --- a/arch/arm/kernel/hw_breakpoint.c +++ b/arch/arm/kernel/hw_breakpoint.c | |||
@@ -167,7 +167,7 @@ static int debug_arch_supported(void) | |||
167 | /* Can we determine the watchpoint access type from the fsr? */ | 167 | /* Can we determine the watchpoint access type from the fsr? */ |
168 | static int debug_exception_updates_fsr(void) | 168 | static int debug_exception_updates_fsr(void) |
169 | { | 169 | { |
170 | return 0; | 170 | return get_debug_arch() >= ARM_DEBUG_ARCH_V8; |
171 | } | 171 | } |
172 | 172 | ||
173 | /* Determine number of WRP registers available. */ | 173 | /* Determine number of WRP registers available. */ |
@@ -257,6 +257,7 @@ static int enable_monitor_mode(void) | |||
257 | break; | 257 | break; |
258 | case ARM_DEBUG_ARCH_V7_ECP14: | 258 | case ARM_DEBUG_ARCH_V7_ECP14: |
259 | case ARM_DEBUG_ARCH_V7_1: | 259 | case ARM_DEBUG_ARCH_V7_1: |
260 | case ARM_DEBUG_ARCH_V8: | ||
260 | ARM_DBG_WRITE(c0, c2, 2, (dscr | ARM_DSCR_MDBGEN)); | 261 | ARM_DBG_WRITE(c0, c2, 2, (dscr | ARM_DSCR_MDBGEN)); |
261 | isb(); | 262 | isb(); |
262 | break; | 263 | break; |