xref: /linux/arch/arm/Kconfig.debug (revision 4a50bfe365a977f634311504484342fbfffe855c)
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
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
34*4a50bfe3SRussell 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 Torvaldsconfig DEBUG_ERRORS
671da177e4SLinus Torvalds	bool "Verbose kernel error messages"
681da177e4SLinus Torvalds	depends on DEBUG_KERNEL
691da177e4SLinus Torvalds	help
701da177e4SLinus Torvalds	  This option controls verbose debugging information which can be
711da177e4SLinus Torvalds	  printed when the kernel detects an internal error. This debugging
721da177e4SLinus Torvalds	  information is useful to kernel hackers when tracking down problems,
731da177e4SLinus Torvalds	  but mostly meaningless to other people. It's safe to say Y unless
741da177e4SLinus Torvalds	  you are concerned with the code size or don't want to see these
751da177e4SLinus Torvalds	  messages.
761da177e4SLinus Torvalds
77ddf4e42cSSascha Hauerconfig DEBUG_STACK_USAGE
78ddf4e42cSSascha Hauer	bool "Enable stack utilization instrumentation"
79ddf4e42cSSascha Hauer	depends on DEBUG_KERNEL
80ddf4e42cSSascha Hauer	help
81ddf4e42cSSascha Hauer	  Enables the display of the minimum amount of free stack which each
82ddf4e42cSSascha Hauer	  task has ever had available in the sysrq-T output.
831da177e4SLinus Torvalds
841da177e4SLinus Torvalds# These options are only for real kernel hackers who want to get their hands dirty.
851da177e4SLinus Torvaldsconfig DEBUG_LL
861da177e4SLinus Torvalds	bool "Kernel low-level debugging functions"
871da177e4SLinus Torvalds	depends on DEBUG_KERNEL
881da177e4SLinus Torvalds	help
8935efb606SRussell King	  Say Y here to include definitions of printascii, printch, printhex
901da177e4SLinus Torvalds	  in the kernel.  This is helpful if you are debugging code that
911da177e4SLinus Torvalds	  executes before the console is initialized.
921da177e4SLinus Torvalds
9393fd03a8SCatalin Marinasconfig EARLY_PRINTK
9493fd03a8SCatalin Marinas	bool "Early printk"
9593fd03a8SCatalin Marinas	depends on DEBUG_LL
9693fd03a8SCatalin Marinas	help
9793fd03a8SCatalin Marinas	  Say Y here if you want to have an early console using the
9893fd03a8SCatalin Marinas	  kernel low-level debugging functions. Add earlyprintk to your
9993fd03a8SCatalin Marinas	  kernel parameters to enable this console.
10093fd03a8SCatalin Marinas
1011da177e4SLinus Torvaldsconfig DEBUG_ICEDCC
1021da177e4SLinus Torvalds	bool "Kernel low-level debugging via EmbeddedICE DCC channel"
1031da177e4SLinus Torvalds	depends on DEBUG_LL
1041da177e4SLinus Torvalds	help
1051da177e4SLinus Torvalds	  Say Y here if you want the debug print routines to direct their
1061da177e4SLinus Torvalds	  output to the EmbeddedICE macrocell's DCC channel using
1071da177e4SLinus Torvalds	  co-processor 14. This is known to work on the ARM9 style ICE
108c633c3cfSJean-Christop PLAGNIOL-VILLARD	  channel and on the XScale with the PEEDI.
1091da177e4SLinus Torvalds
1101da177e4SLinus Torvalds	  It does include a timeout to ensure that the system does not
1111da177e4SLinus Torvalds	  totally freeze when there is nothing connected to read.
1121da177e4SLinus Torvalds
113c5d6c770SAlexander Shishkinconfig OC_ETM
114c5d6c770SAlexander Shishkin	bool "On-chip ETM and ETB"
115c5d6c770SAlexander Shishkin	select ARM_AMBA
116c5d6c770SAlexander Shishkin	help
117c5d6c770SAlexander Shishkin	  Enables the on-chip embedded trace macrocell and embedded trace
118c5d6c770SAlexander Shishkin	  buffer driver that will allow you to collect traces of the
119c5d6c770SAlexander Shishkin	  kernel code.
120c5d6c770SAlexander Shishkin
1211da177e4SLinus Torvaldsconfig DEBUG_DC21285_PORT
1221da177e4SLinus Torvalds	bool "Kernel low-level debugging messages via footbridge serial port"
1231da177e4SLinus Torvalds	depends on DEBUG_LL && FOOTBRIDGE
1241da177e4SLinus Torvalds	help
1251da177e4SLinus Torvalds	  Say Y here if you want the debug print routines to direct their
1261da177e4SLinus Torvalds	  output to the serial port in the DC21285 (Footbridge). Saying N
1271da177e4SLinus Torvalds	  will cause the debug messages to appear on the first 16550
1281da177e4SLinus Torvalds	  serial port.
1291da177e4SLinus Torvalds
1301da177e4SLinus Torvaldsconfig DEBUG_CLPS711X_UART2
1311da177e4SLinus Torvalds	bool "Kernel low-level debugging messages via UART2"
1321da177e4SLinus Torvalds	depends on DEBUG_LL && ARCH_CLPS711X
1331da177e4SLinus Torvalds	help
1341da177e4SLinus Torvalds	  Say Y here if you want the debug print routines to direct their
1351da177e4SLinus Torvalds	  output to the second serial port on these devices.  Saying N will
1361da177e4SLinus Torvalds	  cause the debug messages to appear on the first serial port.
1371da177e4SLinus Torvalds
1383ec20520SBen Dooksconfig DEBUG_S3C_UART
13989f1fa08SBen Dooks	depends on PLAT_SAMSUNG
1403ec20520SBen Dooks	int "S3C UART to use for low-level debug"
1411da177e4SLinus Torvalds	default "0"
1421da177e4SLinus Torvalds	help
1433ec20520SBen Dooks	  Choice for UART for kernel low-level using S3C UARTS,
1441da177e4SLinus Torvalds	  should be between zero and two. The port must have been
145c41045a4SEgry Gabor	  initialised by the boot-loader before use.
1461da177e4SLinus Torvalds
1471da177e4SLinus Torvalds	  The uncompressor code port configuration is now handled
148c7657846SBen Dooks	  by CONFIG_S3C_LOWLEVEL_UART_PORT.
1491da177e4SLinus Torvalds
1501da177e4SLinus Torvaldsendmenu
151