Kconfig.debug 11 KB

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