1 ###############################################################################
3 # MN10300 Low-level gdbstub routines
5 # Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
6 # Written by David Howells (dhowells@redhat.com)
8 # This program is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public Licence
10 # as published by the Free Software Foundation; either version
11 # 2 of the Licence, or (at your option) any later version.
13 ###############################################################################
14 #include <linux/sys.h>
15 #include <linux/linkage.h>
17 #include <asm/cache.h>
18 #include <asm/cpu-regs.h>
19 #include <asm/exceptions.h>
20 #include <asm/frame.inc>
21 #include <asm/serial-regs.h>
25 ###############################################################################
27 # GDB stub read memory with guard
28 # - D0 holds the memory address to read
29 # - D1 holds the address to store the byte into
31 ###############################################################################
32 .globl gdbstub_read_byte_guard
33 .globl gdbstub_read_byte_cont
34 ENTRY(gdbstub_read_byte)
38 gdbstub_read_byte_guard:
40 gdbstub_read_byte_cont:
44 .globl gdbstub_read_word_guard
45 .globl gdbstub_read_word_cont
46 ENTRY(gdbstub_read_word)
50 gdbstub_read_word_guard:
52 gdbstub_read_word_cont:
56 .globl gdbstub_read_dword_guard
57 .globl gdbstub_read_dword_cont
58 ENTRY(gdbstub_read_dword)
62 gdbstub_read_dword_guard:
64 gdbstub_read_dword_cont:
68 ###############################################################################
70 # GDB stub write memory with guard
71 # - D0 holds the byte to store
72 # - D1 holds the memory address to write
74 ###############################################################################
75 .globl gdbstub_write_byte_guard
76 .globl gdbstub_write_byte_cont
77 ENTRY(gdbstub_write_byte)
81 gdbstub_write_byte_guard:
83 gdbstub_write_byte_cont:
86 .globl gdbstub_write_word_guard
87 .globl gdbstub_write_word_cont
88 ENTRY(gdbstub_write_word)
92 gdbstub_write_word_guard:
94 gdbstub_write_word_cont:
97 .globl gdbstub_write_dword_guard
98 .globl gdbstub_write_dword_cont
99 ENTRY(gdbstub_write_dword)
103 gdbstub_write_dword_guard:
105 gdbstub_write_dword_cont:
108 ###############################################################################
110 # GDB stub BUG() trap
112 ###############################################################################
113 ENTRY(__gdbstub_bug_trap)
114 .byte 0xF7,0xF7 # don't use 0xFF as the JTAG unit preempts that