xref: /openbmc/linux/arch/sh/Kconfig.debug (revision b817f7e0)
11da177e4SLinus Torvaldsmenu "Kernel hacking"
21da177e4SLinus Torvalds
3afbfb52eSPaul Mundtconfig TRACE_IRQFLAGS_SUPPORT
4d7ef4fb3SHarvey Harrison	def_bool y
5afbfb52eSPaul Mundt
61da177e4SLinus Torvaldssource "lib/Kconfig.debug"
71da177e4SLinus Torvalds
81da177e4SLinus Torvaldsconfig SH_STANDARD_BIOS
91da177e4SLinus Torvalds	bool "Use LinuxSH standard BIOS"
101a013e2fSPaul Mundt	depends on SUPERH32
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
318d797cd1SPaul Mundt	hex
326fc21b82SPaul Mundt	depends on EARLY_SCIF_CONSOLE
332ad69908SPaul Mundt	default "0xa4400000" if CPU_SUBTYPE_SH7712 || CPU_SUBTYPE_SH7705
342ad69908SPaul Mundt	default "0xa4430000" if CPU_SUBTYPE_SH7720 || CPU_SUBTYPE_SH7721
352ad69908SPaul Mundt	default "0xf8420000" if CPU_SUBTYPE_SH7619
362ad69908SPaul Mundt	default "0xff804000" if CPU_SUBTYPE_MXG
372ad69908SPaul Mundt	default "0xffc30000" if CPU_SUBTYPE_SHX3
382ad69908SPaul Mundt	default "0xffe00000" if CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7763 || \
39a4e1d084SYoshihiro Shimoda				CPU_SUBTYPE_SH7722 || CPU_SUBTYPE_SH7366 || \
40a4e1d084SYoshihiro Shimoda				CPU_SUBTYPE_SH7343
412ad69908SPaul Mundt	default "0xffe80000" if CPU_SH4
425cbc3af5SMagnus Damm	default "0xffea0000" if CPU_SUBTYPE_SH7785
436d01f510SPaul Mundt	default "0xfffe8000" if CPU_SUBTYPE_SH7203
44a8f67f4bSPaul Mundt	default "0xfffe9800" if CPU_SUBTYPE_SH7206 || CPU_SUBTYPE_SH7263
458d797cd1SPaul Mundt	default "0x00000000"
461da177e4SLinus Torvalds
471da177e4SLinus Torvaldsconfig EARLY_PRINTK
481da177e4SLinus Torvalds	bool "Early printk support"
491da177e4SLinus Torvalds	depends on SH_STANDARD_BIOS || EARLY_SCIF_CONSOLE
501da177e4SLinus Torvalds	help
511da177e4SLinus Torvalds	  Say Y here to redirect kernel printk messages to the serial port
521da177e4SLinus Torvalds	  used by the SH-IPL bootloader, starting very early in the boot
531da177e4SLinus Torvalds	  process and ending when the kernel's serial console is initialised.
541da177e4SLinus Torvalds	  This option is only useful porting the kernel to a new machine,
551da177e4SLinus Torvalds	  when the kernel may crash or hang before the serial console is
561da177e4SLinus Torvalds	  initialised. If unsure, say N.
571da177e4SLinus Torvalds
586fc21b82SPaul Mundt	  On devices that are running SH-IPL and want to keep the port
596fc21b82SPaul Mundt	  initialization consistent while not using the BIOS callbacks,
606fc21b82SPaul Mundt	  select both the EARLY_SCIF_CONSOLE and SH_STANDARD_BIOS, using
616fc21b82SPaul Mundt	  the kernel command line option to toggle back and forth.
626fc21b82SPaul Mundt
6391e656aaSPaul Mundtconfig DEBUG_BOOTMEM
6491e656aaSPaul Mundt	depends on DEBUG_KERNEL
6591e656aaSPaul Mundt	bool "Debug BOOTMEM initialization"
6691e656aaSPaul Mundt
67d153ea88SPaul Mundtconfig DEBUG_STACKOVERFLOW
68d153ea88SPaul Mundt	bool "Check for stack overflows"
695db141a9SPaul Mundt	depends on DEBUG_KERNEL && SUPERH32
70d153ea88SPaul Mundt	help
71d153ea88SPaul Mundt	  This option will cause messages to be printed if free stack space
72d153ea88SPaul Mundt	  drops below a certain limit.
73d153ea88SPaul Mundt
74d153ea88SPaul Mundtconfig DEBUG_STACK_USAGE
75d153ea88SPaul Mundt	bool "Stack utilization instrumentation"
76d153ea88SPaul Mundt	depends on DEBUG_KERNEL
77d153ea88SPaul Mundt	help
78d153ea88SPaul Mundt	  Enables the display of the minimum amount of free stack which each
79d153ea88SPaul Mundt	  task has ever had available in the sysrq-T and sysrq-P debug output.
80d153ea88SPaul Mundt
81d153ea88SPaul Mundt	  This option will slow down process creation somewhat.
82d153ea88SPaul Mundt
83a6a31139SPaul Mundtconfig 4KSTACKS
84a6a31139SPaul Mundt	bool "Use 4Kb for kernel stacks instead of 8Kb"
85b817f7e0SPaul Mundt	depends on DEBUG_KERNEL && (MMU || BROKEN) && !PAGE_SIZE_64KB
86a6a31139SPaul Mundt	help
87a6a31139SPaul Mundt	  If you say Y here the kernel will use a 4Kb stacksize for the
88a6a31139SPaul Mundt	  kernel stack attached to each process/thread. This facilitates
89a6a31139SPaul Mundt	  running more threads on a system and also reduces the pressure
90a6a31139SPaul Mundt	  on the VM subsystem for higher order allocations. This option
91a6a31139SPaul Mundt	  will also use IRQ stacks to compensate for the reduced stackspace.
92a6a31139SPaul Mundt
93110ed282SPaul Mundtconfig IRQSTACKS
94110ed282SPaul Mundt	bool "Use separate kernel stacks when processing interrupts"
955db141a9SPaul Mundt	depends on DEBUG_KERNEL && SUPERH32
96110ed282SPaul Mundt	help
97110ed282SPaul Mundt	  If you say Y here the kernel will use separate kernel stacks
98110ed282SPaul Mundt	  for handling hard and soft interrupts.  This can help avoid
99110ed282SPaul Mundt	  overflowing the process kernel stacks.
100110ed282SPaul Mundt
101fa5da2f7SPaul Mundtconfig SH_KGDB
1021da177e4SLinus Torvalds	bool "Include KGDB kernel debugger"
1032549b322SPaul Mundt	select FRAME_POINTER
104fa5da2f7SPaul Mundt	select DEBUG_INFO
105357d5946SPaul Mundt	depends on CPU_SH3 || CPU_SH4
1061da177e4SLinus Torvalds	help
1071da177e4SLinus Torvalds	  Include in-kernel hooks for kgdb, the Linux kernel source level
1081da177e4SLinus Torvalds	  debugger.  See <http://kgdb.sourceforge.net/> for more information.
1091da177e4SLinus Torvalds	  Unless you are intending to debug the kernel, say N here.
1101da177e4SLinus Torvalds
1111da177e4SLinus Torvaldsmenu "KGDB configuration options"
112fa5da2f7SPaul Mundt	depends on SH_KGDB
1131da177e4SLinus Torvalds
1141da177e4SLinus Torvaldsconfig MORE_COMPILE_OPTIONS
1151da177e4SLinus Torvalds	bool "Add any additional compile options"
1161da177e4SLinus Torvalds	help
1171da177e4SLinus Torvalds	  If you want to add additional CFLAGS to the kernel build, enable this
1181da177e4SLinus Torvalds	  option and then enter what you would like to add in the next question.
1191da177e4SLinus Torvalds	  Note however that -g is already appended with the selection of KGDB.
1201da177e4SLinus Torvalds
1211da177e4SLinus Torvaldsconfig COMPILE_OPTIONS
1221da177e4SLinus Torvalds	string "Additional compile arguments"
1231da177e4SLinus Torvalds	depends on MORE_COMPILE_OPTIONS
1241da177e4SLinus Torvalds
1251da177e4SLinus Torvaldsconfig KGDB_NMI
126d7ef4fb3SHarvey Harrison	def_bool n
127d7ef4fb3SHarvey Harrison	prompt "Enter KGDB on NMI"
1281da177e4SLinus Torvalds
1291da177e4SLinus Torvaldsconfig SH_KGDB_CONSOLE
130d7ef4fb3SHarvey Harrison	def_bool n
131d7ef4fb3SHarvey Harrison	prompt "Console messages through GDB"
132808bde25SPaul Mundt	depends on !SERIAL_SH_SCI_CONSOLE && SERIAL_SH_SCI=y
133fa5da2f7SPaul Mundt	select SERIAL_CORE_CONSOLE
1341da177e4SLinus Torvalds
1351da177e4SLinus Torvaldsconfig KGDB_SYSRQ
136d7ef4fb3SHarvey Harrison	def_bool y
137d7ef4fb3SHarvey Harrison	prompt "Allow SysRq 'G' to enter KGDB"
1380acc729eSPaul Mundt	depends on MAGIC_SYSRQ
1391da177e4SLinus Torvalds
1401da177e4SLinus Torvaldscomment "Serial port setup"
1411da177e4SLinus Torvalds
1421da177e4SLinus Torvaldsconfig KGDB_DEFPORT
1431da177e4SLinus Torvalds	int "Port number (ttySCn)"
1441da177e4SLinus Torvalds	default "1"
1451da177e4SLinus Torvalds
1461da177e4SLinus Torvaldsconfig KGDB_DEFBAUD
1471da177e4SLinus Torvalds	int "Baud rate"
1481da177e4SLinus Torvalds	default "115200"
1491da177e4SLinus Torvalds
1501da177e4SLinus Torvaldschoice
1511da177e4SLinus Torvalds	prompt "Parity"
152fa5da2f7SPaul Mundt	depends on SH_KGDB
1531da177e4SLinus Torvalds	default KGDB_DEFPARITY_N
1541da177e4SLinus Torvalds
1551da177e4SLinus Torvaldsconfig KGDB_DEFPARITY_N
1561da177e4SLinus Torvalds	bool "None"
1571da177e4SLinus Torvalds
1581da177e4SLinus Torvaldsconfig KGDB_DEFPARITY_E
1591da177e4SLinus Torvalds	bool "Even"
1601da177e4SLinus Torvalds
1611da177e4SLinus Torvaldsconfig KGDB_DEFPARITY_O
1621da177e4SLinus Torvalds	bool "Odd"
1631da177e4SLinus Torvalds
1641da177e4SLinus Torvaldsendchoice
1651da177e4SLinus Torvalds
1661da177e4SLinus Torvaldschoice
1671da177e4SLinus Torvalds	prompt "Data bits"
168fa5da2f7SPaul Mundt	depends on SH_KGDB
1691da177e4SLinus Torvalds	default KGDB_DEFBITS_8
1701da177e4SLinus Torvalds
1711da177e4SLinus Torvaldsconfig KGDB_DEFBITS_8
1721da177e4SLinus Torvalds	bool "8"
1731da177e4SLinus Torvalds
1741da177e4SLinus Torvaldsconfig KGDB_DEFBITS_7
1751da177e4SLinus Torvalds	bool "7"
1761da177e4SLinus Torvalds
1771da177e4SLinus Torvaldsendchoice
1781da177e4SLinus Torvalds
1791da177e4SLinus Torvaldsendmenu
1801da177e4SLinus Torvalds
1818214d52aSPaul Mundtif SUPERH64
1828214d52aSPaul Mundt
1838214d52aSPaul Mundtconfig SH64_PROC_ASIDS
1848214d52aSPaul Mundt	bool "Debug: report ASIDs through /proc/asids"
185c07abb6dSPaul Mundt	depends on PROC_FS && MMU
1868214d52aSPaul Mundt
1878214d52aSPaul Mundtconfig SH64_SR_WATCH
1888214d52aSPaul Mundt	bool "Debug: set SR.WATCH to enable hardware watchpoints and trace"
1898214d52aSPaul Mundt
1908214d52aSPaul Mundtconfig POOR_MANS_STRACE
1918214d52aSPaul Mundt	bool "Debug: enable rudimentary strace facility"
1928214d52aSPaul Mundt	help
1938214d52aSPaul Mundt	  This option allows system calls to be traced to the console.  It also
1948214d52aSPaul Mundt	  aids in detecting kernel stack underflow.  It is useful for debugging
1958214d52aSPaul Mundt	  early-userland problems (e.g. init incurring fatal exceptions.)
1968214d52aSPaul Mundt
1978214d52aSPaul Mundtconfig SH_ALPHANUMERIC
1988214d52aSPaul Mundt	bool "Enable debug outputs to on-board alphanumeric display"
1998214d52aSPaul Mundt	depends on SH_CAYMAN
2008214d52aSPaul Mundt
2018214d52aSPaul Mundtconfig SH_NO_BSS_INIT
2028214d52aSPaul Mundt	bool "Avoid zeroing BSS (to speed-up startup on suitable platforms)"
2038214d52aSPaul Mundt
2048214d52aSPaul Mundtendif
2058214d52aSPaul Mundt
2061da177e4SLinus Torvaldsendmenu
207