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

4.104.114.84.95
Last change on this file since b96254f was b96254f, checked in by Ralf Corsepius <ralf.corsepius@…>, on 11/21/04 at 07:42:11

Add doxygen preamble.

  • Property mode set to 100644
File size: 5.7 KB
Line 
1/**
2 * @file rtems/config.h
3 */
4 
5/*
6 *  This include file contains the table of user defined configuration
7 *  parameters.
8 *
9 *  COPYRIGHT (c) 1989-1999.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.com/license/LICENSE.
15 *
16 *  $Id$
17 */
18
19#ifndef __RTEMS_CONFIGURATION_h
20#define __RTEMS_CONFIGURATION_h
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26/*
27 *  Unlimited object support. Changes the configuration table entry for POSIX
28 *  or RTEMS APIs to bounded only by the memory of the work-space.
29 *
30 *  Use the macro to define the resource unlimited before placing in
31 *  the configuration table.
32 */
33
34#include <rtems/score/object.h>
35#define RTEMS_UNLIMITED_OBJECTS OBJECTS_UNLIMITED_OBJECTS
36
37#define rtems_resource_unlimited(resource) \
38  ( resource | RTEMS_UNLIMITED_OBJECTS )
39
40/*
41 *  This is kind of kludgy but it allows targets to totally ignore the
42 *  optional APIs like POSIX and ITRON safely.
43 */
44
45#ifdef RTEMS_POSIX_API
46#include <rtems/posix/config.h>
47#else
48typedef void *posix_api_configuration_table;
49#endif
50
51#ifdef RTEMS_ITRON_API
52#include <rtems/itron.h>
53#include <rtems/itron/config.h>
54#else
55typedef void *itron_api_configuration_table;
56#endif
57
58#include <rtems/rtems/config.h>
59
60/*  XXX <rtems/rtems/config.h> should cover these
61#include <rtems/rtems/status.h>
62#include <rtems/rtems/types.h>
63#include <rtems/rtems/tasks.h>
64*/
65
66#include <rtems/extension.h>
67#include <rtems/io.h>
68#if defined(RTEMS_MULTIPROCESSING)
69#include <rtems/score/mpci.h>
70#endif
71
72/*
73 *  The following records define the Multiprocessor Configuration
74 *  Table.  This table defines the multiprocessor system
75 *  characteristics which must be known by RTEMS in a multiprocessor
76 *  system.
77 */
78
79typedef struct {
80  uint32_t      node;             /* local node number */
81  uint32_t      maximum_nodes;    /* maximum # nodes in system */
82  uint32_t      maximum_global_objects; /* maximum # global objects */
83  uint32_t      maximum_proxies;  /* maximum # proxies */
84#if defined(RTEMS_MULTIPROCESSING)
85  rtems_mpci_table   *User_mpci_table;  /* pointer to MPCI table */
86#else
87  void         *User_mpci_table;        /* pointer to MPCI table */
88#endif
89} rtems_multiprocessing_table;
90
91/*
92 *  The following records define the Configuration Table.  The
93 *  information contained in this table is required in all
94 *  RTEMS systems, whether single or multiprocessor.  This
95 *  table primarily defines the following:
96 *
97 *     + location and size of the RTEMS Workspace
98 *     + microseconds per clock tick
99 *     + clock ticks per task timeslice
100 *     + required number of each object type for each API configured
101 */
102
103typedef struct {
104  void                             *work_space_start;
105  uint32_t                    work_space_size;
106  uint32_t                    maximum_extensions;
107  uint32_t                    microseconds_per_tick;
108  uint32_t                    ticks_per_timeslice;
109  uint32_t                    maximum_devices;
110  uint32_t                    maximum_drivers;
111  uint32_t                    number_of_device_drivers;
112  rtems_driver_address_table       *Device_driver_table;
113  uint32_t                    number_of_initial_extensions;
114  rtems_extensions_table           *User_extension_table;
115  rtems_multiprocessing_table      *User_multiprocessing_table;
116  rtems_api_configuration_table    *RTEMS_api_configuration;
117  posix_api_configuration_table    *POSIX_api_configuration;
118  itron_api_configuration_table    *ITRON_api_configuration;
119} rtems_configuration_table;
120
121/*
122 *  The following are provided strictly for the convenience of
123 *  the user.  They are not used in RTEMS itself.
124 */
125
126SAPI_EXTERN rtems_configuration_table    *_Configuration_Table;
127SAPI_EXTERN rtems_multiprocessing_table  *_Configuration_MP_table;
128
129/*
130 *  Some handy macros to avoid dependencies on either the BSP
131 *  or the exact format of the configuration table.
132 */
133
134#define rtems_configuration_get_table() \
135        (&_Configuration_Table)
136
137#define rtems_configuration_get_work_space_start() \
138        (_Configuration_Table->work_space_start)
139
140#define rtems_configuration_get_work_space_size() \
141        (_Configuration_Table->work_space_size)
142
143#define rtems_configuration_get_maximum_extensions() \
144        (_Configuration_Table->maximum_extensions)
145
146#define rtems_configuration_get_microseconds_per_tick() \
147        (_Configuration_Table->microseconds_per_tick)
148#define rtems_configuration_get_milliseconds_per_tick() \
149        (_Configuration_Table->microseconds_per_tick / 1000)
150
151#define rtems_configuration_get_ticks_per_timeslice() \
152        (_Configuration_Table->ticks_per_timeslice)
153
154#define rtems_configuration_get_maximum_devices() \
155        (_Configuration_Table->maximum_devices)
156
157#define rtems_configuration_get_number_of_device_drivers() \
158        (_Configuration_Table->number_of_device_drivers)
159
160#define rtems_configuration_get_device_driver_table() \
161        (_Configuration_Table->device_driver_table)
162
163#define rtems_configuration_get_number_of_initial_extensions() \
164        (_Configuration_Table->number_of_initial_extensions)
165
166#define rtems_configuration_get_user_extension_table() \
167        (_Configuration_Table->user_extension_table)
168
169#define rtems_configuration_get_user_multiprocessing_table() \
170        (_Configuration_Table->User_multiprocessing_table)
171
172#define rtems_configuration_get_rtems_api_configuration() \
173        (_Configuration_Table->RTEMS_api_configuration)
174
175#define rtems_configuration_get_posix_api_configuration() \
176        (_Configuration_Table->POSIX_api_configuration)
177
178#define rtems_configuration_get_itron_api_configuration() \
179        (_Configuration_Table->ITRON_api_configuration)
180
181#ifdef __cplusplus
182}
183#endif
184
185#endif
186/* end of include file */
Note: See TracBrowser for help on using the repository browser.