Kconfig.debug 11 KB

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