Skip to contentSkip to conversation

arm: handy macro to force a break point in the Fast Model.

PATCH In review Ian Campbell 1 participant 2 messages Jul 23, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: handy macro to force a break point in the Fast Model.

---
 xen/include/asm-arm/debugger.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
xen/include/asm-arm/debugger.h +7 -0
index 452613a..8c6f527 100644
@@ -4,6 +4,13 @@
 #define debugger_trap_fatal(v, r) ((void) 0)
 #define debugger_trap_immediate() ((void) 0)
 
+/* Trigger a break point in the fast model... */
+#define MODEL_BKPT() asm volatile(\
+       "mov r0, #0x18;\n /* angel_SWIreason_ReportException */\n"\
+       "mov r1, #0x20000;/* 0x20020= ADP_Stopped_BreakPoint */\n"\
+       "orr r1, r1, #0x20;\n"\
+       "swi 0x123456;\n" ::: "r0", "r1")
+
 #endif /* __ARM_DEBUGGER_H__ */
 /*
  * Local variables:
Signature · 1 line
1.7.9.1
#1 lore raw
Quoted 1 line · Ian Campbell

Just sending this for the benefit of the archives, not really worth applying, I don't think.

Quoted 22 lines
---
 xen/include/asm-arm/debugger.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
xen/include/asm-arm/debugger.h +7 -0
index 452613a..8c6f527 100644
@@ -4,6 +4,13 @@
 #define debugger_trap_fatal(v, r) ((void) 0)
 #define debugger_trap_immediate() ((void) 0)
 
+/* Trigger a break point in the fast model... */
+#define MODEL_BKPT() asm volatile(\
+       "mov r0, #0x18;\n /* angel_SWIreason_ReportException */\n"\
+       "mov r1, #0x20000;/* 0x20020= ADP_Stopped_BreakPoint */\n"\
+       "orr r1, r1, #0x20;\n"\
+       "swi 0x123456;\n" ::: "r0", "r1")
+
 #endif /* __ARM_DEBUGGER_H__ */
 /*
  * Local variables: