Kconfig.debug 11 KB

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