2 * linux/arch/arm/kernel/debug.S
4 * Copyright (C) 1994-1999 Russell King
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * 32-bit debugging code
12 #include <linux/linkage.h>
13 #include <asm/assembler.h>
18 * Some debugging routines (useful if you've got MM problems and
19 * printk isn't working). For DEBUGGING ONLY!!! Do not leave
20 * references to these in a production kernel!
23 #if !defined(CONFIG_DEBUG_SEMIHOSTING)
24 #include CONFIG_DEBUG_LL_INCLUDE
28 .macro addruart_current, rx, tmp1, tmp2
29 addruart \tmp1, \tmp2, \rx
30 mrc p15, 0, \rx, c1, c0
36 #else /* !CONFIG_MMU */
37 .macro addruart_current, rx, tmp1, tmp2
38 addruart \rx, \tmp1, \tmp2
41 #endif /* CONFIG_MMU */
44 * Useful debugging routines
58 printhex: adr r2, hexbuf
66 addge r1, r1, #'a' - 10
78 #ifndef CONFIG_DEBUG_SEMIHOSTING
81 addruart_current r3, r1, r2
97 addruart_current r3, r1, r2
109 ENDPROC(debug_ll_addr)
116 mov r0, #0x04 @ SYS_WRITE0
125 mov r0, #0x03 @ SYS_WRITEC
136 ENDPROC(debug_ll_addr)