Kconfig.debug 12 KB

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