Kconfig.debug 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. menu "Kernel hacking"
  2. source "lib/Kconfig.debug"
  3. config DEBUG_MMRS
  4. bool "Generate Blackfin MMR tree"
  5. select DEBUG_FS
  6. help
  7. Create a tree of Blackfin MMRs via the debugfs tree. If
  8. you enable this, you will find all MMRs laid out in the
  9. /sys/kernel/debug/blackfin/ directory where you can read/write
  10. MMRs directly from userspace. This is obviously just a debug
  11. feature.
  12. config DEBUG_HWERR
  13. bool "Hardware error interrupt debugging"
  14. depends on DEBUG_KERNEL
  15. help
  16. When enabled, the hardware error interrupt is never disabled, and
  17. will happen immediately when an error condition occurs. This comes
  18. at a slight cost in code size, but is necessary if you are getting
  19. hardware error interrupts and need to know where they are coming
  20. from.
  21. config DEBUG_ICACHE_CHECK
  22. bool "Check Instruction cache coherency"
  23. depends on DEBUG_KERNEL
  24. depends on DEBUG_HWERR
  25. help
  26. Say Y here if you are getting weird unexplained errors. This will
  27. ensure that icache is what SDRAM says it should be by doing a
  28. byte wise comparison between SDRAM and instruction cache. This
  29. also relocates the irq_panic() function to L1 memory, (which is
  30. un-cached).
  31. config DEBUG_HUNT_FOR_ZERO
  32. bool "Catch NULL pointer reads/writes"
  33. default y
  34. help
  35. Say Y here to catch reads/writes to anywhere in the memory range
  36. from 0x0000 - 0x0FFF (the first 4k) of memory. This is useful in
  37. catching common programming errors such as NULL pointer dereferences.
  38. Misbehaving applications will be killed (generate a SEGV) while the
  39. kernel will trigger a panic.
  40. Enabling this option will take up an extra entry in CPLB table.
  41. Otherwise, there is no extra overhead.
  42. config DEBUG_BFIN_HWTRACE_ON
  43. bool "Turn on Blackfin's Hardware Trace"
  44. default y
  45. help
  46. All Blackfins include a Trace Unit which stores a history of the last
  47. 16 changes in program flow taken by the program sequencer. The history
  48. allows the user to recreate the program sequencer’s recent path. This
  49. can be handy when an application dies - we print out the execution
  50. path of how it got to the offending instruction.
  51. By turning this off, you may save a tiny amount of power.
  52. choice
  53. prompt "Omit loop Tracing"
  54. default DEBUG_BFIN_HWTRACE_COMPRESSION_OFF
  55. depends on DEBUG_BFIN_HWTRACE_ON
  56. help
  57. The trace buffer can be configured to omit recording of changes in
  58. program flow that match either the last entry or one of the last
  59. two entries. Omitting one of these entries from the record prevents
  60. the trace buffer from overflowing because of any sort of loop (for, do
  61. while, etc) in the program.
  62. Because zero-overhead Hardware loops are not recorded in the trace buffer,
  63. this feature can be used to prevent trace overflow from loops that
  64. are nested four deep.
  65. config DEBUG_BFIN_HWTRACE_COMPRESSION_OFF
  66. bool "Trace all Loops"
  67. help
  68. The trace buffer records all changes of flow
  69. config DEBUG_BFIN_HWTRACE_COMPRESSION_ONE
  70. bool "Compress single-level loops"
  71. help
  72. The trace buffer does not record single loops - helpful if trace
  73. is spinning on a while or do loop.
  74. config DEBUG_BFIN_HWTRACE_COMPRESSION_TWO
  75. bool "Compress two-level loops"
  76. help
  77. The trace buffer does not record loops two levels deep. Helpful if
  78. the trace is spinning in a nested loop
  79. endchoice
  80. config DEBUG_BFIN_HWTRACE_COMPRESSION
  81. int
  82. depends on DEBUG_BFIN_HWTRACE_ON
  83. default 0 if DEBUG_BFIN_HWTRACE_COMPRESSION_OFF
  84. default 1 if DEBUG_BFIN_HWTRACE_COMPRESSION_ONE
  85. default 2 if DEBUG_BFIN_HWTRACE_COMPRESSION_TWO
  86. config DEBUG_BFIN_HWTRACE_EXPAND
  87. bool "Expand Trace Buffer greater than 16 entries"
  88. depends on DEBUG_BFIN_HWTRACE_ON
  89. default n
  90. help
  91. By selecting this option, every time the 16 hardware entries in
  92. the Blackfin's HW Trace buffer are full, the kernel will move them
  93. into a software buffer, for dumping when there is an issue. This
  94. has a great impact on performance, (an interrupt every 16 change of
  95. flows) and should normally be turned off, except in those nasty
  96. debugging sessions
  97. config DEBUG_BFIN_HWTRACE_EXPAND_LEN
  98. int "Size of Trace buffer (in power of 2k)"
  99. range 0 4
  100. depends on DEBUG_BFIN_HWTRACE_EXPAND
  101. default 1
  102. help
  103. This sets the size of the software buffer that the trace information
  104. is kept in.
  105. 0 for (2^0) 1k, or 256 entries,
  106. 1 for (2^1) 2k, or 512 entries,
  107. 2 for (2^2) 4k, or 1024 entries,
  108. 3 for (2^3) 8k, or 2048 entries,
  109. 4 for (2^4) 16k, or 4096 entries
  110. config DEBUG_BFIN_NO_KERN_HWTRACE
  111. bool "Trace user apps (turn off hwtrace in kernel)"
  112. depends on DEBUG_BFIN_HWTRACE_ON
  113. default n
  114. help
  115. Some pieces of the kernel contain a lot of flow changes which can
  116. quickly fill up the hardware trace buffer. When debugging crashes,
  117. the hardware trace may indicate that the problem lies in kernel
  118. space when in reality an application is buggy.
  119. Say Y here to disable hardware tracing in some known "jumpy" pieces
  120. of code so that the trace buffer will extend further back.
  121. config EARLY_PRINTK
  122. bool "Early printk"
  123. default n
  124. help
  125. This option enables special console drivers which allow the kernel
  126. to print messages very early in the bootup process.
  127. This is useful for kernel debugging when your machine crashes very
  128. early before the console code is initialized. After enabling this
  129. feature, you must add "earlyprintk=serial,uart0,57600" to the
  130. command line (bootargs). It is safe to say Y here in all cases, as
  131. all of this lives in the init section and is thrown away after the
  132. kernel boots completely.
  133. config CPLB_INFO
  134. bool "Display the CPLB information"
  135. help
  136. Display the CPLB information via /proc/cplbinfo.
  137. config ACCESS_CHECK
  138. bool "Check the user pointer address"
  139. default y
  140. help
  141. Usually the pointer transfer from user space is checked to see if its
  142. address is in the kernel space.
  143. Say N here to disable that check to improve the performance.
  144. endmenu