summaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/asm.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/include/asm/asm.h')
-rw-r--r--arch/mips/include/asm/asm.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/mips/include/asm/asm.h b/arch/mips/include/asm/asm.h
index 7a23f4ed82..7d2b673bd9 100644
--- a/arch/mips/include/asm/asm.h
+++ b/arch/mips/include/asm/asm.h
@@ -106,6 +106,26 @@ __error: \
nop;
/*
+ * STOP_WITH_DEBUG_EVENT - Stop code execution by triggering
+ * Software Debug Breakpoint. It is needed stop CPU and
+ * notify debugger (for example OpenOCD) about break point event.
+ * It should allow to simplify bootstrapping a system over JTAG.
+ */
+#define STOP_WITH_DEBUG_EVENT \
+ /* trigger a soft breakpoint for OpenOCD */ \
+ SDBBP; \
+ /* position independent variant of dead loop */ \
+ __error: \
+ b __error; \
+ nop; \
+ /* Call some code from .text section. \
+ * It is needed to keep same linker script for \
+ * all images. */ \
+ la v0, mips_dead_end; \
+ jal v0; \
+ nop;
+
+/*
* FEXPORT - export definition of a function symbol
*/
#define FEXPORT(symbol) \