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 8913079a73SJean-Christophe PLAGNIOL-VILLARD bool "Kernel low-level debugging on 9263, 9g45 and cap9" 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 106e76f4750SRussell King config DEBUG_DC21285_PORT 107e76f4750SRussell King bool "Kernel low-level debugging messages via footbridge serial port" 108e76f4750SRussell King depends on FOOTBRIDGE 109e76f4750SRussell King help 110e76f4750SRussell King Say Y here if you want the debug print routines to direct 111e76f4750SRussell King their output to the serial port in the DC21285 (Footbridge). 112e76f4750SRussell King 113e76f4750SRussell King config DEBUG_FOOTBRIDGE_COM1 114e76f4750SRussell King bool "Kernel low-level debugging messages via footbridge 8250 at PCI COM1" 115e76f4750SRussell King depends on FOOTBRIDGE 116e76f4750SRussell King help 117e76f4750SRussell King Say Y here if you want the debug print routines to direct 118e76f4750SRussell King their output to the 8250 at PCI COM1. 119e76f4750SRussell King 120220e6cf7SRob Herring config DEBUG_HIGHBANK_UART 121220e6cf7SRob Herring bool "Kernel low-level debugging messages via Highbank UART" 122220e6cf7SRob Herring depends on ARCH_HIGHBANK 123220e6cf7SRob Herring help 124220e6cf7SRob Herring Say Y here if you want the debug print routines to direct 125220e6cf7SRob Herring their output to the UART on Highbank based devices. 126220e6cf7SRob Herring 127f350b861SShawn Guo config DEBUG_IMX1_UART 128f350b861SShawn Guo bool "i.MX1 Debug UART" 129f350b861SShawn Guo depends on SOC_IMX1 130f350b861SShawn Guo help 131f350b861SShawn Guo Say Y here if you want kernel low-level debugging support 132f350b861SShawn Guo on i.MX1. 133f350b861SShawn Guo 134f350b861SShawn Guo config DEBUG_IMX23_UART 135f350b861SShawn Guo bool "i.MX23 Debug UART" 136f350b861SShawn Guo depends on SOC_IMX23 137f350b861SShawn Guo help 138f350b861SShawn Guo Say Y here if you want kernel low-level debugging support 139f350b861SShawn Guo on i.MX23. 140f350b861SShawn Guo 141f350b861SShawn Guo config DEBUG_IMX25_UART 142f350b861SShawn Guo bool "i.MX25 Debug UART" 143f350b861SShawn Guo depends on SOC_IMX25 144f350b861SShawn Guo help 145f350b861SShawn Guo Say Y here if you want kernel low-level debugging support 146f350b861SShawn Guo on i.MX25. 147f350b861SShawn Guo 148f350b861SShawn Guo config DEBUG_IMX21_IMX27_UART 149f350b861SShawn Guo bool "i.MX21 and i.MX27 Debug UART" 150f350b861SShawn Guo depends on SOC_IMX21 || SOC_IMX27 151f350b861SShawn Guo help 152f350b861SShawn Guo Say Y here if you want kernel low-level debugging support 153f350b861SShawn Guo on i.MX21 or i.MX27. 154f350b861SShawn Guo 155f350b861SShawn Guo config DEBUG_IMX28_UART 156f350b861SShawn Guo bool "i.MX28 Debug UART" 157f350b861SShawn Guo depends on SOC_IMX28 158f350b861SShawn Guo help 159f350b861SShawn Guo Say Y here if you want kernel low-level debugging support 160f350b861SShawn Guo on i.MX28. 161f350b861SShawn Guo 162f350b861SShawn Guo config DEBUG_IMX31_IMX35_UART 163f350b861SShawn Guo bool "i.MX31 and i.MX35 Debug UART" 164f350b861SShawn Guo depends on SOC_IMX31 || SOC_IMX35 165f350b861SShawn Guo help 166f350b861SShawn Guo Say Y here if you want kernel low-level debugging support 167f350b861SShawn Guo on i.MX31 or i.MX35. 168f350b861SShawn Guo 169f350b861SShawn Guo config DEBUG_IMX51_UART 170f350b861SShawn Guo bool "i.MX51 Debug UART" 171f350b861SShawn Guo depends on SOC_IMX51 172f350b861SShawn Guo help 173f350b861SShawn Guo Say Y here if you want kernel low-level debugging support 174f350b861SShawn Guo on i.MX51. 175f350b861SShawn Guo 176f350b861SShawn Guo config DEBUG_IMX50_IMX53_UART 177f350b861SShawn Guo bool "i.MX50 and i.MX53 Debug UART" 178f350b861SShawn Guo depends on SOC_IMX50 || SOC_IMX53 179f350b861SShawn Guo help 180f350b861SShawn Guo Say Y here if you want kernel low-level debugging support 181f350b861SShawn Guo on i.MX50 or i.MX53. 182f350b861SShawn Guo 183bac89d75SShawn Guo config DEBUG_IMX6Q_UART 184bac89d75SShawn Guo bool "i.MX6Q Debug UART" 185bac89d75SShawn Guo depends on SOC_IMX6Q 186bac89d75SShawn Guo help 187bac89d75SShawn Guo Say Y here if you want kernel low-level debugging support 188bac89d75SShawn Guo on i.MX6Q. 189bac89d75SShawn Guo 190650e3f0dSStephen Boyd config DEBUG_MSM_UART1 191650e3f0dSStephen Boyd bool "Kernel low-level debugging messages via MSM UART1" 192650e3f0dSStephen Boyd depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50 193650e3f0dSStephen Boyd help 194650e3f0dSStephen Boyd Say Y here if you want the debug print routines to direct 195650e3f0dSStephen Boyd their output to the first serial port on MSM devices. 196650e3f0dSStephen Boyd 197650e3f0dSStephen Boyd config DEBUG_MSM_UART2 198650e3f0dSStephen Boyd bool "Kernel low-level debugging messages via MSM UART2" 199650e3f0dSStephen Boyd depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50 200650e3f0dSStephen Boyd help 201650e3f0dSStephen Boyd Say Y here if you want the debug print routines to direct 202650e3f0dSStephen Boyd their output to the second serial port on MSM devices. 203650e3f0dSStephen Boyd 204650e3f0dSStephen Boyd config DEBUG_MSM_UART3 205650e3f0dSStephen Boyd bool "Kernel low-level debugging messages via MSM UART3" 206650e3f0dSStephen Boyd depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50 207650e3f0dSStephen Boyd help 208650e3f0dSStephen Boyd Say Y here if you want the debug print routines to direct 209650e3f0dSStephen Boyd their output to the third serial port on MSM devices. 210650e3f0dSStephen Boyd 211a3d3ef9dSStephen Boyd config DEBUG_MSM8660_UART 212a3d3ef9dSStephen Boyd bool "Kernel low-level debugging messages via MSM 8660 UART" 213a3d3ef9dSStephen Boyd depends on ARCH_MSM8X60 214a3d3ef9dSStephen Boyd select MSM_HAS_DEBUG_UART_HS 215a3d3ef9dSStephen Boyd help 216a3d3ef9dSStephen Boyd Say Y here if you want the debug print routines to direct 217a3d3ef9dSStephen Boyd their output to the serial port on MSM 8660 devices. 218a3d3ef9dSStephen Boyd 219a3d3ef9dSStephen Boyd config DEBUG_MSM8960_UART 220a3d3ef9dSStephen Boyd bool "Kernel low-level debugging messages via MSM 8960 UART" 221a3d3ef9dSStephen Boyd depends on ARCH_MSM8960 222a3d3ef9dSStephen Boyd select MSM_HAS_DEBUG_UART_HS 223a3d3ef9dSStephen Boyd help 224a3d3ef9dSStephen Boyd Say Y here if you want the debug print routines to direct 225a3d3ef9dSStephen Boyd their output to the serial port on MSM 8960 devices. 226a3d3ef9dSStephen Boyd 227e76f4750SRussell King config DEBUG_REALVIEW_STD_PORT 228e76f4750SRussell King bool "RealView Default UART" 229e76f4750SRussell King depends on ARCH_REALVIEW 230e76f4750SRussell King help 231e76f4750SRussell King Say Y here if you want the debug print routines to direct 232e76f4750SRussell King their output to the serial port on RealView EB, PB11MP, PBA8 233e76f4750SRussell King and PBX platforms. 234e76f4750SRussell King 235e76f4750SRussell King config DEBUG_REALVIEW_PB1176_PORT 236e76f4750SRussell King bool "RealView PB1176 UART" 237e76f4750SRussell King depends on MACH_REALVIEW_PB1176 238e76f4750SRussell King help 239e76f4750SRussell King Say Y here if you want the debug print routines to direct 240e76f4750SRussell King their output to the standard serial port on the RealView 241e76f4750SRussell King PB1176 platform. 242e76f4750SRussell King 243e76f4750SRussell King config DEBUG_S3C_UART0 244e76f4750SRussell King depends on PLAT_SAMSUNG 245e76f4750SRussell King bool "Use S3C UART 0 for low-level debug" 246e76f4750SRussell King help 247e76f4750SRussell King Say Y here if you want the debug print routines to direct 248e76f4750SRussell King their output to UART 0. The port must have been initialised 249e76f4750SRussell King by the boot-loader before use. 250e76f4750SRussell King 251e76f4750SRussell King The uncompressor code port configuration is now handled 252e76f4750SRussell King by CONFIG_S3C_LOWLEVEL_UART_PORT. 253e76f4750SRussell King 254e76f4750SRussell King config DEBUG_S3C_UART1 255e76f4750SRussell King depends on PLAT_SAMSUNG 256e76f4750SRussell King bool "Use S3C UART 1 for low-level debug" 257e76f4750SRussell King help 258e76f4750SRussell King Say Y here if you want the debug print routines to direct 259e76f4750SRussell King their output to UART 1. The port must have been initialised 260e76f4750SRussell King by the boot-loader before use. 261e76f4750SRussell King 262e76f4750SRussell King The uncompressor code port configuration is now handled 263e76f4750SRussell King by CONFIG_S3C_LOWLEVEL_UART_PORT. 264e76f4750SRussell King 265e76f4750SRussell King config DEBUG_S3C_UART2 266e76f4750SRussell King depends on PLAT_SAMSUNG 267e76f4750SRussell King bool "Use S3C UART 2 for low-level debug" 268e76f4750SRussell King help 269e76f4750SRussell King Say Y here if you want the debug print routines to direct 270e76f4750SRussell King their output to UART 2. The port must have been initialised 271e76f4750SRussell King by the boot-loader before use. 272e76f4750SRussell King 273e76f4750SRussell King The uncompressor code port configuration is now handled 274e76f4750SRussell King by CONFIG_S3C_LOWLEVEL_UART_PORT. 275e76f4750SRussell King 276e76f4750SRussell King config DEBUG_LL_UART_NONE 277e76f4750SRussell King bool "No low-level debugging UART" 278e76f4750SRussell King help 279e76f4750SRussell King Say Y here if your platform doesn't provide a UART option 280e76f4750SRussell King below. This relies on your platform choosing the right UART 281e76f4750SRussell King definition internally in order for low-level debugging to 282e76f4750SRussell King work. 283e76f4750SRussell King 284e76f4750SRussell King config DEBUG_ICEDCC 285e76f4750SRussell King bool "Kernel low-level debugging via EmbeddedICE DCC channel" 286e76f4750SRussell King help 287e76f4750SRussell King Say Y here if you want the debug print routines to direct 288e76f4750SRussell King their output to the EmbeddedICE macrocell's DCC channel using 289e76f4750SRussell King co-processor 14. This is known to work on the ARM9 style ICE 290e76f4750SRussell King channel and on the XScale with the PEEDI. 291e76f4750SRussell King 292e76f4750SRussell King Note that the system will appear to hang during boot if there 293e76f4750SRussell King is nothing connected to read from the DCC. 294e76f4750SRussell King 295*b0df8986SRussell King config DEBUG_SEMIHOSTING 296*b0df8986SRussell King bool "Kernel low-level debug output via semihosting I" 297*b0df8986SRussell King help 298*b0df8986SRussell King Semihosting enables code running on an ARM target to use 299*b0df8986SRussell King the I/O facilities on a host debugger/emulator through a 300*b0df8986SRussell King simple SVC calls. The host debugger or emulator must have 301*b0df8986SRussell King semihosting enabled for the special svc call to be trapped 302*b0df8986SRussell King otherwise the kernel will crash. 303*b0df8986SRussell King 304*b0df8986SRussell King This is known to work with OpenOCD, as wellas 305*b0df8986SRussell King ARM's Fast Models, or any other controlling environment 306*b0df8986SRussell King that implements semihosting. 307*b0df8986SRussell King 308*b0df8986SRussell King For more details about semihosting, please see 309*b0df8986SRussell King chapter 8 of DUI0203I_rvct_developer_guide.pdf from ARM Ltd. 310*b0df8986SRussell King 31117916b28SWill Deaconendchoice 31217916b28SWill Deacon 31393fd03a8SCatalin Marinasconfig EARLY_PRINTK 31493fd03a8SCatalin Marinas bool "Early printk" 31593fd03a8SCatalin Marinas depends on DEBUG_LL 31693fd03a8SCatalin Marinas help 31793fd03a8SCatalin Marinas Say Y here if you want to have an early console using the 31893fd03a8SCatalin Marinas kernel low-level debugging functions. Add earlyprintk to your 31993fd03a8SCatalin Marinas kernel parameters to enable this console. 32093fd03a8SCatalin Marinas 321c5d6c770SAlexander Shishkinconfig OC_ETM 322c5d6c770SAlexander Shishkin bool "On-chip ETM and ETB" 32353eebb0dSArnd Bergmann depends on ARM_AMBA 324c5d6c770SAlexander Shishkin help 325c5d6c770SAlexander Shishkin Enables the on-chip embedded trace macrocell and embedded trace 326c5d6c770SAlexander Shishkin buffer driver that will allow you to collect traces of the 327c5d6c770SAlexander Shishkin kernel code. 328c5d6c770SAlexander Shishkin 3294189bc71SJon Medhurstconfig ARM_KPROBES_TEST 3304189bc71SJon Medhurst tristate "Kprobes test module" 3314189bc71SJon Medhurst depends on KPROBES && MODULES 3324189bc71SJon Medhurst help 3334189bc71SJon Medhurst Perform tests of kprobes API and instruction set simulation. 3344189bc71SJon Medhurst 3351da177e4SLinus Torvaldsendmenu 336