0001 # SPDX-License-Identifier: GPL-2.0
0002
0003 config EARLY_PRINTK_USB
0004 bool
0005
0006 config X86_VERBOSE_BOOTUP
0007 bool "Enable verbose x86 bootup info messages"
0008 default y
0009 help
0010 Enables the informational output from the decompression stage
0011 (e.g. bzImage) of the boot. If you disable this you will still
0012 see errors. Disable this if you want silent bootup.
0013
0014 config EARLY_PRINTK
0015 bool "Early printk" if EXPERT
0016 default y
0017 help
0018 Write kernel log output directly into the VGA buffer or to a serial
0019 port.
0020
0021 This is useful for kernel debugging when your machine crashes very
0022 early before the console code is initialized. For normal operation
0023 it is not recommended because it looks ugly and doesn't cooperate
0024 with klogd/syslogd or the X server. You should normally say N here,
0025 unless you want to debug such a crash.
0026
0027 config EARLY_PRINTK_DBGP
0028 bool "Early printk via EHCI debug port"
0029 depends on EARLY_PRINTK && PCI
0030 select EARLY_PRINTK_USB
0031 help
0032 Write kernel log output directly into the EHCI debug port.
0033
0034 This is useful for kernel debugging when your machine crashes very
0035 early before the console code is initialized. For normal operation
0036 it is not recommended because it looks ugly and doesn't cooperate
0037 with klogd/syslogd or the X server. You should normally say N here,
0038 unless you want to debug such a crash. You need usb debug device.
0039
0040 config EARLY_PRINTK_USB_XDBC
0041 bool "Early printk via the xHCI debug port"
0042 depends on EARLY_PRINTK && PCI
0043 select EARLY_PRINTK_USB
0044 help
0045 Write kernel log output directly into the xHCI debug port.
0046
0047 One use for this feature is kernel debugging, for example when your
0048 machine crashes very early before the regular console code is
0049 initialized. Other uses include simpler, lockless logging instead of
0050 a full-blown printk console driver + klogd.
0051
0052 For normal production environments this is normally not recommended,
0053 because it doesn't feed events into klogd/syslogd and doesn't try to
0054 print anything on the screen.
0055
0056 You should normally say N here, unless you want to debug early
0057 crashes or need a very simple printk logging facility.
0058
0059 config EFI_PGT_DUMP
0060 bool "Dump the EFI pagetable"
0061 depends on EFI
0062 select PTDUMP_CORE
0063 help
0064 Enable this if you want to dump the EFI page table before
0065 enabling virtual mode. This can be used to debug miscellaneous
0066 issues with the mapping of the EFI runtime regions into that
0067 table.
0068
0069 config DEBUG_TLBFLUSH
0070 bool "Set upper limit of TLB entries to flush one-by-one"
0071 depends on DEBUG_KERNEL
0072 help
0073 X86-only for now.
0074
0075 This option allows the user to tune the amount of TLB entries the
0076 kernel flushes one-by-one instead of doing a full TLB flush. In
0077 certain situations, the former is cheaper. This is controlled by the
0078 tlb_flushall_shift knob under /sys/kernel/debug/x86. If you set it
0079 to -1, the code flushes the whole TLB unconditionally. Otherwise,
0080 for positive values of it, the kernel will use single TLB entry
0081 invalidating instructions according to the following formula:
0082
0083 flush_entries <= active_tlb_entries / 2^tlb_flushall_shift
0084
0085 If in doubt, say "N".
0086
0087 config IOMMU_DEBUG
0088 bool "Enable IOMMU debugging"
0089 depends on GART_IOMMU && DEBUG_KERNEL
0090 depends on X86_64
0091 help
0092 Force the IOMMU to on even when you have less than 4GB of
0093 memory and add debugging code. On overflow always panic. And
0094 allow to enable IOMMU leak tracing. Can be disabled at boot
0095 time with iommu=noforce. This will also enable scatter gather
0096 list merging. Currently not recommended for production
0097 code. When you use it make sure you have a big enough
0098 IOMMU/AGP aperture. Most of the options enabled by this can
0099 be set more finegrained using the iommu= command line
0100 options. See Documentation/x86/x86_64/boot-options.rst for more
0101 details.
0102
0103 config IOMMU_LEAK
0104 bool "IOMMU leak tracing"
0105 depends on IOMMU_DEBUG && DMA_API_DEBUG
0106 help
0107 Add a simple leak tracer to the IOMMU code. This is useful when you
0108 are debugging a buggy device driver that leaks IOMMU mappings.
0109
0110 config HAVE_MMIOTRACE_SUPPORT
0111 def_bool y
0112
0113 config X86_DECODER_SELFTEST
0114 bool "x86 instruction decoder selftest"
0115 depends on DEBUG_KERNEL && INSTRUCTION_DECODER
0116 depends on !COMPILE_TEST
0117 help
0118 Perform x86 instruction decoder selftests at build time.
0119 This option is useful for checking the sanity of x86 instruction
0120 decoder code.
0121 If unsure, say "N".
0122
0123 choice
0124 prompt "IO delay type"
0125 default IO_DELAY_0X80
0126
0127 config IO_DELAY_0X80
0128 bool "port 0x80 based port-IO delay [recommended]"
0129 help
0130 This is the traditional Linux IO delay used for in/out_p.
0131 It is the most tested hence safest selection here.
0132
0133 config IO_DELAY_0XED
0134 bool "port 0xed based port-IO delay"
0135 help
0136 Use port 0xed as the IO delay. This frees up port 0x80 which is
0137 often used as a hardware-debug port.
0138
0139 config IO_DELAY_UDELAY
0140 bool "udelay based port-IO delay"
0141 help
0142 Use udelay(2) as the IO delay method. This provides the delay
0143 while not having any side-effect on the IO port space.
0144
0145 config IO_DELAY_NONE
0146 bool "no port-IO delay"
0147 help
0148 No port-IO delay. Will break on old boxes that require port-IO
0149 delay for certain operations. Should work on most new machines.
0150
0151 endchoice
0152
0153 config DEBUG_BOOT_PARAMS
0154 bool "Debug boot parameters"
0155 depends on DEBUG_KERNEL
0156 depends on DEBUG_FS
0157 help
0158 This option will cause struct boot_params to be exported via debugfs.
0159
0160 config CPA_DEBUG
0161 bool "CPA self-test code"
0162 depends on DEBUG_KERNEL
0163 help
0164 Do change_page_attr() self-tests every 30 seconds.
0165
0166 config DEBUG_ENTRY
0167 bool "Debug low-level entry code"
0168 depends on DEBUG_KERNEL
0169 help
0170 This option enables sanity checks in x86's low-level entry code.
0171 Some of these sanity checks may slow down kernel entries and
0172 exits or otherwise impact performance.
0173
0174 If unsure, say N.
0175
0176 config DEBUG_NMI_SELFTEST
0177 bool "NMI Selftest"
0178 depends on DEBUG_KERNEL && X86_LOCAL_APIC
0179 help
0180 Enabling this option turns on a quick NMI selftest to verify
0181 that the NMI behaves correctly.
0182
0183 This might help diagnose strange hangs that rely on NMI to
0184 function properly.
0185
0186 If unsure, say N.
0187
0188 config DEBUG_IMR_SELFTEST
0189 bool "Isolated Memory Region self test"
0190 depends on INTEL_IMR
0191 help
0192 This option enables automated sanity testing of the IMR code.
0193 Some simple tests are run to verify IMR bounds checking, alignment
0194 and overlapping. This option is really only useful if you are
0195 debugging an IMR memory map or are modifying the IMR code and want to
0196 test your changes.
0197
0198 If unsure say N here.
0199
0200 config X86_DEBUG_FPU
0201 bool "Debug the x86 FPU code"
0202 depends on DEBUG_KERNEL
0203 default y
0204 help
0205 If this option is enabled then there will be extra sanity
0206 checks and (boot time) debug printouts added to the kernel.
0207 This debugging adds some small amount of runtime overhead
0208 to the kernel.
0209
0210 If unsure, say N.
0211
0212 config PUNIT_ATOM_DEBUG
0213 tristate "ATOM Punit debug driver"
0214 depends on PCI
0215 select DEBUG_FS
0216 select IOSF_MBI
0217 help
0218 This is a debug driver, which gets the power states
0219 of all Punit North Complex devices. The power states of
0220 each device is exposed as part of the debugfs interface.
0221 The current power state can be read from
0222 /sys/kernel/debug/punit_atom/dev_power_state
0223
0224 choice
0225 prompt "Choose kernel unwinder"
0226 default UNWINDER_ORC if X86_64
0227 default UNWINDER_FRAME_POINTER if X86_32
0228 help
0229 This determines which method will be used for unwinding kernel stack
0230 traces for panics, oopses, bugs, warnings, perf, /proc/<pid>/stack,
0231 livepatch, lockdep, and more.
0232
0233 config UNWINDER_ORC
0234 bool "ORC unwinder"
0235 depends on X86_64
0236 select OBJTOOL
0237 help
0238 This option enables the ORC (Oops Rewind Capability) unwinder for
0239 unwinding kernel stack traces. It uses a custom data format which is
0240 a simplified version of the DWARF Call Frame Information standard.
0241
0242 This unwinder is more accurate across interrupt entry frames than the
0243 frame pointer unwinder. It also enables a 5-10% performance
0244 improvement across the entire kernel compared to frame pointers.
0245
0246 Enabling this option will increase the kernel's runtime memory usage
0247 by roughly 2-4MB, depending on your kernel config.
0248
0249 config UNWINDER_FRAME_POINTER
0250 bool "Frame pointer unwinder"
0251 select FRAME_POINTER
0252 help
0253 This option enables the frame pointer unwinder for unwinding kernel
0254 stack traces.
0255
0256 The unwinder itself is fast and it uses less RAM than the ORC
0257 unwinder, but the kernel text size will grow by ~3% and the kernel's
0258 overall performance will degrade by roughly 5-10%.
0259
0260 config UNWINDER_GUESS
0261 bool "Guess unwinder"
0262 depends on EXPERT
0263 depends on !STACKDEPOT
0264 help
0265 This option enables the "guess" unwinder for unwinding kernel stack
0266 traces. It scans the stack and reports every kernel text address it
0267 finds. Some of the addresses it reports may be incorrect.
0268
0269 While this option often produces false positives, it can still be
0270 useful in many cases. Unlike the other unwinders, it has no runtime
0271 overhead.
0272
0273 endchoice
0274
0275 config FRAME_POINTER
0276 depends on !UNWINDER_ORC && !UNWINDER_GUESS
0277 bool