xref: /openbmc/linux/arch/sh/Kconfig.debug (revision 91e656aa)
11da177e4SLinus Torvaldsmenu "Kernel hacking"
21da177e4SLinus Torvalds
3afbfb52eSPaul Mundtconfig TRACE_IRQFLAGS_SUPPORT
4afbfb52eSPaul Mundt	bool
5afbfb52eSPaul Mundt	default y
6afbfb52eSPaul Mundt
71da177e4SLinus Torvaldssource "lib/Kconfig.debug"
81da177e4SLinus Torvalds
91da177e4SLinus Torvaldsconfig SH_STANDARD_BIOS
101da177e4SLinus Torvalds	bool "Use LinuxSH standard BIOS"
111da177e4SLinus Torvalds	help
121da177e4SLinus Torvalds	  Say Y here if your target has the gdb-sh-stub
131da177e4SLinus Torvalds	  package from www.m17n.org (or any conforming standard LinuxSH BIOS)
141da177e4SLinus Torvalds	  in FLASH or EPROM.  The kernel will use standard BIOS calls during
151da177e4SLinus Torvalds	  boot for various housekeeping tasks (including calls to read and
161da177e4SLinus Torvalds	  write characters to a system console, get a MAC address from an
171da177e4SLinus Torvalds	  on-board Ethernet interface, and shut down the hardware).  Note this
181da177e4SLinus Torvalds	  does not work with machines with an existing operating system in
191da177e4SLinus Torvalds	  mask ROM and no flash (WindowsCE machines fall in this category).
201da177e4SLinus Torvalds	  If unsure, say N.
211da177e4SLinus Torvalds
221da177e4SLinus Torvaldsconfig EARLY_SCIF_CONSOLE
231da177e4SLinus Torvalds	bool "Use early SCIF console"
246fc21b82SPaul Mundt	help
256fc21b82SPaul Mundt	  This enables an early console using a fixed SCIF port. This can
266fc21b82SPaul Mundt	  be used by platforms that are either not running the SH
276fc21b82SPaul Mundt	  standard BIOS, or do not wish to use the BIOS callbacks for the
286fc21b82SPaul Mundt	  serial I/O.
296fc21b82SPaul Mundt
306fc21b82SPaul Mundtconfig EARLY_SCIF_CONSOLE_PORT
316fc21b82SPaul Mundt	hex "SCIF port for early console"
326fc21b82SPaul Mundt	depends on EARLY_SCIF_CONSOLE
336fc21b82SPaul Mundt	default "0xffe00000" if CPU_SUBTYPE_SH7780
3411cbb70eSYoshinori Sato	default "0xfffe9800" if CPU_SUBTYPE_SH7206
3511cbb70eSYoshinori Sato	default "0xf8420000" if CPU_SUBTYPE_SH7619
362a8ff459SNobuhiro Iwamatsu	default "0xa4400000" if CPU_SUBTYPE_SH7712 || CPU_SUBTYPE_SH7705
376fc21b82SPaul Mundt	default "0xffe80000" if CPU_SH4
381da177e4SLinus Torvalds
391da177e4SLinus Torvaldsconfig EARLY_PRINTK
401da177e4SLinus Torvalds	bool "Early printk support"
411da177e4SLinus Torvalds	depends on SH_STANDARD_BIOS || EARLY_SCIF_CONSOLE
421da177e4SLinus Torvalds	help
431da177e4SLinus Torvalds	  Say Y here to redirect kernel printk messages to the serial port
441da177e4SLinus Torvalds	  used by the SH-IPL bootloader, starting very early in the boot
451da177e4SLinus Torvalds	  process and ending when the kernel's serial console is initialised.
461da177e4SLinus Torvalds	  This option is only useful porting the kernel to a new machine,
471da177e4SLinus Torvalds	  when the kernel may crash or hang before the serial console is
481da177e4SLinus Torvalds	  initialised. If unsure, say N.
491da177e4SLinus Torvalds
506fc21b82SPaul Mundt	  On devices that are running SH-IPL and want to keep the port
516fc21b82SPaul Mundt	  initialization consistent while not using the BIOS callbacks,
526fc21b82SPaul Mundt	  select both the EARLY_SCIF_CONSOLE and SH_STANDARD_BIOS, using
536fc21b82SPaul Mundt	  the kernel command line option to toggle back and forth.
546fc21b82SPaul Mundt
5591e656aaSPaul Mundtconfig DEBUG_BOOTMEM
5691e656aaSPaul Mundt	depends on DEBUG_KERNEL
5791e656aaSPaul Mundt	bool "Debug BOOTMEM initialization"
5891e656aaSPaul Mundt
59d153ea88SPaul Mundtconfig DEBUG_STACKOVERFLOW
60d153ea88SPaul Mundt	bool "Check for stack overflows"
61d153ea88SPaul Mundt	depends on DEBUG_KERNEL
62d153ea88SPaul Mundt	help
63d153ea88SPaul Mundt	  This option will cause messages to be printed if free stack space
64d153ea88SPaul Mundt	  drops below a certain limit.
65d153ea88SPaul Mundt
66d153ea88SPaul Mundtconfig DEBUG_STACK_USAGE
67d153ea88SPaul Mundt	bool "Stack utilization instrumentation"
68d153ea88SPaul Mundt	depends on DEBUG_KERNEL
69d153ea88SPaul Mundt	help
70d153ea88SPaul Mundt	  Enables the display of the minimum amount of free stack which each
71d153ea88SPaul Mundt	  task has ever had available in the sysrq-T and sysrq-P debug output.
72d153ea88SPaul Mundt
73d153ea88SPaul Mundt	  This option will slow down process creation somewhat.
74d153ea88SPaul Mundt
75a6a31139SPaul Mundtconfig 4KSTACKS
76a6a31139SPaul Mundt	bool "Use 4Kb for kernel stacks instead of 8Kb"
77a6a31139SPaul Mundt	depends on DEBUG_KERNEL
78a6a31139SPaul Mundt	help
79a6a31139SPaul Mundt	  If you say Y here the kernel will use a 4Kb stacksize for the
80a6a31139SPaul Mundt	  kernel stack attached to each process/thread. This facilitates
81a6a31139SPaul Mundt	  running more threads on a system and also reduces the pressure
82a6a31139SPaul Mundt	  on the VM subsystem for higher order allocations. This option
83a6a31139SPaul Mundt	  will also use IRQ stacks to compensate for the reduced stackspace.
84a6a31139SPaul Mundt
85fa5da2f7SPaul Mundtconfig SH_KGDB
861da177e4SLinus Torvalds	bool "Include KGDB kernel debugger"
872549b322SPaul Mundt	select FRAME_POINTER
88fa5da2f7SPaul Mundt	select DEBUG_INFO
891da177e4SLinus Torvalds	help
901da177e4SLinus Torvalds	  Include in-kernel hooks for kgdb, the Linux kernel source level
911da177e4SLinus Torvalds	  debugger.  See <http://kgdb.sourceforge.net/> for more information.
921da177e4SLinus Torvalds	  Unless you are intending to debug the kernel, say N here.
931da177e4SLinus Torvalds
941da177e4SLinus Torvaldsmenu "KGDB configuration options"
95fa5da2f7SPaul Mundt	depends on SH_KGDB
961da177e4SLinus Torvalds
971da177e4SLinus Torvaldsconfig MORE_COMPILE_OPTIONS
981da177e4SLinus Torvalds	bool "Add any additional compile options"
991da177e4SLinus Torvalds	help
1001da177e4SLinus Torvalds	  If you want to add additional CFLAGS to the kernel build, enable this
1011da177e4SLinus Torvalds	  option and then enter what you would like to add in the next question.
1021da177e4SLinus Torvalds	  Note however that -g is already appended with the selection of KGDB.
1031da177e4SLinus Torvalds
1041da177e4SLinus Torvaldsconfig COMPILE_OPTIONS
1051da177e4SLinus Torvalds	string "Additional compile arguments"
1061da177e4SLinus Torvalds	depends on MORE_COMPILE_OPTIONS
1071da177e4SLinus Torvalds
1081da177e4SLinus Torvaldsconfig KGDB_NMI
1091da177e4SLinus Torvalds	bool "Enter KGDB on NMI"
1101da177e4SLinus Torvalds	default n
1111da177e4SLinus Torvalds
1121da177e4SLinus Torvaldsconfig SH_KGDB_CONSOLE
1131da177e4SLinus Torvalds	bool "Console messages through GDB"
114fa5da2f7SPaul Mundt	depends on !SERIAL_SH_SCI_CONSOLE
115fa5da2f7SPaul Mundt	select SERIAL_CORE_CONSOLE
1161da177e4SLinus Torvalds	default n
1171da177e4SLinus Torvalds
1181da177e4SLinus Torvaldsconfig KGDB_SYSRQ
1191da177e4SLinus Torvalds	bool "Allow SysRq 'G' to enter KGDB"
1201da177e4SLinus Torvalds	default y
1211da177e4SLinus Torvalds
1221da177e4SLinus Torvaldscomment "Serial port setup"
1231da177e4SLinus Torvalds
1241da177e4SLinus Torvaldsconfig KGDB_DEFPORT
1251da177e4SLinus Torvalds	int "Port number (ttySCn)"
1261da177e4SLinus Torvalds	default "1"
1271da177e4SLinus Torvalds
1281da177e4SLinus Torvaldsconfig KGDB_DEFBAUD
1291da177e4SLinus Torvalds	int "Baud rate"
1301da177e4SLinus Torvalds	default "115200"
1311da177e4SLinus Torvalds
1321da177e4SLinus Torvaldschoice
1331da177e4SLinus Torvalds	prompt "Parity"
134fa5da2f7SPaul Mundt	depends on SH_KGDB
1351da177e4SLinus Torvalds	default KGDB_DEFPARITY_N
1361da177e4SLinus Torvalds
1371da177e4SLinus Torvaldsconfig KGDB_DEFPARITY_N
1381da177e4SLinus Torvalds	bool "None"
1391da177e4SLinus Torvalds
1401da177e4SLinus Torvaldsconfig KGDB_DEFPARITY_E
1411da177e4SLinus Torvalds	bool "Even"
1421da177e4SLinus Torvalds
1431da177e4SLinus Torvaldsconfig KGDB_DEFPARITY_O
1441da177e4SLinus Torvalds	bool "Odd"
1451da177e4SLinus Torvalds
1461da177e4SLinus Torvaldsendchoice
1471da177e4SLinus Torvalds
1481da177e4SLinus Torvaldschoice
1491da177e4SLinus Torvalds	prompt "Data bits"
150fa5da2f7SPaul Mundt	depends on SH_KGDB
1511da177e4SLinus Torvalds	default KGDB_DEFBITS_8
1521da177e4SLinus Torvalds
1531da177e4SLinus Torvaldsconfig KGDB_DEFBITS_8
1541da177e4SLinus Torvalds	bool "8"
1551da177e4SLinus Torvalds
1561da177e4SLinus Torvaldsconfig KGDB_DEFBITS_7
1571da177e4SLinus Torvalds	bool "7"
1581da177e4SLinus Torvalds
1591da177e4SLinus Torvaldsendchoice
1601da177e4SLinus Torvalds
1611da177e4SLinus Torvaldsendmenu
1621da177e4SLinus Torvalds
1631da177e4SLinus Torvaldsendmenu
164