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