![]() |
|
|||
0001 /* 0002 * The PowerPC (32/64) specific defines / externs for KGDB. Based on 0003 * the previous 32bit and 64bit specific files, which had the following 0004 * copyrights: 0005 * 0006 * PPC64 Mods (C) 2005 Frank Rowand (frowand@mvista.com) 0007 * PPC Mods (C) 2004 Tom Rini (trini@mvista.com) 0008 * PPC Mods (C) 2003 John Whitney (john.whitney@timesys.com) 0009 * PPC Mods (C) 1998 Michael Tesch (tesch@cs.wisc.edu) 0010 * 0011 * 0012 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 0013 * Author: Tom Rini <trini@kernel.crashing.org> 0014 * 0015 * 2006 (c) MontaVista Software, Inc. This file is licensed under 0016 * the terms of the GNU General Public License version 2. This program 0017 * is licensed "as is" without any warranty of any kind, whether express 0018 * or implied. 0019 */ 0020 #ifdef __KERNEL__ 0021 #ifndef __POWERPC_KGDB_H__ 0022 #define __POWERPC_KGDB_H__ 0023 0024 #ifndef __ASSEMBLY__ 0025 0026 #define BREAK_INSTR_SIZE 4 0027 #define BUFMAX ((NUMREGBYTES * 2) + 512) 0028 #define OUTBUFMAX ((NUMREGBYTES * 2) + 512) 0029 0030 #define BREAK_INSTR 0x7d821008 /* twge r2, r2 */ 0031 0032 static inline void arch_kgdb_breakpoint(void) 0033 { 0034 asm(stringify_in_c(.long BREAK_INSTR)); 0035 } 0036 #define CACHE_FLUSH_IS_SAFE 1 0037 #define DBG_MAX_REG_NUM 70 0038 0039 /* The number bytes of registers we have to save depends on a few 0040 * things. For 64bit we default to not including vector registers and 0041 * vector state registers. */ 0042 #ifdef CONFIG_PPC64 0043 /* 0044 * 64 bit (8 byte) registers: 0045 * 32 gpr, 32 fpr, nip, msr, link, ctr 0046 * 32 bit (4 byte) registers: 0047 * ccr, xer, fpscr 0048 */ 0049 #define NUMREGBYTES ((68 * 8) + (3 * 4)) 0050 #define NUMCRITREGBYTES 184 0051 #else /* CONFIG_PPC32 */ 0052 /* On non-E500 family PPC32 we determine the size by picking the last 0053 * register we need, but on E500 we skip sections so we list what we 0054 * need to store, and add it up. */ 0055 #ifndef CONFIG_E500 0056 #define MAXREG (PT_FPSCR+1) 0057 #else 0058 /* 32 GPRs (8 bytes), nip, msr, ccr, link, ctr, xer, acc (8 bytes), spefscr*/ 0059 #define MAXREG ((32*2)+6+2+1) 0060 #endif 0061 #define NUMREGBYTES (MAXREG * sizeof(int)) 0062 /* CR/LR, R1, R2, R13-R31 inclusive. */ 0063 #define NUMCRITREGBYTES (23 * sizeof(int)) 0064 #endif /* 32/64 */ 0065 #endif /* !(__ASSEMBLY__) */ 0066 #endif /* !__POWERPC_KGDB_H__ */ 0067 #endif /* __KERNEL__ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |