Kconfig.debug 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. menu "Kernel hacking"
  2. source "lib/Kconfig.debug"
  3. config DEBUG_VERBOSE
  4. bool "Verbose fault messages"
  5. default y
  6. select PRINTK
  7. help
  8. When a program crashes due to an exception, or the kernel detects
  9. an internal error, the kernel can print a not so brief message
  10. explaining what the problem was. This debugging information is
  11. useful to developers and kernel hackers when tracking down problems,
  12. but mostly meaningless to other people. This is always helpful for
  13. debugging but serves no purpose on a production system.
  14. Most people should say N here.
  15. config DEBUG_MMRS
  16. tristate "Generate Blackfin MMR tree"
  17. select DEBUG_FS
  18. help
  19. Create a tree of Blackfin MMRs via the debugfs tree. If
  20. you enable this, you will find all MMRs laid out in the
  21. /sys/kernel/debug/blackfin/ directory where you can read/write
  22. MMRs directly from userspace. This is obviously just a debug
  23. feature.
  24. config DEBUG_HWERR
  25. bool "Hardware error interrupt debugging"
  26. depends on DEBUG_KERNEL
  27. help
  28. When enabled, the hardware error interrupt is never disabled, and
  29. will happen immediately when an error condition occurs. This comes
  30. at a slight cost in code size, but is necessary if you are getting
  31. hardware error interrupts and need to know where they are coming
  32. from.
  33. config EXACT_HWERR
  34. bool "Try to make Hardware errors exact"
  35. depends on DEBUG_HWERR
  36. help
  37. By default, the Blackfin hardware errors are not exact - the error
  38. be reported multiple cycles after the error happens. This delay
  39. can cause the wrong application, or even the kernel to receive a
  40. signal to be killed. If you are getting HW errors in your system,
  41. try turning this on to ensure they are at least coming from the
  42. proper thread.
  43. On production systems, it is safe (and a small optimization) to say N.
  44. config DEBUG_DOUBLEFAULT
  45. bool "Debug Double Faults"
  46. default n
  47. help
  48. If an exception is caused while executing code within the exception
  49. handler, the NMI handler, the reset vector, or in emulator mode,
  50. a double fault occurs. On the Blackfin, this is a unrecoverable
  51. event. You have two options:
  52. - RESET exactly when double fault occurs. The excepting
  53. instruction address is stored in RETX, where the next kernel
  54. boot will print it out.
  55. - Print debug message. This is much more error prone, although
  56. easier to handle. It is error prone since:
  57. - The excepting instruction is not committed.
  58. - All writebacks from the instruction are prevented.
  59. - The generated exception is not taken.
  60. - The EXCAUSE field is updated with an unrecoverable event
  61. The only way to check this is to see if EXCAUSE contains the
  62. unrecoverable event value at every exception return. By selecting
  63. this option, you are skipping over the faulting instruction, and
  64. hoping things stay together enough to print out a debug message.
  65. This does add a little kernel code, but is the only method to debug
  66. double faults - if unsure say "Y"
  67. choice
  68. prompt "Double Fault Failure Method"
  69. default DEBUG_DOUBLEFAULT_PRINT
  70. depends on DEBUG_DOUBLEFAULT
  71. config DEBUG_DOUBLEFAULT_PRINT
  72. bool "Print"
  73. config DEBUG_DOUBLEFAULT_RESET
  74. bool "Reset"
  75. endchoice
  76. config DEBUG_HUNT_FOR_ZERO
  77. bool "Catch NULL pointer reads/writes"
  78. default y
  79. help
  80. Say Y here to catch reads/writes to anywhere in the memory range
  81. from 0x0000 - 0x0FFF (the first 4k) of memory. This is useful in
  82. catching common programming errors such as NULL pointer dereferences.
  83. Misbehaving applications will be killed (generate a SEGV) while the
  84. kernel will trigger a panic.
  85. Enabling this option will take up an extra entry in CPLB table.
  86. Otherwise, there is no extra overhead.
  87. config DEBUG_BFIN_HWTRACE_ON
  88. bool "Turn on Blackfin's Hardware Trace"
  89. default y
  90. help
  91. All Blackfins include a Trace Unit which stores a history of the last
  92. 16 changes in program flow taken by the program sequencer. The history
  93. allows the user to recreate the program sequencer’s recent path. This
  94. can be handy when an application dies - we print out the execution
  95. path of how it got to the offending instruction.
  96. By turning this off, you may save a tiny amount of power.
  97. choice
  98. prompt "Omit loop Tracing"
  99. default DEBUG_BFIN_HWTRACE_COMPRESSION_OFF
  100. depends on DEBUG_BFIN_HWTRACE_ON
  101. help
  102. The trace buffer can be configured to omit recording of changes in
  103. program flow that match either the last entry or one of the last
  104. two entries. Omitting one of these entries from the record prevents
  105. the trace buffer from overflowing because of any sort of loop (for, do
  106. while, etc) in the program.
  107. Because zero-overhead Hardware loops are not recorded in the trace buffer,
  108. this feature can be used to prevent trace overflow from loops that
  109. are nested four deep.
  110. config DEBUG_BFIN_HWTRACE_COMPRESSION_OFF
  111. bool "Trace all Loops"
  112. help
  113. The trace buffer records all changes of flow
  114. config DEBUG_BFIN_HWTRACE_COMPRESSION_ONE
  115. bool "Compress single-level loops"
  116. help
  117. The trace buffer does not record single loops - helpful if trace
  118. is spinning on a while or do loop.
  119. config DEBUG_BFIN_HWTRACE_COMPRESSION_TWO
  120. bool "Compress two-level loops"
  121. help
  122. The trace buffer does not record loops two levels deep. Helpful if
  123. the trace is spinning in a nested loop
  124. endchoice
  125. config DEBUG_BFIN_HWTRACE_COMPRESSION
  126. int
  127. depends on DEBUG_BFIN_HWTRACE_ON
  128. default 0 if DEBUG_BFIN_HWTRACE_COMPRESSION_OFF
  129. default 1 if DEBUG_BFIN_HWTRACE_COMPRESSION_ONE
  130. default 2 if DEBUG_BFIN_HWTRACE_COMPRESSION_TWO
  131. config DEBUG_BFIN_HWTRACE_EXPAND
  132. bool "Expand Trace Buffer greater than 16 entries"
  133. depends on DEBUG_BFIN_HWTRACE_ON
  134. default n
  135. help
  136. By selecting this option, every time the 16 hardware entries in
  137. the Blackfin's HW Trace buffer are full, the kernel will move them
  138. into a software buffer, for dumping when there is an issue. This
  139. has a great impact on performance, (an interrupt every 16 change of
  140. flows) and should normally be turned off, except in those nasty
  141. debugging sessions
  142. config DEBUG_BFIN_HWTRACE_EXPAND_LEN
  143. int "Size of Trace buffer (in power of 2k)"
  144. range 0 4
  145. depends on DEBUG_BFIN_HWTRACE_EXPAND
  146. default 1
  147. help
  148. This sets the size of the software buffer that the trace information
  149. is kept in.
  150. 0 for (2^0) 1k, or 256 entries,
  151. 1 for (2^1) 2k, or 512 entries,
  152. 2 for (2^2) 4k, or 1024 entries,
  153. 3 for (2^3) 8k, or 2048 entries,
  154. 4 for (2^4) 16k, or 4096 entries
  155. config DEBUG_BFIN_NO_KERN_HWTRACE
  156. bool "Turn off hwtrace in CPLB handlers"
  157. depends on DEBUG_BFIN_HWTRACE_ON
  158. default y
  159. help
  160. The CPLB error handler contains a lot of flow changes which can
  161. quickly fill up the hardware trace buffer. When debugging crashes,
  162. the hardware trace may indicate that the problem lies in kernel
  163. space when in reality an application is buggy.
  164. Say Y here to disable hardware tracing in some known "jumpy" pieces
  165. of code so that the trace buffer will extend further back.
  166. config EARLY_PRINTK
  167. bool "Early printk"
  168. default n
  169. select SERIAL_CORE_CONSOLE
  170. help
  171. This option enables special console drivers which allow the kernel
  172. to print messages very early in the bootup process.
  173. This is useful for kernel debugging when your machine crashes very
  174. early before the console code is initialized. After enabling this
  175. feature, you must add "earlyprintk=serial,uart0,57600" to the
  176. command line (bootargs). It is safe to say Y here in all cases, as
  177. all of this lives in the init section and is thrown away after the
  178. kernel boots completely.
  179. config NMI_WATCHDOG
  180. bool "Enable NMI watchdog to help debugging lockup on SMP"
  181. default n
  182. depends on SMP
  183. help
  184. If any CPU in the system does not execute the period local timer
  185. interrupt for more than 5 seconds, then the NMI handler dumps debug
  186. information. This information can be used to debug the lockup.
  187. config CPLB_INFO
  188. bool "Display the CPLB information"
  189. help
  190. Display the CPLB information via /proc/cplbinfo.
  191. config ACCESS_CHECK
  192. bool "Check the user pointer address"
  193. default y
  194. help
  195. Usually the pointer transfer from user space is checked to see if its
  196. address is in the kernel space.
  197. Say N here to disable that check to improve the performance.
  198. config BFIN_ISRAM_SELF_TEST
  199. bool "isram boot self tests"
  200. default n
  201. help
  202. Run some self tests of the isram driver code at boot.
  203. config BFIN_PSEUDODBG_INSNS
  204. bool "Support pseudo debug instructions"
  205. default n
  206. help
  207. This option allows the kernel to emulate some pseudo instructions which
  208. allow simulator test cases to be run under Linux with no changes.
  209. Most people should say N here.
  210. config BFIN_PM_WAKEUP_TIME_BENCH
  211. bool "Display the total time for kernel to resume from power saving mode"
  212. default n
  213. help
  214. Display the total time when kernel resumes normal from standby or
  215. suspend to mem mode.
  216. endmenu