Skip to content

Commit

Permalink
Blackfin arch: add supporting for kgdb
Browse files Browse the repository at this point in the history
Signed-off-by: Sonic Zhang <[email protected]>
Signed-off-by: Bryan Wu <[email protected]>
  • Loading branch information
sonicz authored and Bryan Wu committed Oct 13, 2008
1 parent 5d2e321 commit a5ac012
Show file tree
Hide file tree
Showing 8 changed files with 606 additions and 350 deletions.
155 changes: 0 additions & 155 deletions Documentation/blackfin/kgdb.txt

This file was deleted.

3 changes: 3 additions & 0 deletions arch/blackfin/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ menu "Kernel hacking"

source "lib/Kconfig.debug"

config HAVE_ARCH_KGDB
def_bool y

config DEBUG_MMRS
bool "Generate Blackfin MMR tree"
select DEBUG_FS
Expand Down
21 changes: 13 additions & 8 deletions arch/blackfin/include/asm/kgdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,16 @@ enum regnames {
/* Number of bytes of registers. */
#define NUMREGBYTES BFIN_NUM_REGS*4

#define BREAKPOINT() asm(" EXCPT 2;");
#define BREAK_INSTR_SIZE 2
#define HW_BREAKPOINT_NUM 6
static inline void arch_kgdb_breakpoint(void)
{
asm(" EXCPT 2;");
}
#define BREAK_INSTR_SIZE 2
#define CACHE_FLUSH_IS_SAFE 1
#define HW_INST_WATCHPOINT_NUM 6
#define HW_WATCHPOINT_NUM 8
#define TYPE_INST_WATCHPOINT 0
#define TYPE_DATA_WATCHPOINT 1

/* Instruction watchpoint address control register bits mask */
#define WPPWR 0x1
Expand Down Expand Up @@ -163,10 +170,11 @@ enum regnames {
#define WPDAEN1 0x8
#define WPDCNTEN0 0x10
#define WPDCNTEN1 0x20

#define WPDSRC0 0xc0
#define WPDACC0 0x300
#define WPDACC0_OFFSET 8
#define WPDSRC1 0xc00
#define WPDACC1 0x3000
#define WPDACC1_OFFSET 12

/* Watchpoint status register bits mask */
#define STATIA0 0x1
Expand All @@ -178,7 +186,4 @@ enum regnames {
#define STATDA0 0x40
#define STATDA1 0x80

extern void kgdb_print(const char *fmt, ...);
extern void init_kgdb_uart(void);

#endif
Loading

0 comments on commit a5ac012

Please sign in to comment.