xref: /openbmc/linux/arch/mips/Kconfig.debug (revision 762f99f4f3cb41a775b5157dd761217beba65873)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
21da177e4SLinus Torvalds
34dd92e15SRalf Baechleconfig EARLY_PRINTK
46a108a14SDavid Rientjes	bool "Early printk" if EXPERT
54dd92e15SRalf Baechle	depends on SYS_HAS_EARLY_PRINTK
64dd92e15SRalf Baechle	default y
74dd92e15SRalf Baechle	help
84dd92e15SRalf Baechle	  This option enables special console drivers which allow the kernel
94dd92e15SRalf Baechle	  to print messages very early in the bootup process.
104dd92e15SRalf Baechle
114dd92e15SRalf Baechle	  This is useful for kernel debugging when your machine crashes very
124dd92e15SRalf Baechle	  early before the console code is initialized. For normal operation,
134dd92e15SRalf Baechle	  it is not recommended because it looks ugly on some machines and
144dd92e15SRalf Baechle	  doesn't cooperate with an X server. You should normally say N here,
154dd92e15SRalf Baechle	  unless you want to debug such a crash.
164dd92e15SRalf Baechle
177cd93b89SYoichi Yuasaconfig EARLY_PRINTK_8250
18e6086557SRalf Baechle	bool
19e6086557SRalf Baechle	depends on EARLY_PRINTK && USE_GENERIC_EARLY_PRINTK_8250
20e6086557SRalf Baechle	default y
217cd93b89SYoichi Yuasa	help
22e6086557SRalf Baechle	  "8250/16550 and compatible serial early printk driver"
237cd93b89SYoichi Yuasa	  If you say Y here, it will be possible to use a 8250/16550 serial
247cd93b89SYoichi Yuasa	  port as the boot console.
257cd93b89SYoichi Yuasa
26e6086557SRalf Baechleconfig USE_GENERIC_EARLY_PRINTK_8250
27e6086557SRalf Baechle	bool
28e6086557SRalf Baechle
296acc7d48SDmitri Vorobievconfig CMDLINE_BOOL
306acc7d48SDmitri Vorobiev	bool "Built-in kernel command line"
316acc7d48SDmitri Vorobiev	help
326acc7d48SDmitri Vorobiev	  For most systems, it is firmware or second stage bootloader that
336acc7d48SDmitri Vorobiev	  by default specifies the kernel command line options.  However,
346acc7d48SDmitri Vorobiev	  it might be necessary or advantageous to either override the
356acc7d48SDmitri Vorobiev	  default kernel command line or add a few extra options to it.
366acc7d48SDmitri Vorobiev	  For such cases, this option allows you to hardcode your own
376acc7d48SDmitri Vorobiev	  command line options directly into the kernel.  For that, you
386acc7d48SDmitri Vorobiev	  should choose 'Y' here, and fill in the extra boot arguments
396acc7d48SDmitri Vorobiev	  in CONFIG_CMDLINE.
406acc7d48SDmitri Vorobiev
416acc7d48SDmitri Vorobiev	  The built-in options will be concatenated to the default command
426acc7d48SDmitri Vorobiev	  line if CMDLINE_OVERRIDE is set to 'N'. Otherwise, the default
436acc7d48SDmitri Vorobiev	  command line will be ignored and replaced by the built-in string.
446acc7d48SDmitri Vorobiev
456acc7d48SDmitri Vorobiev	  Most MIPS systems will normally expect 'N' here and rely upon
466acc7d48SDmitri Vorobiev	  the command line from the firmware or the second-stage bootloader.
476acc7d48SDmitri Vorobiev
481da177e4SLinus Torvaldsconfig CMDLINE
491da177e4SLinus Torvalds	string "Default kernel command string"
506acc7d48SDmitri Vorobiev	depends on CMDLINE_BOOL
511da177e4SLinus Torvalds	help
521da177e4SLinus Torvalds	  On some platforms, there is currently no way for the boot loader to
536acc7d48SDmitri Vorobiev	  pass arguments to the kernel.  For these platforms, and for the cases
546acc7d48SDmitri Vorobiev	  when you want to add some extra options to the command line or ignore
556acc7d48SDmitri Vorobiev	  the default command line, you can supply some command-line options at
566acc7d48SDmitri Vorobiev	  build time by entering them here.  In other cases you can specify
576acc7d48SDmitri Vorobiev	  kernel args so that you don't have to set them up in board prom
586acc7d48SDmitri Vorobiev	  initialization routines.
596acc7d48SDmitri Vorobiev
606acc7d48SDmitri Vorobiev	  For more information, see the CMDLINE_BOOL and CMDLINE_OVERRIDE
616acc7d48SDmitri Vorobiev	  options.
626acc7d48SDmitri Vorobiev
636acc7d48SDmitri Vorobievconfig CMDLINE_OVERRIDE
646b2aac42SMasanari Iida	bool "Built-in command line overrides firmware arguments"
656acc7d48SDmitri Vorobiev	depends on CMDLINE_BOOL
666acc7d48SDmitri Vorobiev	help
676acc7d48SDmitri Vorobiev	  By setting this option to 'Y' you will have your kernel ignore
686acc7d48SDmitri Vorobiev	  command line arguments from firmware or second stage bootloader.
696acc7d48SDmitri Vorobiev	  Instead, the built-in command line will be used exclusively.
706acc7d48SDmitri Vorobiev
716acc7d48SDmitri Vorobiev	  Normally, you will choose 'N' here.
721da177e4SLinus Torvalds
731da177e4SLinus Torvaldsconfig SB1XXX_CORELIS
741da177e4SLinus Torvalds	bool "Corelis Debugger"
751da177e4SLinus Torvalds	depends on SIBYTE_SB1xxx_SOC
76e87f69a5SJulian Braha	select DEBUG_KERNEL if !COMPILE_TEST
773e441845SRalf Baechle	select DEBUG_INFO if !COMPILE_TEST
781da177e4SLinus Torvalds	help
791da177e4SLinus Torvalds	  Select compile flags that produce code that can be processed by the
801da177e4SLinus Torvalds	  Corelis mksym utility and UDB Emulator.
811da177e4SLinus Torvalds
82f86a69b1SWu Zhangjinconfig DEBUG_ZBOOT
83f86a69b1SWu Zhangjin	bool "Enable compressed kernel support debugging"
84f86a69b1SWu Zhangjin	depends on DEBUG_KERNEL && SYS_SUPPORTS_ZBOOT
85f86a69b1SWu Zhangjin	default n
86f86a69b1SWu Zhangjin	help
87f86a69b1SWu Zhangjin	  If you want to add compressed kernel support to a new board, and the
88f86a69b1SWu Zhangjin	  board supports uart16550 compatible serial port, please select
89f86a69b1SWu Zhangjin	  SYS_SUPPORTS_ZBOOT_UART16550 for your board and enable this option to
90f86a69b1SWu Zhangjin	  debug it.
91f86a69b1SWu Zhangjin
92f86a69b1SWu Zhangjin	  If your board doesn't support uart16550 compatible serial port, you
93f86a69b1SWu Zhangjin	  can try to select SYS_SUPPORTS_ZBOOT and use the other methods to
94f86a69b1SWu Zhangjin	  debug it. for example, add a new serial port support just as
95f86a69b1SWu Zhangjin	  arch/mips/boot/compressed/uart-16550.c does.
96f86a69b1SWu Zhangjin
97f86a69b1SWu Zhangjin	  After the compressed kernel support works, please disable this option
98f86a69b1SWu Zhangjin	  to reduce the kernel image size and speed up the booting procedure a
99f86a69b1SWu Zhangjin	  little.
100f86a69b1SWu Zhangjin
101*f92a05b9SPaul Cercueilconfig ZBOOT_INGENIC_UART
102*f92a05b9SPaul Cercueil	int "UART to use for compressed kernel debugging"
103*f92a05b9SPaul Cercueil	depends on DEBUG_ZBOOT && MACH_INGENIC_SOC
104*f92a05b9SPaul Cercueil	default 0
105*f92a05b9SPaul Cercueil	range 0 4
106*f92a05b9SPaul Cercueil	help
107*f92a05b9SPaul Cercueil	  Specify the UART that should be used for compressed kernel debugging.
108*f92a05b9SPaul Cercueil
109bba90760SDavid Daneyconfig SPINLOCK_TEST
110bba90760SDavid Daney	bool "Enable spinlock timing tests in debugfs"
111bba90760SDavid Daney	depends on DEBUG_FS
112bba90760SDavid Daney	default n
113bba90760SDavid Daney	help
114bba90760SDavid Daney	  Add several files to the debugfs to test spinlock speed.
115bba90760SDavid Daney
116d478b088SPaul Burtonconfig SCACHE_DEBUGFS
117d478b088SPaul Burton	bool "L2 cache debugfs entries"
118d478b088SPaul Burton	depends on DEBUG_FS
119d478b088SPaul Burton	help
120d478b088SPaul Burton	  Enable this to allow parts of the L2 cache configuration, such as
121d478b088SPaul Burton	  whether or not prefetching is enabled, to be exposed to userland
122d478b088SPaul Burton	  via debugfs.
123d478b088SPaul Burton
124d478b088SPaul Burton	  If unsure, say N.
125d478b088SPaul Burton
1267e5e371eSJames Hoganmenuconfig MIPS_CPS_NS16550_BOOL
127609cf6f2SPaul Burton	bool "CPS SMP NS16550 UART output"
128609cf6f2SPaul Burton	depends on MIPS_CPS
129609cf6f2SPaul Burton	help
130609cf6f2SPaul Burton	  Output debug information via an ns16550 compatible UART if exceptions
131609cf6f2SPaul Burton	  occur early in the boot process of a secondary core.
132609cf6f2SPaul Burton
1337e5e371eSJames Hoganif MIPS_CPS_NS16550_BOOL
1347e5e371eSJames Hogan
1357e5e371eSJames Hoganconfig MIPS_CPS_NS16550
1367e5e371eSJames Hogan	def_bool MIPS_CPS_NS16550_BASE != 0
137609cf6f2SPaul Burton
138609cf6f2SPaul Burtonconfig MIPS_CPS_NS16550_BASE
139609cf6f2SPaul Burton	hex "UART Base Address"
140609cf6f2SPaul Burton	default 0x1b0003f8 if MIPS_MALTA
1417e5e371eSJames Hogan	default 0
142609cf6f2SPaul Burton	help
143609cf6f2SPaul Burton	  The base address of the ns16550 compatible UART on which to output
144609cf6f2SPaul Burton	  debug information from the early stages of core startup.
145609cf6f2SPaul Burton
1467e5e371eSJames Hogan	  This is only used if non-zero.
1477e5e371eSJames Hogan
148609cf6f2SPaul Burtonconfig MIPS_CPS_NS16550_SHIFT
149609cf6f2SPaul Burton	int "UART Register Shift"
1507e5e371eSJames Hogan	default 0
151609cf6f2SPaul Burton	help
152609cf6f2SPaul Burton	  The number of bits to shift ns16550 register indices by in order to
153609cf6f2SPaul Burton	  form their addresses. That is, log base 2 of the span between
154609cf6f2SPaul Burton	  adjacent ns16550 registers in the system.
155609cf6f2SPaul Burton
156ad42e0a8SSerge Seminconfig MIPS_CPS_NS16550_WIDTH
157ad42e0a8SSerge Semin	int "UART Register Width"
158ad42e0a8SSerge Semin	default 1
159ad42e0a8SSerge Semin	help
160ad42e0a8SSerge Semin	  ns16550 registers width. UART registers IO access methods will be
161ad42e0a8SSerge Semin	  selected in accordance with this parameter. By setting it to 1, 2 or
162ad42e0a8SSerge Semin	  4 UART registers will be accessed by means of lb/sb, lh/sh or lw/sw
163ad42e0a8SSerge Semin	  instructions respectively. Any value not from that set activates
164ad42e0a8SSerge Semin	  lb/sb instructions.
165ad42e0a8SSerge Semin
1667e5e371eSJames Hoganendif # MIPS_CPS_NS16550_BOOL
167