Kconfig.debug 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  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 FTR_FIXUP_SELFTEST
  54. bool "Run self-tests of the feature-fixup code."
  55. depends on DEBUG_KERNEL
  56. default n
  57. config MSI_BITMAP_SELFTEST
  58. bool "Run self-tests of the MSI bitmap code."
  59. depends on DEBUG_KERNEL
  60. default n
  61. config XMON
  62. bool "Include xmon kernel debugger"
  63. depends on DEBUG_KERNEL
  64. help
  65. Include in-kernel hooks for the xmon kernel monitor/debugger.
  66. Unless you are intending to debug the kernel, say N here.
  67. Make sure to enable also CONFIG_BOOTX_TEXT on Macs. Otherwise
  68. nothing will appear on the screen (xmon writes directly to the
  69. framebuffer memory).
  70. The cmdline option 'xmon' or 'xmon=early' will drop into xmon
  71. very early during boot. 'xmon=on' will just enable the xmon
  72. debugger hooks. 'xmon=off' will disable the debugger hooks
  73. if CONFIG_XMON_DEFAULT is set.
  74. xmon will print a backtrace on the very first invocation.
  75. 'xmon=nobt' will disable this autobacktrace.
  76. config XMON_DEFAULT
  77. bool "Enable xmon by default"
  78. depends on XMON
  79. help
  80. xmon is normally disabled unless booted with 'xmon=on'.
  81. Use 'xmon=off' to disable xmon init during runtime.
  82. config XMON_DISASSEMBLY
  83. bool "Include disassembly support in xmon"
  84. depends on XMON
  85. default y
  86. help
  87. Include support for disassembling in xmon. You probably want
  88. to say Y here, unless you're building for a memory-constrained
  89. system.
  90. config DEBUGGER
  91. bool
  92. depends on KGDB || XMON
  93. default y
  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_BOOK3S
  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. help
  110. Say Y to enable some early debugging facilities that may be available
  111. for your processor/board combination. Those facilities are hacks
  112. intended to debug problems early during boot, this should not be
  113. enabled in a production kernel.
  114. Note that enabling this will also cause the kernel default log level
  115. to be pushed to max automatically very early during boot
  116. choice
  117. prompt "Early debugging console"
  118. depends on PPC_EARLY_DEBUG
  119. help
  120. Use the selected console for early debugging. Careful, if you
  121. enable debugging for the wrong type of machine your kernel
  122. _will not boot_.
  123. config PPC_EARLY_DEBUG_BOOTX
  124. bool "BootX or OpenFirmware"
  125. depends on BOOTX_TEXT
  126. help
  127. Select this to enable early debugging for a machine using BootX
  128. or OpenFirmware.
  129. config PPC_EARLY_DEBUG_LPAR
  130. bool "LPAR HV Console"
  131. depends on PPC_PSERIES
  132. help
  133. Select this to enable early debugging for a machine with a HVC
  134. console on vterm 0.
  135. config PPC_EARLY_DEBUG_LPAR_HVSI
  136. bool "LPAR HVSI Console"
  137. depends on PPC_PSERIES
  138. help
  139. Select this to enable early debugging for a machine with a HVSI
  140. console on a specified vterm.
  141. config PPC_EARLY_DEBUG_G5
  142. bool "Apple G5"
  143. depends on PPC_PMAC64
  144. help
  145. Select this to enable early debugging for Apple G5 machines.
  146. config PPC_EARLY_DEBUG_RTAS_PANEL
  147. bool "RTAS Panel"
  148. depends on PPC_RTAS
  149. help
  150. Select this to enable early debugging via the RTAS panel.
  151. config PPC_EARLY_DEBUG_RTAS_CONSOLE
  152. bool "RTAS Console"
  153. depends on PPC_RTAS
  154. select UDBG_RTAS_CONSOLE
  155. help
  156. Select this to enable early debugging via the RTAS console.
  157. config PPC_EARLY_DEBUG_MAPLE
  158. bool "Maple real mode"
  159. depends on PPC_MAPLE
  160. help
  161. Select this to enable early debugging for Maple.
  162. config PPC_EARLY_DEBUG_PAS_REALMODE
  163. bool "PA Semi real mode"
  164. depends on PPC_PASEMI
  165. help
  166. Select this to enable early debugging for PA Semi.
  167. Output will be on UART0.
  168. config PPC_EARLY_DEBUG_44x
  169. bool "Early serial debugging for IBM/AMCC 44x CPUs"
  170. depends on 44x
  171. help
  172. Select this to enable early debugging for IBM 44x chips via the
  173. inbuilt serial port. If you enable this, ensure you set
  174. PPC_EARLY_DEBUG_44x_PHYSLOW below to suit your target board.
  175. config PPC_EARLY_DEBUG_40x
  176. bool "Early serial debugging for IBM/AMCC 40x CPUs"
  177. depends on 40x
  178. help
  179. Select this to enable early debugging for IBM 40x chips via the
  180. inbuilt serial port. This works on chips with a 16550 compatible
  181. UART. Xilinx chips with uartlite cannot use this option.
  182. config PPC_EARLY_DEBUG_CPM
  183. bool "Early serial debugging for Freescale CPM-based serial ports"
  184. depends on SERIAL_CPM
  185. select PIN_TLB if PPC_8xx
  186. help
  187. Select this to enable early debugging for Freescale chips
  188. using a CPM-based serial port. This assumes that the bootwrapper
  189. has run, and set up the CPM in a particular way.
  190. config PPC_EARLY_DEBUG_USBGECKO
  191. bool "Early debugging through the USB Gecko adapter"
  192. depends on GAMECUBE_COMMON
  193. select USBGECKO_UDBG
  194. help
  195. Select this to enable early debugging for Nintendo GameCube/Wii
  196. consoles via an external USB Gecko adapter.
  197. config PPC_EARLY_DEBUG_PS3GELIC
  198. bool "Early debugging through the PS3 Ethernet port"
  199. depends on PPC_PS3
  200. select PS3GELIC_UDBG
  201. help
  202. Select this to enable early debugging for the PlayStation3 via
  203. UDP broadcasts sent out through the Ethernet port.
  204. config PPC_EARLY_DEBUG_OPAL_RAW
  205. bool "OPAL raw console"
  206. depends on HVC_OPAL
  207. help
  208. Select this to enable early debugging for the PowerNV platform
  209. using a "raw" console
  210. config PPC_EARLY_DEBUG_OPAL_HVSI
  211. bool "OPAL hvsi console"
  212. depends on HVC_OPAL
  213. help
  214. Select this to enable early debugging for the PowerNV platform
  215. using an "hvsi" console
  216. config PPC_EARLY_DEBUG_MEMCONS
  217. bool "In memory console"
  218. help
  219. Select this to enable early debugging using an in memory console.
  220. This console provides input and output buffers stored within the
  221. kernel BSS and should be safe to select on any system. A debugger
  222. can then be used to read kernel output or send input to the console.
  223. endchoice
  224. config PPC_MEMCONS_OUTPUT_SIZE
  225. int "In memory console output buffer size"
  226. depends on PPC_EARLY_DEBUG_MEMCONS
  227. default 4096
  228. help
  229. Selects the size of the output buffer (in bytes) of the in memory
  230. console.
  231. config PPC_MEMCONS_INPUT_SIZE
  232. int "In memory console input buffer size"
  233. depends on PPC_EARLY_DEBUG_MEMCONS
  234. default 128
  235. help
  236. Selects the size of the input buffer (in bytes) of the in memory
  237. console.
  238. config PPC_EARLY_DEBUG_OPAL
  239. def_bool y
  240. depends on PPC_EARLY_DEBUG_OPAL_RAW || PPC_EARLY_DEBUG_OPAL_HVSI
  241. config PPC_EARLY_DEBUG_HVSI_VTERMNO
  242. hex "vterm number to use with early debug HVSI"
  243. depends on PPC_EARLY_DEBUG_LPAR_HVSI
  244. default "0x30000000"
  245. help
  246. You probably want 0x30000000 for your first serial port and
  247. 0x30000001 for your second one
  248. config PPC_EARLY_DEBUG_OPAL_VTERMNO
  249. hex "vterm number to use with OPAL early debug"
  250. depends on PPC_EARLY_DEBUG_OPAL
  251. default "0"
  252. help
  253. This correspond to which /dev/hvcN you want to use for early
  254. debug.
  255. On OPAL v2, this will be 0 for network console and 1 or 2 for
  256. the machine built-in serial ports.
  257. config PPC_EARLY_DEBUG_44x_PHYSLOW
  258. hex "Low 32 bits of early debug UART physical address"
  259. depends on PPC_EARLY_DEBUG_44x
  260. default "0x40000200"
  261. help
  262. You probably want 0x40000200 for ebony boards and
  263. 0x40000300 for taishan
  264. config PPC_EARLY_DEBUG_44x_PHYSHIGH
  265. hex "EPRN of early debug UART physical address"
  266. depends on PPC_EARLY_DEBUG_44x
  267. default "0x1"
  268. config PPC_EARLY_DEBUG_40x_PHYSADDR
  269. hex "Early debug UART physical address"
  270. depends on PPC_EARLY_DEBUG_40x
  271. default "0xef600300"
  272. config PPC_EARLY_DEBUG_CPM_ADDR
  273. hex "CPM UART early debug transmit descriptor address"
  274. depends on PPC_EARLY_DEBUG_CPM
  275. default "0xfa202008" if PPC_EP88XC
  276. default "0xf0001ff8" if CPM2
  277. default "0xff002008" if CPM1
  278. help
  279. This specifies the address of the transmit descriptor
  280. used for early debug output. Because it is needed before
  281. platform probing is done, all platforms selected must
  282. share the same address.
  283. config STRICT_DEVMEM
  284. def_bool y
  285. prompt "Filter access to /dev/mem"
  286. help
  287. This option restricts access to /dev/mem. If this option is
  288. disabled, you allow userspace access to all memory, including
  289. kernel and userspace memory. Accidental memory access is likely
  290. to be disastrous.
  291. Memory access is required for experts who want to debug the kernel.
  292. If you are unsure, say Y.
  293. config FAIL_IOMMU
  294. bool "Fault-injection capability for IOMMU"
  295. depends on FAULT_INJECTION
  296. help
  297. Provide fault-injection capability for IOMMU. Each device can
  298. be selectively enabled via the fail_iommu property.
  299. If you are unsure, say N.
  300. endmenu