summaryrefslogtreecommitdiff
path: root/target-arm/internals.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-09-29 18:48:46 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-09-29 18:48:46 +0100
commit0eacea706060f9c53998896696b5f94cf49b8f03 (patch)
tree91e8570b960d11167e8fded480262493dea5f23c /target-arm/internals.h
parent46747d15080a93cc82cac563c1b7b8ffef164bb5 (diff)
downloadqemu-0eacea706060f9c53998896696b5f94cf49b8f03.tar.gz
target-arm: Implement handling of breakpoint firing
Implement handling of breakpoint event firing to correctly inject the debug exception into the guest. Since the breakpoint and watchpoint control register format is very similar we adjust wp_matches() to also handle breakpoints as well rather than using a separate function. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1410523465-13400-3-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'target-arm/internals.h')
-rw-r--r--target-arm/internals.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/target-arm/internals.h b/target-arm/internals.h
index b7e4822dc7..986a7b1817 100644
--- a/target-arm/internals.h
+++ b/target-arm/internals.h
@@ -313,6 +313,12 @@ static inline uint32_t syn_watchpoint(int same_el, int cm, int wnr)
| (cm << 8) | (wnr << 6) | 0x22;
}
+static inline uint32_t syn_breakpoint(int same_el)
+{
+ return (EC_BREAKPOINT << ARM_EL_EC_SHIFT) | (same_el << ARM_EL_EC_SHIFT)
+ | ARM_EL_IL | 0x22;
+}
+
/* Update a QEMU watchpoint based on the information the guest has set in the
* DBGWCR<n>_EL1 and DBGWVR<n>_EL1 registers.
*/