linux/arch/microblaze/include/asm/kgdb.h
Michal Simek 2d5973cb5a microblaze: Add KGDB support
Kgdb uses brki r16, 0x18 instruction to call
low level _debug_exception function which save
current state to pt_regs and call microblaze_kgdb_break
function. _debug_exception should be called only from
the kernel space. User space calling is not supported
because user application debugging uses different handling.

pt_regs_to_gdb_regs loads additional special registers
which can't be changed

 * Enable KGDB in Kconfig
 * Remove ancient not-tested KGDB support
 * Remove ancient _debug_exception code from entry.S

Only MMU KGDB support is supported.

Signed-off-by: Michal Simek <monstr@monstr.eu>
CC: Jason Wessel <jason.wessel@windriver.com>
CC: John Williams <john.williams@petalogix.com>
CC: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
CC: linux-kernel@vger.kernel.org
Acked-by: Jason Wessel <jason.wessel@windriver.com>
2010-08-04 10:45:17 +02:00

29 lines
622 B
C

#ifdef __KERNEL__
#ifndef __MICROBLAZE_KGDB_H__
#define __MICROBLAZE_KGDB_H__
#ifndef __ASSEMBLY__
#define CACHE_FLUSH_IS_SAFE 1
#define BUFMAX 2048
/*
* 32 32-bit general purpose registers (r0-r31)
* 6 32-bit special registers (pc, msr, ear, esr, fsr, btr)
* 12 32-bit PVR
* 7 32-bit MMU Regs (redr, rpid, rzpr, rtlbx, rtlbsx, rtlblo, rtlbhi)
* ------
* 57 registers
*/
#define NUMREGBYTES (57 * 4)
#define BREAK_INSTR_SIZE 4
static inline void arch_kgdb_breakpoint(void)
{
__asm__ __volatile__("brki r16, 0x18;");
}
#endif /* __ASSEMBLY__ */
#endif /* __MICROBLAZE_KGDB_H__ */
#endif /* __KERNEL__ */