xref: /linux/arch/arm/Kconfig.debug (revision 087aaffcdf9c91667c93923fbc05fa8fb6bc7d3a)
11da177e4SLinus Torvaldsmenu "Kernel hacking"
21da177e4SLinus Torvalds
31da177e4SLinus Torvaldssource "lib/Kconfig.debug"
41da177e4SLinus Torvalds
5*087aaffcSNicolas Pitreconfig STRICT_DEVMEM
6*087aaffcSNicolas Pitre	bool "Filter access to /dev/mem"
7*087aaffcSNicolas Pitre	depends on MMU
8*087aaffcSNicolas Pitre	---help---
9*087aaffcSNicolas Pitre	  If this option is disabled, you allow userspace (root) access to all
10*087aaffcSNicolas Pitre	  of memory, including kernel and userspace memory. Accidental
11*087aaffcSNicolas Pitre	  access to this is obviously disastrous, but specific access can
12*087aaffcSNicolas Pitre	  be used by people debugging the kernel.
13*087aaffcSNicolas Pitre
14*087aaffcSNicolas Pitre	  If this option is switched on, the /dev/mem file only allows
15*087aaffcSNicolas Pitre	  userspace access to memory mapped peripherals.
16*087aaffcSNicolas Pitre
17*087aaffcSNicolas Pitre          If in doubt, say Y.
18*087aaffcSNicolas 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
26adf8b37bSCatalin Marinas	default y if !ARM_UNWIND
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
34adf8b37bSCatalin Marinas	bool "Enable stack unwinding support"
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
441da177e4SLinus Torvaldsconfig DEBUG_USER
451da177e4SLinus Torvalds	bool "Verbose user fault messages"
461da177e4SLinus Torvalds	help
471da177e4SLinus Torvalds	  When a user program crashes due to an exception, the kernel can
481da177e4SLinus Torvalds	  print a brief message explaining what the problem was. This is
491da177e4SLinus Torvalds	  sometimes helpful for debugging but serves no purpose on a
501da177e4SLinus Torvalds	  production system. Most people should say N here.
511da177e4SLinus Torvalds
521da177e4SLinus Torvalds	  In addition, you need to pass user_debug=N on the kernel command
531da177e4SLinus Torvalds	  line to enable this feature.  N consists of the sum of:
541da177e4SLinus Torvalds
551da177e4SLinus Torvalds	      1 - undefined instruction events
561da177e4SLinus Torvalds	      2 - system calls
571da177e4SLinus Torvalds	      4 - invalid data aborts
581da177e4SLinus Torvalds	      8 - SIGSEGV faults
591da177e4SLinus Torvalds	     16 - SIGBUS faults
601da177e4SLinus Torvalds
611da177e4SLinus Torvaldsconfig DEBUG_ERRORS
621da177e4SLinus Torvalds	bool "Verbose kernel error messages"
631da177e4SLinus Torvalds	depends on DEBUG_KERNEL
641da177e4SLinus Torvalds	help
651da177e4SLinus Torvalds	  This option controls verbose debugging information which can be
661da177e4SLinus Torvalds	  printed when the kernel detects an internal error. This debugging
671da177e4SLinus Torvalds	  information is useful to kernel hackers when tracking down problems,
681da177e4SLinus Torvalds	  but mostly meaningless to other people. It's safe to say Y unless
691da177e4SLinus Torvalds	  you are concerned with the code size or don't want to see these
701da177e4SLinus Torvalds	  messages.
711da177e4SLinus Torvalds
72ddf4e42cSSascha Hauerconfig DEBUG_STACK_USAGE
73ddf4e42cSSascha Hauer	bool "Enable stack utilization instrumentation"
74ddf4e42cSSascha Hauer	depends on DEBUG_KERNEL
75ddf4e42cSSascha Hauer	help
76ddf4e42cSSascha Hauer	  Enables the display of the minimum amount of free stack which each
77ddf4e42cSSascha Hauer	  task has ever had available in the sysrq-T output.
781da177e4SLinus Torvalds
791da177e4SLinus Torvalds# These options are only for real kernel hackers who want to get their hands dirty.
801da177e4SLinus Torvaldsconfig DEBUG_LL
811da177e4SLinus Torvalds	bool "Kernel low-level debugging functions"
821da177e4SLinus Torvalds	depends on DEBUG_KERNEL
831da177e4SLinus Torvalds	help
8435efb606SRussell King	  Say Y here to include definitions of printascii, printch, printhex
851da177e4SLinus Torvalds	  in the kernel.  This is helpful if you are debugging code that
861da177e4SLinus Torvalds	  executes before the console is initialized.
871da177e4SLinus Torvalds
8893fd03a8SCatalin Marinasconfig EARLY_PRINTK
8993fd03a8SCatalin Marinas	bool "Early printk"
9093fd03a8SCatalin Marinas	depends on DEBUG_LL
9193fd03a8SCatalin Marinas	help
9293fd03a8SCatalin Marinas	  Say Y here if you want to have an early console using the
9393fd03a8SCatalin Marinas	  kernel low-level debugging functions. Add earlyprintk to your
9493fd03a8SCatalin Marinas	  kernel parameters to enable this console.
9593fd03a8SCatalin Marinas
961da177e4SLinus Torvaldsconfig DEBUG_ICEDCC
971da177e4SLinus Torvalds	bool "Kernel low-level debugging via EmbeddedICE DCC channel"
981da177e4SLinus Torvalds	depends on DEBUG_LL
991da177e4SLinus Torvalds	help
1001da177e4SLinus Torvalds	  Say Y here if you want the debug print routines to direct their
1011da177e4SLinus Torvalds	  output to the EmbeddedICE macrocell's DCC channel using
1021da177e4SLinus Torvalds	  co-processor 14. This is known to work on the ARM9 style ICE
103c633c3cfSJean-Christop PLAGNIOL-VILLARD	  channel and on the XScale with the PEEDI.
1041da177e4SLinus Torvalds
1051da177e4SLinus Torvalds	  It does include a timeout to ensure that the system does not
1061da177e4SLinus Torvalds	  totally freeze when there is nothing connected to read.
1071da177e4SLinus Torvalds
108c5d6c770SAlexander Shishkinconfig OC_ETM
109c5d6c770SAlexander Shishkin	bool "On-chip ETM and ETB"
110c5d6c770SAlexander Shishkin	select ARM_AMBA
111c5d6c770SAlexander Shishkin	help
112c5d6c770SAlexander Shishkin	  Enables the on-chip embedded trace macrocell and embedded trace
113c5d6c770SAlexander Shishkin	  buffer driver that will allow you to collect traces of the
114c5d6c770SAlexander Shishkin	  kernel code.
115c5d6c770SAlexander Shishkin
1161da177e4SLinus Torvaldsconfig DEBUG_DC21285_PORT
1171da177e4SLinus Torvalds	bool "Kernel low-level debugging messages via footbridge serial port"
1181da177e4SLinus Torvalds	depends on DEBUG_LL && FOOTBRIDGE
1191da177e4SLinus Torvalds	help
1201da177e4SLinus Torvalds	  Say Y here if you want the debug print routines to direct their
1211da177e4SLinus Torvalds	  output to the serial port in the DC21285 (Footbridge). Saying N
1221da177e4SLinus Torvalds	  will cause the debug messages to appear on the first 16550
1231da177e4SLinus Torvalds	  serial port.
1241da177e4SLinus Torvalds
1251da177e4SLinus Torvaldsconfig DEBUG_CLPS711X_UART2
1261da177e4SLinus Torvalds	bool "Kernel low-level debugging messages via UART2"
1271da177e4SLinus Torvalds	depends on DEBUG_LL && ARCH_CLPS711X
1281da177e4SLinus Torvalds	help
1291da177e4SLinus Torvalds	  Say Y here if you want the debug print routines to direct their
1301da177e4SLinus Torvalds	  output to the second serial port on these devices.  Saying N will
1311da177e4SLinus Torvalds	  cause the debug messages to appear on the first serial port.
1321da177e4SLinus Torvalds
1333ec20520SBen Dooksconfig DEBUG_S3C_UART
13489f1fa08SBen Dooks	depends on PLAT_SAMSUNG
1353ec20520SBen Dooks	int "S3C UART to use for low-level debug"
1361da177e4SLinus Torvalds	default "0"
1371da177e4SLinus Torvalds	help
1383ec20520SBen Dooks	  Choice for UART for kernel low-level using S3C UARTS,
1391da177e4SLinus Torvalds	  should be between zero and two. The port must have been
140c41045a4SEgry Gabor	  initialised by the boot-loader before use.
1411da177e4SLinus Torvalds
1421da177e4SLinus Torvalds	  The uncompressor code port configuration is now handled
143c7657846SBen Dooks	  by CONFIG_S3C_LOWLEVEL_UART_PORT.
1441da177e4SLinus Torvalds
1451da177e4SLinus Torvaldsendmenu
146