source: rtems/cpukit/sapi/include/rtems/config.h @ ac7d5ef0

4.104.114.84.95
Last change on this file since ac7d5ef0 was ac7d5ef0, checked in by Joel Sherrill <joel.sherrill@…>, on May 11, 1995 at 5:39:37 PM

Initial revision

  • Property mode set to 100644
File size: 10.1 KB
Line 
1/*  config.h
2 *
3 *  This include file contains the table of user defined configuration
4 *  parameters.
5 *
6 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
7 *  On-Line Applications Research Corporation (OAR).
8 *  All rights assigned to U.S. Government, 1994.
9 *
10 *  This material may be reproduced by or for the U.S. Government pursuant
11 *  to the copyright license under the clause at DFARS 252.227-7013.  This
12 *  notice must appear in all copies of this file and its derivatives.
13 *
14 *  $Id$
15 */
16
17#ifndef __RTEMS_CONFIGURATION_h
18#define __RTEMS_CONFIGURATION_h
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#include <rtems/object.h>
25#include <rtems/thread.h>
26
27/*
28 *  The following records define the Initialization Tasks Table.
29 *  Each entry contains the information required by RTEMS to
30 *  create and start a user task automatically at executive
31 *  initialization time.
32 */
33
34typedef struct {
35  Objects_Name       name;              /* task name */
36  unsigned32         stack_size;        /* task stack size */
37  rtems_task_priority   initial_priority;  /* task priority */
38  rtems_attribute attribute_set;     /* task attributes */
39  rtems_task_entry       entry_point;       /* task entry point */
40  rtems_mode      mode_set;          /* task initial mode */
41  unsigned32         argument;          /* task argument */
42}   rtems_initialization_tasks_table;
43
44/*
45 *
46 *  The following defines the types for:
47 *
48 *    + major and minor numbers
49 *    + the return type of a device driver entry
50 *    + a pointer to a device driver entry
51 *    + an entry in the the Device Driver Address Table.  Each entry in this
52 *      table corresponds to an application provided device driver and
53 *      defines the entry points for that device driver.
54 */
55
56typedef unsigned32 rtems_device_major_number;
57typedef unsigned32 rtems_device_minor_number;
58
59typedef void rtems_device_driver;
60
61typedef rtems_device_driver ( *rtems_device_driver_entry )(
62                 rtems_device_major_number,
63                 rtems_device_minor_number,
64                 void *,
65                 Objects_Id,
66                 unsigned32 *
67             );
68
69typedef struct {
70  rtems_device_driver_entry initialization; /* initialization procedure */
71  rtems_device_driver_entry open;           /* open request procedure */
72  rtems_device_driver_entry close;          /* close request procedure */
73  rtems_device_driver_entry read;           /* read request procedure */
74  rtems_device_driver_entry write;          /* write request procedure */
75  rtems_device_driver_entry control;        /* special functions procedure */
76}   rtems_driver_address_table;
77
78/*
79 *  The following records defines the User Extension Table.
80 *  This table defines the application dependent routines which
81 *  are invoked at critical points in the life of each task and
82 *  the system as a whole.
83 */
84
85typedef void rtems_extension;
86
87typedef rtems_extension ( *rtems_task_create_extension )(
88                 rtems_tcb *,
89                 rtems_tcb *
90             );
91
92typedef rtems_extension ( *rtems_task_delete_extension )(
93                 rtems_tcb *,
94                 rtems_tcb *
95             );
96
97typedef rtems_extension ( *rtems_task_start_extension )(
98                 rtems_tcb *,
99                 rtems_tcb *
100             );
101
102typedef rtems_extension ( *rtems_task_restart_extension )(
103                 rtems_tcb *,
104                 rtems_tcb *
105             );
106
107typedef rtems_extension ( *rtems_task_switch_extension )(
108                 rtems_tcb *,
109                 rtems_tcb *
110             );
111
112typedef rtems_extension ( *rtems_task_begin_extension )(
113                 rtems_tcb *
114             );
115
116typedef rtems_extension ( *rtems_task_exitted_extension )(
117                 rtems_tcb *
118             );
119
120typedef rtems_extension ( *rtems_fatal_extension )(
121                 unsigned32
122             );
123
124typedef struct {
125  rtems_task_create_extension  rtems_task_create;
126  rtems_task_start_extension   rtems_task_start;
127  rtems_task_restart_extension rtems_task_restart;
128  rtems_task_delete_extension  rtems_task_delete;
129  rtems_task_switch_extension  task_switch;
130  rtems_task_begin_extension   task_begin;
131  rtems_task_exitted_extension task_exitted;
132  rtems_fatal_extension        fatal;
133}   rtems_extensions_table;
134
135/*
136 *  The following records define the Multiprocessor Communications
137 *  Interface (MPCI) Table.  This table defines the user-provided
138 *  MPCI which is a required part of a multiprocessor RTEMS system.
139 *
140 *  For non-blocking local operations that become remote operations,
141 *  we need a timeout.  This is a per-driver timeout: default_timeout
142 */
143
144/* XXX FORWARD REFERENCES */
145
146typedef struct Configuration_Table    rtems_configuration_table;
147typedef struct Configuration_Table_MP rtems_multiprocessing_table;
148
149typedef void rtems_mpci_entry;
150
151typedef rtems_mpci_entry ( *rtems_mpci_initialization_entry )(
152                 rtems_configuration_table *,
153                 rtems_cpu_table *,
154                 rtems_multiprocessing_table *
155             );
156
157typedef rtems_mpci_entry ( *rtems_mpci_get_packet_entry )(
158                 rtems_packet_prefix **
159             );
160
161typedef rtems_mpci_entry ( *rtems_mpci_return_packet_entry )(
162                 rtems_packet_prefix *
163             );
164
165typedef rtems_mpci_entry ( *rtems_mpci_send_entry )(
166                 unsigned32,
167                 rtems_packet_prefix *
168             );
169
170typedef rtems_mpci_entry ( *rtems_mpci_receive_entry )(
171                 rtems_packet_prefix **
172             );
173
174typedef struct {
175  unsigned32                      default_timeout;        /* in ticks */
176  rtems_mpci_initialization_entry initialization;
177  rtems_mpci_get_packet_entry     get_packet;
178  rtems_mpci_return_packet_entry  return_packet;
179  rtems_mpci_send_entry           send_packet;
180  rtems_mpci_receive_entry        receive_packet;
181}  rtems_mpci_table;
182
183/*
184 *  The following records define the Multiprocessor Configuration
185 *  Table.  This table defines the multiprocessor system
186 *  characteristics which must be known by RTEMS in a multiprocessor
187 *  system.
188 */
189
190struct Configuration_Table_MP {
191  unsigned32  node;                   /* local node number */
192  unsigned32  maximum_nodes;          /* maximum # nodes in system */
193  unsigned32  maximum_global_objects; /* maximum # global objects */
194  unsigned32  maximum_proxies;        /* maximum # proxies */
195  rtems_mpci_table *User_mpci_table;
196                                      /* pointer to MPCI table */
197};
198
199/*
200 *  The following records define the Configuration Table.  The
201 *  information contained in this table is required in all
202 *  RTEMS systems, whether single or multiprocessor.  This
203 *  table primarily defines the following:
204 *
205 *     + location and size of the RTEMS Workspace
206 *     + required number of each object type
207 *     + microseconds per clock tick
208 *     + clock ticks per task timeslice
209 */
210
211struct Configuration_Table {
212  void                                     *work_space_start;
213  unsigned32                                work_space_size;
214  unsigned32                                maximum_tasks;
215  unsigned32                                maximum_timers;
216  unsigned32                                maximum_semaphores;
217  unsigned32                                maximum_message_queues;
218  unsigned32                                maximum_messages;
219  unsigned32                                maximum_partitions;
220  unsigned32                                maximum_regions;
221  unsigned32                                maximum_ports;
222  unsigned32                                maximum_periods;
223  unsigned32                                maximum_extensions;
224  unsigned32                                microseconds_per_tick;
225  unsigned32                                ticks_per_timeslice;
226  unsigned32                                number_of_initialization_tasks;
227  rtems_initialization_tasks_table *User_initialization_tasks_table;
228  unsigned32                                number_of_device_drivers;
229  rtems_driver_address_table       *Device_driver_table;
230  rtems_extensions_table            *User_extension_table;
231  rtems_multiprocessing_table      *User_multiprocessing_table;
232};
233
234/*
235 *  The following defines the default Multiprocessing Configuration
236 *  Table.  This table is used in a single processor system.
237 */
238
239extern const rtems_multiprocessing_table
240  _Configuration_Default_multiprocessing_table;
241
242/*
243 *  The following define the internal pointers to the user's
244 *  configuration information.
245 */
246
247EXTERN rtems_configuration_table                 *_Configuration_Table;
248EXTERN rtems_multiprocessing_table *_Configuration_MP_table;
249EXTERN rtems_mpci_table            *_Configuration_MPCI_table;
250
251/*
252 *
253 *  _Configuration_Handler_initialization
254 *
255 *  DESCRIPTION:
256 *
257 *  This routine performs the initialization necessary for this handler.
258 */
259
260STATIC INLINE void _Configuration_Handler_initialization(
261  rtems_configuration_table                 *configuration_table,
262  rtems_multiprocessing_table *multiprocessing_table,
263  rtems_mpci_table            *users_mpci_table
264);
265
266/*
267 *  _Configuration_Is_multiprocessing
268 *
269 *  DESCRIPTION:
270 *
271 *  This function determines if a multiprocessing application has been
272 *  configured, if so, TRUE is returned, otherwise FALSE is returned.
273 */
274
275STATIC INLINE boolean _Configuration_Is_multiprocessing( void );
276
277/*
278 *  _Configuration_Is_null_driver_address_table_pointer
279 *
280 *  DESCRIPTION:
281 *
282 *  This function returns TRUE if the_table is NULL and FALSE otherwise.
283 */
284
285STATIC INLINE boolean _Configuration_Is_null_driver_address_table_pointer(
286  rtems_driver_address_table *the_table
287);
288
289/*
290 *  _Configuration_Is_null_extension_table_pointer
291 *
292 *  DESCRIPTION:
293 *
294 *  This function returns TRUE if the_table is NULL and FALSE otherwise.
295 */
296
297STATIC INLINE boolean _Configuration_Is_null_extension_table_pointer(
298  rtems_extensions_table *the_table
299);
300
301/*
302 *  _Configuration_Is_null_initialization_tasks_table_pointer
303 *
304 *  DESCRIPTION:
305 *
306 *  This function returns TRUE if the_table is NULL and FALSE otherwise.
307 */
308
309STATIC INLINE boolean
310    _Configuration_Is_null_initialization_tasks_table_pointer(
311  rtems_initialization_tasks_table *the_table
312);
313
314#include <rtems/config.inl>
315
316#ifdef __cplusplus
317}
318#endif
319
320#endif
321/* end of include file */
Note: See TracBrowser for help on using the repository browser.