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 static inline void arch_kgdb_breakpoint(void)
131 #define BREAK_INSTR_SIZE 2
132 #define CACHE_FLUSH_IS_SAFE 1
133 #define HW_INST_WATCHPOINT_NUM 6
134 #define HW_WATCHPOINT_NUM 8
135 #define TYPE_INST_WATCHPOINT 0
136 #define TYPE_DATA_WATCHPOINT 1
138 /* Instruction watchpoint address control register bits mask */
141 #define WPIRINV01 0x4
144 #define WPICNTEN0 0x20
145 #define WPICNTEN1 0x40
148 #define WPIREN23 0x200
149 #define WPIRINV23 0x400
150 #define WPIAEN2 0x800
151 #define WPIAEN3 0x1000
152 #define WPICNTEN2 0x2000
153 #define WPICNTEN3 0x4000
154 #define EMUSW2 0x8000
155 #define EMUSW3 0x10000
156 #define WPIREN45 0x20000
157 #define WPIRINV45 0x40000
158 #define WPIAEN4 0x80000
159 #define WPIAEN5 0x100000
160 #define WPICNTEN4 0x200000
161 #define WPICNTEN5 0x400000
162 #define EMUSW4 0x800000
163 #define EMUSW5 0x1000000
164 #define WPAND 0x2000000
166 /* Data watchpoint address control register bits mask */
168 #define WPDRINV01 0x2
171 #define WPDCNTEN0 0x10
172 #define WPDCNTEN1 0x20
175 #define WPDACC0_OFFSET 8
176 #define WPDSRC1 0xc00
177 #define WPDACC1_OFFSET 12
179 /* Watchpoint status register bits mask */