|
0
|
1 #ifndef CYGONCE_PKGCONF_KERNEL_H |
|
|
2 #define CYGONCE_PKGCONF_KERNEL_H |
|
|
3 // ==================================================================== |
|
|
4 // |
|
|
5 // pkgconf/kernel.h |
|
|
6 // |
|
|
7 // Kernel configuration file |
|
|
8 // |
|
|
9 // ==================================================================== |
|
|
10 //####COPYRIGHTBEGIN#### |
|
|
11 // |
|
|
12 // ------------------------------------------- |
|
|
13 // The contents of this file are subject to the Cygnus eCos Public License |
|
|
14 // Version 1.0 (the "License"); you may not use this file except in |
|
|
15 // compliance with the License. You may obtain a copy of the License at |
|
|
16 // http://sourceware.cygnus.com/ecos |
|
|
17 // |
|
|
18 // Software distributed under the License is distributed on an "AS IS" |
|
|
19 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the |
|
|
20 // License for the specific language governing rights and limitations under |
|
|
21 // the License. |
|
|
22 // |
|
|
23 // The Original Code is eCos - Embedded Cygnus Operating System, released |
|
|
24 // September 30, 1998. |
|
|
25 // |
|
|
26 // The Initial Developer of the Original Code is Cygnus. Portions created |
|
|
27 // by Cygnus are Copyright (C) 1998 Cygnus Solutions. All Rights Reserved. |
|
|
28 // ------------------------------------------- |
|
|
29 // |
|
|
30 //####COPYRIGHTEND#### |
|
|
31 // ==================================================================== |
|
|
32 //#####DESCRIPTIONBEGIN#### |
|
|
33 // |
|
|
34 // Author(s): nickg |
|
|
35 // Contributors: nickg |
|
|
36 // Date: 1997-09-29 |
|
|
37 // Purpose: To allow the user to edit kernel configuration options. |
|
|
38 // Description: |
|
|
39 // |
|
|
40 //####DESCRIPTIONEND#### |
|
|
41 // |
|
|
42 // ==================================================================== |
|
|
43 |
|
|
44 /* --------------------------------------------------------------------- |
|
|
45 * Some of the kernel configuration options depend on global options, |
|
|
46 * so it is necessary to include the global options first. |
|
|
47 */ |
|
|
48 |
|
|
49 #include <pkgconf/system.h> |
|
|
50 |
|
|
51 /* Only define options if the kernel is to be present */ |
|
|
52 #ifdef CYGPKG_KERNEL |
|
|
53 |
|
|
54 #include <pkgconf/hal.h> |
|
|
55 #include <pkgconf/infra.h> |
|
|
56 |
|
|
57 /* --------------------------------------------------------------------- |
|
|
58 * The overall package definition. |
|
|
59 |
|
|
60 {{CFG_DATA |
|
|
61 |
|
|
62 cdl_package CYGPKG_KERNEL { |
|
|
63 display "eCos kernel" |
|
|
64 type boolean |
|
|
65 requires CYGFUN_HAL_COMMON_KERNEL_SUPPORT |
|
|
66 description " |
|
|
67 This package contains the core functionality of the eCos |
|
|
68 kernel. It relies on functionality provided by various HAL |
|
|
69 packages and by the eCos infrastructure. In turn the eCos |
|
|
70 kernel provides support for other packages such as the device |
|
|
71 drivers and the uITRON compatibility layer." |
|
|
72 doc ref/ecos-ref/ecos-kernel-overview.html |
|
|
73 } |
|
|
74 |
|
|
75 }}CFG_DATA */ |
|
|
76 |
|
|
77 /* --------------------------------------------------------------------- |
|
|
78 * The first component within the kernel is related to interrupt |
|
|
79 * handling. |
|
|
80 {{CFG_DATA |
|
|
81 |
|
|
82 cdl_component CYGPKG_KERNEL_INTERRUPTS { |
|
|
83 display "Kernel interrupt handling" |
|
|
84 parent CYGPKG_KERNEL |
|
|
85 type dummy |
|
|
86 description " |
|
|
87 The majority of configuration options related to interrupt |
|
|
88 handling are in the HAL packages, since usually the code has |
|
|
89 to be platform-specific. There are a number of options |
|
|
90 provided within the kernel related to slightly higher-level |
|
|
91 concepts, for example Delayed Service Routines." |
|
|
92 doc ref/ecos-ref/interrupts.html |
|
|
93 } |
|
|
94 |
|
|
95 # In the absence of active-if support this has to be |
|
|
96 # a sub-component. It does not use the CYGPKG_ prefix to make |
|
|
97 # it easier to change back into an ordinary option later on. |
|
|
98 cdl_component CYGIMP_KERNEL_INTERRUPTS_DSRS { |
|
|
99 display "Use delayed service routines (DSRs)" |
|
|
100 parent CYGPKG_KERNEL_INTERRUPTS |
|
|
101 description " |
|
|
102 In eCos the recommended way to handle device interrupts is to |
|
|
103 do a minimum amount of work inside the low level interrupt |
|
|
104 handler itself, and instead do as much as possible in a |
|
|
105 Delayed Service Routine or DSR. If an application does not |
|
|
106 make use of DSRs directly or indirectly then it is possible |
|
|
107 to disable the DSR support completely, which reduces the |
|
|
108 overheads of context switches and interrupt handling. Note |
|
|
109 that the kernel real-time clock makes use of DSRs, as do many |
|
|
110 of the device drivers. " |
|
|
111 doc ref/ecos-ref/interrupt-and-exception-handlers.html |
|
|
112 } |
|
|
113 |
|
|
114 # NOTE: the choice of list vs table should not be two separate |
|
|
115 # options. There is a single option which must have one of |
|
|
116 # two legal values. |
|
|
117 cdl_option CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST { |
|
|
118 display "Use linked lists for DSRs" |
|
|
119 parent CYGIMP_KERNEL_INTERRUPTS_DSRS |
|
|
120 type radio |
|
|
121 description " |
|
|
122 When DSR support is enabled the kernel must keep track of all |
|
|
123 the DSRs that are pending. This information can be kept in a |
|
|
124 fixed-size table or in a linked list. The list implementation |
|
|
125 requires that the kernel disable interrupts for a very short |
|
|
126 period of time outside interrupt handlers, but there is no |
|
|
127 possibility of a table overflow occurring." |
|
|
128 doc ref/ecos-ref/interrupts.html |
|
|
129 } |
|
|
130 |
|
|
131 cdl_option CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE { |
|
|
132 display "Use fixed-size table for DSRs" |
|
|
133 parent CYGIMP_KERNEL_INTERRUPTS_DSRS |
|
|
134 type radio |
|
|
135 description " |
|
|
136 When DSR support is enabled the kernel must keep track of all |
|
|
137 the DSRs that are pending. This information can be kept in a |
|
|
138 fixed-size table or in a linked list. The table |
|
|
139 implementation involves a very small risk of overflow at |
|
|
140 run-time if a given interrupt source is able to have more |
|
|
141 than one pending DSR. However it has the advantage that |
|
|
142 the kernel does not need to disable interrupts outside |
|
|
143 interrupt handlers." |
|
|
144 doc ref/ecos-ref/interrupts.html |
|
|
145 } |
|
|
146 |
|
|
147 cdl_option CYGNUM_KERNEL_INTERRUPTS_DSRS_TABLE_SIZE { |
|
|
148 display "Number of entries in fixed-size DSR table" |
|
|
149 parent CYGIMP_KERNEL_INTERRUPTS_DSRS |
|
|
150 type count |
|
|
151 legal_values 2 to 1024 |
|
|
152 #active_if CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE |
|
|
153 description " |
|
|
154 When DSR support is enabled the kernel must keep track of all |
|
|
155 the DSRs that are pending. One approach involves a fixed-size |
|
|
156 table, which involves a very small risk of overflow at |
|
|
157 run-time. By increasing the table size it is possible to reduce |
|
|
158 this risk." |
|
|
159 doc ref/ecos-ref/interrupts.html |
|
|
160 } |
|
|
161 |
|
|
162 cdl_option CYGIMP_KERNEL_INTERRUPTS_CHAIN { |
|
|
163 display "Chain all interrupts together" |
|
|
164 parent CYGPKG_KERNEL_INTERRUPTS |
|
|
165 requires CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN |
|
|
166 description " |
|
|
167 Interrupts can be attached to vectors either singly, or be |
|
|
168 chained together. The latter is necessary if there is no way |
|
|
169 of discovering which device has interrupted without |
|
|
170 inspecting the device itself. It can also reduce the amount |
|
|
171 of RAM needed for interrupt decoding tables and code." |
|
|
172 doc ref/ecos-ref/interrupts.html |
|
|
173 } |
|
|
174 |
|
|
175 }}CFG_DATA */ |
|
|
176 |
|
|
177 #define CYGIMP_KERNEL_INTERRUPTS_DSRS |
|
|
178 #define CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST |
|
|
179 #undef CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE |
|
|
180 #define CYGNUM_KERNEL_INTERRUPTS_DSRS_TABLE_SIZE 32 |
|
|
181 #undef CYGIMP_KERNEL_INTERRUPTS_CHAIN |
|
|
182 |
|
|
183 /* --------------------------------------------------------------------- |
|
|
184 * Exceptions. Currently there are only two options. The first |
|
|
185 * determines whether or not exceptions are enabled at all. The |
|
|
186 * second controls whether they apply globally or on a per-thread |
|
|
187 * basis. There should probably be more options, but the boundary |
|
|
188 * between the HAL and kernel becomes blurred. |
|
|
189 |
|
|
190 {{CFG_DATA |
|
|
191 |
|
|
192 cdl_component CYGPKG_KERNEL_EXCEPTIONS { |
|
|
193 display "Exception handling" |
|
|
194 parent CYGPKG_KERNEL |
|
|
195 requires CYGPKG_HAL_EXCEPTIONS |
|
|
196 description " |
|
|
197 In the context of the eCos kernel exceptions are unexpected |
|
|
198 events detected by the hardware, for example an attempt to |
|
|
199 execute an illegal instruction. There is no relation with |
|
|
200 other forms of exception, for example the catch and throw |
|
|
201 facilities of languages like C++. It is possible to disable |
|
|
202 all support for exceptions and thus save some memory." |
|
|
203 doc ref/ecos-ref/exceptions.html |
|
|
204 } |
|
|
205 |
|
|
206 cdl_option CYGSEM_KERNEL_EXCEPTIONS_DECODE { |
|
|
207 display "Decode exception types in kernel" |
|
|
208 parent CYGPKG_KERNEL_EXCEPTIONS |
|
|
209 description " |
|
|
210 On targets where several different types of exception are |
|
|
211 possible, for example executing an illegal instruction and |
|
|
212 division by zero, it is possible for the kernel to do some |
|
|
213 decoding of the exception type and deliver the different |
|
|
214 types of exception to different handlers in the application |
|
|
215 code. Alternatively the kernel can simply pass all |
|
|
216 exceptions directly to application code, leaving the |
|
|
217 decoding to be done by the application" |
|
|
218 doc ref/ecos-ref/exceptions.html |
|
|
219 } |
|
|
220 |
|
|
221 cdl_option CYGSEM_KERNEL_EXCEPTIONS_GLOBAL { |
|
|
222 display "Use global exception handlers" |
|
|
223 parent CYGPKG_KERNEL_EXCEPTIONS |
|
|
224 description " |
|
|
225 In the context of the eCos kernel exceptions are unexpected |
|
|
226 events detected by the hardware, for example an attempt to |
|
|
227 execute an illegal instruction. If the kernel is configured |
|
|
228 to support exceptions then two implementations are |
|
|
229 possible. The default implementation involves a single set |
|
|
230 of exception handlers that are in use for the entire |
|
|
231 system. The alternative implementation allows different |
|
|
232 exception handlers to be specified for each thread." |
|
|
233 doc ref/ecos-ref/exceptions.html |
|
|
234 } |
|
|
235 |
|
|
236 }}CFG_DATA */ |
|
|
237 |
|
|
238 #define CYGPKG_KERNEL_EXCEPTIONS |
|
|
239 #undef CYGSEM_KERNEL_EXCEPTIONS_DECODE |
|
|
240 #define CYGSEM_KERNEL_EXCEPTIONS_GLOBAL |
|
|
241 |
|
|
242 |
|
|
243 /* --------------------------------------------------------------------- |
|
|
244 * {{CFG_DATA |
|
|
245 |
|
|
246 cdl_component CYGPKG_KERNEL_SCHED { |
|
|
247 display "Kernel schedulers" |
|
|
248 type dummy |
|
|
249 parent CYGPKG_KERNEL |
|
|
250 description " |
|
|
251 The eCos kernel provides a choice of schedulers. In addition |
|
|
252 there are a number of configuration options to control the |
|
|
253 detailed behaviour of these schedulers. |
|
|
254 " |
|
|
255 doc ref/ecos-ref/ecos-kernel-overview.html#THE-SCHEDULER |
|
|
256 } |
|
|
257 |
|
|
258 cdl_option CYGSEM_KERNEL_SCHED_MLQUEUE { |
|
|
259 display "Multi-level queue scheduler" |
|
|
260 type radio |
|
|
261 parent CYGPKG_KERNEL_SCHED |
|
|
262 description " |
|
|
263 The multi-level queue scheduler supports multiple priority |
|
|
264 levels and multiple threads at each priority level. |
|
|
265 Preemption between priority levels is automatic. Timeslicing |
|
|
266 within a given priority level is controlled by a separate |
|
|
267 configuration option" |
|
|
268 doc ref/ecos-ref/ecos-kernel-overview.html#THE-SCHEDULER |
|
|
269 } |
|
|
270 |
|
|
271 cdl_option CYGSEM_KERNEL_SCHED_BITMAP { |
|
|
272 display "Bitmap scheduler" |
|
|
273 type radio |
|
|
274 parent CYGPKG_KERNEL_SCHED |
|
|
275 description " |
|
|
276 The bitmap scheduler supports multiple priority levels but |
|
|
277 only one thread can exist at each priority level. This means |
|
|
278 that scheduling decisions are very simple and hence the |
|
|
279 scheduler is efficient. Preemption between priority levels is |
|
|
280 automatic. Timeslicing within a given priority level is |
|
|
281 irrelevant since there can be only one thread at each |
|
|
282 priority level." |
|
|
283 doc ref/ecos-ref/ecos-kernel-overview.html#THE-SCHEDULER |
|
|
284 } |
|
|
285 |
|
|
286 #cdl_option CYGSEM_KERNEL_SCHED_LOTTERY { |
|
|
287 # display "Lottery scheduler" |
|
|
288 # type radio |
|
|
289 # parent CYGPKG_KERNEL_SCHED |
|
|
290 # description " |
|
|
291 # This scheduler is not yet available." |
|
|
292 #} |
|
|
293 |
|
|
294 # NOTE: this option only makes sense if the current scheduler |
|
|
295 # supports multiple priority levels. |
|
|
296 cdl_option CYGNUM_KERNEL_SCHED_PRIORITIES { |
|
|
297 display "Number of priority levels" |
|
|
298 type count |
|
|
299 legal_values 1 to 32 |
|
|
300 parent CYGPKG_KERNEL_SCHED |
|
|
301 #active_if CYGINT_KERNEL_SCHED_PRIORITY_SCHEDULER |
|
|
302 description " |
|
|
303 This option controls the number of priority levels that are |
|
|
304 available. For some types of scheduler including the bitmap |
|
|
305 scheduler this may impose an upper bound on the number of |
|
|
306 threads in the system. For other schedulers such as the |
|
|
307 mlqueue scheduler the number of threads is independent from |
|
|
308 the number of priority levels. Note that the lowest priority |
|
|
309 level is normally used only by the idle thread, although |
|
|
310 application threads can run at this priority if necessary." |
|
|
311 doc ref/ecos-ref/ecos-kernel-overview.html#THE-SCHEDULER |
|
|
312 } |
|
|
313 |
|
|
314 # NOTE: this option only makes sense for some of the schedulers. |
|
|
315 # Timeslicing is irrelevant for bitmap schedulers. |
|
|
316 cdl_option CYGSEM_KERNEL_SCHED_TIMESLICE { |
|
|
317 display "Scheduler timeslicing" |
|
|
318 parent CYGPKG_KERNEL_SCHED |
|
|
319 requires !CYGSEM_KERNEL_SCHED_BITMAP |
|
|
320 requires CYGVAR_KERNEL_COUNTERS_CLOCK |
|
|
321 description " |
|
|
322 Some schedulers including the mlqueue scheduler support |
|
|
323 timeslicing. This means that the kernel will check regularly |
|
|
324 whether or not there is another runnable thread with the |
|
|
325 same priority, and if there is such a thread there will be |
|
|
326 an automatic context switch. Not all applications require |
|
|
327 timeslicing, for example because every thread performs a |
|
|
328 blocking operation regularly. For these applications it is |
|
|
329 possible to disable timeslicing, which reduces the overheads |
|
|
330 associated with timer interrupts." |
|
|
331 } |
|
|
332 |
|
|
333 cdl_option CYGNUM_KERNEL_SCHED_TIMESLICE_TICKS { |
|
|
334 display "Number of clock ticks between timeslices" |
|
|
335 parent CYGPKG_KERNEL_SCHED |
|
|
336 type count |
|
|
337 legal_values 1 to 65535 |
|
|
338 #active_if CYGSEM_KERNEL_SCHED_TIMESLICE |
|
|
339 description " |
|
|
340 Assuming timeslicing is enabled, how frequently should it |
|
|
341 take place? The value of this option corresponds to the |
|
|
342 number of clock ticks that should occur before a timeslice |
|
|
343 takes place, so increasing the value reduces the frequency |
|
|
344 of timeslices." |
|
|
345 } |
|
|
346 |
|
|
347 }}CFG_DATA */ |
|
|
348 |
|
|
349 #define CYGSEM_KERNEL_SCHED_MLQUEUE |
|
|
350 #undef CYGSEM_KERNEL_SCHED_BITMAP |
|
|
351 #undef CYGSEM_KERNEL_SCHED_LOTTERY |
|
|
352 #define CYGNUM_KERNEL_SCHED_PRIORITIES 32 |
|
|
353 #define CYGSEM_KERNEL_SCHED_TIMESLICE |
|
|
354 #define CYGNUM_KERNEL_SCHED_TIMESLICE_TICKS 5 |
|
|
355 |
|
|
356 /* --------------------------------------------------------------------- |
|
|
357 * Counters and clocks. |
|
|
358 |
|
|
359 {{CFG_DATA |
|
|
360 |
|
|
361 cdl_component CYGPKG_KERNEL_COUNTERS { |
|
|
362 display "Counters and clocks" |
|
|
363 parent CYGPKG_KERNEL |
|
|
364 type dummy |
|
|
365 description " |
|
|
366 The counter objects provided by the kernel provide an |
|
|
367 abstraction of the clock facility that is generally provided. |
|
|
368 Application code can associate alarms with counters, where an |
|
|
369 alarm is identified by the number of ticks until it triggers, |
|
|
370 the action to be taken on triggering, and whether or not the |
|
|
371 alarm should be repeated." |
|
|
372 doc ref/ecos-ref/counters-clocks-and-alarms.html |
|
|
373 } |
|
|
374 |
|
|
375 cdl_option CYGVAR_KERNEL_COUNTERS_CLOCK { |
|
|
376 display "Provide real-time clock" |
|
|
377 parent CYGPKG_KERNEL_COUNTERS |
|
|
378 requires CYGIMP_KERNEL_INTERRUPTS_DSRS |
|
|
379 description " |
|
|
380 On all current target systems the kernel can provide a |
|
|
381 real-time clock. This clock serves two purposes. First it is |
|
|
382 necessary to support clock and alarm related functions. |
|
|
383 Second it is needed to implement timeslicing in some of the |
|
|
384 schedulers including the mlqueue scheduler. If the |
|
|
385 application does not require any of these facilities then it |
|
|
386 is possible to disable the real time clock support |
|
|
387 completely." |
|
|
388 doc ref/ecos-ref/counters-clocks-and-alarms.html |
|
|
389 } |
|
|
390 |
|
|
391 cdl_component CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE { |
|
|
392 display "Override default clock settings" |
|
|
393 parent CYGPKG_KERNEL_COUNTERS |
|
|
394 requires CYGVAR_KERNEL_COUNTERS_CLOCK |
|
|
395 type bool |
|
|
396 description " |
|
|
397 The kernel has default settings for the clock interrupt |
|
|
398 frequency. These settings will vary from platform to |
|
|
399 platform, but typically there will be a 100 clock interrupts |
|
|
400 every second. It is possible to change this frequency, but |
|
|
401 it requires some knowledge of the target hardware. |
|
|
402 " |
|
|
403 } |
|
|
404 |
|
|
405 cdl_option CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_PERIOD { |
|
|
406 display "Clock hardware initialization value" |
|
|
407 parent CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE |
|
|
408 type count |
|
|
409 legal_values 1 to 0x7fffffff |
|
|
410 description " |
|
|
411 During system initialization this value is used to initialize |
|
|
412 the clock hardware. The exact meaning of the value and the |
|
|
413 range of legal values therefore depends on the target hardware, |
|
|
414 and the hardware documentation should be consulted for further |
|
|
415 details. In addition the clock resolution numerator and |
|
|
416 denominator values should be updated. Typical values for |
|
|
417 this option would be 150000 on the MN10300 stdeval1 board, |
|
|
418 15625 on the tx39 jmr3904 board, and 20625 on the powerpc |
|
|
419 cogent board." |
|
|
420 } |
|
|
421 |
|
|
422 cdl_option CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_NUMERATOR { |
|
|
423 display "Clock resolution numerator" |
|
|
424 parent CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE |
|
|
425 type count |
|
|
426 legal_values 1 to 0x7fffffff |
|
|
427 description " |
|
|
428 If a non-default clock interrupt frequency is used then it |
|
|
429 is necessary to specify the clock resolution explicitly. |
|
|
430 This resolution involves two separate values, the numerator |
|
|
431 and the denominator. The result of dividing the numerator by |
|
|
432 the denominator should correspond to the number of |
|
|
433 nanoseconds between clock interrupts. For example a |
|
|
434 numerator of 1000000000 and a denominator of 100 means that |
|
|
435 there are 10000000 nanoseconds (or 10 milliseconds) between |
|
|
436 clock interrupts. Expressing the resolution as a fraction |
|
|
437 should minimize clock drift even for frequencies that cannot |
|
|
438 be expressed as a simple integer. For example a frequency of |
|
|
439 60Hz corresponds to a clock resolution of 16666666.66... |
|
|
440 nanoseconds. This can be expressed accurately as 1000000000 |
|
|
441 over 60." |
|
|
442 } |
|
|
443 |
|
|
444 cdl_option CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_DENOMINATOR { |
|
|
445 display "Clock resolution denominator" |
|
|
446 parent CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE |
|
|
447 type count |
|
|
448 legal_values 1 to 0x7fffffff |
|
|
449 description " |
|
|
450 If a non-default clock interrupt frequency is used then it |
|
|
451 is necessary to specify the clock resolution explicitly. |
|
|
452 This resolution involves two separate values, the numerator |
|
|
453 and the denominator. The result of dividing the numerator by |
|
|
454 the denominator should correspond to the number of |
|
|
455 nanoseconds between clock interrupts. For example a |
|
|
456 numerator of 1000000000 and a denominator of 100 means that |
|
|
457 there are 10000000 nanoseconds (or 10 milliseconds) between |
|
|
458 clock interrupts. Expressing the resolution as a fraction |
|
|
459 should minimize clock drift even for frequencies that cannot |
|
|
460 be expressed as a simple integer. For example a frequency of |
|
|
461 60Hz corresponds to a clock resolution of 16666666.66... |
|
|
462 nanoseconds. This can be expressed accurately as 1000000000 |
|
|
463 over 60." |
|
|
464 } |
|
|
465 |
|
|
466 |
|
|
467 # NOTE: these option should really be a single enum. |
|
|
468 cdl_option CYGIMP_KERNEL_COUNTERS_SINGLE_LIST { |
|
|
469 display "Implement counters using a single list" |
|
|
470 parent CYGPKG_KERNEL_COUNTERS |
|
|
471 type radio |
|
|
472 description " |
|
|
473 There are two different implementations of the counter |
|
|
474 objects. The first implementation stores all alarms in a |
|
|
475 single linked list. The alternative implementation uses a |
|
|
476 table of linked lists. A single list is more efficient in |
|
|
477 terms of memory usage and is generally adequate when the |
|
|
478 application only makes use of a small number of alarms." |
|
|
479 doc ref/ecos-ref/counters-clocks-and-alarms.html |
|
|
480 } |
|
|
481 |
|
|
482 cdl_option CYGIMP_KERNEL_COUNTERS_MULTI_LIST { |
|
|
483 display "Implement counters using a table of lists" |
|
|
484 parent CYGPKG_KERNEL_COUNTERS |
|
|
485 type radio |
|
|
486 description " |
|
|
487 There are two different implementations of the counter |
|
|
488 objects. The first implementation stores all alarms in a |
|
|
489 single linked list. The alternative implementation uses a |
|
|
490 table of linked lists, with the size of the table being a |
|
|
491 separate configurable option. For more complicated |
|
|
492 operations it is better to have a table of lists since this |
|
|
493 reduces the amount of computation whenever the timer goes |
|
|
494 off. Assuming a table size of 8 (the default value) on |
|
|
495 average the timer code will only need to check 1/8 of the |
|
|
496 pending alarms instead of all of them." |
|
|
497 doc ref/ecos-ref/counters-clocks-and-alarms.html |
|
|
498 } |
|
|
499 |
|
|
500 cdl_option CYGNUM_KERNEL_COUNTERS_MULTI_LIST_SIZE { |
|
|
501 display "Size of counter list table" |
|
|
502 parent CYGPKG_KERNEL_COUNTERS |
|
|
503 type count |
|
|
504 legal_values 1 to 1024 |
|
|
505 #active_if CYGIMP_KERNEL_COUNTERS_MULTI_LIST |
|
|
506 description " |
|
|
507 If counters are implemented using an array of linked lists |
|
|
508 then this option controls the size of the array. A larger |
|
|
509 size reduces the amount of computation that needs to take |
|
|
510 place whenever the timer goes off, but requires extra |
|
|
511 memory." |
|
|
512 doc ref/ecos-ref/counters-clocks-and-alarms.html |
|
|
513 } |
|
|
514 |
|
|
515 }}CFG_DATA */ |
|
|
516 |
|
|
517 #define CYGVAR_KERNEL_COUNTERS_CLOCK |
|
|
518 #undef CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE |
|
|
519 #define CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_PERIOD 9999 |
|
|
520 #define CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_NUMERATOR 1000000000 |
|
|
521 #define CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_DENOMINATOR 100 |
|
|
522 #define CYGIMP_KERNEL_COUNTERS_SINGLE_LIST |
|
|
523 #undef CYGIMP_KERNEL_COUNTERS_MULTI_LIST |
|
|
524 #define CYGNUM_KERNEL_COUNTERS_MULTI_LIST_SIZE 8 |
|
|
525 |
|
|
526 /* --------------------------------------------------------------------- |
|
|
527 * Thread-related options |
|
|
528 {{CFG_DATA |
|
|
529 |
|
|
530 cdl_component CYGPKG_KERNEL_THREADS { |
|
|
531 display "Thread-related options" |
|
|
532 type dummy |
|
|
533 parent CYGPKG_KERNEL |
|
|
534 description " |
|
|
535 There are a number of configuration options related to the |
|
|
536 implementation of threads, for example whether or not the |
|
|
537 eCos kernel supports per-thread data." |
|
|
538 doc ref/ecos-ref/thread-operations.html |
|
|
539 } |
|
|
540 |
|
|
541 cdl_option CYGFUN_KERNEL_THREADS_TIMER { |
|
|
542 display "Allow per-thread timers" |
|
|
543 parent CYGPKG_KERNEL_THREADS |
|
|
544 requires CYGVAR_KERNEL_COUNTERS_CLOCK |
|
|
545 description " |
|
|
546 This option controls whether or not the kernel should support |
|
|
547 per-thread clock and alarm related functions. Also some of |
|
|
548 the synchronization primitives such as semaphore and |
|
|
549 condition variable timed wait operations require per-thread |
|
|
550 timer support. If none of these facilities are required then |
|
|
551 the option can be disabled." |
|
|
552 doc ref/ecos-ref/thread-operations.html |
|
|
553 } |
|
|
554 |
|
|
555 cdl_option CYGVAR_KERNEL_THREADS_NAME { |
|
|
556 display "Support optional name for each thread" |
|
|
557 parent CYGPKG_KERNEL_THREADS |
|
|
558 description " |
|
|
559 Threads may optionally be supplied with a name string that is |
|
|
560 used to identify them during debugging. This name is only |
|
|
561 present if `this option is defined. Disabling it reduces both |
|
|
562 code and data size." |
|
|
563 doc ref/ecos-ref/thread-operations.html |
|
|
564 } |
|
|
565 |
|
|
566 cdl_option CYGVAR_KERNEL_THREADS_LIST { |
|
|
567 display "Keep track of all threads using a linked list" |
|
|
568 parent CYGPKG_KERNEL_THREADS |
|
|
569 description " |
|
|
570 Threads may optionally be placed on a housekeeping list so |
|
|
571 that all threads may be located easily. This is useful mainly |
|
|
572 in conjunction with source-level debugging." |
|
|
573 doc ref/ecos-ref/thread-operations.html |
|
|
574 } |
|
|
575 |
|
|
576 cdl_option CYGFUN_KERNEL_THREADS_STACK_LIMIT { |
|
|
577 display "Keep track of the base of each thread's stack" |
|
|
578 parent CYGPKG_KERNEL_THREADS |
|
|
579 description " |
|
|
580 This option makes the kernel keep track of the lower limit on |
|
|
581 each thread's stack. It allows the kernel to adjust the lower |
|
|
582 limit, thus making space for per-thread data. Note that it |
|
|
583 does not imply any form of run-time stack overflow checking." |
|
|
584 doc ref/ecos-ref/thread-operations.html |
|
|
585 } |
|
|
586 |
|
|
587 cdl_option CYGVAR_KERNEL_THREADS_DATA { |
|
|
588 display "Support for per-thread data" |
|
|
589 parent CYGPKG_KERNEL_THREADS |
|
|
590 requires CYGFUN_KERNEL_THREADS_STACK_LIMIT |
|
|
591 description " |
|
|
592 It is possible for the kernel to support per-thread data, in |
|
|
593 other words an area of memory specific to each thread which |
|
|
594 can be used to store data for that thread. This per-thread |
|
|
595 data can be used by applications or by other packages such as |
|
|
596 the ISO C library." |
|
|
597 doc ref/ecos-ref/thread-operations.html |
|
|
598 } |
|
|
599 |
|
|
600 cdl_option CYGNUM_KERNEL_THREADS_DATA_MAX { |
|
|
601 display "Number of words of per-thread data" |
|
|
602 parent CYGPKG_KERNEL_THREADS |
|
|
603 #active_if CYGVAR_KERNEL_THREADS_DATA |
|
|
604 type count |
|
|
605 legal_values 1 to 65535 |
|
|
606 description " |
|
|
607 It is possible for the kernel to support per-thread data, in |
|
|
608 other words an area of memory specific to each thread which |
|
|
609 can be used to store data for that thread. This per-thread |
|
|
610 data can be used by applications or by other packages such as |
|
|
611 the ISO C library. This configuration option controls the |
|
|
612 number of words of per-thread data that the kernel will |
|
|
613 allow." |
|
|
614 doc ref/ecos-ref/thread-operations.html |
|
|
615 } |
|
|
616 |
|
|
617 cdl_option CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE { |
|
|
618 display "Stack size for the idle thread" |
|
|
619 parent CYGPKG_KERNEL_THREADS |
|
|
620 type count |
|
|
621 legal_values 512 to 65536 |
|
|
622 description " |
|
|
623 This configuration option specifies the stack size in bytes |
|
|
624 for the idle thread. Unless the HAL is configured to use a |
|
|
625 separate interrupt stack this size must be sufficient to meet |
|
|
626 the requirements of all interrupt handlers - these |
|
|
627 requirements are cumulative if nested interrupted are |
|
|
628 enabled. Depending on the target architecture, the stack size |
|
|
629 typically has to be a multiple of eight or sixteen bytes." |
|
|
630 |
|
|
631 doc ref/ecos-ref/thread-operations.html |
|
|
632 } |
|
|
633 |
|
|
634 }}CFG_DATA */ |
|
|
635 |
|
|
636 #define CYGFUN_KERNEL_THREADS_TIMER |
|
|
637 #define CYGVAR_KERNEL_THREADS_NAME |
|
|
638 #define CYGVAR_KERNEL_THREADS_LIST |
|
|
639 #define CYGFUN_KERNEL_THREADS_STACK_LIMIT |
|
|
640 #define CYGVAR_KERNEL_THREADS_DATA |
|
|
641 #define CYGNUM_KERNEL_THREADS_DATA_MAX 6 |
|
|
642 #define CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE 2048 |
|
|
643 |
|
|
644 |
|
|
645 /* --------------------------------------------------------------------- |
|
|
646 * Synchronization primitives. |
|
|
647 |
|
|
648 {{CFG_DATA |
|
|
649 |
|
|
650 cdl_component CYGPKG_KERNEL_SYNCH { |
|
|
651 display "Synchronization primitives" |
|
|
652 type dummy |
|
|
653 parent CYGPKG_KERNEL |
|
|
654 description " |
|
|
655 The eCos kernel supports a number of different |
|
|
656 synchronization primitives such as mutexes, semaphores, |
|
|
657 condition variables, and message boxes. There are |
|
|
658 configuration options to control the exact behaviour of some |
|
|
659 of these synchronization primitives. |
|
|
660 " |
|
|
661 doc ref/ecos-ref/thread-synchronization.html |
|
|
662 } |
|
|
663 |
|
|
664 # NOTE: the requires statement is only valid for the current kernel. |
|
|
665 # Priority inheritance is possible in other schedulers as well |
|
|
666 # but is not yet implemented. |
|
|
667 cdl_option CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE_SIMPLE { |
|
|
668 display "Simple mutex priority inheritance" |
|
|
669 requires CYGSEM_KERNEL_SCHED_MLQUEUE |
|
|
670 parent CYGPKG_KERNEL_SYNCH |
|
|
671 description " |
|
|
672 This option enables a relatively simple implementation of |
|
|
673 mutex priority inheritance. The implementation will only work |
|
|
674 in the mlqueue scheduler, and it does not handle the rare |
|
|
675 case of nested mutexes completely correctly. However it is |
|
|
676 both fast and deterministic. Mutex priority inheritance can |
|
|
677 be disabled if the application does not require it, which |
|
|
678 will reduce both code size and data space." |
|
|
679 doc ref/ecos-ref/synchronization.html#MUTEXES |
|
|
680 } |
|
|
681 |
|
|
682 cdl_option CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT { |
|
|
683 display "Message box blocking put support" |
|
|
684 parent CYGPKG_KERNEL_SYNCH |
|
|
685 description " |
|
|
686 Message boxes can support three different versions of the |
|
|
687 put-message operation. The first is tryput(), which will fail |
|
|
688 if the message box is already full. The other two are the |
|
|
689 ordinary put() function which will block if the message box |
|
|
690 is full, and a timed put() operation which will block for |
|
|
691 upto a certain length of time if the message box is currently |
|
|
692 full. The blocking versions require extra memory in the |
|
|
693 message box data structure and extra code in the other |
|
|
694 message box functions, so they can be disabled if the |
|
|
695 application does not require them. If this option is enabled |
|
|
696 then the system will always provide the blocking put() |
|
|
697 function, and it will also provide the timed put() function |
|
|
698 if thread timers are enabled." |
|
|
699 doc ref/ecos-ref/message-boxes.html |
|
|
700 } |
|
|
701 |
|
|
702 cdl_option CYGNUM_KERNEL_SYNCH_MBOX_QUEUE_SIZE { |
|
|
703 display "Message box queue size" |
|
|
704 parent CYGPKG_KERNEL_SYNCH |
|
|
705 type count |
|
|
706 legal_values 1 to 65535 |
|
|
707 description " |
|
|
708 This configuration option controls the number of messages |
|
|
709 that can be queued in a message box before a non-blocking |
|
|
710 put() operation will fail or a blocking put() operation will |
|
|
711 block. The cost in memory is one pointer per message box for |
|
|
712 each possible message." |
|
|
713 } |
|
|
714 |
|
|
715 cdl_option CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT { |
|
|
716 display "Condition variable timed-wait support" |
|
|
717 parent CYGPKG_KERNEL_SYNCH |
|
|
718 requires CYGVAR_KERNEL_COUNTERS_CLOCK |
|
|
719 description " |
|
|
720 This option enables the condition variable timed wait |
|
|
721 facility." |
|
|
722 doc ref/ecos-ref/synchronization.html#CONDITION-VARIABLES |
|
|
723 } |
|
|
724 |
|
|
725 }}CFG_DATA |
|
|
726 |
|
|
727 */ |
|
|
728 |
|
|
729 #define CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE_SIMPLE |
|
|
730 #define CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT |
|
|
731 #define CYGNUM_KERNEL_SYNCH_MBOX_QUEUE_SIZE 10 |
|
|
732 #define CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT |
|
|
733 |
|
|
734 /* --------------------------------------------------------------------- |
|
|
735 {{CFG_DATA |
|
|
736 |
|
|
737 cdl_component CYGPKG_KERNEL_INSTRUMENT { |
|
|
738 display "Kernel instrumentation" |
|
|
739 parent CYGPKG_KERNEL |
|
|
740 description " |
|
|
741 The current release of the kernel contains an initial version |
|
|
742 of instrumentation support. The various parts of the kernel |
|
|
743 will invoke instrumentation routines whenever appropriate |
|
|
744 events occur, and these will be stored in a circular buffer |
|
|
745 for later reference." |
|
|
746 } |
|
|
747 |
|
|
748 |
|
|
749 cdl_option CYGNUM_KERNEL_INSTRUMENT_BUFFER_SIZE { |
|
|
750 display "Size of instrumentation buffer size" |
|
|
751 parent CYGPKG_KERNEL_INSTRUMENT |
|
|
752 type count |
|
|
753 legal_values 16 to 0x100000 |
|
|
754 description " |
|
|
755 If kernel instrumentation is enabled then the instrumentation |
|
|
756 data goes into a circular buffer. A larger buffer allows |
|
|
757 more data to be stored, but at a significant cost in memory. |
|
|
758 The value of this option corresponds to the number of entries |
|
|
759 in the table, and typically each entry will require 16 bytes |
|
|
760 of memory." |
|
|
761 } |
|
|
762 |
|
|
763 cdl_option CYGDBG_KERNEL_INSTRUMENT_FLAGS { |
|
|
764 display "Perform selective instrumentation" |
|
|
765 parent CYGPKG_KERNEL_INSTRUMENT |
|
|
766 description " |
|
|
767 The kernel can either collect all instrumentation events, or |
|
|
768 it can filter out events at runtime based on a set of flags. |
|
|
769 For example it would be possible to decide at runtime that |
|
|
770 only scheduler and interrupt instrumentation flags are of |
|
|
771 interest and that all other flags should be ignored. This |
|
|
772 flag mechanism involves extra code and processor cycle |
|
|
773 overhead in the instrumentation code, so it can be disabled |
|
|
774 if the application developer is interested in all |
|
|
775 instrumentation events." |
|
|
776 } |
|
|
777 |
|
|
778 # NOTE: many of these options should only be active if the appropriate |
|
|
779 # component is active. |
|
|
780 cdl_option CYGDBG_KERNEL_INSTRUMENT_SCHED { |
|
|
781 display "Instrument the scheduler" |
|
|
782 parent CYGPKG_KERNEL_INSTRUMENT |
|
|
783 description " |
|
|
784 It is possible to perform selective instrumentation at |
|
|
785 run-time. It is also possible to disable instrumentation |
|
|
786 in various kernel components at compile-time, thus |
|
|
787 reducing the code size overheads. This option controls |
|
|
788 whether or not instrumentation support is compiled into |
|
|
789 the scheduling code." |
|
|
790 } |
|
|
791 |
|
|
792 cdl_option CYGDBG_KERNEL_INSTRUMENT_THREAD { |
|
|
793 display "Instrument thread operations" |
|
|
794 parent CYGPKG_KERNEL_INSTRUMENT |
|
|
795 description " |
|
|
796 It is possible to perform selective instrumentation at |
|
|
797 run-time. It is also possible to disable instrumentation |
|
|
798 in various kernel components at compile-time, thus |
|
|
799 reducing the code size overheads. This option controls |
|
|
800 whether or not instrumentation support is compiled into |
|
|
801 the code that manipulates threads." |
|
|
802 } |
|
|
803 |
|
|
804 cdl_option CYGDBG_KERNEL_INSTRUMENT_INTR { |
|
|
805 display "Instrument interrupts" |
|
|
806 parent CYGPKG_KERNEL_INSTRUMENT |
|
|
807 description " |
|
|
808 It is possible to perform selective instrumentation at |
|
|
809 run-time. It is also possible to disable instrumentation |
|
|
810 in various kernel components at compile-time, thus |
|
|
811 reducing the code size overheads. This option controls |
|
|
812 whether or not instrumentation support is compiled into |
|
|
813 the interrupt handling code." |
|
|
814 } |
|
|
815 |
|
|
816 cdl_option CYGDBG_KERNEL_INSTRUMENT_MUTEX { |
|
|
817 display "Instrument mutex operations" |
|
|
818 parent CYGPKG_KERNEL_INSTRUMENT |
|
|
819 description " |
|
|
820 It is possible to perform selective instrumentation at |
|
|
821 run-time. It is also possible to disable instrumentation |
|
|
822 in various kernel components at compile-time, thus |
|
|
823 reducing the code size overheads. This option controls |
|
|
824 whether or not instrumentation support is compiled into |
|
|
825 the mutex code." |
|
|
826 } |
|
|
827 |
|
|
828 cdl_option CYGDBG_KERNEL_INSTRUMENT_CONDVAR { |
|
|
829 display "Instrument condition variable operations" |
|
|
830 parent CYGPKG_KERNEL_INSTRUMENT |
|
|
831 description " |
|
|
832 It is possible to perform selective instrumentation at |
|
|
833 run-time. It is also possible to disable instrumentation |
|
|
834 in various kernel components at compile-time, thus |
|
|
835 reducing the code size overheads. This option controls |
|
|
836 whether or not instrumentation support is compiled into |
|
|
837 the condition variable code." |
|
|
838 } |
|
|
839 |
|
|
840 cdl_option CYGDBG_KERNEL_INSTRUMENT_BINSEM { |
|
|
841 display "Instrument binary semaphore operations" |
|
|
842 parent CYGPKG_KERNEL_INSTRUMENT |
|
|
843 description " |
|
|
844 It is possible to perform selective instrumentation at |
|
|
845 run-time. It is also possible to disable instrumentation |
|
|
846 in various kernel components at compile-time, thus |
|
|
847 reducing the code size overheads. This option controls |
|
|
848 whether or not instrumentation support is compiled into |
|
|
849 the binary semaphore code." |
|
|
850 } |
|
|
851 |
|
|
852 cdl_option CYGDBG_KERNEL_INSTRUMENT_CNTSEM { |
|
|
853 display "Instrument counting semaphore operations" |
|
|
854 parent CYGPKG_KERNEL_INSTRUMENT |
|
|
855 description " |
|
|
856 It is possible to perform selective instrumentation at |
|
|
857 run-time. It is also possible to disable instrumentation |
|
|
858 in various kernel components at compile-time, thus |
|
|
859 reducing the code size overheads. This option controls |
|
|
860 whether or not instrumentation support is compiled into |
|
|
861 the counting semaphore code." |
|
|
862 } |
|
|
863 |
|
|
864 cdl_option CYGDBG_KERNEL_INSTRUMENT_MBOXT { |
|
|
865 display "Instrument message box operations" |
|
|
866 parent CYGPKG_KERNEL_INSTRUMENT |
|
|
867 description " |
|
|
868 It is possible to perform selective instrumentation at |
|
|
869 run-time. It is also possible to disable instrumentation |
|
|
870 in various kernel components at compile-time, thus |
|
|
871 reducing the code size overheads. This option controls |
|
|
872 whether or not instrumentation support is compiled into |
|
|
873 the message box code." |
|
|
874 } |
|
|
875 |
|
|
876 cdl_option CYGDBG_KERNEL_INSTRUMENT_CLOCK { |
|
|
877 display "Instrument clock operations" |
|
|
878 parent CYGPKG_KERNEL_INSTRUMENT |
|
|
879 description " |
|
|
880 It is possible to perform selective instrumentation at |
|
|
881 run-time. It is also possible to disable instrumentation |
|
|
882 in various kernel components at compile-time, thus |
|
|
883 reducing the code size overheads. This option controls |
|
|
884 whether or not instrumentation support is compiled into |
|
|
885 the real-time clock code." |
|
|
886 } |
|
|
887 |
|
|
888 cdl_option CYGDBG_KERNEL_INSTRUMENT_ALARM { |
|
|
889 display "Instrument alarm-related operations" |
|
|
890 parent CYGPKG_KERNEL_INSTRUMENT |
|
|
891 description " |
|
|
892 It is possible to perform selective instrumentation at |
|
|
893 run-time. It is also possible to disable instrumentation |
|
|
894 in various kernel components at compile-time, thus |
|
|
895 reducing the code size overheads. This option controls |
|
|
896 whether or not instrumentation support is compiled into |
|
|
897 the code related to alarm operations." |
|
|
898 } |
|
|
899 |
|
|
900 cdl_option CYGDBG_KERNEL_INSTRUMENT_USER { |
|
|
901 display "Support application-level instrumentation" |
|
|
902 parent CYGPKG_KERNEL_INSTRUMENT |
|
|
903 description " |
|
|
904 It is possible to perform selective instrumentation at |
|
|
905 run-time. It is also possible to disable instrumentation |
|
|
906 in various kernel components at compile-time, thus |
|
|
907 reducing the code size overheads. This option controls |
|
|
908 whether or not application-level instrumentation gets |
|
|
909 compiled in." |
|
|
910 } |
|
|
911 |
|
|
912 }}CFG_DATA |
|
|
913 */ |
|
|
914 |
|
|
915 #undef CYGPKG_KERNEL_INSTRUMENT |
|
|
916 #undef CYGVAR_KERNEL_INSTRUMENT_EXTERNAL_BUFFER |
|
|
917 #define CYGNUM_KERNEL_INSTRUMENT_BUFFER_SIZE 256 |
|
|
918 #define CYGDBG_KERNEL_INSTRUMENT_FLAGS |
|
|
919 #define CYGDBG_KERNEL_INSTRUMENT_SCHED |
|
|
920 #define CYGDBG_KERNEL_INSTRUMENT_THREAD |
|
|
921 #define CYGDBG_KERNEL_INSTRUMENT_INTR |
|
|
922 #define CYGDBG_KERNEL_INSTRUMENT_MUTEX |
|
|
923 #define CYGDBG_KERNEL_INSTRUMENT_CONDVAR |
|
|
924 #define CYGDBG_KERNEL_INSTRUMENT_BINSEM |
|
|
925 #define CYGDBG_KERNEL_INSTRUMENT_CNTSEM |
|
|
926 #define CYGDBG_KERNEL_INSTRUMENT_CLOCK |
|
|
927 #define CYGDBG_KERNEL_INSTRUMENT_ALARM |
|
|
928 #define CYGDBG_KERNEL_INSTRUMENT_MBOXT |
|
|
929 #define CYGDBG_KERNEL_INSTRUMENT_USER |
|
|
930 |
|
|
931 /* --------------------------------------------------------------------- |
|
|
932 * There appears to be somewhat of a lack of configuration options here. |
|
|
933 {{CFG_DATA |
|
|
934 |
|
|
935 cdl_component CYGPKG_KERNEL_MEMORY { |
|
|
936 display "Memory allocators" |
|
|
937 type dummy |
|
|
938 parent CYGPKG_KERNEL |
|
|
939 description " |
|
|
940 Configuration options related to the kernel memory allocation |
|
|
941 support." |
|
|
942 } |
|
|
943 |
|
|
944 cdl_option CYGSEM_KERNEL_MEMORY_COALESCE { |
|
|
945 display "Coalesce memory in the variable-block allocator" |
|
|
946 parent CYGPKG_KERNEL_MEMORY |
|
|
947 description " |
|
|
948 The variable-block memory allocator can perform coalescing |
|
|
949 of memory whenever the application code releases memory back |
|
|
950 to the pool. This coalescing reduces the possibility of |
|
|
951 memory fragmentation problems, but involves extra code and |
|
|
952 processor cycles." |
|
|
953 } |
|
|
954 |
|
|
955 }}CFG_DATA */ |
|
|
956 |
|
|
957 #define CYGSEM_KERNEL_MEMORY_COALESCE |
|
|
958 |
|
|
959 /* --------------------------------------------------------------------- |
|
|
960 * Options related to source-level debugging and diagnostics. |
|
|
961 |
|
|
962 {{CFG_DATA |
|
|
963 |
|
|
964 cdl_component CYGPKG_KERNEL_DEBUG { |
|
|
965 display "Source-level debugging support" |
|
|
966 type dummy |
|
|
967 parent CYGPKG_KERNEL |
|
|
968 description " |
|
|
969 If the source level debugger gdb is to be used for debugging |
|
|
970 application code then it may be necessary to configure in support |
|
|
971 for this in the kernel." |
|
|
972 } |
|
|
973 |
|
|
974 # NOTE: does this require any other support ? |
|
|
975 cdl_option CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT { |
|
|
976 display "Include GDB multi-threading debug support" |
|
|
977 parent CYGPKG_KERNEL_DEBUG |
|
|
978 requires CYGVAR_KERNEL_THREADS_LIST |
|
|
979 requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT |
|
|
980 description " |
|
|
981 This option enables some extra kernel code which is needed |
|
|
982 to support multi-threaded source level debugging." |
|
|
983 } |
|
|
984 |
|
|
985 }}CFG_DATA */ |
|
|
986 |
|
|
987 #define CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT |
|
|
988 |
|
|
989 /* --------------------------------------------------------------------- |
|
|
990 * Kernel API's. The C++ one is the default. A C API is optional. |
|
|
991 * Support for other languages is possible. |
|
|
992 |
|
|
993 {{CFG_DATA |
|
|
994 |
|
|
995 cdl_component CYGPKG_KERNEL_API { |
|
|
996 display "Kernel APIs" |
|
|
997 type dummy |
|
|
998 parent CYGPKG_KERNEL |
|
|
999 description " |
|
|
1000 The eCos kernel is implemented in C++, so a C++ interface |
|
|
1001 to the kernel is always available. There is also an optional |
|
|
1002 C API. Additional API's may be provided in future versions." |
|
|
1003 doc ref/ecos-ref/kernel-apis.html |
|
|
1004 } |
|
|
1005 |
|
|
1006 cdl_option CYGFUN_KERNEL_API_C { |
|
|
1007 display "Provide C API" |
|
|
1008 parent CYGPKG_KERNEL_API |
|
|
1009 description " |
|
|
1010 The eCos kernel is implemented in C++, but there is an |
|
|
1011 optional C API for use by application code. This C API can be |
|
|
1012 disabled if the application code does not invoke the kernel |
|
|
1013 directly, but instead uses higher level code such as the |
|
|
1014 uITRON compatibility layer." |
|
|
1015 } |
|
|
1016 |
|
|
1017 }}CFG_DATA */ |
|
|
1018 |
|
|
1019 #define CYGFUN_KERNEL_API_C |
|
|
1020 |
|
|
1021 /* --------------------------------------------------------------------- |
|
|
1022 * The rest of this header file contains various fix-ups and |
|
|
1023 * options which cannot yet be controlled via the GUI tool. |
|
|
1024 * |
|
|
1025 * First some miscellaneous scheduler support, all calculated. |
|
|
1026 */ |
|
|
1027 |
|
|
1028 #if defined(CYGSEM_KERNEL_SCHED_TIMESLICE) && defined(CYGSEM_KERNEL_SCHED_BITMAP) |
|
|
1029 # error Timeslicing cannot be enabled if the bitmap scheduler is used. |
|
|
1030 #endif |
|
|
1031 |
|
|
1032 /* |
|
|
1033 * These #define's are for the system's internal use only and should |
|
|
1034 * not be edited by users. */ |
|
|
1035 #ifdef CYGSEM_KERNEL_SCHED_BITMAP |
|
|
1036 # define CYGPRI_KERNEL_SCHED_IMPL_HXX <cyg/kernel/bitmap.hxx> |
|
|
1037 #elif defined(CYGSEM_KERNEL_SCHED_MLQUEUE) |
|
|
1038 # define CYGPRI_KERNEL_SCHED_IMPL_HXX <cyg/kernel/mlqueue.hxx> |
|
|
1039 #elif defined(CYGSEM_KERNEL_SCHED_LOTTERY) |
|
|
1040 # define CYGPRI_KERNEL_SCHED_IMPL_HXX <cyg/kernel/lottery.hxx> |
|
|
1041 #else |
|
|
1042 #error No Scheduler defined |
|
|
1043 #endif |
|
|
1044 |
|
|
1045 #define CYGNUM_KERNEL_SCHED_BITMAP_SIZE CYGNUM_KERNEL_SCHED_PRIORITIES |
|
|
1046 |
|
|
1047 /* --------------------------------------------------------------------- |
|
|
1048 * Counter and clock related miscellania. |
|
|
1049 * |
|
|
1050 * If a real-time clock is enabled then there are additional |
|
|
1051 * configuration options controlling the resolution of the clock, |
|
|
1052 * CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION and |
|
|
1053 * CYGNUM_KERNEL_COUNTERS_RTC_PERIOD. Different targets require |
|
|
1054 * different default values, and the current configuration tool cannot |
|
|
1055 * deal with this yet. Also the exact details of the resolution and |
|
|
1056 * period values are still subject to change. |
|
|
1057 * |
|
|
1058 * To allow the clock settings to be controlled in some fashion, |
|
|
1059 * there is a configuration option to override the default settings. |
|
|
1060 * If this option is enabled then the resolution and period |
|
|
1061 * #define's will come from configuration options (which do not |
|
|
1062 * necessarily have sensible defaults, and which are not validated). |
|
|
1063 * Otherwise the platform-specific numbers below are used. On |
|
|
1064 * hardware this result in 100 clock interrupts every second. |
|
|
1065 * For simulators slightly different values are used, so that the |
|
|
1066 * various test cases run faster. |
|
|
1067 */ |
|
|
1068 |
|
|
1069 #ifdef CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE |
|
|
1070 |
|
|
1071 # define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION \ |
|
|
1072 { CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_NUMERATOR, \ |
|
|
1073 CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_DENOMINATOR } |
|
|
1074 |
|
|
1075 # define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_PERIOD |
|
|
1076 |
|
|
1077 #else /* CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE */ |
|
|
1078 |
|
|
1079 #if defined(CYG_HAL_MN10300_STDEVAL1) |
|
|
1080 |
|
|
1081 #define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION {1000000000, 100} |
|
|
1082 #define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD 150000 |
|
|
1083 |
|
|
1084 #endif |
|
|
1085 #if defined(CYG_HAL_MN10300_SIM) |
|
|
1086 |
|
|
1087 #define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION {1000000000, 100} |
|
|
1088 #define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD 9999 |
|
|
1089 |
|
|
1090 #endif |
|
|
1091 |
|
|
1092 #if defined(CYG_HAL_MIPS_JMR3904) |
|
|
1093 |
|
|
1094 #define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION {1000000000, 100} |
|
|
1095 #define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD 15360 |
|
|
1096 |
|
|
1097 #endif |
|
|
1098 |
|
|
1099 #if defined(CYG_HAL_MIPS_SIM) |
|
|
1100 |
|
|
1101 #define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION {1000000000, 100} |
|
|
1102 #define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD 999 |
|
|
1103 |
|
|
1104 #endif |
|
|
1105 |
|
|
1106 #if defined(CYG_HAL_POWERPC_MP860) |
|
|
1107 |
|
|
1108 #define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION {1000000000, 100} |
|
|
1109 #define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD 20625 |
|
|
1110 |
|
|
1111 #endif |
|
|
1112 |
|
|
1113 |
|
|
1114 #ifndef CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION |
|
|
1115 |
|
|
1116 #define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION {1000000000, 100} |
|
|
1117 #define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD 9999 |
|
|
1118 |
|
|
1119 #endif |
|
|
1120 |
|
|
1121 #endif /* CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE */ |
|
|
1122 |
|
|
1123 /* --------------------------------------------------------------------- |
|
|
1124 * Thread-related miscellania. |
|
|
1125 * |
|
|
1126 * These options provide for an assertion that the count value for counted |
|
|
1127 * thread wakeups or for thread suspends do not exceed set limits. This is |
|
|
1128 * to help with debugging, to allow a runaaway loop, for example, to be |
|
|
1129 * detected more easily. |
|
|
1130 * |
|
|
1131 * If the option is not defined, no assert is included. Whether asserts |
|
|
1132 * are themselves included depends on infrastructure configury in infra.h |
|
|
1133 * |
|
|
1134 * It is hoped that these defaults are helpful rather than interfering. |
|
|
1135 */ |
|
|
1136 #define CYGNUM_KERNEL_MAX_SUSPEND_COUNT_ASSERT (500) |
|
|
1137 #define CYGNUM_KERNEL_MAX_COUNTED_WAKE_COUNT_ASSERT (500) |
|
|
1138 |
|
|
1139 /* |
|
|
1140 * If the scheduler configuration only has a single priority level, |
|
|
1141 * then the idle thread must yield each time around its loop. |
|
|
1142 */ |
|
|
1143 |
|
|
1144 #if CYGNUM_KERNEL_SCHED_PRIORITIES == 1 |
|
|
1145 # define CYGIMP_IDLE_THREAD_YIELD |
|
|
1146 #endif |
|
|
1147 |
|
|
1148 /* |
|
|
1149 * Per thread data options. Per thread data suuport is based loosely |
|
|
1150 * on that define by POSIX. Each thread has an array of slots, up to |
|
|
1151 * CYGNUM_KERNEL_THREADS_DATA_MAX, that may contain data. Some of the |
|
|
1152 * slots have been preallocated to specific packages. Others may be |
|
|
1153 * allocated dynamically. |
|
|
1154 */ |
|
|
1155 |
|
|
1156 #define CYGNUM_KERNEL_THREADS_DATA_KERNEL 0 |
|
|
1157 #define CYGNUM_KERNEL_THREADS_DATA_ITRON 1 |
|
|
1158 #define CYGNUM_KERNEL_THREADS_DATA_LIBC 2 |
|
|
1159 #define CYGNUM_KERNEL_THREADS_DATA_POSIX 3 |
|
|
1160 |
|
|
1161 #define CYGNUM_KERNEL_THREADS_DATA_ALL 0xF |
|
|
1162 |
|
|
1163 /* |
|
|
1164 * Some consistency checks. |
|
|
1165 */ |
|
|
1166 #if defined(CYGFUN_KERNEL_THREADS_TIMER) && !defined(CYGVAR_KERNEL_COUNTERS_CLOCK) |
|
|
1167 # error "Cannot have Thread Timers without Real Time Clock" |
|
|
1168 #endif |
|
|
1169 |
|
|
1170 #if defined(CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT) && !defined(CYGVAR_KERNEL_THREADS_LIST) |
|
|
1171 # error "GDB thread support requires a list of all known threads." |
|
|
1172 #endif |
|
|
1173 |
|
|
1174 /* --------------------------------------------------------------------- |
|
|
1175 * Synchronization primitives miscellania. |
|
|
1176 * |
|
|
1177 * These lines should not be edited by users. |
|
|
1178 */ |
|
|
1179 #ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE_SIMPLE |
|
|
1180 # define CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE |
|
|
1181 #endif |
|
|
1182 #if defined(CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE) && !defined(CYGSEM_KERNEL_SCHED_MLQUEUE) |
|
|
1183 # error "Priority inheritance can only be enabled if the mlqueue scheduler is used." |
|
|
1184 #endif |
|
|
1185 |
|
|
1186 /* --------------------------------------------------------------------- |
|
|
1187 * This code allows the kernel build to be configured as a GDB |
|
|
1188 * stub ROM monitor. It is only intended for internal use. |
|
|
1189 */ |
|
|
1190 |
|
|
1191 /* |
|
|
1192 * BLV: This code must be kept commented out for now, as it can |
|
|
1193 * confuse the configuration tool. The correct solution is to have a |
|
|
1194 * standard configuration for the system as represented by e.g. a |
|
|
1195 * .ptest file which does the right thing. A ROM monitor is an |
|
|
1196 * application, and application-specific configuration stuff should |
|
|
1197 * not live in the master header file. |
|
|
1198 */ |
|
|
1199 |
|
|
1200 /* |
|
|
1201 #undef CYG_HAL_ROM_MONITOR |
|
|
1202 |
|
|
1203 #ifdef CYG_HAL_ROM_MONITOR |
|
|
1204 |
|
|
1205 #undef CYGFUN_HAL_COMMON_KERNEL_SUPPORT |
|
|
1206 #undef CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT |
|
|
1207 #undef CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK |
|
|
1208 #undef CYGSEM_HAL_COMMON_INTERRUPTS_ALLOW_NESTING |
|
|
1209 #undef CYGIMP_KERNEL_INTERRUPTS_CHAIN |
|
|
1210 #undef CYGVAR_KERNEL_COUNTERS_CLOCK |
|
|
1211 #undef CYGFUN_KERNEL_THREADS_TIMER |
|
|
1212 #undef CYGPKG_KERNEL_EXCEPTIONS |
|
|
1213 #undef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE_SIMPLE |
|
|
1214 #undef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE |
|
|
1215 #undef CYGPKG_KERNEL_INSTRUMENT |
|
|
1216 #undef CYGDBG_INFRA_DIAG_USE_DEVICE // now lives in infra |
|
|
1217 |
|
|
1218 #define CYGDBG_KERNEL_DEBUG_GDB_INCLUDE_STUBS |
|
|
1219 |
|
|
1220 #endif |
|
|
1221 */ |
|
|
1222 |
|
|
1223 /* -------------------------------------------------------------------*/ |
|
|
1224 |
|
|
1225 #endif /* ifdef CYGPKG_KERNEL */ |
|
|
1226 |
|
|
1227 /* -------------------------------------------------------------------*/ |
|
|
1228 #endif /* CYGONCE_PKGCONF_KERNEL_H */ |
|
|
1229 /* EOF kernel.h */ |