xref: /openbmc/linux/arch/mips/Kconfig.debug (revision 6b2aac42b20f495d9ea220036f57596d525d4233)
11da177e4SLinus Torvaldsmenu "Kernel hacking"
21da177e4SLinus Torvalds
3192ef366SRalf Baechleconfig TRACE_IRQFLAGS_SUPPORT
4192ef366SRalf Baechle	bool
5192ef366SRalf Baechle	default y
6192ef366SRalf Baechle
71da177e4SLinus Torvaldssource "lib/Kconfig.debug"
81da177e4SLinus Torvalds
94dd92e15SRalf Baechleconfig EARLY_PRINTK
106a108a14SDavid Rientjes	bool "Early printk" if EXPERT
114dd92e15SRalf Baechle	depends on SYS_HAS_EARLY_PRINTK
124dd92e15SRalf Baechle	default y
134dd92e15SRalf Baechle	help
144dd92e15SRalf Baechle	  This option enables special console drivers which allow the kernel
154dd92e15SRalf Baechle	  to print messages very early in the bootup process.
164dd92e15SRalf Baechle
174dd92e15SRalf Baechle	  This is useful for kernel debugging when your machine crashes very
184dd92e15SRalf Baechle	  early before the console code is initialized. For normal operation,
194dd92e15SRalf Baechle	  it is not recommended because it looks ugly on some machines and
204dd92e15SRalf Baechle	  doesn't cooperate with an X server. You should normally say N here,
214dd92e15SRalf Baechle	  unless you want to debug such a crash.
224dd92e15SRalf Baechle
236acc7d48SDmitri Vorobievconfig CMDLINE_BOOL
246acc7d48SDmitri Vorobiev	bool "Built-in kernel command line"
256acc7d48SDmitri Vorobiev	default n
266acc7d48SDmitri Vorobiev	help
276acc7d48SDmitri Vorobiev	  For most systems, it is firmware or second stage bootloader that
286acc7d48SDmitri Vorobiev	  by default specifies the kernel command line options.  However,
296acc7d48SDmitri Vorobiev	  it might be necessary or advantageous to either override the
306acc7d48SDmitri Vorobiev	  default kernel command line or add a few extra options to it.
316acc7d48SDmitri Vorobiev	  For such cases, this option allows you to hardcode your own
326acc7d48SDmitri Vorobiev	  command line options directly into the kernel.  For that, you
336acc7d48SDmitri Vorobiev	  should choose 'Y' here, and fill in the extra boot arguments
346acc7d48SDmitri Vorobiev	  in CONFIG_CMDLINE.
356acc7d48SDmitri Vorobiev
366acc7d48SDmitri Vorobiev	  The built-in options will be concatenated to the default command
376acc7d48SDmitri Vorobiev	  line if CMDLINE_OVERRIDE is set to 'N'. Otherwise, the default
386acc7d48SDmitri Vorobiev	  command line will be ignored and replaced by the built-in string.
396acc7d48SDmitri Vorobiev
406acc7d48SDmitri Vorobiev	  Most MIPS systems will normally expect 'N' here and rely upon
416acc7d48SDmitri Vorobiev	  the command line from the firmware or the second-stage bootloader.
426acc7d48SDmitri Vorobiev
431da177e4SLinus Torvaldsconfig CMDLINE
441da177e4SLinus Torvalds	string "Default kernel command string"
456acc7d48SDmitri Vorobiev	depends on CMDLINE_BOOL
461da177e4SLinus Torvalds	default ""
471da177e4SLinus Torvalds	help
481da177e4SLinus Torvalds	  On some platforms, there is currently no way for the boot loader to
496acc7d48SDmitri Vorobiev	  pass arguments to the kernel.  For these platforms, and for the cases
506acc7d48SDmitri Vorobiev	  when you want to add some extra options to the command line or ignore
516acc7d48SDmitri Vorobiev	  the default command line, you can supply some command-line options at
526acc7d48SDmitri Vorobiev	  build time by entering them here.  In other cases you can specify
536acc7d48SDmitri Vorobiev	  kernel args so that you don't have to set them up in board prom
546acc7d48SDmitri Vorobiev	  initialization routines.
556acc7d48SDmitri Vorobiev
566acc7d48SDmitri Vorobiev	  For more information, see the CMDLINE_BOOL and CMDLINE_OVERRIDE
576acc7d48SDmitri Vorobiev	  options.
586acc7d48SDmitri Vorobiev
596acc7d48SDmitri Vorobievconfig CMDLINE_OVERRIDE
60*6b2aac42SMasanari Iida	bool "Built-in command line overrides firmware arguments"
616acc7d48SDmitri Vorobiev	default n
626acc7d48SDmitri Vorobiev	depends on CMDLINE_BOOL
636acc7d48SDmitri Vorobiev	help
646acc7d48SDmitri Vorobiev	  By setting this option to 'Y' you will have your kernel ignore
656acc7d48SDmitri Vorobiev	  command line arguments from firmware or second stage bootloader.
666acc7d48SDmitri Vorobiev	  Instead, the built-in command line will be used exclusively.
676acc7d48SDmitri Vorobiev
686acc7d48SDmitri Vorobiev	  Normally, you will choose 'N' here.
691da177e4SLinus Torvalds
70334c86c4SFrom: jiang.adam@gmail.comconfig DEBUG_STACKOVERFLOW
71334c86c4SFrom: jiang.adam@gmail.com	bool "Check for stack overflows"
72334c86c4SFrom: jiang.adam@gmail.com	depends on DEBUG_KERNEL
73334c86c4SFrom: jiang.adam@gmail.com	help
74334c86c4SFrom: jiang.adam@gmail.com	  This option will cause messages to be printed if free stack space
75334c86c4SFrom: jiang.adam@gmail.com	  drops below a certain limit(2GB on MIPS). The debugging option
76334c86c4SFrom: jiang.adam@gmail.com	  provides another way to check stack overflow happened on kernel mode
77334c86c4SFrom: jiang.adam@gmail.com	  stack usually caused by nested interruption.
78334c86c4SFrom: jiang.adam@gmail.com
799349075aSRalf Baechleconfig SMTC_IDLE_HOOK_DEBUG
80c68644d3SRalf Baechle	bool "Enable additional debug checks before going into CPU idle loop"
81c68644d3SRalf Baechle	depends on DEBUG_KERNEL && MIPS_MT_SMTC
82c68644d3SRalf Baechle	help
83c68644d3SRalf Baechle	  This option enables Enable additional debug checks before going into
84c68644d3SRalf Baechle	  CPU idle loop.  For details on these checks, see
85c68644d3SRalf Baechle	  arch/mips/kernel/smtc.c.  This debugging option result in significant
86c68644d3SRalf Baechle	  overhead so should be disabled in production kernels.
87c68644d3SRalf Baechle
881da177e4SLinus Torvaldsconfig SB1XXX_CORELIS
891da177e4SLinus Torvalds	bool "Corelis Debugger"
901da177e4SLinus Torvalds	depends on SIBYTE_SB1xxx_SOC
911da177e4SLinus Torvalds	select DEBUG_INFO
921da177e4SLinus Torvalds	help
931da177e4SLinus Torvalds	  Select compile flags that produce code that can be processed by the
941da177e4SLinus Torvalds	  Corelis mksym utility and UDB Emulator.
951da177e4SLinus Torvalds
961da177e4SLinus Torvaldsconfig RUNTIME_DEBUG
971da177e4SLinus Torvalds	bool "Enable run-time debugging"
981da177e4SLinus Torvalds	depends on DEBUG_KERNEL
991da177e4SLinus Torvalds	help
1001da177e4SLinus Torvalds	  If you say Y here, some debugging macros will do run-time checking.
1011da177e4SLinus Torvalds	  If you say N here, those macros will mostly turn to no-ops.  See
10200ace207SDmitri Vorobiev	  arch/mips/include/asm/debug.h for debugging macros.
1031da177e4SLinus Torvalds	  If unsure, say N.
1041da177e4SLinus Torvalds
105f86a69b1SWu Zhangjinconfig DEBUG_ZBOOT
106f86a69b1SWu Zhangjin	bool "Enable compressed kernel support debugging"
107f86a69b1SWu Zhangjin	depends on DEBUG_KERNEL && SYS_SUPPORTS_ZBOOT
108f86a69b1SWu Zhangjin	default n
109f86a69b1SWu Zhangjin	help
110f86a69b1SWu Zhangjin	  If you want to add compressed kernel support to a new board, and the
111f86a69b1SWu Zhangjin	  board supports uart16550 compatible serial port, please select
112f86a69b1SWu Zhangjin	  SYS_SUPPORTS_ZBOOT_UART16550 for your board and enable this option to
113f86a69b1SWu Zhangjin	  debug it.
114f86a69b1SWu Zhangjin
115f86a69b1SWu Zhangjin	  If your board doesn't support uart16550 compatible serial port, you
116f86a69b1SWu Zhangjin	  can try to select SYS_SUPPORTS_ZBOOT and use the other methods to
117f86a69b1SWu Zhangjin	  debug it. for example, add a new serial port support just as
118f86a69b1SWu Zhangjin	  arch/mips/boot/compressed/uart-16550.c does.
119f86a69b1SWu Zhangjin
120f86a69b1SWu Zhangjin	  After the compressed kernel support works, please disable this option
121f86a69b1SWu Zhangjin	  to reduce the kernel image size and speed up the booting procedure a
122f86a69b1SWu Zhangjin	  little.
123f86a69b1SWu Zhangjin
124bba90760SDavid Daneyconfig SPINLOCK_TEST
125bba90760SDavid Daney	bool "Enable spinlock timing tests in debugfs"
126bba90760SDavid Daney	depends on DEBUG_FS
127bba90760SDavid Daney	default n
128bba90760SDavid Daney	help
129bba90760SDavid Daney	  Add several files to the debugfs to test spinlock speed.
130bba90760SDavid Daney
1311da177e4SLinus Torvaldsendmenu
132