Kconfig.debug 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  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. depends on PPC64
  74. config PPC_RFI_SRR_DEBUG
  75. bool "Include extra checks for RFI SRR register validity"
  76. depends on PPC_BOOK3S_64
  77. config XMON
  78. bool "Include xmon kernel debugger"
  79. depends on DEBUG_KERNEL
  80. select CONSOLE_POLL if SERIAL_CPM_CONSOLE
  81. help
  82. Include in-kernel hooks for the xmon kernel monitor/debugger.
  83. Unless you are intending to debug the kernel, say N here.
  84. Make sure to enable also CONFIG_BOOTX_TEXT on Macs. Otherwise
  85. nothing will appear on the screen (xmon writes directly to the
  86. framebuffer memory).
  87. The cmdline option 'xmon' or 'xmon=early' will drop into xmon
  88. very early during boot. 'xmon=on' will just enable the xmon
  89. debugger hooks. 'xmon=off' will disable the debugger hooks
  90. if CONFIG_XMON_DEFAULT is set.
  91. xmon will print a backtrace on the very first invocation.
  92. 'xmon=nobt' will disable this autobacktrace.
  93. config XMON_DEFAULT
  94. bool "Enable xmon by default"
  95. depends on XMON
  96. help
  97. xmon is normally disabled unless booted with 'xmon=on'.
  98. Use 'xmon=off' to disable xmon init during runtime.
  99. config XMON_DISASSEMBLY
  100. bool "Include disassembly support in xmon"
  101. depends on XMON
  102. default y
  103. help
  104. Include support for disassembling in xmon. You probably want
  105. to say Y here, unless you're building for a memory-constrained
  106. system.
  107. config XMON_DEFAULT_RO_MODE
  108. bool "Restrict xmon to read-only operations by default"
  109. depends on XMON
  110. default y
  111. help
  112. Operate xmon in read-only mode. The cmdline options 'xmon=rw' and
  113. 'xmon=ro' override this default.
  114. config DEBUGGER
  115. bool
  116. depends on KGDB || XMON
  117. default y
  118. config BDI_SWITCH
  119. bool "Include BDI-2000 user context switcher"
  120. depends on DEBUG_KERNEL && PPC32
  121. help
  122. Include in-kernel support for the Abatron BDI2000 debugger.
  123. Unless you are intending to debug the kernel with one of these
  124. machines, say N here.
  125. config BOOTX_TEXT
  126. bool "Support for early boot text console (BootX or OpenFirmware only)"
  127. depends on PPC_BOOK3S
  128. help
  129. Say Y here to see progress messages from the boot firmware in text
  130. mode. Requires either BootX or Open Firmware.
  131. config PPC_EARLY_DEBUG
  132. bool "Early debugging (dangerous)"
  133. help
  134. Say Y to enable some early debugging facilities that may be available
  135. for your processor/board combination. Those facilities are hacks
  136. intended to debug problems early during boot, this should not be
  137. enabled in a production kernel.
  138. Note that enabling this will also cause the kernel default log level
  139. to be pushed to max automatically very early during boot
  140. choice
  141. prompt "Early debugging console"
  142. depends on PPC_EARLY_DEBUG
  143. help
  144. Use the selected console for early debugging. Careful, if you
  145. enable debugging for the wrong type of machine your kernel
  146. _will not boot_.
  147. config PPC_EARLY_DEBUG_BOOTX
  148. bool "BootX or OpenFirmware"
  149. depends on BOOTX_TEXT
  150. help
  151. Select this to enable early debugging for a machine using BootX
  152. or OpenFirmware.
  153. config PPC_EARLY_DEBUG_LPAR
  154. bool "LPAR HV Console"
  155. depends on PPC_PSERIES && HVC_CONSOLE
  156. help
  157. Select this to enable early debugging for a machine with a HVC
  158. console on vterm 0.
  159. config PPC_EARLY_DEBUG_LPAR_HVSI
  160. bool "LPAR HVSI Console"
  161. depends on PPC_PSERIES && HVC_CONSOLE
  162. help
  163. Select this to enable early debugging for a machine with a HVSI
  164. console on a specified vterm.
  165. config PPC_EARLY_DEBUG_G5
  166. bool "Apple G5"
  167. depends on PPC_PMAC64
  168. help
  169. Select this to enable early debugging for Apple G5 machines.
  170. config PPC_EARLY_DEBUG_RTAS_PANEL
  171. bool "RTAS Panel"
  172. depends on PPC_RTAS
  173. help
  174. Select this to enable early debugging via the RTAS panel.
  175. config PPC_EARLY_DEBUG_RTAS_CONSOLE
  176. bool "RTAS Console"
  177. depends on PPC_RTAS
  178. select UDBG_RTAS_CONSOLE
  179. help
  180. Select this to enable early debugging via the RTAS console.
  181. config PPC_EARLY_DEBUG_MAPLE
  182. bool "Maple real mode"
  183. depends on PPC_MAPLE
  184. help
  185. Select this to enable early debugging for Maple.
  186. config PPC_EARLY_DEBUG_PAS_REALMODE
  187. bool "PA Semi real mode"
  188. depends on PPC_PASEMI
  189. help
  190. Select this to enable early debugging for PA Semi.
  191. Output will be on UART0.
  192. config PPC_EARLY_DEBUG_44x
  193. bool "Early serial debugging for IBM/AMCC 44x CPUs"
  194. depends on 44x
  195. help
  196. Select this to enable early debugging for IBM 44x chips via the
  197. inbuilt serial port. If you enable this, ensure you set
  198. PPC_EARLY_DEBUG_44x_PHYSLOW below to suit your target board.
  199. config PPC_EARLY_DEBUG_40x
  200. bool "Early serial debugging for IBM/AMCC 40x CPUs"
  201. depends on 40x
  202. help
  203. Select this to enable early debugging for IBM 40x chips via the
  204. inbuilt serial port. This works on chips with a 16550 compatible
  205. UART.
  206. config PPC_EARLY_DEBUG_CPM
  207. bool "Early serial debugging for Freescale CPM-based serial ports"
  208. depends on SERIAL_CPM=y
  209. help
  210. Select this to enable early debugging for Freescale chips
  211. using a CPM-based serial port. This assumes that the bootwrapper
  212. has run, and set up the CPM in a particular way.
  213. config PPC_EARLY_DEBUG_USBGECKO
  214. bool "Early debugging through the USB Gecko adapter"
  215. depends on GAMECUBE_COMMON
  216. select USBGECKO_UDBG
  217. help
  218. Select this to enable early debugging for Nintendo GameCube/Wii
  219. consoles via an external USB Gecko adapter.
  220. config PPC_EARLY_DEBUG_PS3GELIC
  221. bool "Early debugging through the PS3 Ethernet port"
  222. depends on PPC_PS3
  223. select PS3GELIC_UDBG
  224. help
  225. Select this to enable early debugging for the PlayStation3 via
  226. UDP broadcasts sent out through the Ethernet port.
  227. config PPC_EARLY_DEBUG_OPAL_RAW
  228. bool "OPAL raw console"
  229. depends on HVC_OPAL
  230. help
  231. Select this to enable early debugging for the PowerNV platform
  232. using a "raw" console
  233. config PPC_EARLY_DEBUG_OPAL_HVSI
  234. bool "OPAL hvsi console"
  235. depends on HVC_OPAL
  236. help
  237. Select this to enable early debugging for the PowerNV platform
  238. using an "hvsi" console
  239. config PPC_EARLY_DEBUG_MEMCONS
  240. bool "In memory console"
  241. help
  242. Select this to enable early debugging using an in memory console.
  243. This console provides input and output buffers stored within the
  244. kernel BSS and should be safe to select on any system. A debugger
  245. can then be used to read kernel output or send input to the console.
  246. config PPC_EARLY_DEBUG_16550
  247. bool "Serial 16550"
  248. depends on PPC_UDBG_16550
  249. help
  250. Select this to enable early debugging via Serial 16550 console
  251. endchoice
  252. config PPC_MEMCONS_OUTPUT_SIZE
  253. int "In memory console output buffer size"
  254. depends on PPC_EARLY_DEBUG_MEMCONS
  255. default 4096
  256. help
  257. Selects the size of the output buffer (in bytes) of the in memory
  258. console.
  259. config PPC_MEMCONS_INPUT_SIZE
  260. int "In memory console input buffer size"
  261. depends on PPC_EARLY_DEBUG_MEMCONS
  262. default 128
  263. help
  264. Selects the size of the input buffer (in bytes) of the in memory
  265. console.
  266. config PPC_EARLY_DEBUG_OPAL
  267. def_bool y
  268. depends on PPC_EARLY_DEBUG_OPAL_RAW || PPC_EARLY_DEBUG_OPAL_HVSI
  269. config PPC_EARLY_DEBUG_HVSI_VTERMNO
  270. hex "vterm number to use with early debug HVSI"
  271. depends on PPC_EARLY_DEBUG_LPAR_HVSI
  272. default "0x30000000"
  273. help
  274. You probably want 0x30000000 for your first serial port and
  275. 0x30000001 for your second one
  276. config PPC_EARLY_DEBUG_OPAL_VTERMNO
  277. hex "vterm number to use with OPAL early debug"
  278. depends on PPC_EARLY_DEBUG_OPAL
  279. default "0"
  280. help
  281. This correspond to which /dev/hvcN you want to use for early
  282. debug.
  283. On OPAL v2, this will be 0 for network console and 1 or 2 for
  284. the machine built-in serial ports.
  285. config PPC_EARLY_DEBUG_44x_PHYSLOW
  286. hex "Low 32 bits of early debug UART physical address"
  287. depends on PPC_EARLY_DEBUG_44x
  288. default "0x40000200"
  289. help
  290. You probably want 0x40000200 for ebony boards and
  291. 0x40000300 for taishan
  292. config PPC_EARLY_DEBUG_44x_PHYSHIGH
  293. hex "EPRN of early debug UART physical address"
  294. depends on PPC_EARLY_DEBUG_44x
  295. default "0x1"
  296. config PPC_EARLY_DEBUG_40x_PHYSADDR
  297. hex "Early debug UART physical address"
  298. depends on PPC_EARLY_DEBUG_40x
  299. default "0xef600300"
  300. config PPC_EARLY_DEBUG_CPM_ADDR
  301. hex "CPM UART early debug transmit descriptor address"
  302. depends on PPC_EARLY_DEBUG_CPM
  303. default "0xfa202008" if PPC_EP88XC
  304. default "0xf0001ff8" if CPM2
  305. default "0xff002008" if CPM1
  306. help
  307. This specifies the address of the transmit descriptor
  308. used for early debug output. Because it is needed before
  309. platform probing is done, all platforms selected must
  310. share the same address.
  311. config PPC_EARLY_DEBUG_16550_PHYSADDR
  312. hex "Early debug Serial 16550 physical address"
  313. depends on PPC_EARLY_DEBUG_16550
  314. config PPC_EARLY_DEBUG_16550_STRIDE
  315. int "Early debug Serial 16550 stride"
  316. depends on PPC_EARLY_DEBUG_16550
  317. default 1
  318. config FAIL_IOMMU
  319. bool "Fault-injection capability for IOMMU"
  320. depends on FAULT_INJECTION
  321. depends on PCI || IBMVIO
  322. help
  323. Provide fault-injection capability for IOMMU. Each device can
  324. be selectively enabled via the fail_iommu property.
  325. If you are unsure, say N.
  326. config PPC_FAST_ENDIAN_SWITCH
  327. bool "Deprecated fast endian-switch syscall"
  328. depends on DEBUG_KERNEL && PPC_BOOK3S_64
  329. help
  330. If you're unsure what this is, say N.
  331. config KASAN_SHADOW_OFFSET
  332. hex
  333. depends on KASAN
  334. default 0xe0000000 if PPC32
  335. default 0xa80e000000000000 if PPC_BOOK3S_64
  336. default 0xa8001c0000000000 if PPC_BOOK3E_64