Kconfig.debug 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  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 DEBUG_STACKOVERFLOW
  26. bool "Check for stack overflows"
  27. depends on DEBUG_KERNEL
  28. help
  29. This option will cause messages to be printed if free stack space
  30. drops below a certain limit.
  31. config DEBUG_STACK_USAGE
  32. bool "Stack utilization instrumentation"
  33. depends on DEBUG_KERNEL
  34. help
  35. Enables the display of the minimum amount of free stack which each
  36. task has ever had available in the sysrq-T and sysrq-P debug output.
  37. This option will slow down process creation somewhat.
  38. config HCALL_STATS
  39. bool "Hypervisor call instrumentation"
  40. depends on PPC_PSERIES && DEBUG_FS
  41. help
  42. Adds code to keep track of the number of hypervisor calls made and
  43. the amount of time spent in hypervisor calls. Wall time spent in
  44. each call is always calculated, and if available CPU cycles spent
  45. are also calculated. A directory named hcall_inst is added at the
  46. root of the debugfs filesystem. Within the hcall_inst directory
  47. are files that contain CPU specific call statistics.
  48. This option will add a small amount of overhead to all hypervisor
  49. calls.
  50. config PPC_EMULATED_STATS
  51. bool "Emulated instructions tracking"
  52. depends on DEBUG_FS
  53. help
  54. Adds code to keep track of the number of instructions that are
  55. emulated by the in-kernel emulator. Counters for the various classes
  56. of emulated instructions are available under
  57. powerpc/emulated_instructions/ in the root of the debugfs file
  58. system. Optionally (controlled by
  59. powerpc/emulated_instructions/do_warn in debugfs), rate-limited
  60. warnings can be printed to the console when instructions are
  61. emulated.
  62. config CODE_PATCHING_SELFTEST
  63. bool "Run self-tests of the code-patching code."
  64. depends on DEBUG_KERNEL
  65. default n
  66. config FTR_FIXUP_SELFTEST
  67. bool "Run self-tests of the feature-fixup code."
  68. depends on DEBUG_KERNEL
  69. default n
  70. config MSI_BITMAP_SELFTEST
  71. bool "Run self-tests of the MSI bitmap code."
  72. depends on DEBUG_KERNEL
  73. default n
  74. config XMON
  75. bool "Include xmon kernel debugger"
  76. depends on DEBUG_KERNEL
  77. help
  78. Include in-kernel hooks for the xmon kernel monitor/debugger.
  79. Unless you are intending to debug the kernel, say N here.
  80. Make sure to enable also CONFIG_BOOTX_TEXT on Macs. Otherwise
  81. nothing will appear on the screen (xmon writes directly to the
  82. framebuffer memory).
  83. The cmdline option 'xmon' or 'xmon=early' will drop into xmon
  84. very early during boot. 'xmon=on' will just enable the xmon
  85. debugger hooks. 'xmon=off' will disable the debugger hooks
  86. if CONFIG_XMON_DEFAULT is set.
  87. xmon will print a backtrace on the very first invocation.
  88. 'xmon=nobt' will disable this autobacktrace.
  89. config XMON_DEFAULT
  90. bool "Enable xmon by default"
  91. depends on XMON
  92. help
  93. xmon is normally disabled unless booted with 'xmon=on'.
  94. Use 'xmon=off' to disable xmon init during runtime.
  95. config XMON_DISASSEMBLY
  96. bool "Include disassembly support in xmon"
  97. depends on XMON
  98. default y
  99. help
  100. Include support for disassembling in xmon. You probably want
  101. to say Y here, unless you're building for a memory-constrained
  102. system.
  103. config DEBUGGER
  104. bool
  105. depends on KGDB || XMON
  106. default y
  107. config IRQSTACKS
  108. bool "Use separate kernel stacks when processing interrupts"
  109. help
  110. If you say Y here the kernel will use separate kernel stacks
  111. for handling hard and soft interrupts. This can help avoid
  112. overflowing the process kernel stacks.
  113. config VIRQ_DEBUG
  114. bool "Expose hardware/virtual IRQ mapping via debugfs"
  115. depends on DEBUG_FS
  116. help
  117. This option will show the mapping relationship between hardware irq
  118. numbers and virtual irq numbers. The mapping is exposed via debugfs
  119. in the file powerpc/virq_mapping.
  120. If you don't know what this means you don't need it.
  121. config BDI_SWITCH
  122. bool "Include BDI-2000 user context switcher"
  123. depends on DEBUG_KERNEL && PPC32
  124. help
  125. Include in-kernel support for the Abatron BDI2000 debugger.
  126. Unless you are intending to debug the kernel with one of these
  127. machines, say N here.
  128. config BOOTX_TEXT
  129. bool "Support for early boot text console (BootX or OpenFirmware only)"
  130. depends on PPC_OF && PPC_BOOK3S
  131. help
  132. Say Y here to see progress messages from the boot firmware in text
  133. mode. Requires either BootX or Open Firmware.
  134. config PPC_EARLY_DEBUG
  135. bool "Early debugging (dangerous)"
  136. # PPC_EARLY_DEBUG on 440 leaves AS=1 mappings above the TLB high water
  137. # mark, which doesn't work with current 440 KVM.
  138. depends on !KVM
  139. help
  140. Say Y to enable some early debugging facilities that may be available
  141. for your processor/board combination. Those facilities are hacks
  142. intended to debug problems early during boot, this should not be
  143. enabled in a production kernel.
  144. Note that enabling this will also cause the kernel default log level
  145. to be pushed to max automatically very early during boot
  146. choice
  147. prompt "Early debugging console"
  148. depends on PPC_EARLY_DEBUG
  149. help
  150. Use the selected console for early debugging. Careful, if you
  151. enable debugging for the wrong type of machine your kernel
  152. _will not boot_.
  153. config PPC_EARLY_DEBUG_LPAR
  154. bool "LPAR HV Console"
  155. depends on PPC_PSERIES
  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_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_ISERIES
  181. bool "iSeries HV Console"
  182. depends on PPC_ISERIES
  183. help
  184. Select this to enable early debugging for legacy iSeries. You need
  185. to hit "Ctrl-x Ctrl-x" to see the messages on the console.
  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_BEAT
  193. bool "Beat HV Console"
  194. depends on PPC_CELLEB
  195. select PPC_UDBG_BEAT
  196. help
  197. Select this to enable early debugging for Celleb with Beat.
  198. config PPC_EARLY_DEBUG_44x
  199. bool "Early serial debugging for IBM/AMCC 44x CPUs"
  200. depends on 44x
  201. help
  202. Select this to enable early debugging for IBM 44x chips via the
  203. inbuilt serial port. If you enable this, ensure you set
  204. PPC_EARLY_DEBUG_44x_PHYSLOW below to suit your target board.
  205. config PPC_EARLY_DEBUG_40x
  206. bool "Early serial debugging for IBM/AMCC 40x CPUs"
  207. depends on 40x
  208. help
  209. Select this to enable early debugging for IBM 40x chips via the
  210. inbuilt serial port. This works on chips with a 16550 compatible
  211. UART. Xilinx chips with uartlite cannot use this option.
  212. config PPC_EARLY_DEBUG_CPM
  213. bool "Early serial debugging for Freescale CPM-based serial ports"
  214. depends on SERIAL_CPM
  215. select PIN_TLB if PPC_8xx
  216. help
  217. Select this to enable early debugging for Freescale chips
  218. using a CPM-based serial port. This assumes that the bootwrapper
  219. has run, and set up the CPM in a particular way.
  220. endchoice
  221. config PPC_EARLY_DEBUG_44x_PHYSLOW
  222. hex "Low 32 bits of early debug UART physical address"
  223. depends on PPC_EARLY_DEBUG_44x
  224. default "0x40000200"
  225. help
  226. You probably want 0x40000200 for ebony boards and
  227. 0x40000300 for taishan
  228. config PPC_EARLY_DEBUG_44x_PHYSHIGH
  229. hex "EPRN of early debug UART physical address"
  230. depends on PPC_EARLY_DEBUG_44x
  231. default "0x1"
  232. config PPC_EARLY_DEBUG_40x_PHYSADDR
  233. hex "Early debug UART physical address"
  234. depends on PPC_EARLY_DEBUG_40x
  235. default "0xef600300"
  236. config PPC_EARLY_DEBUG_CPM_ADDR
  237. hex "CPM UART early debug transmit descriptor address"
  238. depends on PPC_EARLY_DEBUG_CPM
  239. default "0xfa202008" if PPC_EP88XC
  240. default "0xf0001ff8" if CPM2
  241. default "0xff002008" if CPM1
  242. help
  243. This specifies the address of the transmit descriptor
  244. used for early debug output. Because it is needed before
  245. platform probing is done, all platforms selected must
  246. share the same address.
  247. endmenu