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 #define KGDB_MAX_NO_CPUS 8
17 * BUFMAX defines the maximum number of characters in inbound/outbound buffers.
18 * At least NUMREGBYTES*2 are needed for register packets.
19 * Longer buffer is needed to list all threads.
24 * Note that this register image is different from
25 * the register image that Linux produces at interrupt time.
27 * Linux's register image is defined by struct pt_regs in ptrace.h.
85 /* Pseudo Registers */
88 BFIN_EXTRA1
, /* Address of .text section. */
89 BFIN_EXTRA2
, /* Address of .data section. */
90 BFIN_EXTRA3
, /* Address of .bss section. */
97 /* LAST ENTRY SHOULD NOT BE CHANGED. */
98 BFIN_NUM_REGS
/* The number of all registers. */
101 /* Number of bytes of registers. */
102 #define NUMREGBYTES BFIN_NUM_REGS*4
104 static inline void arch_kgdb_breakpoint(void)
108 #define BREAK_INSTR_SIZE 2
109 #define CACHE_FLUSH_IS_SAFE 1
110 #define HW_INST_WATCHPOINT_NUM 6
111 #define HW_WATCHPOINT_NUM 8
112 #define TYPE_INST_WATCHPOINT 0
113 #define TYPE_DATA_WATCHPOINT 1
115 /* Instruction watchpoint address control register bits mask */
118 #define WPIRINV01 0x4
121 #define WPICNTEN0 0x20
122 #define WPICNTEN1 0x40
125 #define WPIREN23 0x200
126 #define WPIRINV23 0x400
127 #define WPIAEN2 0x800
128 #define WPIAEN3 0x1000
129 #define WPICNTEN2 0x2000
130 #define WPICNTEN3 0x4000
131 #define EMUSW2 0x8000
132 #define EMUSW3 0x10000
133 #define WPIREN45 0x20000
134 #define WPIRINV45 0x40000
135 #define WPIAEN4 0x80000
136 #define WPIAEN5 0x100000
137 #define WPICNTEN4 0x200000
138 #define WPICNTEN5 0x400000
139 #define EMUSW4 0x800000
140 #define EMUSW5 0x1000000
141 #define WPAND 0x2000000
143 /* Data watchpoint address control register bits mask */
145 #define WPDRINV01 0x2
148 #define WPDCNTEN0 0x10
149 #define WPDCNTEN1 0x20
152 #define WPDACC0_OFFSET 8
153 #define WPDSRC1 0xc00
154 #define WPDACC1_OFFSET 12
156 /* Watchpoint status register bits mask */