11da177e4SLinus Torvaldsmenu "Kernel hacking" 21da177e4SLinus Torvalds 31da177e4SLinus Torvaldssource "lib/Kconfig.debug" 41da177e4SLinus Torvalds 5087aaffcSNicolas Pitreconfig STRICT_DEVMEM 6087aaffcSNicolas Pitre bool "Filter access to /dev/mem" 7087aaffcSNicolas Pitre depends on MMU 8087aaffcSNicolas Pitre ---help--- 9087aaffcSNicolas Pitre If this option is disabled, you allow userspace (root) access to all 10087aaffcSNicolas Pitre of memory, including kernel and userspace memory. Accidental 11087aaffcSNicolas Pitre access to this is obviously disastrous, but specific access can 12087aaffcSNicolas Pitre be used by people debugging the kernel. 13087aaffcSNicolas Pitre 14087aaffcSNicolas Pitre If this option is switched on, the /dev/mem file only allows 15087aaffcSNicolas Pitre userspace access to memory mapped peripherals. 16087aaffcSNicolas Pitre 17087aaffcSNicolas Pitre If in doubt, say Y. 18087aaffcSNicolas Pitre 19adf8b37bSCatalin Marinas# RMK wants arm kernels compiled with frame pointers or stack unwinding. 201da177e4SLinus Torvalds# If you know what you are doing and are willing to live without stack 211da177e4SLinus Torvalds# traces, you can get a slightly smaller kernel by setting this option to 221da177e4SLinus Torvalds# n, but then RMK will have to kill you ;). 231da177e4SLinus Torvaldsconfig FRAME_POINTER 241da177e4SLinus Torvalds bool 2516c79651SCatalin Marinas depends on !THUMB2_KERNEL 260e341af8SRabin Vincent default y if !ARM_UNWIND || FUNCTION_GRAPH_TRACER 271da177e4SLinus Torvalds help 281da177e4SLinus Torvalds If you say N here, the resulting kernel will be slightly smaller and 29adf8b37bSCatalin Marinas faster. However, if neither FRAME_POINTER nor ARM_UNWIND are enabled, 30adf8b37bSCatalin Marinas when a problem occurs with the kernel, the information that is 31adf8b37bSCatalin Marinas reported is severely limited. 32adf8b37bSCatalin Marinas 33adf8b37bSCatalin Marinasconfig ARM_UNWIND 344a50bfe3SRussell King bool "Enable stack unwinding support (EXPERIMENTAL)" 35adf8b37bSCatalin Marinas depends on AEABI && EXPERIMENTAL 36adf8b37bSCatalin Marinas default y 37adf8b37bSCatalin Marinas help 38adf8b37bSCatalin Marinas This option enables stack unwinding support in the kernel 39adf8b37bSCatalin Marinas using the information automatically generated by the 40adf8b37bSCatalin Marinas compiler. The resulting kernel image is slightly bigger but 41adf8b37bSCatalin Marinas the performance is not affected. Currently, this feature 42adf8b37bSCatalin Marinas only works with EABI compilers. If unsure say Y. 431da177e4SLinus Torvalds 4409bfafacSRabin Vincentconfig OLD_MCOUNT 4509bfafacSRabin Vincent bool 4609bfafacSRabin Vincent depends on FUNCTION_TRACER && FRAME_POINTER 4709bfafacSRabin Vincent default y 4809bfafacSRabin Vincent 491da177e4SLinus Torvaldsconfig DEBUG_USER 501da177e4SLinus Torvalds bool "Verbose user fault messages" 511da177e4SLinus Torvalds help 521da177e4SLinus Torvalds When a user program crashes due to an exception, the kernel can 531da177e4SLinus Torvalds print a brief message explaining what the problem was. This is 541da177e4SLinus Torvalds sometimes helpful for debugging but serves no purpose on a 551da177e4SLinus Torvalds production system. Most people should say N here. 561da177e4SLinus Torvalds 571da177e4SLinus Torvalds In addition, you need to pass user_debug=N on the kernel command 581da177e4SLinus Torvalds line to enable this feature. N consists of the sum of: 591da177e4SLinus Torvalds 601da177e4SLinus Torvalds 1 - undefined instruction events 611da177e4SLinus Torvalds 2 - system calls 621da177e4SLinus Torvalds 4 - invalid data aborts 631da177e4SLinus Torvalds 8 - SIGSEGV faults 641da177e4SLinus Torvalds 16 - SIGBUS faults 651da177e4SLinus Torvalds 661da177e4SLinus Torvalds# These options are only for real kernel hackers who want to get their hands dirty. 671da177e4SLinus Torvaldsconfig DEBUG_LL 684f5ef922SWill Deacon bool "Kernel low-level debugging functions (read help!)" 691da177e4SLinus Torvalds depends on DEBUG_KERNEL 701da177e4SLinus Torvalds help 7135efb606SRussell King Say Y here to include definitions of printascii, printch, printhex 721da177e4SLinus Torvalds in the kernel. This is helpful if you are debugging code that 731da177e4SLinus Torvalds executes before the console is initialized. 741da177e4SLinus Torvalds 754f5ef922SWill Deacon Note that selecting this option will limit the kernel to a single 764f5ef922SWill Deacon UART definition, as specified below. Attempting to boot the kernel 774f5ef922SWill Deacon image on a different platform *will not work*, so this option should 784f5ef922SWill Deacon not be enabled for kernels that are intended to be portable. 794f5ef922SWill Deacon 8017916b28SWill Deaconchoice 8117916b28SWill Deacon prompt "Kernel low-level debugging port" 8217916b28SWill Deacon depends on DEBUG_LL 8317916b28SWill Deacon 8413079a73SJean-Christophe PLAGNIOL-VILLARD config AT91_DEBUG_LL_DBGU0 8513079a73SJean-Christophe PLAGNIOL-VILLARD bool "Kernel low-level debugging on rm9200, 9260/9g20, 9261/9g10 and 9rl" 8613079a73SJean-Christophe PLAGNIOL-VILLARD depends on HAVE_AT91_DBGU0 8713079a73SJean-Christophe PLAGNIOL-VILLARD 8813079a73SJean-Christophe PLAGNIOL-VILLARD config AT91_DEBUG_LL_DBGU1 899918ceafSJean-Christophe PLAGNIOL-VILLARD bool "Kernel low-level debugging on 9263 and 9g45" 9013079a73SJean-Christophe PLAGNIOL-VILLARD depends on HAVE_AT91_DBGU1 9113079a73SJean-Christophe PLAGNIOL-VILLARD 92164acf96SStephen Boyd config DEBUG_CLPS711X_UART1 93164acf96SStephen Boyd bool "Kernel low-level debugging messages via UART1" 94164acf96SStephen Boyd depends on ARCH_CLPS711X 95164acf96SStephen Boyd help 96164acf96SStephen Boyd Say Y here if you want the debug print routines to direct 97164acf96SStephen Boyd their output to the first serial port on these devices. 9817916b28SWill Deacon 9917916b28SWill Deacon config DEBUG_CLPS711X_UART2 10017916b28SWill Deacon bool "Kernel low-level debugging messages via UART2" 10117916b28SWill Deacon depends on ARCH_CLPS711X 10217916b28SWill Deacon help 10317916b28SWill Deacon Say Y here if you want the debug print routines to direct 10417916b28SWill Deacon their output to the second serial port on these devices. 10517916b28SWill Deacon 106*477099f1SUwe Kleine-König config DEBUG_DAVINCI_DA8XX_UART1 107*477099f1SUwe Kleine-König bool "Kernel low-level debugging on DaVinci DA8XX using UART1" 108*477099f1SUwe Kleine-König depends on ARCH_DAVINCI_DA8XX 109*477099f1SUwe Kleine-König help 110*477099f1SUwe Kleine-König Say Y here if you want the debug print routines to direct 111*477099f1SUwe Kleine-König their output to UART1 serial port on DaVinci DA8XX devices. 112*477099f1SUwe Kleine-König 113*477099f1SUwe Kleine-König config DEBUG_DAVINCI_DA8XX_UART2 114*477099f1SUwe Kleine-König bool "Kernel low-level debugging on DaVinci DA8XX using UART2" 115*477099f1SUwe Kleine-König depends on ARCH_DAVINCI_DA8XX 116*477099f1SUwe Kleine-König help 117*477099f1SUwe Kleine-König Say Y here if you want the debug print routines to direct 118*477099f1SUwe Kleine-König their output to UART2 serial port on DaVinci DA8XX devices. 119*477099f1SUwe Kleine-König 120*477099f1SUwe Kleine-König config DEBUG_DAVINCI_DMx_UART0 121*477099f1SUwe Kleine-König bool "Kernel low-level debugging on DaVinci DMx using UART0" 122*477099f1SUwe Kleine-König depends on ARCH_DAVINCI_DMx 123*477099f1SUwe Kleine-König help 124*477099f1SUwe Kleine-König Say Y here if you want the debug print routines to direct 125*477099f1SUwe Kleine-König their output to UART0 serial port on DaVinci DMx devices. 126*477099f1SUwe Kleine-König 127*477099f1SUwe Kleine-König config DEBUG_DAVINCI_TNETV107X_UART1 128*477099f1SUwe Kleine-König bool "Kernel low-level debugging on DaVinci TNETV107x using UART1" 129*477099f1SUwe Kleine-König depends on ARCH_DAVINCI_TNETV107X 130*477099f1SUwe Kleine-König help 131*477099f1SUwe Kleine-König Say Y here if you want the debug print routines to direct 132*477099f1SUwe Kleine-König their output to UART1 serial port on DaVinci TNETV107X 133*477099f1SUwe Kleine-König devices. 134*477099f1SUwe Kleine-König 135e76f4750SRussell King config DEBUG_DC21285_PORT 136e76f4750SRussell King bool "Kernel low-level debugging messages via footbridge serial port" 137e76f4750SRussell King depends on FOOTBRIDGE 138e76f4750SRussell King help 139e76f4750SRussell King Say Y here if you want the debug print routines to direct 140e76f4750SRussell King their output to the serial port in the DC21285 (Footbridge). 141e76f4750SRussell King 142e76f4750SRussell King config DEBUG_FOOTBRIDGE_COM1 143e76f4750SRussell King bool "Kernel low-level debugging messages via footbridge 8250 at PCI COM1" 144e76f4750SRussell King depends on FOOTBRIDGE 145e76f4750SRussell King help 146e76f4750SRussell King Say Y here if you want the debug print routines to direct 147e76f4750SRussell King their output to the 8250 at PCI COM1. 148e76f4750SRussell King 149220e6cf7SRob Herring config DEBUG_HIGHBANK_UART 150220e6cf7SRob Herring bool "Kernel low-level debugging messages via Highbank UART" 151220e6cf7SRob Herring depends on ARCH_HIGHBANK 152220e6cf7SRob Herring help 153220e6cf7SRob Herring Say Y here if you want the debug print routines to direct 154220e6cf7SRob Herring their output to the UART on Highbank based devices. 155220e6cf7SRob Herring 156f350b861SShawn Guo config DEBUG_IMX1_UART 157f350b861SShawn Guo bool "i.MX1 Debug UART" 158f350b861SShawn Guo depends on SOC_IMX1 159f350b861SShawn Guo help 160f350b861SShawn Guo Say Y here if you want kernel low-level debugging support 161f350b861SShawn Guo on i.MX1. 162f350b861SShawn Guo 163f350b861SShawn Guo config DEBUG_IMX23_UART 164f350b861SShawn Guo bool "i.MX23 Debug UART" 165f350b861SShawn Guo depends on SOC_IMX23 166f350b861SShawn Guo help 167f350b861SShawn Guo Say Y here if you want kernel low-level debugging support 168f350b861SShawn Guo on i.MX23. 169f350b861SShawn Guo 170f350b861SShawn Guo config DEBUG_IMX25_UART 171f350b861SShawn Guo bool "i.MX25 Debug UART" 172f350b861SShawn Guo depends on SOC_IMX25 173f350b861SShawn Guo help 174f350b861SShawn Guo Say Y here if you want kernel low-level debugging support 175f350b861SShawn Guo on i.MX25. 176f350b861SShawn Guo 177f350b861SShawn Guo config DEBUG_IMX21_IMX27_UART 178f350b861SShawn Guo bool "i.MX21 and i.MX27 Debug UART" 179f350b861SShawn Guo depends on SOC_IMX21 || SOC_IMX27 180f350b861SShawn Guo help 181f350b861SShawn Guo Say Y here if you want kernel low-level debugging support 182f350b861SShawn Guo on i.MX21 or i.MX27. 183f350b861SShawn Guo 184f350b861SShawn Guo config DEBUG_IMX28_UART 185f350b861SShawn Guo bool "i.MX28 Debug UART" 186f350b861SShawn Guo depends on SOC_IMX28 187f350b861SShawn Guo help 188f350b861SShawn Guo Say Y here if you want kernel low-level debugging support 189f350b861SShawn Guo on i.MX28. 190f350b861SShawn Guo 191f350b861SShawn Guo config DEBUG_IMX31_IMX35_UART 192f350b861SShawn Guo bool "i.MX31 and i.MX35 Debug UART" 193f350b861SShawn Guo depends on SOC_IMX31 || SOC_IMX35 194f350b861SShawn Guo help 195f350b861SShawn Guo Say Y here if you want kernel low-level debugging support 196f350b861SShawn Guo on i.MX31 or i.MX35. 197f350b861SShawn Guo 198f350b861SShawn Guo config DEBUG_IMX51_UART 199f350b861SShawn Guo bool "i.MX51 Debug UART" 200f350b861SShawn Guo depends on SOC_IMX51 201f350b861SShawn Guo help 202f350b861SShawn Guo Say Y here if you want kernel low-level debugging support 203f350b861SShawn Guo on i.MX51. 204f350b861SShawn Guo 205f350b861SShawn Guo config DEBUG_IMX50_IMX53_UART 206f350b861SShawn Guo bool "i.MX50 and i.MX53 Debug UART" 207f350b861SShawn Guo depends on SOC_IMX50 || SOC_IMX53 208f350b861SShawn Guo help 209f350b861SShawn Guo Say Y here if you want kernel low-level debugging support 210f350b861SShawn Guo on i.MX50 or i.MX53. 211f350b861SShawn Guo 212cdaf29cfSDirk Behme config DEBUG_IMX6Q_UART4 213cdaf29cfSDirk Behme bool "i.MX6Q Debug UART4" 214bac89d75SShawn Guo depends on SOC_IMX6Q 215bac89d75SShawn Guo help 216bac89d75SShawn Guo Say Y here if you want kernel low-level debugging support 217cdaf29cfSDirk Behme on i.MX6Q UART4. 218bac89d75SShawn Guo 219650e3f0dSStephen Boyd config DEBUG_MSM_UART1 220650e3f0dSStephen Boyd bool "Kernel low-level debugging messages via MSM UART1" 221650e3f0dSStephen Boyd depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50 222650e3f0dSStephen Boyd help 223650e3f0dSStephen Boyd Say Y here if you want the debug print routines to direct 224650e3f0dSStephen Boyd their output to the first serial port on MSM devices. 225650e3f0dSStephen Boyd 226650e3f0dSStephen Boyd config DEBUG_MSM_UART2 227650e3f0dSStephen Boyd bool "Kernel low-level debugging messages via MSM UART2" 228650e3f0dSStephen Boyd depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50 229650e3f0dSStephen Boyd help 230650e3f0dSStephen Boyd Say Y here if you want the debug print routines to direct 231650e3f0dSStephen Boyd their output to the second serial port on MSM devices. 232650e3f0dSStephen Boyd 233650e3f0dSStephen Boyd config DEBUG_MSM_UART3 234650e3f0dSStephen Boyd bool "Kernel low-level debugging messages via MSM UART3" 235650e3f0dSStephen Boyd depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50 236650e3f0dSStephen Boyd help 237650e3f0dSStephen Boyd Say Y here if you want the debug print routines to direct 238650e3f0dSStephen Boyd their output to the third serial port on MSM devices. 239650e3f0dSStephen Boyd 240a3d3ef9dSStephen Boyd config DEBUG_MSM8660_UART 241a3d3ef9dSStephen Boyd bool "Kernel low-level debugging messages via MSM 8660 UART" 242a3d3ef9dSStephen Boyd depends on ARCH_MSM8X60 243a3d3ef9dSStephen Boyd select MSM_HAS_DEBUG_UART_HS 244a3d3ef9dSStephen Boyd help 245a3d3ef9dSStephen Boyd Say Y here if you want the debug print routines to direct 246a3d3ef9dSStephen Boyd their output to the serial port on MSM 8660 devices. 247a3d3ef9dSStephen Boyd 248a3d3ef9dSStephen Boyd config DEBUG_MSM8960_UART 249a3d3ef9dSStephen Boyd bool "Kernel low-level debugging messages via MSM 8960 UART" 250a3d3ef9dSStephen Boyd depends on ARCH_MSM8960 251a3d3ef9dSStephen Boyd select MSM_HAS_DEBUG_UART_HS 252a3d3ef9dSStephen Boyd help 253a3d3ef9dSStephen Boyd Say Y here if you want the debug print routines to direct 254a3d3ef9dSStephen Boyd their output to the serial port on MSM 8960 devices. 255a3d3ef9dSStephen Boyd 256e76f4750SRussell King config DEBUG_REALVIEW_STD_PORT 257e76f4750SRussell King bool "RealView Default UART" 258e76f4750SRussell King depends on ARCH_REALVIEW 259e76f4750SRussell King help 260e76f4750SRussell King Say Y here if you want the debug print routines to direct 261e76f4750SRussell King their output to the serial port on RealView EB, PB11MP, PBA8 262e76f4750SRussell King and PBX platforms. 263e76f4750SRussell King 264e76f4750SRussell King config DEBUG_REALVIEW_PB1176_PORT 265e76f4750SRussell King bool "RealView PB1176 UART" 266e76f4750SRussell King depends on MACH_REALVIEW_PB1176 267e76f4750SRussell King help 268e76f4750SRussell King Say Y here if you want the debug print routines to direct 269e76f4750SRussell King their output to the standard serial port on the RealView 270e76f4750SRussell King PB1176 platform. 271e76f4750SRussell King 272e76f4750SRussell King config DEBUG_S3C_UART0 273e76f4750SRussell King depends on PLAT_SAMSUNG 274e76f4750SRussell King bool "Use S3C UART 0 for low-level debug" 275e76f4750SRussell King help 276e76f4750SRussell King Say Y here if you want the debug print routines to direct 277e76f4750SRussell King their output to UART 0. The port must have been initialised 278e76f4750SRussell King by the boot-loader before use. 279e76f4750SRussell King 280e76f4750SRussell King The uncompressor code port configuration is now handled 281e76f4750SRussell King by CONFIG_S3C_LOWLEVEL_UART_PORT. 282e76f4750SRussell King 283e76f4750SRussell King config DEBUG_S3C_UART1 284e76f4750SRussell King depends on PLAT_SAMSUNG 285e76f4750SRussell King bool "Use S3C UART 1 for low-level debug" 286e76f4750SRussell King help 287e76f4750SRussell King Say Y here if you want the debug print routines to direct 288e76f4750SRussell King their output to UART 1. The port must have been initialised 289e76f4750SRussell King by the boot-loader before use. 290e76f4750SRussell King 291e76f4750SRussell King The uncompressor code port configuration is now handled 292e76f4750SRussell King by CONFIG_S3C_LOWLEVEL_UART_PORT. 293e76f4750SRussell King 294e76f4750SRussell King config DEBUG_S3C_UART2 295e76f4750SRussell King depends on PLAT_SAMSUNG 296e76f4750SRussell King bool "Use S3C UART 2 for low-level debug" 297e76f4750SRussell King help 298e76f4750SRussell King Say Y here if you want the debug print routines to direct 299e76f4750SRussell King their output to UART 2. The port must have been initialised 300e76f4750SRussell King by the boot-loader before use. 301e76f4750SRussell King 302e76f4750SRussell King The uncompressor code port configuration is now handled 303e76f4750SRussell King by CONFIG_S3C_LOWLEVEL_UART_PORT. 304e76f4750SRussell King 305e76f4750SRussell King config DEBUG_LL_UART_NONE 306e76f4750SRussell King bool "No low-level debugging UART" 307e76f4750SRussell King help 308e76f4750SRussell King Say Y here if your platform doesn't provide a UART option 309e76f4750SRussell King below. This relies on your platform choosing the right UART 310e76f4750SRussell King definition internally in order for low-level debugging to 311e76f4750SRussell King work. 312e76f4750SRussell King 313e76f4750SRussell King config DEBUG_ICEDCC 314e76f4750SRussell King bool "Kernel low-level debugging via EmbeddedICE DCC channel" 315e76f4750SRussell King help 316e76f4750SRussell King Say Y here if you want the debug print routines to direct 317e76f4750SRussell King their output to the EmbeddedICE macrocell's DCC channel using 318e76f4750SRussell King co-processor 14. This is known to work on the ARM9 style ICE 319e76f4750SRussell King channel and on the XScale with the PEEDI. 320e76f4750SRussell King 321e76f4750SRussell King Note that the system will appear to hang during boot if there 322e76f4750SRussell King is nothing connected to read from the DCC. 323e76f4750SRussell King 324b0df8986SRussell King config DEBUG_SEMIHOSTING 325b0df8986SRussell King bool "Kernel low-level debug output via semihosting I" 326b0df8986SRussell King help 327b0df8986SRussell King Semihosting enables code running on an ARM target to use 328b0df8986SRussell King the I/O facilities on a host debugger/emulator through a 329b0df8986SRussell King simple SVC calls. The host debugger or emulator must have 330b0df8986SRussell King semihosting enabled for the special svc call to be trapped 331b0df8986SRussell King otherwise the kernel will crash. 332b0df8986SRussell King 333b0df8986SRussell King This is known to work with OpenOCD, as wellas 334b0df8986SRussell King ARM's Fast Models, or any other controlling environment 335b0df8986SRussell King that implements semihosting. 336b0df8986SRussell King 337b0df8986SRussell King For more details about semihosting, please see 338b0df8986SRussell King chapter 8 of DUI0203I_rvct_developer_guide.pdf from ARM Ltd. 339b0df8986SRussell King 34017916b28SWill Deaconendchoice 34117916b28SWill Deacon 34293fd03a8SCatalin Marinasconfig EARLY_PRINTK 34393fd03a8SCatalin Marinas bool "Early printk" 34493fd03a8SCatalin Marinas depends on DEBUG_LL 34593fd03a8SCatalin Marinas help 34693fd03a8SCatalin Marinas Say Y here if you want to have an early console using the 34793fd03a8SCatalin Marinas kernel low-level debugging functions. Add earlyprintk to your 34893fd03a8SCatalin Marinas kernel parameters to enable this console. 34993fd03a8SCatalin Marinas 350c5d6c770SAlexander Shishkinconfig OC_ETM 351c5d6c770SAlexander Shishkin bool "On-chip ETM and ETB" 35253eebb0dSArnd Bergmann depends on ARM_AMBA 353c5d6c770SAlexander Shishkin help 354c5d6c770SAlexander Shishkin Enables the on-chip embedded trace macrocell and embedded trace 355c5d6c770SAlexander Shishkin buffer driver that will allow you to collect traces of the 356c5d6c770SAlexander Shishkin kernel code. 357c5d6c770SAlexander Shishkin 3584189bc71SJon Medhurstconfig ARM_KPROBES_TEST 3594189bc71SJon Medhurst tristate "Kprobes test module" 3604189bc71SJon Medhurst depends on KPROBES && MODULES 3614189bc71SJon Medhurst help 3624189bc71SJon Medhurst Perform tests of kprobes API and instruction set simulation. 3634189bc71SJon Medhurst 3641da177e4SLinus Torvaldsendmenu 365