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__
12 #define KGDB_MAX_NO_CPUS 8
15 * BUFMAX defines the maximum number of characters in inbound/outbound buffers.
16 * At least NUMREGBYTES*2 are needed for register packets.
17 * Longer buffer is needed to list all threads.
77 /* Pseudo Registers */
80 BFIN_EXTRA1, /* Address of .text section. */
81 BFIN_EXTRA2, /* Address of .data section. */
82 BFIN_EXTRA3, /* Address of .bss section. */
89 /* LAST ENTRY SHOULD NOT BE CHANGED. */
90 BFIN_NUM_REGS /* The number of all registers. */
93 /* Number of bytes of registers. */
94 #define NUMREGBYTES (BFIN_NUM_REGS * 4)
96 static inline void arch_kgdb_breakpoint(void)
98 asm volatile ("EXCPT 2;");
100 #define BREAK_INSTR_SIZE 2
101 #define CACHE_FLUSH_IS_SAFE 1
102 #define GDB_ADJUSTS_BREAK_OFFSET
103 #define GDB_SKIP_HW_WATCH_TEST
104 #define HW_INST_WATCHPOINT_NUM 6
105 #define HW_WATCHPOINT_NUM 8
106 #define TYPE_INST_WATCHPOINT 0
107 #define TYPE_DATA_WATCHPOINT 1
109 /* Instruction watchpoint address control register bits mask */
112 #define WPIRINV01 0x4
115 #define WPICNTEN0 0x20
116 #define WPICNTEN1 0x40
119 #define WPIREN23 0x200
120 #define WPIRINV23 0x400
121 #define WPIAEN2 0x800
122 #define WPIAEN3 0x1000
123 #define WPICNTEN2 0x2000
124 #define WPICNTEN3 0x4000
125 #define EMUSW2 0x8000
126 #define EMUSW3 0x10000
127 #define WPIREN45 0x20000
128 #define WPIRINV45 0x40000
129 #define WPIAEN4 0x80000
130 #define WPIAEN5 0x100000
131 #define WPICNTEN4 0x200000
132 #define WPICNTEN5 0x400000
133 #define EMUSW4 0x800000
134 #define EMUSW5 0x1000000
135 #define WPAND 0x2000000
137 /* Data watchpoint address control register bits mask */
139 #define WPDRINV01 0x2
142 #define WPDCNTEN0 0x10
143 #define WPDCNTEN1 0x20
146 #define WPDACC0_OFFSET 8
147 #define WPDSRC1 0xc00
148 #define WPDACC1_OFFSET 12
150 /* Watchpoint status register bits mask */