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