source: rtems/c/src/exec/sapi/include/confdefs.h @ c64e4ed4

4.104.114.84.95
Last change on this file since c64e4ed4 was 3652ad35, checked in by Joel Sherrill <joel.sherrill@…>, on 09/19/95 at 14:53:29

Minor bug fixes to get all targets compilable and running. The
single biggest changes were the expansion of the workspace size
macro to include other types of objects and the increase in the
minimum stack size for most CPUs.

  • Property mode set to 100644
File size: 10.9 KB
Line 
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, 1990, 1991, 1992, 1993, 1994.
8 *  On-Line Applications Research Corporation (OAR).
9 *  All rights assigned to U.S. Government, 1994.
10 *
11 *  This material may be reproduced by or for the U.S. Government pursuant
12 *  to the copyright license under the clause at DFARS 252.227-7013.  This
13 *  notice must appear in all copies of this file and its derivatives.
14 *
15 *  $Id$
16 */
17
18#ifndef __CONFIGURATION_TEMPLATE_h
19#define __CONFIGURATION_TEMPLATE_h
20 
21#ifdef __cplusplus
22extern "C" {
23#endif
24 
25
26extern rtems_initialization_tasks_table Initialization_tasks[];
27extern rtems_driver_address_table       Device_drivers[];
28extern rtems_configuration_table        Configuration;
29extern rtems_multiprocessing_table      Multiprocessing_configuration;
30
31/*
32 *  Default User Initialization Task Table.  This table guarantees that
33 *  one user initialization table is defined.
34 */
35
36#ifndef CONFIGURE_HAS_OWN_INIT_TASK_TABLE
37
38#ifndef CONFIGURE_INIT_TASK_NAME
39#define CONFIGURE_INIT_TASK_NAME          rtems_build_name( 'U', 'I', '1', ' ' )
40#endif
41
42#ifndef CONFIGURE_INIT_TASK_STACK_SIZE
43#define CONFIGURE_INIT_TASK_STACK_SIZE    RTEMS_MINIMUM_STACK_SIZE
44#endif
45
46#ifndef CONFIGURE_INIT_TASK_PRIORITY
47#define CONFIGURE_INIT_TASK_PRIORITY      1
48#endif
49
50#ifndef CONFIGURE_INIT_TASK_ATTRIBUTES
51#define CONFIGURE_INIT_TASK_ATTRIBUTES    RTEMS_DEFAULT_ATTRIBUTES
52#endif
53
54#ifndef CONFIGURE_INIT_TASK_ENTRY_POINT
55#define CONFIGURE_INIT_TASK_ENTRY_POINT   Init
56#endif
57
58#ifndef CONFIGURE_INIT_TASK_INITIAL_MODES
59#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_PREEMPT
60#endif
61
62#ifndef CONFIGURE_INIT_TASK_ARGUMENTS
63#define CONFIGURE_INIT_TASK_ARGUMENTS     0
64#endif
65
66#ifdef CONFIGURE_INIT
67rtems_initialization_tasks_table Initialization_tasks[] = {
68  { CONFIGURE_INIT_TASK_NAME,
69    CONFIGURE_INIT_TASK_STACK_SIZE,
70    CONFIGURE_INIT_TASK_PRIORITY,
71    CONFIGURE_INIT_TASK_ATTRIBUTES,
72    CONFIGURE_INIT_TASK_ENTRY_POINT,
73    CONFIGURE_INIT_TASK_INITIAL_MODES,
74    CONFIGURE_INIT_TASK_ARGUMENTS
75  }
76};
77#endif
78
79#endif
80
81/*
82 *  Default Device Driver Table.  Each driver needed by the test is explicitly
83 *  choosen by that test.  There is always a null driver entry.
84 */
85
86#define NULL_DRIVER_TABLE_ENTRY \
87 { NULL, NULL, NULL, NULL, NULL, NULL }
88
89#ifdef CONFIGURE_TEST_NEEDS_TIMER_DRIVER
90#include <timerdrv.h>
91#endif
92
93#ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER
94#include <stubdrv.h>
95#endif
96
97#ifndef CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE
98
99#ifdef CONFIGURE_INIT
100rtems_driver_address_table Device_drivers[] = {
101#ifdef CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
102  CONSOLE_DRIVER_TABLE_ENTRY,
103#endif
104#ifdef CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
105  CLOCK_DRIVER_TABLE_ENTRY,
106#endif
107#ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER
108  STUB_DRIVER_TABLE_ENTRY,
109#endif
110  NULL_DRIVER_TABLE_ENTRY
111};
112#endif
113
114#endif  /* CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE */
115
116/*
117 *  Default the number of devices per device driver.  This value may be
118 *  overridden by the user.
119 */
120
121#ifndef CONFIGURE_HAS_OWN_NUMBER_OF_DEVICES
122
123#ifndef CONFIGURE_MAXIMUM_DEVICES
124#define CONFIGURE_MAXIMUM_DEVICES   20
125#endif
126
127#endif /* CONFIGURE_HAS_OWN_NUMBER_OF_DEVICES */
128
129/*
130 *  Default Configuration Table.  This table contains the most values set in
131 *  the RTEMS Test Suite.  Each value may be overridden within each test to
132 *  customize the environment.
133 */
134
135#ifdef CONFIGURE_MPTEST
136#ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE
137
138#ifndef CONFIGURE_MP_NODE_NUMBER
139#define CONFIGURE_MP_NODE_NUMBER                NODE_NUMBER
140#endif
141
142#ifndef CONFIGURE_MP_MAXIMUM_NODES
143#define CONFIGURE_MP_MAXIMUM_NODES              2
144#endif
145
146#ifndef CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS
147#define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS     32
148#endif
149
150#ifndef CONFIGURE_MP_MAXIMUM_PROXIES
151#define CONFIGURE_MP_MAXIMUM_PROXIES            32
152#endif
153
154#ifndef CONFIGURE_MP_MPCI_TABLE_POINTER
155#include <mpci.h>
156#define CONFIGURE_MP_MPCI_TABLE_POINTER         &MPCI_table
157#endif
158
159#ifdef CONFIGURE_INIT
160rtems_multiprocessing_table Multiprocessing_configuration = {
161  CONFIGURE_MP_NODE_NUMBER,              /* local node number */
162  CONFIGURE_MP_MAXIMUM_NODES,            /* maximum # nodes in system */
163  CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS,   /* maximum # global objects */
164  CONFIGURE_MP_MAXIMUM_PROXIES,          /* maximum # proxies */
165  CONFIGURE_MP_MPCI_TABLE_POINTER        /* pointer to MPCI config table */
166};
167#endif
168
169#define CONFIGURE_MULTIPROCESSING_TABLE    &Multiprocessing_configuration
170
171#endif /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */
172
173#else
174
175#define CONFIGURE_MULTIPROCESSING_TABLE    NULL
176
177#endif /* CONFIGURE_MPTEST */
178 
179/*
180 *  Default Configuration Table.  This table contains the most values set in
181 *  the RTEMS Test Suite.  Each value may be overridden within each test to
182 *  customize the environment.
183 */
184
185#ifndef CONFIGURE_HAS_OWN_CONFIGURATION_TABLE
186 
187#ifndef CONFIGURE_EXECUTIVE_RAM_WORK_AREA
188#define CONFIGURE_EXECUTIVE_RAM_WORK_AREA     NULL
189#endif
190
191#ifndef CONFIGURE_MAXIMUM_TASKS
192#define CONFIGURE_MAXIMUM_TASKS               10
193#endif
194
195#ifndef CONFIGURE_MAXIMUM_TIMERS
196#define CONFIGURE_MAXIMUM_TIMERS              0
197#endif
198
199#ifndef CONFIGURE_MAXIMUM_SEMAPHORES
200#define CONFIGURE_MAXIMUM_SEMAPHORES          0
201#endif
202
203#ifndef CONFIGURE_MAXIMUM_MESSAGE_QUEUES
204#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES      0
205#endif
206
207#ifndef CONFIGURE_MAXIMUM_PARTITIONS
208#define CONFIGURE_MAXIMUM_PARTITIONS          0
209#endif
210
211#ifndef CONFIGURE_MAXIMUM_REGIONS
212#define CONFIGURE_MAXIMUM_REGIONS             0
213#endif
214
215#ifndef CONFIGURE_MAXIMUM_PORTS
216#define CONFIGURE_MAXIMUM_PORTS               0
217#endif
218
219#ifndef CONFIGURE_MAXIMUM_PERIODS
220#define CONFIGURE_MAXIMUM_PERIODS             0
221#endif
222
223#ifndef CONFIGURE_MAXIMUM_USER_EXTENSIONS
224#define CONFIGURE_MAXIMUM_USER_EXTENSIONS     0
225#endif
226
227#ifndef CONFIGURE_MICROSECONDS_PER_TICK
228#define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(10)
229#endif
230
231#ifndef CONFIGURE_TICKS_PER_TIMESLICE
232#define CONFIGURE_TICKS_PER_TIMESLICE        50
233#endif
234
235#ifndef CONFIGURE_INITIAL_EXTENSIONS 
236#define CONFIGURE_INITIAL_EXTENSIONS         NULL
237#endif
238
239/*
240 *  Calculate the RAM size based on the maximum number of objects configured.
241 *  The model is to estimate the memory required for each configured item,
242 *  sum the memory requirements and insure that there is at least 32K greater
243 *  than that for things not directly addressed such as:
244 *
245 *    + stacks greater than minimum size
246 *    + FP contexts
247 *    + API areas (should be optional)
248 *    + messages
249 *    + object name and local pointer table overhead
250 *    + per node memory requirements
251 *    + executive fixed requirements (including at least internal threads
252 *       and the Ready chains)
253 *
254 *  NOTE:  Eventually this should take into account some of the above.
255 *         Basically, this is a "back of the envelope" estimate for
256 *         memory requirements.  It could be more accurate.
257 */
258
259#ifndef CONFIGURE_EXECUTIVE_RAM_SIZE
260
261#define CONFIGURE_OBJECT_TABLE_STUFF \
262  ( sizeof(Objects_Control *) + sizeof(rtems_name *) + sizeof(rtems_name) )
263
264#define CONFIGURE_MEMORY_FOR_TASKS(_tasks) \
265  ((_tasks) * \
266   ((sizeof(Thread_Control) + CONTEXT_FP_SIZE + \
267      STACK_MINIMUM_SIZE + sizeof( RTEMS_API_Control ) + \
268      CONFIGURE_OBJECT_TABLE_STUFF)) \
269  )
270
271#define CONFIGURE_MEMORY_FOR_TIMERS(_timers) \
272  ((_timers) * ( sizeof(Timer_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
273
274#define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \
275  ((_semaphores) * \
276   ( sizeof(Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
277
278#define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) \
279  ( (_queues) * \
280    ( sizeof(Message_queue_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
281
282#define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) \
283  ( (_partitions) * \
284    ( sizeof(Partition_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
285
286#define CONFIGURE_MEMORY_FOR_REGIONS(_regions) \
287  ( (_regions) * \
288    ( sizeof(Region_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
289
290#define CONFIGURE_MEMORY_FOR_PORTS(_ports) \
291  ( (_ports) * \
292    ( sizeof(Dual_ported_memory_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
293
294#define CONFIGURE_MEMORY_FOR_PERIODS(_periods) \
295  ( (_periods) * \
296    ( sizeof(Rate_monotonic_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
297
298#define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) \
299  ( (_extensions) * \
300    ( sizeof(Extension_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
301
302#define CONFIGURE_MEMORY_FOR_DEVICES(_devices) \
303  (((_devices) + 1) * ( sizeof(rtems_driver_name_t) ) )
304
305#ifdef CONFIGURE_MPTEST
306
307#ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE
308
309#define CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \
310  ( ((_proxies) + 1) * ( sizeof(Thread_Proxy_control) )  )
311
312#define CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(_global_objects) \
313  ((_global_objects)  * ( sizeof(Objects_MP_Control) )  )
314
315#define CONFIGURE_MEMORY_FOR_MP \
316  ( CONFIGURE_MEMORY_FOR_PROXIES(CONFIGURE_MP_MAXIMUM_PROXIES) + \
317    CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS) \
318  )
319
320#endif  /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */
321
322#else
323
324#define CONFIGURE_MEMORY_FOR_MP  0
325
326#endif
327#define CONFIGURE_EXECUTIVE_RAM_SIZE \
328(( CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS) + \
329   CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS) + \
330   CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES) + \
331   CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
332   CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
333   CONFIGURE_MEMORY_FOR_REGIONS(CONFIGURE_MAXIMUM_REGIONS) + \
334   CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
335   CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
336   CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS) + \
337   CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \
338   CONFIGURE_MEMORY_FOR_MP + \
339   (96*1024) \
340) & 0xffff8000)
341#endif
342
343#ifdef CONFIGURE_INIT
344rtems_configuration_table Configuration = {
345  CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
346  CONFIGURE_EXECUTIVE_RAM_SIZE,
347  CONFIGURE_MAXIMUM_TASKS,
348  CONFIGURE_MAXIMUM_TIMERS,
349  CONFIGURE_MAXIMUM_SEMAPHORES,
350  CONFIGURE_MAXIMUM_MESSAGE_QUEUES,
351  CONFIGURE_MAXIMUM_PARTITIONS,
352  CONFIGURE_MAXIMUM_REGIONS,
353  CONFIGURE_MAXIMUM_PORTS,
354  CONFIGURE_MAXIMUM_PERIODS,
355  CONFIGURE_MAXIMUM_USER_EXTENSIONS,
356  CONFIGURE_MICROSECONDS_PER_TICK,
357  CONFIGURE_TICKS_PER_TIMESLICE,
358  sizeof (Initialization_tasks)/
359   sizeof(rtems_initialization_tasks_table), /* number of init tasks */
360  Initialization_tasks,                      /* init task(s) table */
361  sizeof (Device_drivers)/
362    sizeof(rtems_driver_address_table),      /* number of device drivers */
363  CONFIGURE_MAXIMUM_DEVICES,
364  Device_drivers,                            /* pointer to driver table */
365  CONFIGURE_INITIAL_EXTENSIONS,              /* pointer to initial extensions */
366  CONFIGURE_MULTIPROCESSING_TABLE            /* ptr to MP config table */
367};
368#endif
369
370#endif /* CONFIGURE_HAS_OWN_CONFIGURATION_TABLE */
371
372#ifdef __cplusplus
373}
374#endif
375 
376#endif
377/* end of include file */
Note: See TracBrowser for help on using the repository browser.