mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 16:24:13 +08:00
609cf6f229
Provide support for outputting early debug information, in the form of various register values should an exception occur, during the early bringup of secondary cores. This code requires an ns16550-compatible UART accessible from the secondary core, and is written in assembly due to the environment in which such early exceptions occur where way may not have a stack, be coherent or even have initialised caches. [ralf@linux-mips.org: Fix merge conflict.] Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: Steven J. Hill <Steven.Hill@imgtec.com> Cc: Andrew Bresticker <abrestic@chromium.org> Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> Cc: Maciej W. Rozycki <macro@linux-mips.org> Cc: Jason Cooper <jason@lakedaemon.net> Cc: linux-kernel@vger.kernel.org Cc: James Hogan <james.hogan@imgtec.com> Cc: Markos Chandras <markos.chandras@imgtec.com> Patchwork: https://patchwork.linux-mips.org/patch/11202/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
189 lines
6.1 KiB
Plaintext
189 lines
6.1 KiB
Plaintext
menu "Kernel hacking"
|
|
|
|
config TRACE_IRQFLAGS_SUPPORT
|
|
bool
|
|
default y
|
|
|
|
source "lib/Kconfig.debug"
|
|
|
|
config EARLY_PRINTK
|
|
bool "Early printk" if EXPERT
|
|
depends on SYS_HAS_EARLY_PRINTK
|
|
default y
|
|
help
|
|
This option enables special console drivers which allow the kernel
|
|
to print messages very early in the bootup process.
|
|
|
|
This is useful for kernel debugging when your machine crashes very
|
|
early before the console code is initialized. For normal operation,
|
|
it is not recommended because it looks ugly on some machines and
|
|
doesn't cooperate with an X server. You should normally say N here,
|
|
unless you want to debug such a crash.
|
|
|
|
config EARLY_PRINTK_8250
|
|
bool
|
|
depends on EARLY_PRINTK && USE_GENERIC_EARLY_PRINTK_8250
|
|
default y
|
|
help
|
|
"8250/16550 and compatible serial early printk driver"
|
|
If you say Y here, it will be possible to use a 8250/16550 serial
|
|
port as the boot console.
|
|
|
|
config USE_GENERIC_EARLY_PRINTK_8250
|
|
bool
|
|
|
|
config CMDLINE_BOOL
|
|
bool "Built-in kernel command line"
|
|
default n
|
|
help
|
|
For most systems, it is firmware or second stage bootloader that
|
|
by default specifies the kernel command line options. However,
|
|
it might be necessary or advantageous to either override the
|
|
default kernel command line or add a few extra options to it.
|
|
For such cases, this option allows you to hardcode your own
|
|
command line options directly into the kernel. For that, you
|
|
should choose 'Y' here, and fill in the extra boot arguments
|
|
in CONFIG_CMDLINE.
|
|
|
|
The built-in options will be concatenated to the default command
|
|
line if CMDLINE_OVERRIDE is set to 'N'. Otherwise, the default
|
|
command line will be ignored and replaced by the built-in string.
|
|
|
|
Most MIPS systems will normally expect 'N' here and rely upon
|
|
the command line from the firmware or the second-stage bootloader.
|
|
|
|
config CMDLINE
|
|
string "Default kernel command string"
|
|
depends on CMDLINE_BOOL
|
|
default ""
|
|
help
|
|
On some platforms, there is currently no way for the boot loader to
|
|
pass arguments to the kernel. For these platforms, and for the cases
|
|
when you want to add some extra options to the command line or ignore
|
|
the default command line, you can supply some command-line options at
|
|
build time by entering them here. In other cases you can specify
|
|
kernel args so that you don't have to set them up in board prom
|
|
initialization routines.
|
|
|
|
For more information, see the CMDLINE_BOOL and CMDLINE_OVERRIDE
|
|
options.
|
|
|
|
config CMDLINE_OVERRIDE
|
|
bool "Built-in command line overrides firmware arguments"
|
|
default n
|
|
depends on CMDLINE_BOOL
|
|
help
|
|
By setting this option to 'Y' you will have your kernel ignore
|
|
command line arguments from firmware or second stage bootloader.
|
|
Instead, the built-in command line will be used exclusively.
|
|
|
|
Normally, you will choose 'N' here.
|
|
|
|
config SB1XXX_CORELIS
|
|
bool "Corelis Debugger"
|
|
depends on SIBYTE_SB1xxx_SOC
|
|
select DEBUG_INFO
|
|
help
|
|
Select compile flags that produce code that can be processed by the
|
|
Corelis mksym utility and UDB Emulator.
|
|
|
|
config DEBUG_ZBOOT
|
|
bool "Enable compressed kernel support debugging"
|
|
depends on DEBUG_KERNEL && SYS_SUPPORTS_ZBOOT
|
|
default n
|
|
help
|
|
If you want to add compressed kernel support to a new board, and the
|
|
board supports uart16550 compatible serial port, please select
|
|
SYS_SUPPORTS_ZBOOT_UART16550 for your board and enable this option to
|
|
debug it.
|
|
|
|
If your board doesn't support uart16550 compatible serial port, you
|
|
can try to select SYS_SUPPORTS_ZBOOT and use the other methods to
|
|
debug it. for example, add a new serial port support just as
|
|
arch/mips/boot/compressed/uart-16550.c does.
|
|
|
|
After the compressed kernel support works, please disable this option
|
|
to reduce the kernel image size and speed up the booting procedure a
|
|
little.
|
|
|
|
config SPINLOCK_TEST
|
|
bool "Enable spinlock timing tests in debugfs"
|
|
depends on DEBUG_FS
|
|
default n
|
|
help
|
|
Add several files to the debugfs to test spinlock speed.
|
|
|
|
if CPU_MIPSR6
|
|
|
|
choice
|
|
prompt "Compact branch policy"
|
|
default MIPS_COMPACT_BRANCHES_OPTIMAL
|
|
|
|
config MIPS_COMPACT_BRANCHES_NEVER
|
|
bool "Never (force delay slot branches)"
|
|
help
|
|
Pass the -mcompact-branches=never flag to the compiler in order to
|
|
force it to always emit branches with delay slots, and make no use
|
|
of the compact branch instructions introduced by MIPSr6. This is
|
|
useful if you suspect there may be an issue with compact branches in
|
|
either the compiler or the CPU.
|
|
|
|
config MIPS_COMPACT_BRANCHES_OPTIMAL
|
|
bool "Optimal (use where beneficial)"
|
|
help
|
|
Pass the -mcompact-branches=optimal flag to the compiler in order for
|
|
it to make use of compact branch instructions where it deems them
|
|
beneficial, and use branches with delay slots elsewhere. This is the
|
|
default compiler behaviour, and should be used unless you have a
|
|
reason to choose otherwise.
|
|
|
|
config MIPS_COMPACT_BRANCHES_ALWAYS
|
|
bool "Always (force compact branches)"
|
|
help
|
|
Pass the -mcompact-branches=always flag to the compiler in order to
|
|
force it to always emit compact branches, making no use of branch
|
|
instructions with delay slots. This can result in more compact code
|
|
which may be beneficial in some scenarios.
|
|
|
|
endchoice
|
|
|
|
endif # CPU_MIPSR6
|
|
|
|
config SCACHE_DEBUGFS
|
|
bool "L2 cache debugfs entries"
|
|
depends on DEBUG_FS
|
|
help
|
|
Enable this to allow parts of the L2 cache configuration, such as
|
|
whether or not prefetching is enabled, to be exposed to userland
|
|
via debugfs.
|
|
|
|
If unsure, say N.
|
|
|
|
menuconfig MIPS_CPS_NS16550
|
|
bool "CPS SMP NS16550 UART output"
|
|
depends on MIPS_CPS
|
|
help
|
|
Output debug information via an ns16550 compatible UART if exceptions
|
|
occur early in the boot process of a secondary core.
|
|
|
|
if MIPS_CPS_NS16550
|
|
|
|
config MIPS_CPS_NS16550_BASE
|
|
hex "UART Base Address"
|
|
default 0x1b0003f8 if MIPS_MALTA
|
|
help
|
|
The base address of the ns16550 compatible UART on which to output
|
|
debug information from the early stages of core startup.
|
|
|
|
config MIPS_CPS_NS16550_SHIFT
|
|
int "UART Register Shift"
|
|
default 0 if MIPS_MALTA
|
|
help
|
|
The number of bits to shift ns16550 register indices by in order to
|
|
form their addresses. That is, log base 2 of the span between
|
|
adjacent ns16550 registers in the system.
|
|
|
|
endif # MIPS_CPS_NS16550
|
|
|
|
endmenu
|