/* Kernel debugger for MN103001*2* Copyright (C) 2010 Red Hat, Inc. All Rights Reserved.3* Written by David Howells ([email protected])4*5* This program is free software; you can redistribute it and/or6* modify it under the terms of the GNU General Public Licence7* as published by the Free Software Foundation; either version8* 2 of the Licence, or (at your option) any later version.9*/1011#ifndef _ASM_KGDB_H12#define _ASM_KGDB_H1314/*15* BUFMAX defines the maximum number of characters in inbound/outbound16* buffers at least NUMREGBYTES*2 are needed for register packets17* Longer buffer is needed to list all threads18*/19#define BUFMAX 10242021/*22* Note that this register image is in a different order than the register23* image that Linux produces at interrupt time.24*/25enum regnames {26GDB_FR_D0 = 0,27GDB_FR_D1 = 1,28GDB_FR_D2 = 2,29GDB_FR_D3 = 3,30GDB_FR_A0 = 4,31GDB_FR_A1 = 5,32GDB_FR_A2 = 6,33GDB_FR_A3 = 7,3435GDB_FR_SP = 8,36GDB_FR_PC = 9,37GDB_FR_MDR = 10,38GDB_FR_EPSW = 11,39GDB_FR_LIR = 12,40GDB_FR_LAR = 13,41GDB_FR_MDRQ = 14,4243GDB_FR_E0 = 15,44GDB_FR_E1 = 16,45GDB_FR_E2 = 17,46GDB_FR_E3 = 18,47GDB_FR_E4 = 19,48GDB_FR_E5 = 20,49GDB_FR_E6 = 21,50GDB_FR_E7 = 22,5152GDB_FR_SSP = 23,53GDB_FR_MSP = 24,54GDB_FR_USP = 25,55GDB_FR_MCRH = 26,56GDB_FR_MCRL = 27,57GDB_FR_MCVF = 28,5859GDB_FR_FPCR = 29,60GDB_FR_DUMMY0 = 30,61GDB_FR_DUMMY1 = 31,6263GDB_FR_FS0 = 32,6465GDB_FR_SIZE = 64,66};6768#define GDB_ORIG_D0 4169#define NUMREGBYTES (GDB_FR_SIZE*4)7071static inline void arch_kgdb_breakpoint(void)72{73asm(".globl __arch_kgdb_breakpoint; __arch_kgdb_breakpoint: break");74}75extern u8 __arch_kgdb_breakpoint;7677#define BREAK_INSTR_SIZE 178#define CACHE_FLUSH_IS_SAFE 17980#endif /* _ASM_KGDB_H */818283