2 * File: include/asm-blackfin/kgdb.h
9 * Rev: $Id: kgdb_bfin_linux-2.6.x.patch 4934 2007-02-13 09:32:11Z sonicz $
12 * Copyright 2005-2006 Analog Devices Inc.
14 * Bugs: Enter bugs at http://blackfin.uclinux.org/
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, see the file COPYING, or write
28 * to the Free Software Foundation, Inc.,
29 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
32 #ifndef __ASM_BLACKFIN_KGDB_H__
33 #define __ASM_BLACKFIN_KGDB_H__
35 #include <linux/ptrace.h>
38 #define KGDB_MAX_NO_CPUS 8
40 /************************************************************************/
41 /* BUFMAX defines the maximum number of characters in inbound/outbound buffers*/
42 /* at least NUMREGBYTES*2 are needed for register packets */
43 /* Longer buffer is needed to list all threads */
47 * Note that this register image is different from
48 * the register image that Linux produces at interrupt time.
50 * Linux's register image is defined by struct pt_regs in ptrace.h.
108 /* Pseudo Registers */
111 BFIN_EXTRA1
, /* Address of .text section. */
112 BFIN_EXTRA2
, /* Address of .data section. */
113 BFIN_EXTRA3
, /* Address of .bss section. */
120 /* LAST ENTRY SHOULD NOT BE CHANGED. */
121 BFIN_NUM_REGS
/* The number of all registers. */
124 /* Number of bytes of registers. */
125 #define NUMREGBYTES BFIN_NUM_REGS*4
127 #define BREAKPOINT() asm(" EXCPT 2;");
128 #define BREAK_INSTR_SIZE 2
129 #define HW_BREAKPOINT_NUM 6
131 /* Instruction watchpoint address control register bits mask */
134 #define WPIRINV01 0x4
137 #define WPICNTEN0 0x20
138 #define WPICNTEN1 0x40
141 #define WPIREN23 0x200
142 #define WPIRINV23 0x400
143 #define WPIAEN2 0x800
144 #define WPIAEN3 0x1000
145 #define WPICNTEN2 0x2000
146 #define WPICNTEN3 0x4000
147 #define EMUSW2 0x8000
148 #define EMUSW3 0x10000
149 #define WPIREN45 0x20000
150 #define WPIRINV45 0x40000
151 #define WPIAEN4 0x80000
152 #define WPIAEN5 0x100000
153 #define WPICNTEN4 0x200000
154 #define WPICNTEN5 0x400000
155 #define EMUSW4 0x800000
156 #define EMUSW5 0x1000000
157 #define WPAND 0x2000000
159 /* Data watchpoint address control register bits mask */
161 #define WPDRINV01 0x2
164 #define WPDCNTEN0 0x10
165 #define WPDCNTEN1 0x20
167 #define WPDACC0 0x300
168 #define WPDSRC1 0xc00
169 #define WPDACC1 0x3000
171 /* Watchpoint status register bits mask */
181 extern void kgdb_print(const char *fmt
, ...);
182 extern void init_kgdb_uart(void);