Kconfig.debug 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. menu "Kernel hacking"
  2. source "lib/Kconfig.debug"
  3. config DEBUG_STACKOVERFLOW
  4. bool "Check for stack overflows"
  5. depends on DEBUG_KERNEL
  6. help
  7. This option will cause messages to be printed if free stack space
  8. drops below a certain limit.
  9. config DEBUG_STACK_USAGE
  10. bool "Stack utilization instrumentation"
  11. depends on DEBUG_KERNEL
  12. help
  13. Enables the display of the minimum amount of free stack which each
  14. task has ever had available in the sysrq-T and sysrq-P debug output.
  15. This option will slow down process creation somewhat.
  16. config DEBUG_PAGEALLOC
  17. bool "Debug page memory allocations"
  18. depends on DEBUG_KERNEL && !HIBERNATION
  19. help
  20. Unmap pages from the kernel linear mapping after free_pages().
  21. This results in a large slowdown, but helps to find certain types
  22. of memory corruptions.
  23. config HCALL_STATS
  24. bool "Hypervisor call instrumentation"
  25. depends on PPC_PSERIES && DEBUG_FS
  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 CODE_PATCHING_SELFTEST
  36. bool "Run self-tests of the code-patching code."
  37. depends on DEBUG_KERNEL
  38. default n
  39. config FTR_FIXUP_SELFTEST
  40. bool "Run self-tests of the feature-fixup code."
  41. depends on DEBUG_KERNEL
  42. default n
  43. config MSI_BITMAP_SELFTEST
  44. bool "Run self-tests of the MSI bitmap code."
  45. depends on DEBUG_KERNEL
  46. default n
  47. config XMON
  48. bool "Include xmon kernel debugger"
  49. depends on DEBUG_KERNEL
  50. help
  51. Include in-kernel hooks for the xmon kernel monitor/debugger.
  52. Unless you are intending to debug the kernel, say N here.
  53. Make sure to enable also CONFIG_BOOTX_TEXT on Macs. Otherwise
  54. nothing will appear on the screen (xmon writes directly to the
  55. framebuffer memory).
  56. The cmdline option 'xmon' or 'xmon=early' will drop into xmon
  57. very early during boot. 'xmon=on' will just enable the xmon
  58. debugger hooks. 'xmon=off' will disable the debugger hooks
  59. if CONFIG_XMON_DEFAULT is set.
  60. xmon will print a backtrace on the very first invocation.
  61. 'xmon=nobt' will disable this autobacktrace.
  62. config XMON_DEFAULT
  63. bool "Enable xmon by default"
  64. depends on XMON
  65. help
  66. xmon is normally disabled unless booted with 'xmon=on'.
  67. Use 'xmon=off' to disable xmon init during runtime.
  68. config XMON_DISASSEMBLY
  69. bool "Include disassembly support in xmon"
  70. depends on XMON
  71. default y
  72. help
  73. Include support for disassembling in xmon. You probably want
  74. to say Y here, unless you're building for a memory-constrained
  75. system.
  76. config DEBUGGER
  77. bool
  78. depends on KGDB || XMON
  79. default y
  80. config IRQSTACKS
  81. bool "Use separate kernel stacks when processing interrupts"
  82. help
  83. If you say Y here the kernel will use separate kernel stacks
  84. for handling hard and soft interrupts. This can help avoid
  85. overflowing the process kernel stacks.
  86. config VIRQ_DEBUG
  87. bool "Expose hardware/virtual IRQ mapping via debugfs"
  88. depends on DEBUG_FS
  89. help
  90. This option will show the mapping relationship between hardware irq
  91. numbers and virtual irq numbers. The mapping is exposed via debugfs
  92. in the file powerpc/virq_mapping.
  93. If you don't know what this means you don't need it.
  94. config BDI_SWITCH
  95. bool "Include BDI-2000 user context switcher"
  96. depends on DEBUG_KERNEL && PPC32
  97. help
  98. Include in-kernel support for the Abatron BDI2000 debugger.
  99. Unless you are intending to debug the kernel with one of these
  100. machines, say N here.
  101. config BOOTX_TEXT
  102. bool "Support for early boot text console (BootX or OpenFirmware only)"
  103. depends on PPC_OF && PPC_MULTIPLATFORM
  104. help
  105. Say Y here to see progress messages from the boot firmware in text
  106. mode. Requires either BootX or Open Firmware.
  107. config PPC_EARLY_DEBUG
  108. bool "Early debugging (dangerous)"
  109. # PPC_EARLY_DEBUG on 440 leaves AS=1 mappings above the TLB high water
  110. # mark, which doesn't work with current 440 KVM.
  111. depends on !KVM
  112. help
  113. Say Y to enable some early debugging facilities that may be available
  114. for your processor/board combination. Those facilities are hacks
  115. intended to debug problems early during boot, this should not be
  116. enabled in a production kernel.
  117. Note that enabling this will also cause the kernel default log level
  118. to be pushed to max automatically very early during boot
  119. choice
  120. prompt "Early debugging console"
  121. depends on PPC_EARLY_DEBUG
  122. help
  123. Use the selected console for early debugging. Careful, if you
  124. enable debugging for the wrong type of machine your kernel
  125. _will not boot_.
  126. config PPC_EARLY_DEBUG_LPAR
  127. bool "LPAR HV Console"
  128. depends on PPC_PSERIES
  129. help
  130. Select this to enable early debugging for a machine with a HVC
  131. console on vterm 0.
  132. config PPC_EARLY_DEBUG_G5
  133. bool "Apple G5"
  134. depends on PPC_PMAC64
  135. help
  136. Select this to enable early debugging for Apple G5 machines.
  137. config PPC_EARLY_DEBUG_RTAS_PANEL
  138. bool "RTAS Panel"
  139. depends on PPC_RTAS
  140. help
  141. Select this to enable early debugging via the RTAS panel.
  142. config PPC_EARLY_DEBUG_RTAS_CONSOLE
  143. bool "RTAS Console"
  144. depends on PPC_RTAS
  145. select UDBG_RTAS_CONSOLE
  146. help
  147. Select this to enable early debugging via the RTAS console.
  148. config PPC_EARLY_DEBUG_MAPLE
  149. bool "Maple real mode"
  150. depends on PPC_MAPLE
  151. help
  152. Select this to enable early debugging for Maple.
  153. config PPC_EARLY_DEBUG_ISERIES
  154. bool "iSeries HV Console"
  155. depends on PPC_ISERIES
  156. help
  157. Select this to enable early debugging for legacy iSeries. You need
  158. to hit "Ctrl-x Ctrl-x" to see the messages on the console.
  159. config PPC_EARLY_DEBUG_PAS_REALMODE
  160. bool "PA Semi real mode"
  161. depends on PPC_PASEMI
  162. help
  163. Select this to enable early debugging for PA Semi.
  164. Output will be on UART0.
  165. config PPC_EARLY_DEBUG_BEAT
  166. bool "Beat HV Console"
  167. depends on PPC_CELLEB
  168. select PPC_UDBG_BEAT
  169. help
  170. Select this to enable early debugging for Celleb with Beat.
  171. config PPC_EARLY_DEBUG_44x
  172. bool "Early serial debugging for IBM/AMCC 44x CPUs"
  173. depends on 44x
  174. help
  175. Select this to enable early debugging for IBM 44x chips via the
  176. inbuilt serial port. If you enable this, ensure you set
  177. PPC_EARLY_DEBUG_44x_PHYSLOW below to suit your target board.
  178. config PPC_EARLY_DEBUG_40x
  179. bool "Early serial debugging for IBM/AMCC 40x CPUs"
  180. depends on 40x
  181. help
  182. Select this to enable early debugging for IBM 40x chips via the
  183. inbuilt serial port. This works on chips with a 16550 compatible
  184. UART. Xilinx chips with uartlite cannot use this option.
  185. config PPC_EARLY_DEBUG_CPM
  186. bool "Early serial debugging for Freescale CPM-based serial ports"
  187. depends on SERIAL_CPM
  188. select PIN_TLB if PPC_8xx
  189. help
  190. Select this to enable early debugging for Freescale chips
  191. using a CPM-based serial port. This assumes that the bootwrapper
  192. has run, and set up the CPM in a particular way.
  193. endchoice
  194. config PPC_EARLY_DEBUG_44x_PHYSLOW
  195. hex "Low 32 bits of early debug UART physical address"
  196. depends on PPC_EARLY_DEBUG_44x
  197. default "0x40000200"
  198. help
  199. You probably want 0x40000200 for ebony boards and
  200. 0x40000300 for taishan
  201. config PPC_EARLY_DEBUG_44x_PHYSHIGH
  202. hex "EPRN of early debug UART physical address"
  203. depends on PPC_EARLY_DEBUG_44x
  204. default "0x1"
  205. config PPC_EARLY_DEBUG_40x_PHYSADDR
  206. hex "Early debug UART physical address"
  207. depends on PPC_EARLY_DEBUG_40x
  208. default "0xef600300"
  209. config PPC_EARLY_DEBUG_CPM_ADDR
  210. hex "CPM UART early debug transmit descriptor address"
  211. depends on PPC_EARLY_DEBUG_CPM
  212. default "0xfa202008" if PPC_EP88XC
  213. default "0xf0001ff8" if CPM2
  214. default "0xff002008" if CPM1
  215. help
  216. This specifies the address of the transmit descriptor
  217. used for early debug output. Because it is needed before
  218. platform probing is done, all platforms selected must
  219. share the same address.
  220. endmenu