Kconfig.debug 11 KB

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