~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm64/include/asm/kgdb.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/arm64/include/asm/kgdb.h (Architecture alpha) and /arch/ppc/include/asm-ppc/kgdb.h (Architecture ppc)


  1 /* SPDX-License-Identifier: GPL-2.0-only */         1 
  2 /*                                                
  3  * AArch64 KGDB support                           
  4  *                                                
  5  * Based on arch/arm/include/kgdb.h               
  6  *                                                
  7  * Copyright (C) 2013 Cavium Inc.                 
  8  * Author: Vijaya Kumar K <vijaya.kumar@cavium    
  9  */                                               
 10                                                   
 11 #ifndef __ARM_KGDB_H                              
 12 #define __ARM_KGDB_H                              
 13                                                   
 14 #include <linux/ptrace.h>                         
 15 #include <asm/debug-monitors.h>                   
 16                                                   
 17 #ifndef __ASSEMBLY__                              
 18                                                   
 19 static inline void arch_kgdb_breakpoint(void)     
 20 {                                                 
 21         asm ("brk %0" : : "I" (KGDB_COMPILED_D    
 22 }                                                 
 23                                                   
 24 extern void kgdb_handle_bus_error(void);          
 25 extern int kgdb_fault_expected;                   
 26                                                   
 27 #endif /* !__ASSEMBLY__ */                        
 28                                                   
 29 /*                                                
 30  * gdb remote procotol (well most versions of     
 31  * register layout.                               
 32  *                                                
 33  * General purpose regs:                          
 34  *     r0-r30: 64 bit                             
 35  *     sp,pc : 64 bit                             
 36  *     pstate  : 32 bit                           
 37  *     Total: 33 + 1                              
 38  * FPU regs:                                      
 39  *     f0-f31: 128 bit                            
 40  *     fpsr & fpcr: 32 bit                        
 41  *     Total: 32 + 2                              
 42  *                                                
 43  * To expand a little on the "most versions of    
 44  * protocol for AArch64 was developed it depen    
 45  * Architecture Reference Manual that claimed     
 46  * and, as a result, allocated only 32-bits fo    
 47  * protocol. In fact this statement is still p    
 48  *                                                
 49  * Unfortunately "is a 32-bit register" has a     
 50  * system registers. It means that "the upper     
 51  * RES0.". RES0 is heavily used in the ARM arc    
 52  * way to leave space for future architecture     
 53  * little for people who don't spend their spa    
 54  * manuals, what "is a 32-bit register" actual    
 55  * "is a 64-bit register but one with no meani    
 56  * upper 32-bits... *yet*".                       
 57  *                                                
 58  * Perhaps then we should not be surprised tha    
 59  * confusion. Specifically a patch, influenced    
 60  * that extended PSTATE to 64-bit was accepted    
 61  * was reverted in gdb-7.8.1 and all later rel    
 62  * discovered to be an undocumented protocol c    
 63  *                                                
 64  * So... it is *not* wrong for us to only allo    
 65  * here even though the kernel itself allocate    
 66  * state. That is because this bit of code tel    
 67  * remote protocol (well most versions of it)     
 68  *                                                
 69  * Note that if you are using one of the versi    
 70  * the gdb-7.7 version of the protocol you can    
 71  * without providing a custom register descrip    
 72  * protocol descriptions at runtime).             
 73  */                                               
 74                                                   
 75 #define _GP_REGS                33                
 76 #define _FP_REGS                32                
 77 #define _EXTRA_REGS             3                 
 78 /*                                                
 79  * general purpose registers size in bytes.       
 80  * pstate is only 4 bytes. subtract 4 bytes       
 81  */                                               
 82 #define GP_REG_BYTES            (_GP_REGS * 8)    
 83 #define DBG_MAX_REG_NUM         (_GP_REGS + _F    
 84                                                   
 85 /*                                                
 86  * Size of I/O buffer for gdb packet.             
 87  * considering to hold all register contents,     
 88  */                                               
 89                                                   
 90 #define BUFMAX                  2048              
 91                                                   
 92 /*                                                
 93  * Number of bytes required for gdb_regs buffe    
 94  * _GP_REGS: 8 bytes, _FP_REGS: 16 bytes and _    
 95  * GDB fails to connect for size beyond this w    
 96  * "'g' packet reply is too long"                 
 97  */                                               
 98                                                   
 99 #define NUMREGBYTES     ((_GP_REGS * 8) + (_FP    
100                         (_EXTRA_REGS * 4))        
101                                                   
102 #endif /* __ASM_KGDB_H */                         
103                                                   

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php