Kconfig.debug 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  1. # SPDX-License-Identifier: GPL-2.0
  2. menu "Kernel hacking"
  3. source "lib/Kconfig.debug"
  4. config PPC_DISABLE_WERROR
  5. bool "Don't build arch/powerpc code with -Werror"
  6. default n
  7. help
  8. This option tells the compiler NOT to build the code under
  9. arch/powerpc with the -Werror flag (which means warnings
  10. are treated as errors).
  11. Only enable this if you are hitting a build failure in the
  12. arch/powerpc code caused by a warning, and you don't feel
  13. inclined to fix it.
  14. config PPC_WERROR
  15. bool
  16. depends on !PPC_DISABLE_WERROR
  17. default y
  18. config PRINT_STACK_DEPTH
  19. int "Stack depth to print" if DEBUG_KERNEL
  20. default 64
  21. help
  22. This option allows you to set the stack depth that the kernel
  23. prints in stack traces. This can be useful if your display is
  24. too small and stack traces cause important information to
  25. scroll off the screen.
  26. config HCALL_STATS
  27. bool "Hypervisor call instrumentation"
  28. depends on PPC_PSERIES && DEBUG_FS && TRACEPOINTS
  29. help
  30. Adds code to keep track of the number of hypervisor calls made and
  31. the amount of time spent in hypervisor calls. Wall time spent in
  32. each call is always calculated, and if available CPU cycles spent
  33. are also calculated. A directory named hcall_inst is added at the
  34. root of the debugfs filesystem. Within the hcall_inst directory
  35. are files that contain CPU specific call statistics.
  36. This option will add a small amount of overhead to all hypervisor
  37. calls.
  38. config PPC_EMULATED_STATS
  39. bool "Emulated instructions tracking"
  40. depends on DEBUG_FS
  41. help
  42. Adds code to keep track of the number of instructions that are
  43. emulated by the in-kernel emulator. Counters for the various classes
  44. of emulated instructions are available under
  45. powerpc/emulated_instructions/ in the root of the debugfs file
  46. system. Optionally (controlled by
  47. powerpc/emulated_instructions/do_warn in debugfs), rate-limited
  48. warnings can be printed to the console when instructions are
  49. emulated.
  50. config CODE_PATCHING_SELFTEST
  51. bool "Run self-tests of the code-patching code"
  52. depends on DEBUG_KERNEL
  53. default n
  54. config JUMP_LABEL_FEATURE_CHECKS
  55. bool "Enable use of jump label for cpu/mmu_has_feature()"
  56. depends on JUMP_LABEL
  57. default y
  58. help
  59. Selecting this options enables use of jump labels for some internal
  60. feature checks. This should generate more optimal code for those
  61. checks.
  62. config JUMP_LABEL_FEATURE_CHECK_DEBUG
  63. bool "Do extra check on feature fixup calls"
  64. depends on DEBUG_KERNEL && JUMP_LABEL_FEATURE_CHECKS
  65. default n
  66. help
  67. This tries to catch incorrect usage of cpu_has_feature() and
  68. mmu_has_feature() in the code.
  69. If you don't know what this means, say N.
  70. config FTR_FIXUP_SELFTEST
  71. bool "Run self-tests of the feature-fixup code"
  72. depends on DEBUG_KERNEL
  73. default n
  74. config MSI_BITMAP_SELFTEST
  75. bool "Run self-tests of the MSI bitmap code"
  76. depends on DEBUG_KERNEL
  77. default n
  78. config PPC_IRQ_SOFT_MASK_DEBUG
  79. bool "Include extra checks for powerpc irq soft masking"
  80. default n
  81. config XMON
  82. bool "Include xmon kernel debugger"
  83. depends on DEBUG_KERNEL
  84. help
  85. Include in-kernel hooks for the xmon kernel monitor/debugger.
  86. Unless you are intending to debug the kernel, say N here.
  87. Make sure to enable also CONFIG_BOOTX_TEXT on Macs. Otherwise
  88. nothing will appear on the screen (xmon writes directly to the
  89. framebuffer memory).
  90. The cmdline option 'xmon' or 'xmon=early' will drop into xmon
  91. very early during boot. 'xmon=on' will just enable the xmon
  92. debugger hooks. 'xmon=off' will disable the debugger hooks
  93. if CONFIG_XMON_DEFAULT is set.
  94. xmon will print a backtrace on the very first invocation.
  95. 'xmon=nobt' will disable this autobacktrace.
  96. config XMON_DEFAULT
  97. bool "Enable xmon by default"
  98. depends on XMON
  99. help
  100. xmon is normally disabled unless booted with 'xmon=on'.
  101. Use 'xmon=off' to disable xmon init during runtime.
  102. config XMON_DISASSEMBLY
  103. bool "Include disassembly support in xmon"
  104. depends on XMON
  105. default y
  106. help
  107. Include support for disassembling in xmon. You probably want
  108. to say Y here, unless you're building for a memory-constrained
  109. system.
  110. config DEBUGGER
  111. bool
  112. depends on KGDB || XMON
  113. default y
  114. config BDI_SWITCH
  115. bool "Include BDI-2000 user context switcher"
  116. depends on DEBUG_KERNEL && PPC32
  117. help
  118. Include in-kernel support for the Abatron BDI2000 debugger.
  119. Unless you are intending to debug the kernel with one of these
  120. machines, say N here.
  121. config BOOTX_TEXT
  122. bool "Support for early boot text console (BootX or OpenFirmware only)"
  123. depends on PPC_BOOK3S
  124. help
  125. Say Y here to see progress messages from the boot firmware in text
  126. mode. Requires either BootX or Open Firmware.
  127. config PPC_EARLY_DEBUG
  128. bool "Early debugging (dangerous)"
  129. help
  130. Say Y to enable some early debugging facilities that may be available
  131. for your processor/board combination. Those facilities are hacks
  132. intended to debug problems early during boot, this should not be
  133. enabled in a production kernel.
  134. Note that enabling this will also cause the kernel default log level
  135. to be pushed to max automatically very early during boot
  136. choice
  137. prompt "Early debugging console"
  138. depends on PPC_EARLY_DEBUG
  139. help
  140. Use the selected console for early debugging. Careful, if you
  141. enable debugging for the wrong type of machine your kernel
  142. _will not boot_.
  143. config PPC_EARLY_DEBUG_BOOTX
  144. bool "BootX or OpenFirmware"
  145. depends on BOOTX_TEXT
  146. help
  147. Select this to enable early debugging for a machine using BootX
  148. or OpenFirmware.
  149. config PPC_EARLY_DEBUG_LPAR
  150. bool "LPAR HV Console"
  151. depends on PPC_PSERIES && HVC_CONSOLE
  152. help
  153. Select this to enable early debugging for a machine with a HVC
  154. console on vterm 0.
  155. config PPC_EARLY_DEBUG_LPAR_HVSI
  156. bool "LPAR HVSI Console"
  157. depends on PPC_PSERIES && HVC_CONSOLE
  158. help
  159. Select this to enable early debugging for a machine with a HVSI
  160. console on a specified vterm.
  161. config PPC_EARLY_DEBUG_G5
  162. bool "Apple G5"
  163. depends on PPC_PMAC64
  164. help
  165. Select this to enable early debugging for Apple G5 machines.
  166. config PPC_EARLY_DEBUG_RTAS_PANEL
  167. bool "RTAS Panel"
  168. depends on PPC_RTAS
  169. help
  170. Select this to enable early debugging via the RTAS panel.
  171. config PPC_EARLY_DEBUG_RTAS_CONSOLE
  172. bool "RTAS Console"
  173. depends on PPC_RTAS
  174. select UDBG_RTAS_CONSOLE
  175. help
  176. Select this to enable early debugging via the RTAS console.
  177. config PPC_EARLY_DEBUG_MAPLE
  178. bool "Maple real mode"
  179. depends on PPC_MAPLE
  180. help
  181. Select this to enable early debugging for Maple.
  182. config PPC_EARLY_DEBUG_PAS_REALMODE
  183. bool "PA Semi real mode"
  184. depends on PPC_PASEMI
  185. help
  186. Select this to enable early debugging for PA Semi.
  187. Output will be on UART0.
  188. config PPC_EARLY_DEBUG_44x
  189. bool "Early serial debugging for IBM/AMCC 44x CPUs"
  190. depends on 44x
  191. help
  192. Select this to enable early debugging for IBM 44x chips via the
  193. inbuilt serial port. If you enable this, ensure you set
  194. PPC_EARLY_DEBUG_44x_PHYSLOW below to suit your target board.
  195. config PPC_EARLY_DEBUG_40x
  196. bool "Early serial debugging for IBM/AMCC 40x CPUs"
  197. depends on 40x
  198. help
  199. Select this to enable early debugging for IBM 40x chips via the
  200. inbuilt serial port. This works on chips with a 16550 compatible
  201. UART. Xilinx chips with uartlite cannot use this option.
  202. config PPC_EARLY_DEBUG_CPM
  203. bool "Early serial debugging for Freescale CPM-based serial ports"
  204. depends on SERIAL_CPM
  205. help
  206. Select this to enable early debugging for Freescale chips
  207. using a CPM-based serial port. This assumes that the bootwrapper
  208. has run, and set up the CPM in a particular way.
  209. config PPC_EARLY_DEBUG_USBGECKO
  210. bool "Early debugging through the USB Gecko adapter"
  211. depends on GAMECUBE_COMMON
  212. select USBGECKO_UDBG
  213. help
  214. Select this to enable early debugging for Nintendo GameCube/Wii
  215. consoles via an external USB Gecko adapter.
  216. config PPC_EARLY_DEBUG_PS3GELIC
  217. bool "Early debugging through the PS3 Ethernet port"
  218. depends on PPC_PS3
  219. select PS3GELIC_UDBG
  220. help
  221. Select this to enable early debugging for the PlayStation3 via
  222. UDP broadcasts sent out through the Ethernet port.
  223. config PPC_EARLY_DEBUG_OPAL_RAW
  224. bool "OPAL raw console"
  225. depends on HVC_OPAL
  226. help
  227. Select this to enable early debugging for the PowerNV platform
  228. using a "raw" console
  229. config PPC_EARLY_DEBUG_OPAL_HVSI
  230. bool "OPAL hvsi console"
  231. depends on HVC_OPAL
  232. help
  233. Select this to enable early debugging for the PowerNV platform
  234. using an "hvsi" console
  235. config PPC_EARLY_DEBUG_MEMCONS
  236. bool "In memory console"
  237. help
  238. Select this to enable early debugging using an in memory console.
  239. This console provides input and output buffers stored within the
  240. kernel BSS and should be safe to select on any system. A debugger
  241. can then be used to read kernel output or send input to the console.
  242. endchoice
  243. config PPC_MEMCONS_OUTPUT_SIZE
  244. int "In memory console output buffer size"
  245. depends on PPC_EARLY_DEBUG_MEMCONS
  246. default 4096
  247. help
  248. Selects the size of the output buffer (in bytes) of the in memory
  249. console.
  250. config PPC_MEMCONS_INPUT_SIZE
  251. int "In memory console input buffer size"
  252. depends on PPC_EARLY_DEBUG_MEMCONS
  253. default 128
  254. help
  255. Selects the size of the input buffer (in bytes) of the in memory
  256. console.
  257. config PPC_EARLY_DEBUG_OPAL
  258. def_bool y
  259. depends on PPC_EARLY_DEBUG_OPAL_RAW || PPC_EARLY_DEBUG_OPAL_HVSI
  260. config PPC_EARLY_DEBUG_HVSI_VTERMNO
  261. hex "vterm number to use with early debug HVSI"
  262. depends on PPC_EARLY_DEBUG_LPAR_HVSI
  263. default "0x30000000"
  264. help
  265. You probably want 0x30000000 for your first serial port and
  266. 0x30000001 for your second one
  267. config PPC_EARLY_DEBUG_OPAL_VTERMNO
  268. hex "vterm number to use with OPAL early debug"
  269. depends on PPC_EARLY_DEBUG_OPAL
  270. default "0"
  271. help
  272. This correspond to which /dev/hvcN you want to use for early
  273. debug.
  274. On OPAL v2, this will be 0 for network console and 1 or 2 for
  275. the machine built-in serial ports.
  276. config PPC_EARLY_DEBUG_44x_PHYSLOW
  277. hex "Low 32 bits of early debug UART physical address"
  278. depends on PPC_EARLY_DEBUG_44x
  279. default "0x40000200"
  280. help
  281. You probably want 0x40000200 for ebony boards and
  282. 0x40000300 for taishan
  283. config PPC_EARLY_DEBUG_44x_PHYSHIGH
  284. hex "EPRN of early debug UART physical address"
  285. depends on PPC_EARLY_DEBUG_44x
  286. default "0x1"
  287. config PPC_EARLY_DEBUG_40x_PHYSADDR
  288. hex "Early debug UART physical address"
  289. depends on PPC_EARLY_DEBUG_40x
  290. default "0xef600300"
  291. config PPC_EARLY_DEBUG_CPM_ADDR
  292. hex "CPM UART early debug transmit descriptor address"
  293. depends on PPC_EARLY_DEBUG_CPM
  294. default "0xfa202008" if PPC_EP88XC
  295. default "0xf0001ff8" if CPM2
  296. default "0xff002008" if CPM1
  297. help
  298. This specifies the address of the transmit descriptor
  299. used for early debug output. Because it is needed before
  300. platform probing is done, all platforms selected must
  301. share the same address.
  302. config FAIL_IOMMU
  303. bool "Fault-injection capability for IOMMU"
  304. depends on FAULT_INJECTION
  305. help
  306. Provide fault-injection capability for IOMMU. Each device can
  307. be selectively enabled via the fail_iommu property.
  308. If you are unsure, say N.
  309. config PPC_PTDUMP
  310. bool "Export kernel pagetable layout to userspace via debugfs"
  311. depends on DEBUG_KERNEL && DEBUG_FS
  312. help
  313. This option exports the state of the kernel pagetables to a
  314. debugfs file. This is only useful for kernel developers who are
  315. working in architecture specific areas of the kernel - probably
  316. not a good idea to enable this feature in a production kernel.
  317. If you are unsure, say N.
  318. config PPC_HTDUMP
  319. def_bool y
  320. depends on PPC_PTDUMP && PPC_BOOK3S_64
  321. config PPC_FAST_ENDIAN_SWITCH
  322. bool "Deprecated fast endian-switch syscall"
  323. depends on DEBUG_KERNEL && PPC_BOOK3S_64
  324. help
  325. If you're unsure what this is, say N.
  326. endmenu