1 /* Blackfin KGDB header
3 * Copyright 2005-2009 Analog Devices Inc.
5 * Licensed under the GPL-2 or later.
8 #ifndef __ASM_BLACKFIN_KGDB_H__
9 #define __ASM_BLACKFIN_KGDB_H__
11 #include <linux/ptrace.h>
14 * BUFMAX defines the maximum number of characters in inbound/outbound buffers.
15 * At least NUMREGBYTES*2 are needed for register packets.
16 * Longer buffer is needed to list all threads.
21 * Note that this register image is different from
22 * the register image that Linux produces at interrupt time.
24 * Linux's register image is defined by struct pt_regs in ptrace.h.
82 /* Pseudo Registers */
85 BFIN_EXTRA1
, /* Address of .text section. */
86 BFIN_EXTRA2
, /* Address of .data section. */
87 BFIN_EXTRA3
, /* Address of .bss section. */
94 /* LAST ENTRY SHOULD NOT BE CHANGED. */
95 BFIN_NUM_REGS
/* The number of all registers. */
98 /* Number of bytes of registers. */
99 #define NUMREGBYTES BFIN_NUM_REGS*4
101 static inline void arch_kgdb_breakpoint(void)
105 #define BREAK_INSTR_SIZE 2
107 # define CACHE_FLUSH_IS_SAFE 0
109 # define CACHE_FLUSH_IS_SAFE 1
111 #define GDB_ADJUSTS_BREAK_OFFSET
112 #define HW_INST_WATCHPOINT_NUM 6
113 #define HW_WATCHPOINT_NUM 8
114 #define TYPE_INST_WATCHPOINT 0
115 #define TYPE_DATA_WATCHPOINT 1
117 /* Instruction watchpoint address control register bits mask */
120 #define WPIRINV01 0x4
123 #define WPICNTEN0 0x20
124 #define WPICNTEN1 0x40
127 #define WPIREN23 0x200
128 #define WPIRINV23 0x400
129 #define WPIAEN2 0x800
130 #define WPIAEN3 0x1000
131 #define WPICNTEN2 0x2000
132 #define WPICNTEN3 0x4000
133 #define EMUSW2 0x8000
134 #define EMUSW3 0x10000
135 #define WPIREN45 0x20000
136 #define WPIRINV45 0x40000
137 #define WPIAEN4 0x80000
138 #define WPIAEN5 0x100000
139 #define WPICNTEN4 0x200000
140 #define WPICNTEN5 0x400000
141 #define EMUSW4 0x800000
142 #define EMUSW5 0x1000000
143 #define WPAND 0x2000000
145 /* Data watchpoint address control register bits mask */
147 #define WPDRINV01 0x2
150 #define WPDCNTEN0 0x10
151 #define WPDCNTEN1 0x20
154 #define WPDACC0_OFFSET 8
155 #define WPDSRC1 0xc00
156 #define WPDACC1_OFFSET 12
158 /* Watchpoint status register bits mask */