1 | /* confdefs.h |
---|
2 | * |
---|
3 | * This include file contains the configuration table template that will |
---|
4 | * be used by the single processor tests to define its default configuration |
---|
5 | * parameters. |
---|
6 | * |
---|
7 | * COPYRIGHT (c) 1989-1998. |
---|
8 | * On-Line Applications Research Corporation (OAR). |
---|
9 | * Copyright assigned to U.S. Government, 1994. |
---|
10 | * |
---|
11 | * The license and distribution terms for this file may be |
---|
12 | * found in the file LICENSE in this distribution or at |
---|
13 | * http://www.OARcorp.com/rtems/license.html. |
---|
14 | * |
---|
15 | * $Id$ |
---|
16 | */ |
---|
17 | |
---|
18 | #ifndef __CONFIGURATION_TEMPLATE_h |
---|
19 | #define __CONFIGURATION_TEMPLATE_h |
---|
20 | |
---|
21 | #ifdef __cplusplus |
---|
22 | extern "C" { |
---|
23 | #endif |
---|
24 | |
---|
25 | extern rtems_initialization_tasks_table Initialization_tasks[]; |
---|
26 | extern rtems_driver_address_table Device_drivers[]; |
---|
27 | extern rtems_configuration_table Configuration; |
---|
28 | extern rtems_multiprocessing_table Multiprocessing_configuration; |
---|
29 | #ifdef RTEMS_POSIX_API |
---|
30 | extern posix_api_configuration_table Configuration_POSIX_API; |
---|
31 | #endif |
---|
32 | |
---|
33 | /* |
---|
34 | * RTEMS C Library and Newlib support |
---|
35 | * |
---|
36 | * NOTE: This ends up defining these even when newlib is not used. |
---|
37 | */ |
---|
38 | |
---|
39 | #define CONFIGURE_NEWLIB_EXTENSION 1 |
---|
40 | #define CONFIGURE_MALLOC_REGION 1 |
---|
41 | |
---|
42 | /* |
---|
43 | * Stack Checker Requirements |
---|
44 | */ |
---|
45 | |
---|
46 | #ifdef STACK_CHECKER_ON |
---|
47 | #define CONFIGURE_STACK_CHECKER_EXTENSION 1 |
---|
48 | #else |
---|
49 | #define CONFIGURE_STACK_CHECKER_EXTENSION 0 |
---|
50 | #endif |
---|
51 | |
---|
52 | /* |
---|
53 | * Default User Initialization Task Table. This table guarantees that |
---|
54 | * one user initialization table is defined. |
---|
55 | */ |
---|
56 | |
---|
57 | #ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE |
---|
58 | |
---|
59 | #ifdef CONFIGURE_HAS_OWN_INIT_TASK_TABLE |
---|
60 | |
---|
61 | /* |
---|
62 | * The user is defining their own table information and setting the |
---|
63 | * appropriate variables. |
---|
64 | */ |
---|
65 | |
---|
66 | #else |
---|
67 | |
---|
68 | #ifndef CONFIGURE_INIT_TASK_NAME |
---|
69 | #define CONFIGURE_INIT_TASK_NAME rtems_build_name( 'U', 'I', '1', ' ' ) |
---|
70 | #endif |
---|
71 | |
---|
72 | #ifndef CONFIGURE_INIT_TASK_STACK_SIZE |
---|
73 | #define CONFIGURE_INIT_TASK_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE |
---|
74 | #endif |
---|
75 | |
---|
76 | #ifndef CONFIGURE_INIT_TASK_PRIORITY |
---|
77 | #define CONFIGURE_INIT_TASK_PRIORITY 1 |
---|
78 | #endif |
---|
79 | |
---|
80 | #ifndef CONFIGURE_INIT_TASK_ATTRIBUTES |
---|
81 | #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES |
---|
82 | #endif |
---|
83 | |
---|
84 | #ifndef CONFIGURE_INIT_TASK_ENTRY_POINT |
---|
85 | #define CONFIGURE_INIT_TASK_ENTRY_POINT Init |
---|
86 | #endif |
---|
87 | |
---|
88 | #ifndef CONFIGURE_INIT_TASK_INITIAL_MODES |
---|
89 | #define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_PREEMPT |
---|
90 | #endif |
---|
91 | |
---|
92 | #ifndef CONFIGURE_INIT_TASK_ARGUMENTS |
---|
93 | #define CONFIGURE_INIT_TASK_ARGUMENTS 0 |
---|
94 | #endif |
---|
95 | |
---|
96 | #ifdef CONFIGURE_INIT |
---|
97 | rtems_initialization_tasks_table Initialization_tasks[] = { |
---|
98 | { CONFIGURE_INIT_TASK_NAME, |
---|
99 | CONFIGURE_INIT_TASK_STACK_SIZE, |
---|
100 | CONFIGURE_INIT_TASK_PRIORITY, |
---|
101 | CONFIGURE_INIT_TASK_ATTRIBUTES, |
---|
102 | CONFIGURE_INIT_TASK_ENTRY_POINT, |
---|
103 | CONFIGURE_INIT_TASK_INITIAL_MODES, |
---|
104 | CONFIGURE_INIT_TASK_ARGUMENTS |
---|
105 | } |
---|
106 | }; |
---|
107 | #endif |
---|
108 | |
---|
109 | #define CONFIGURE_INIT_TASK_TABLE Initialization_tasks |
---|
110 | |
---|
111 | #define CONFIGURE_INIT_TASK_TABLE_SIZE \ |
---|
112 | sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table) |
---|
113 | |
---|
114 | #endif /* CONFIGURE_HAS_OWN_INIT_TASK_TABLE */ |
---|
115 | |
---|
116 | #else /* CONFIGURE_RTEMS_INIT_TASKS_TABLE */ |
---|
117 | |
---|
118 | #define CONFIGURE_INIT_TASK_TABLE NULL |
---|
119 | #define CONFIGURE_INIT_TASK_TABLE_SIZE 0 |
---|
120 | |
---|
121 | #endif |
---|
122 | |
---|
123 | /* |
---|
124 | * Default Device Driver Table. Each driver needed by the test is explicitly |
---|
125 | * choosen by that test. There is always a null driver entry. |
---|
126 | */ |
---|
127 | |
---|
128 | #define NULL_DRIVER_TABLE_ENTRY \ |
---|
129 | { NULL, NULL, NULL, NULL, NULL, NULL } |
---|
130 | |
---|
131 | #ifdef CONFIGURE_TEST_NEEDS_TIMER_DRIVER |
---|
132 | #include <timerdrv.h> |
---|
133 | #endif |
---|
134 | |
---|
135 | #ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER |
---|
136 | #include <stubdrv.h> |
---|
137 | #endif |
---|
138 | |
---|
139 | #ifndef CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE |
---|
140 | |
---|
141 | #ifdef CONFIGURE_INIT |
---|
142 | rtems_driver_address_table Device_drivers[] = { |
---|
143 | #ifdef CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER |
---|
144 | CONSOLE_DRIVER_TABLE_ENTRY, |
---|
145 | #endif |
---|
146 | #ifdef CONFIGURE_TEST_NEEDS_CLOCK_DRIVER |
---|
147 | CLOCK_DRIVER_TABLE_ENTRY, |
---|
148 | #endif |
---|
149 | #ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER |
---|
150 | STUB_DRIVER_TABLE_ENTRY, |
---|
151 | #endif |
---|
152 | NULL_DRIVER_TABLE_ENTRY |
---|
153 | }; |
---|
154 | #endif |
---|
155 | |
---|
156 | #endif /* CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE */ |
---|
157 | |
---|
158 | /* |
---|
159 | * Default the number of devices per device driver. This value may be |
---|
160 | * overridden by the user. |
---|
161 | */ |
---|
162 | |
---|
163 | #ifndef CONFIGURE_HAS_OWN_NUMBER_OF_DEVICES |
---|
164 | |
---|
165 | #ifndef CONFIGURE_MAXIMUM_DEVICES |
---|
166 | #define CONFIGURE_MAXIMUM_DEVICES 20 |
---|
167 | #endif |
---|
168 | |
---|
169 | #endif /* CONFIGURE_HAS_OWN_NUMBER_OF_DEVICES */ |
---|
170 | |
---|
171 | /* |
---|
172 | * Default Configuration Table. This table contains the most values set in |
---|
173 | * the RTEMS Test Suite. Each value may be overridden within each test to |
---|
174 | * customize the environment. |
---|
175 | */ |
---|
176 | |
---|
177 | #ifdef CONFIGURE_MPTEST |
---|
178 | #ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE |
---|
179 | |
---|
180 | #ifndef CONFIGURE_MP_NODE_NUMBER |
---|
181 | #define CONFIGURE_MP_NODE_NUMBER NODE_NUMBER |
---|
182 | #endif |
---|
183 | |
---|
184 | #ifndef CONFIGURE_MP_MAXIMUM_NODES |
---|
185 | #define CONFIGURE_MP_MAXIMUM_NODES 2 |
---|
186 | #endif |
---|
187 | |
---|
188 | #ifndef CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS |
---|
189 | #define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 32 |
---|
190 | #endif |
---|
191 | |
---|
192 | #ifndef CONFIGURE_MP_MAXIMUM_PROXIES |
---|
193 | #define CONFIGURE_MP_MAXIMUM_PROXIES 32 |
---|
194 | #endif |
---|
195 | |
---|
196 | #ifndef CONFIGURE_MP_MPCI_TABLE_POINTER |
---|
197 | #include <mpci.h> |
---|
198 | #define CONFIGURE_MP_MPCI_TABLE_POINTER &MPCI_table |
---|
199 | #endif |
---|
200 | |
---|
201 | #ifdef CONFIGURE_INIT |
---|
202 | rtems_multiprocessing_table Multiprocessing_configuration = { |
---|
203 | CONFIGURE_MP_NODE_NUMBER, /* local node number */ |
---|
204 | CONFIGURE_MP_MAXIMUM_NODES, /* maximum # nodes in system */ |
---|
205 | CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS, /* maximum # global objects */ |
---|
206 | CONFIGURE_MP_MAXIMUM_PROXIES, /* maximum # proxies */ |
---|
207 | CONFIGURE_MP_MPCI_TABLE_POINTER /* pointer to MPCI config table */ |
---|
208 | }; |
---|
209 | #endif |
---|
210 | |
---|
211 | #define CONFIGURE_MULTIPROCESSING_TABLE &Multiprocessing_configuration |
---|
212 | |
---|
213 | #endif /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */ |
---|
214 | |
---|
215 | #else |
---|
216 | |
---|
217 | #define CONFIGURE_MULTIPROCESSING_TABLE NULL |
---|
218 | |
---|
219 | #endif /* CONFIGURE_MPTEST */ |
---|
220 | |
---|
221 | /* |
---|
222 | * Default Configuration Table. This table contains the most values set in |
---|
223 | * the RTEMS Test Suite. Each value may be overridden within each test to |
---|
224 | * customize the environment. |
---|
225 | */ |
---|
226 | |
---|
227 | #ifndef CONFIGURE_HAS_OWN_CONFIGURATION_TABLE |
---|
228 | |
---|
229 | #ifndef CONFIGURE_EXECUTIVE_RAM_WORK_AREA |
---|
230 | #define CONFIGURE_EXECUTIVE_RAM_WORK_AREA NULL |
---|
231 | #endif |
---|
232 | |
---|
233 | #ifndef CONFIGURE_MAXIMUM_TASKS |
---|
234 | #define CONFIGURE_MAXIMUM_TASKS 10 |
---|
235 | #endif |
---|
236 | |
---|
237 | #ifndef CONFIGURE_MAXIMUM_TIMERS |
---|
238 | #define CONFIGURE_MAXIMUM_TIMERS 0 |
---|
239 | #endif |
---|
240 | |
---|
241 | #ifndef CONFIGURE_MAXIMUM_SEMAPHORES |
---|
242 | #define CONFIGURE_MAXIMUM_SEMAPHORES 0 |
---|
243 | #endif |
---|
244 | |
---|
245 | #ifndef CONFIGURE_MAXIMUM_MESSAGE_QUEUES |
---|
246 | #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 0 |
---|
247 | #endif |
---|
248 | |
---|
249 | #ifndef CONFIGURE_MAXIMUM_PARTITIONS |
---|
250 | #define CONFIGURE_MAXIMUM_PARTITIONS 0 |
---|
251 | #endif |
---|
252 | |
---|
253 | #ifndef CONFIGURE_MAXIMUM_REGIONS |
---|
254 | #define CONFIGURE_MAXIMUM_REGIONS 0 |
---|
255 | #endif |
---|
256 | |
---|
257 | #ifndef CONFIGURE_MAXIMUM_PORTS |
---|
258 | #define CONFIGURE_MAXIMUM_PORTS 0 |
---|
259 | #endif |
---|
260 | |
---|
261 | #ifndef CONFIGURE_MAXIMUM_PERIODS |
---|
262 | #define CONFIGURE_MAXIMUM_PERIODS 0 |
---|
263 | #endif |
---|
264 | |
---|
265 | #ifndef CONFIGURE_MAXIMUM_USER_EXTENSIONS |
---|
266 | #define CONFIGURE_MAXIMUM_USER_EXTENSIONS 0 |
---|
267 | #endif |
---|
268 | |
---|
269 | #ifndef CONFIGURE_MICROSECONDS_PER_TICK |
---|
270 | #define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(10) |
---|
271 | #endif |
---|
272 | |
---|
273 | #ifndef CONFIGURE_TICKS_PER_TIMESLICE |
---|
274 | #define CONFIGURE_TICKS_PER_TIMESLICE 50 |
---|
275 | #endif |
---|
276 | |
---|
277 | #ifndef CONFIGURE_INITIAL_EXTENSIONS |
---|
278 | #define CONFIGURE_INITIAL_EXTENSIONS NULL |
---|
279 | #endif |
---|
280 | |
---|
281 | /* |
---|
282 | * POSIX API Configuration Parameters |
---|
283 | */ |
---|
284 | |
---|
285 | #ifdef RTEMS_POSIX_API |
---|
286 | |
---|
287 | #ifndef CONFIGURE_MAXIMUM_POSIX_THREADS |
---|
288 | #define CONFIGURE_MAXIMUM_POSIX_THREADS 10 |
---|
289 | #endif |
---|
290 | |
---|
291 | #ifndef CONFIGURE_MAXIMUM_POSIX_MUTEXES |
---|
292 | #define CONFIGURE_MAXIMUM_POSIX_MUTEXES 0 |
---|
293 | #endif |
---|
294 | |
---|
295 | #ifndef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES |
---|
296 | #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 0 |
---|
297 | #endif |
---|
298 | |
---|
299 | #ifndef CONFIGURE_MAXIMUM_POSIX_KEYS |
---|
300 | #define CONFIGURE_MAXIMUM_POSIX_KEYS 0 |
---|
301 | #endif |
---|
302 | |
---|
303 | #ifndef CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS |
---|
304 | #define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 0 |
---|
305 | #endif |
---|
306 | |
---|
307 | #ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE |
---|
308 | |
---|
309 | #ifdef CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE |
---|
310 | |
---|
311 | /* |
---|
312 | * The user is defining their own table information and setting the |
---|
313 | * appropriate variables. |
---|
314 | */ |
---|
315 | |
---|
316 | #else |
---|
317 | |
---|
318 | #ifndef CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT |
---|
319 | #define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT POSIX_Init |
---|
320 | #endif |
---|
321 | |
---|
322 | #ifdef CONFIGURE_INIT |
---|
323 | posix_initialization_threads_table POSIX_Initialization_threads[] = { |
---|
324 | { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT } |
---|
325 | }; |
---|
326 | #endif |
---|
327 | |
---|
328 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME POSIX_Initialization_threads |
---|
329 | |
---|
330 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \ |
---|
331 | sizeof(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME) / \ |
---|
332 | sizeof(posix_initialization_threads_table) |
---|
333 | |
---|
334 | #endif /* CONFIGURE_POSIX_HAS_OWN_INIT_TASK_TABLE */ |
---|
335 | |
---|
336 | #else /* CONFIGURE_POSIX_INIT_THREAD_TABLE */ |
---|
337 | |
---|
338 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME NULL |
---|
339 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE 0 |
---|
340 | |
---|
341 | #endif |
---|
342 | |
---|
343 | #endif /* RTEMS_POSIX_API */ |
---|
344 | |
---|
345 | /* |
---|
346 | * Calculate the RAM size based on the maximum number of objects configured. |
---|
347 | * The model is to estimate the memory required for each configured item, |
---|
348 | * sum the memory requirements and insure that there is at least 32K greater |
---|
349 | * than that for things not directly addressed such as: |
---|
350 | * |
---|
351 | * + stacks greater than minimum size |
---|
352 | * + FP contexts |
---|
353 | * + API areas (should be optional) |
---|
354 | * + messages |
---|
355 | * + object name and local pointer table overhead |
---|
356 | * + per node memory requirements |
---|
357 | * + executive fixed requirements (including at least internal threads |
---|
358 | * and the Ready chains) |
---|
359 | * |
---|
360 | * NOTE: Eventually this should take into account some of the above. |
---|
361 | * Basically, this is a "back of the envelope" estimate for |
---|
362 | * memory requirements. It could be more accurate. |
---|
363 | */ |
---|
364 | |
---|
365 | #ifndef CONFIGURE_EXECUTIVE_RAM_SIZE |
---|
366 | |
---|
367 | #define CONFIGURE_OBJECT_TABLE_STUFF \ |
---|
368 | ( sizeof(Objects_Control *) + sizeof(rtems_name *) + sizeof(rtems_name) ) |
---|
369 | |
---|
370 | #define CONFIGURE_MEMORY_FOR_TASKS(_tasks) \ |
---|
371 | (((_tasks) + 1 ) * \ |
---|
372 | ((sizeof(Thread_Control) + CONTEXT_FP_SIZE + \ |
---|
373 | STACK_MINIMUM_SIZE + sizeof( RTEMS_API_Control ) + \ |
---|
374 | CONFIGURE_OBJECT_TABLE_STUFF)) \ |
---|
375 | ) |
---|
376 | |
---|
377 | #define CONFIGURE_MEMORY_FOR_TIMERS(_timers) \ |
---|
378 | ((_timers) * ( sizeof(Timer_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
379 | |
---|
380 | #define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \ |
---|
381 | ((_semaphores) * \ |
---|
382 | ( sizeof(Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
383 | |
---|
384 | #define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) \ |
---|
385 | ( (_queues) * \ |
---|
386 | ( sizeof(Message_queue_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
387 | |
---|
388 | #define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) \ |
---|
389 | ( (_partitions) * \ |
---|
390 | ( sizeof(Partition_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
391 | |
---|
392 | #define CONFIGURE_MEMORY_FOR_REGIONS(_regions) \ |
---|
393 | ( (_regions) * \ |
---|
394 | ( sizeof(Region_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
395 | |
---|
396 | #define CONFIGURE_MEMORY_FOR_PORTS(_ports) \ |
---|
397 | ( (_ports) * \ |
---|
398 | ( sizeof(Dual_ported_memory_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
399 | |
---|
400 | #define CONFIGURE_MEMORY_FOR_PERIODS(_periods) \ |
---|
401 | ( (_periods) * \ |
---|
402 | ( sizeof(Rate_monotonic_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
403 | |
---|
404 | #define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) \ |
---|
405 | ( (_extensions) * \ |
---|
406 | ( sizeof(Extension_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
407 | |
---|
408 | #define CONFIGURE_MEMORY_FOR_DEVICES(_devices) \ |
---|
409 | (((_devices) + 1) * ( sizeof(rtems_driver_name_t) ) ) |
---|
410 | |
---|
411 | #ifdef CONFIGURE_MPTEST |
---|
412 | |
---|
413 | #ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE |
---|
414 | |
---|
415 | #define CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \ |
---|
416 | ( ((_proxies) + 1) * ( sizeof(Thread_Proxy_control) ) ) |
---|
417 | |
---|
418 | #define CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(_global_objects) \ |
---|
419 | ((_global_objects) * ( sizeof(Objects_MP_Control) ) ) |
---|
420 | |
---|
421 | #define CONFIGURE_MEMORY_FOR_MP \ |
---|
422 | ( CONFIGURE_MEMORY_FOR_PROXIES(CONFIGURE_MP_MAXIMUM_PROXIES) + \ |
---|
423 | CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS) + \ |
---|
424 | CONFIGURE_MEMORY_FOR_TASKS(1) \ |
---|
425 | ) |
---|
426 | |
---|
427 | #endif /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */ |
---|
428 | |
---|
429 | #else |
---|
430 | |
---|
431 | #define CONFIGURE_MEMORY_FOR_MP 0 |
---|
432 | |
---|
433 | #endif |
---|
434 | |
---|
435 | #ifndef CONFIGURE_MEMORY_OVERHEAD |
---|
436 | #define CONFIGURE_MEMORY_OVERHEAD 0 |
---|
437 | #endif |
---|
438 | |
---|
439 | #define CONFIGURE_MEMORY_FOR_SYSTEM_OVEREHAD \ |
---|
440 | ( CONFIGURE_MEMORY_FOR_TASKS(1) + /* IDLE */ \ |
---|
441 | (256 * 12) + /* Ready chains */ \ |
---|
442 | 256 /* name/ptr table overhead */ \ |
---|
443 | ) |
---|
444 | |
---|
445 | #define CONFIGURE_EXECUTIVE_RAM_SIZE \ |
---|
446 | (( CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS) + \ |
---|
447 | CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS) + \ |
---|
448 | CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES) + \ |
---|
449 | CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \ |
---|
450 | CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \ |
---|
451 | CONFIGURE_MEMORY_FOR_REGIONS( \ |
---|
452 | CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION ) + \ |
---|
453 | CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \ |
---|
454 | CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \ |
---|
455 | CONFIGURE_MEMORY_FOR_USER_EXTENSIONS( \ |
---|
456 | CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION + \ |
---|
457 | CONFIGURE_STACK_CHECKER_EXTENSION ) + \ |
---|
458 | CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \ |
---|
459 | CONFIGURE_MEMORY_FOR_MP + \ |
---|
460 | CONFIGURE_MEMORY_FOR_SYSTEM_OVEREHAD + \ |
---|
461 | (((CONFIGURE_MEMORY_OVERHEAD)+1) * 1024) \ |
---|
462 | ) & 0xfffffc00) |
---|
463 | #endif |
---|
464 | |
---|
465 | #ifdef CONFIGURE_GNAT_RTEMS |
---|
466 | #define CONFIGURE_GNAT_MUTEXES 10 |
---|
467 | #define CONFIGURE_GNAT_KEYS 1 |
---|
468 | |
---|
469 | /* 20 are required to run all tests in the ACVC */ |
---|
470 | #ifndef CONFIGURE_MAXIMUM_ADA_TASKS |
---|
471 | #define CONFIGURE_MAXIMUM_ADA_TASKS 20 |
---|
472 | #endif |
---|
473 | |
---|
474 | #else |
---|
475 | #define CONFIGURE_GNAT_MUTEXES 0 |
---|
476 | #define CONFIGURE_GNAT_KEYS 0 |
---|
477 | #define CONFIGURE_MAXIMUM_ADA_TASKS 0 |
---|
478 | #define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0 |
---|
479 | #endif |
---|
480 | |
---|
481 | |
---|
482 | #ifdef CONFIGURE_INIT |
---|
483 | |
---|
484 | rtems_api_configuration_table Configuration_RTEMS_API = { |
---|
485 | CONFIGURE_MAXIMUM_TASKS, |
---|
486 | CONFIGURE_MAXIMUM_TIMERS, |
---|
487 | CONFIGURE_MAXIMUM_SEMAPHORES, |
---|
488 | CONFIGURE_MAXIMUM_MESSAGE_QUEUES, |
---|
489 | CONFIGURE_MAXIMUM_PARTITIONS, |
---|
490 | CONFIGURE_MAXIMUM_REGIONS + CONFIGURE_MALLOC_REGION, |
---|
491 | CONFIGURE_MAXIMUM_PORTS, |
---|
492 | CONFIGURE_MAXIMUM_PERIODS, |
---|
493 | CONFIGURE_INIT_TASK_TABLE_SIZE, |
---|
494 | CONFIGURE_INIT_TASK_TABLE |
---|
495 | }; |
---|
496 | |
---|
497 | #ifdef RTEMS_POSIX_API |
---|
498 | posix_api_configuration_table Configuration_POSIX_API = { |
---|
499 | CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS, |
---|
500 | CONFIGURE_MAXIMUM_POSIX_MUTEXES + CONFIGURE_GNAT_MUTEXES + |
---|
501 | CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS, |
---|
502 | CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES + |
---|
503 | CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS, |
---|
504 | CONFIGURE_MAXIMUM_POSIX_KEYS + CONFIGURE_GNAT_KEYS, |
---|
505 | CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS, |
---|
506 | CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE, |
---|
507 | CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME |
---|
508 | }; |
---|
509 | #endif |
---|
510 | |
---|
511 | rtems_configuration_table Configuration = { |
---|
512 | CONFIGURE_EXECUTIVE_RAM_WORK_AREA, |
---|
513 | CONFIGURE_EXECUTIVE_RAM_SIZE, |
---|
514 | CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION + |
---|
515 | CONFIGURE_STACK_CHECKER_EXTENSION, |
---|
516 | CONFIGURE_MICROSECONDS_PER_TICK, |
---|
517 | CONFIGURE_TICKS_PER_TIMESLICE, |
---|
518 | CONFIGURE_MAXIMUM_DEVICES, |
---|
519 | sizeof (Device_drivers)/ |
---|
520 | sizeof(rtems_driver_address_table), /* number of device drivers */ |
---|
521 | Device_drivers, /* pointer to driver table */ |
---|
522 | CONFIGURE_INITIAL_EXTENSIONS, /* pointer to initial extensions */ |
---|
523 | CONFIGURE_MULTIPROCESSING_TABLE, /* pointer to MP config table */ |
---|
524 | &Configuration_RTEMS_API, /* pointer to RTEMS API config */ |
---|
525 | #ifdef RTEMS_POSIX_API |
---|
526 | &Configuration_POSIX_API /* pointer to POSIX API config */ |
---|
527 | #else |
---|
528 | NULL /* pointer to POSIX API config */ |
---|
529 | #endif |
---|
530 | }; |
---|
531 | #endif |
---|
532 | |
---|
533 | #endif /* CONFIGURE_HAS_OWN_CONFIGURATION_TABLE */ |
---|
534 | |
---|
535 | #ifdef __cplusplus |
---|
536 | } |
---|
537 | #endif |
---|
538 | |
---|
539 | #endif |
---|
540 | /* end of include file */ |
---|