aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/Kconfig169
-rw-r--r--arch/blackfin/Kconfig.debug178
2 files changed, 179 insertions, 168 deletions
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index 6afcf2b8f743..b9043ee52804 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -982,174 +982,7 @@ source "fs/Kconfig"
982 982
983source "kernel/Kconfig.instrumentation" 983source "kernel/Kconfig.instrumentation"
984 984
985menu "Kernel hacking" 985source "arch/blackfin/Kconfig.debug"
986
987source "lib/Kconfig.debug"
988
989config DEBUG_HWERR
990 bool "Hardware error interrupt debugging"
991 depends on DEBUG_KERNEL
992 help
993 When enabled, the hardware error interrupt is never disabled, and
994 will happen immediately when an error condition occurs. This comes
995 at a slight cost in code size, but is necessary if you are getting
996 hardware error interrupts and need to know where they are coming
997 from.
998
999config DEBUG_ICACHE_CHECK
1000 bool "Check Instruction cache coherency"
1001 depends on DEBUG_KERNEL
1002 depends on DEBUG_HWERR
1003 help
1004 Say Y here if you are getting weird unexplained errors. This will
1005 ensure that icache is what SDRAM says it should be by doing a
1006 byte wise comparison between SDRAM and instruction cache. This
1007 also relocates the irq_panic() function to L1 memory, (which is
1008 un-cached).
1009
1010config DEBUG_HUNT_FOR_ZERO
1011 bool "Catch NULL pointer reads/writes"
1012 default y
1013 help
1014 Say Y here to catch reads/writes to anywhere in the memory range
1015 from 0x0000 - 0x0FFF (the first 4k) of memory. This is useful in
1016 catching common programming errors such as NULL pointer dereferences.
1017
1018 Misbehaving applications will be killed (generate a SEGV) while the
1019 kernel will trigger a panic.
1020
1021 Enabling this option will take up an extra entry in CPLB table.
1022 Otherwise, there is no extra overhead.
1023
1024config DEBUG_BFIN_HWTRACE_ON
1025 bool "Turn on Blackfin's Hardware Trace"
1026 default y
1027 help
1028 All Blackfins include a Trace Unit which stores a history of the last
1029 16 changes in program flow taken by the program sequencer. The history
1030 allows the user to recreate the program sequencer’s recent path. This
1031 can be handy when an application dies - we print out the execution
1032 path of how it got to the offending instruction.
1033
1034 By turning this off, you may save a tiny amount of power.
1035
1036choice
1037 prompt "Omit loop Tracing"
1038 default DEBUG_BFIN_HWTRACE_COMPRESSION_OFF
1039 depends on DEBUG_BFIN_HWTRACE_ON
1040 help
1041 The trace buffer can be configured to omit recording of changes in
1042 program flow that match either the last entry or one of the last
1043 two entries. Omitting one of these entries from the record prevents
1044 the trace buffer from overflowing because of any sort of loop (for, do
1045 while, etc) in the program.
1046
1047 Because zero-overhead Hardware loops are not recorded in the trace buffer,
1048 this feature can be used to prevent trace overflow from loops that
1049 are nested four deep.
1050
1051config DEBUG_BFIN_HWTRACE_COMPRESSION_OFF
1052 bool "Trace all Loops"
1053 help
1054 The trace buffer records all changes of flow
1055
1056config DEBUG_BFIN_HWTRACE_COMPRESSION_ONE
1057 bool "Compress single-level loops"
1058 help
1059 The trace buffer does not record single loops - helpful if trace
1060 is spinning on a while or do loop.
1061
1062config DEBUG_BFIN_HWTRACE_COMPRESSION_TWO
1063 bool "Compress two-level loops"
1064 help
1065 The trace buffer does not record loops two levels deep. Helpful if
1066 the trace is spinning in a nested loop
1067
1068endchoice
1069
1070config DEBUG_BFIN_HWTRACE_COMPRESSION
1071 int
1072 depends on DEBUG_BFIN_HWTRACE_ON
1073 default 0 if DEBUG_BFIN_HWTRACE_COMPRESSION_OFF
1074 default 1 if DEBUG_BFIN_HWTRACE_COMPRESSION_ONE
1075 default 2 if DEBUG_BFIN_HWTRACE_COMPRESSION_TWO
1076
1077
1078config DEBUG_BFIN_HWTRACE_EXPAND
1079 bool "Expand Trace Buffer greater than 16 entries"
1080 depends on DEBUG_BFIN_HWTRACE_ON
1081 default n
1082 help
1083 By selecting this option, every time the 16 hardware entries in
1084 the Blackfin's HW Trace buffer are full, the kernel will move them
1085 into a software buffer, for dumping when there is an issue. This
1086 has a great impact on performance, (an interrupt every 16 change of
1087 flows) and should normally be turned off, except in those nasty
1088 debugging sessions
1089
1090config DEBUG_BFIN_HWTRACE_EXPAND_LEN
1091 int "Size of Trace buffer (in power of 2k)"
1092 range 0 4
1093 depends on DEBUG_BFIN_HWTRACE_EXPAND
1094 default 1
1095 help
1096 This sets the size of the software buffer that the trace information
1097 is kept in.
1098 0 for (2^0) 1k, or 256 entries,
1099 1 for (2^1) 2k, or 512 entries,
1100 2 for (2^2) 4k, or 1024 entries,
1101 3 for (2^3) 8k, or 2048 entries,
1102 4 for (2^4) 16k, or 4096 entries
1103
1104config DEBUG_BFIN_NO_KERN_HWTRACE
1105 bool "Trace user apps (turn off hwtrace in kernel)"
1106 depends on DEBUG_BFIN_HWTRACE_ON
1107 default n
1108 help
1109 Some pieces of the kernel contain a lot of flow changes which can
1110 quickly fill up the hardware trace buffer. When debugging crashes,
1111 the hardware trace may indicate that the problem lies in kernel
1112 space when in reality an application is buggy.
1113
1114 Say Y here to disable hardware tracing in some known "jumpy" pieces
1115 of code so that the trace buffer will extend further back.
1116
1117config EARLY_PRINTK
1118 bool "Early printk"
1119 default n
1120 help
1121 This option enables special console drivers which allow the kernel
1122 to print messages very early in the bootup process.
1123
1124 This is useful for kernel debugging when your machine crashes very
1125 early before the console code is initialized. After enabling this
1126 feature, you must add "earlyprintk=serial,uart0,57600" to the
1127 command line (bootargs). It is safe to say Y here in all cases, as
1128 all of this lives in the init section and is thrown away after the
1129 kernel boots completely.
1130
1131config DUAL_CORE_TEST_MODULE
1132 tristate "Dual Core Test Module"
1133 depends on (BF561)
1134 default n
1135 help
1136 Say Y here to build-in dual core test module for dual core test.
1137
1138config CPLB_INFO
1139 bool "Display the CPLB information"
1140 help
1141 Display the CPLB information.
1142
1143config ACCESS_CHECK
1144 bool "Check the user pointer address"
1145 default y
1146 help
1147 Usually the pointer transfer from user space is checked to see if its
1148 address is in the kernel space.
1149
1150 Say N here to disable that check to improve the performance.
1151
1152endmenu
1153 986
1154source "security/Kconfig" 987source "security/Kconfig"
1155 988
diff --git a/arch/blackfin/Kconfig.debug b/arch/blackfin/Kconfig.debug
new file mode 100644
index 000000000000..59b87a483c68
--- /dev/null
+++ b/arch/blackfin/Kconfig.debug
@@ -0,0 +1,178 @@
1menu "Kernel hacking"
2
3source "lib/Kconfig.debug"
4
5config DEBUG_MMRS
6 bool "Generate Blackfin MMR tree"
7 select DEBUG_FS
8 help
9 Create a tree of Blackfin MMRs via the debugfs tree. If
10 you enable this, you will find all MMRs laid out in the
11 /sys/kernel/debug/blackfin/ directory where you can read/write
12 MMRs directly from userspace. This is obviously just a debug
13 feature.
14
15config DEBUG_HWERR
16 bool "Hardware error interrupt debugging"
17 depends on DEBUG_KERNEL
18 help
19 When enabled, the hardware error interrupt is never disabled, and
20 will happen immediately when an error condition occurs. This comes
21 at a slight cost in code size, but is necessary if you are getting
22 hardware error interrupts and need to know where they are coming
23 from.
24
25config DEBUG_ICACHE_CHECK
26 bool "Check Instruction cache coherency"
27 depends on DEBUG_KERNEL
28 depends on DEBUG_HWERR
29 help
30 Say Y here if you are getting weird unexplained errors. This will
31 ensure that icache is what SDRAM says it should be by doing a
32 byte wise comparison between SDRAM and instruction cache. This
33 also relocates the irq_panic() function to L1 memory, (which is
34 un-cached).
35
36config DEBUG_HUNT_FOR_ZERO
37 bool "Catch NULL pointer reads/writes"
38 default y
39 help
40 Say Y here to catch reads/writes to anywhere in the memory range
41 from 0x0000 - 0x0FFF (the first 4k) of memory. This is useful in
42 catching common programming errors such as NULL pointer dereferences.
43
44 Misbehaving applications will be killed (generate a SEGV) while the
45 kernel will trigger a panic.
46
47 Enabling this option will take up an extra entry in CPLB table.
48 Otherwise, there is no extra overhead.
49
50config DEBUG_BFIN_HWTRACE_ON
51 bool "Turn on Blackfin's Hardware Trace"
52 default y
53 help
54 All Blackfins include a Trace Unit which stores a history of the last
55 16 changes in program flow taken by the program sequencer. The history
56 allows the user to recreate the program sequencer’s recent path. This
57 can be handy when an application dies - we print out the execution
58 path of how it got to the offending instruction.
59
60 By turning this off, you may save a tiny amount of power.
61
62choice
63 prompt "Omit loop Tracing"
64 default DEBUG_BFIN_HWTRACE_COMPRESSION_OFF
65 depends on DEBUG_BFIN_HWTRACE_ON
66 help
67 The trace buffer can be configured to omit recording of changes in
68 program flow that match either the last entry or one of the last
69 two entries. Omitting one of these entries from the record prevents
70 the trace buffer from overflowing because of any sort of loop (for, do
71 while, etc) in the program.
72
73 Because zero-overhead Hardware loops are not recorded in the trace buffer,
74 this feature can be used to prevent trace overflow from loops that
75 are nested four deep.
76
77config DEBUG_BFIN_HWTRACE_COMPRESSION_OFF
78 bool "Trace all Loops"
79 help
80 The trace buffer records all changes of flow
81
82config DEBUG_BFIN_HWTRACE_COMPRESSION_ONE
83 bool "Compress single-level loops"
84 help
85 The trace buffer does not record single loops - helpful if trace
86 is spinning on a while or do loop.
87
88config DEBUG_BFIN_HWTRACE_COMPRESSION_TWO
89 bool "Compress two-level loops"
90 help
91 The trace buffer does not record loops two levels deep. Helpful if
92 the trace is spinning in a nested loop
93
94endchoice
95
96config DEBUG_BFIN_HWTRACE_COMPRESSION
97 int
98 depends on DEBUG_BFIN_HWTRACE_ON
99 default 0 if DEBUG_BFIN_HWTRACE_COMPRESSION_OFF
100 default 1 if DEBUG_BFIN_HWTRACE_COMPRESSION_ONE
101 default 2 if DEBUG_BFIN_HWTRACE_COMPRESSION_TWO
102
103
104config DEBUG_BFIN_HWTRACE_EXPAND
105 bool "Expand Trace Buffer greater than 16 entries"
106 depends on DEBUG_BFIN_HWTRACE_ON
107 default n
108 help
109 By selecting this option, every time the 16 hardware entries in
110 the Blackfin's HW Trace buffer are full, the kernel will move them
111 into a software buffer, for dumping when there is an issue. This
112 has a great impact on performance, (an interrupt every 16 change of
113 flows) and should normally be turned off, except in those nasty
114 debugging sessions
115
116config DEBUG_BFIN_HWTRACE_EXPAND_LEN
117 int "Size of Trace buffer (in power of 2k)"
118 range 0 4
119 depends on DEBUG_BFIN_HWTRACE_EXPAND
120 default 1
121 help
122 This sets the size of the software buffer that the trace information
123 is kept in.
124 0 for (2^0) 1k, or 256 entries,
125 1 for (2^1) 2k, or 512 entries,
126 2 for (2^2) 4k, or 1024 entries,
127 3 for (2^3) 8k, or 2048 entries,
128 4 for (2^4) 16k, or 4096 entries
129
130config DEBUG_BFIN_NO_KERN_HWTRACE
131 bool "Trace user apps (turn off hwtrace in kernel)"
132 depends on DEBUG_BFIN_HWTRACE_ON
133 default n
134 help
135 Some pieces of the kernel contain a lot of flow changes which can
136 quickly fill up the hardware trace buffer. When debugging crashes,
137 the hardware trace may indicate that the problem lies in kernel
138 space when in reality an application is buggy.
139
140 Say Y here to disable hardware tracing in some known "jumpy" pieces
141 of code so that the trace buffer will extend further back.
142
143config EARLY_PRINTK
144 bool "Early printk"
145 default n
146 help
147 This option enables special console drivers which allow the kernel
148 to print messages very early in the bootup process.
149
150 This is useful for kernel debugging when your machine crashes very
151 early before the console code is initialized. After enabling this
152 feature, you must add "earlyprintk=serial,uart0,57600" to the
153 command line (bootargs). It is safe to say Y here in all cases, as
154 all of this lives in the init section and is thrown away after the
155 kernel boots completely.
156
157config DUAL_CORE_TEST_MODULE
158 tristate "Dual Core Test Module"
159 depends on (BF561)
160 default n
161 help
162 Say Y here to build-in dual core test module for dual core test.
163
164config CPLB_INFO
165 bool "Display the CPLB information"
166 help
167 Display the CPLB information.
168
169config ACCESS_CHECK
170 bool "Check the user pointer address"
171 default y
172 help
173 Usually the pointer transfer from user space is checked to see if its
174 address is in the kernel space.
175
176 Say N here to disable that check to improve the performance.
177
178endmenu