1 | Index: conf.t |
---|
2 | =================================================================== |
---|
3 | RCS file: /usr1/CVS/rtems/doc/user/conf.t,v |
---|
4 | retrieving revision 1.30 |
---|
5 | diff -c -r1.30 conf.t |
---|
6 | *** conf.t 2002/01/17 21:47:47 1.30 |
---|
7 | --- conf.t 2002/03/21 18:19:08 |
---|
8 | *************** |
---|
9 | *** 255,260 **** |
---|
10 | --- 255,265 ---- |
---|
11 | defined indicating the @code{confdefs.h} is providing the |
---|
12 | device driver table. |
---|
13 | |
---|
14 | + @findex CONFIGURE_MAXIMUM_DRIVERS |
---|
15 | + @item @code{CONFIGURE_MAXIMUM_DRIVERS} is defined |
---|
16 | + as the number of device drivers per node. By default, this is |
---|
17 | + set to 10. |
---|
18 | + |
---|
19 | @findex CONFIGURE_MAXIMUM_DEVICES |
---|
20 | @item @code{CONFIGURE_MAXIMUM_DEVICES} is defined |
---|
21 | to the number of individual devices that may be registered |
---|
22 | *************** |
---|
23 | *** 716,721 **** |
---|
24 | --- 721,727 ---- |
---|
25 | rtems_unsigned32 microseconds_per_tick; |
---|
26 | rtems_unsigned32 ticks_per_timeslice; |
---|
27 | rtems_unsigned32 maximum_devices; |
---|
28 | + rtems_unsigned32 maximum_drivers; |
---|
29 | rtems_unsigned32 number_of_device_drivers; |
---|
30 | rtems_driver_address_table *Device_driver_table; |
---|
31 | rtems_unsigned32 number_of_initial_extensions; |
---|
32 | *************** |
---|
33 | *** 800,805 **** |
---|
34 | --- 806,819 ---- |
---|
35 | an RTEMS application, the value for this field corresponds |
---|
36 | to the setting of the macro @code{CONFIGURE_MAXIMUM_DEVICES}. |
---|
37 | |
---|
38 | + @item maximum_drivers |
---|
39 | + is the maximum number of device drivers that can be registered. |
---|
40 | + When using the @code{confdefs.h} mechanism for configuring |
---|
41 | + an RTEMS application, the value for this field corresponds |
---|
42 | + to the setting of the macro @code{CONFIGURE_MAXIMUM_DRIVERS}. |
---|
43 | + This value is set to @code{maximum_devices} if it is greater |
---|
44 | + than @code{maximum_drivers}. |
---|
45 | + |
---|
46 | @item number_of_device_drivers |
---|
47 | is the number of device drivers for the system. There should be |
---|
48 | the same number of entries in the Device Driver Table. If this field |
---|
49 | *************** |
---|
50 | *** 1397,1410 **** |
---|
51 | |
---|
52 | @cindex Device Driver Table |
---|
53 | |
---|
54 | ! The Device Driver Table is used to inform the I/O |
---|
55 | ! Manager of the set of entry points for each device driver |
---|
56 | ! configured in the system. The table contains one entry for each |
---|
57 | ! device driver required by the application. The number of |
---|
58 | ! entries is defined in the number_of_device_drivers entry in the |
---|
59 | ! Configuration Table. The format of each entry in the Device |
---|
60 | ! Driver Table is defined in |
---|
61 | ! the following @value{LANGUAGE} @value{STRUCTURE}: |
---|
62 | |
---|
63 | @ifset is-C |
---|
64 | @findex rtems_driver_address_table |
---|
65 | --- 1411,1425 ---- |
---|
66 | |
---|
67 | @cindex Device Driver Table |
---|
68 | |
---|
69 | ! The Device Driver Table is used to inform the I/O Manager of the set of |
---|
70 | ! entry points for each device driver configured in the system. The table |
---|
71 | ! contains one entry for each device driver required by the application. |
---|
72 | ! The number of entries is defined in the number_of_device_drivers entry |
---|
73 | ! in the Configuration Table. This table is copied to the Device Drive |
---|
74 | ! Table during the IO Manager's initialization giving the entries in this |
---|
75 | ! table the lower major numbers. The format of each entry in the Device |
---|
76 | ! Driver Table is defined in the following @value{LANGUAGE} |
---|
77 | ! @value{STRUCTURE}: |
---|
78 | |
---|
79 | @ifset is-C |
---|
80 | @findex rtems_driver_address_table |
---|
81 | Index: io.t |
---|
82 | =================================================================== |
---|
83 | RCS file: /usr1/CVS/rtems/doc/user/io.t,v |
---|
84 | retrieving revision 1.14 |
---|
85 | diff -c -r1.14 io.t |
---|
86 | *** io.t 2002/01/17 21:47:47 1.14 |
---|
87 | --- io.t 2002/03/21 18:19:08 |
---|
88 | *************** |
---|
89 | *** 35,45 **** |
---|
90 | |
---|
91 | @cindex Device Driver Table |
---|
92 | |
---|
93 | ! Each application utilizing the RTEMS I/O manager must |
---|
94 | ! specify the address of a Device Driver Table in its |
---|
95 | ! Configuration Table. This table contains each device driver's |
---|
96 | ! entry points. Each device driver may contain the following |
---|
97 | ! entry points: |
---|
98 | |
---|
99 | @itemize @bullet |
---|
100 | @item Initialization |
---|
101 | --- 35,45 ---- |
---|
102 | |
---|
103 | @cindex Device Driver Table |
---|
104 | |
---|
105 | ! Each application utilizing the RTEMS I/O manager must specify the |
---|
106 | ! address of a Device Driver Table in its Configuration Table. This table |
---|
107 | ! contains each device driver's entry points that is to be initialised by |
---|
108 | ! RTEMS during initialization. Each device driver may contain the |
---|
109 | ! following entry points: |
---|
110 | |
---|
111 | @itemize @bullet |
---|
112 | @item Initialization |
---|
113 | *************** |
---|
114 | *** 57,62 **** |
---|
115 | --- 57,69 ---- |
---|
116 | zero (0) as the device driver's return code for these device |
---|
117 | driver entry points. |
---|
118 | |
---|
119 | + Applications can register and unregister drivers with the RTEMS I/O |
---|
120 | + manager avoiding the need to have all drivers statically defined and |
---|
121 | + linked into this table. |
---|
122 | + |
---|
123 | + The @file{confdefs.h} entry @code{CONFIGURE_MAXIMUM_DRIVERS} configures |
---|
124 | + the number of driver slots available to the application. |
---|
125 | + |
---|
126 | @subsection Major and Minor Device Numbers |
---|
127 | |
---|
128 | @cindex major device number |
---|
129 | *************** |
---|
130 | *** 116,121 **** |
---|
131 | --- 123,149 ---- |
---|
132 | for device drivers, it makes no assumptions regarding the |
---|
133 | construction or operation of a device driver. |
---|
134 | |
---|
135 | + @sybsection Runtime Driver Registration |
---|
136 | + |
---|
137 | + @cindex runtime driver registration |
---|
138 | + |
---|
139 | + Board support package and application developers can select wether a |
---|
140 | + device driver is statically entered into the default device table or |
---|
141 | + registered at runtime. |
---|
142 | + |
---|
143 | + Dynamic registration helps applications where: |
---|
144 | + |
---|
145 | + @enumerate |
---|
146 | + @item The BSP and kernel libraries are common to a range of applications |
---|
147 | + for a specific target platform. An application may be built upon a |
---|
148 | + common library with all drivers. The application selects and registers |
---|
149 | + the drivers. Uniform driver name lookup protects the application. |
---|
150 | + @item The type and range of drivers may vary as the application probes a |
---|
151 | + bus during initialization. |
---|
152 | + @item Support for hot swap bus system such as Compact PCI. |
---|
153 | + @item Support for runtime loadable driver modules. |
---|
154 | + @end enumerate |
---|
155 | + |
---|
156 | @subsection Device Driver Interface |
---|
157 | |
---|
158 | @cindex device driver interface |
---|
159 | *************** |
---|
160 | *** 216,221 **** |
---|
161 | --- 244,344 ---- |
---|
162 | subsection is dedicated to each of this manager's directives and |
---|
163 | describes the calling sequence, related constants, usage, and |
---|
164 | status codes. |
---|
165 | + |
---|
166 | + @c |
---|
167 | + @c |
---|
168 | + @c |
---|
169 | + @page |
---|
170 | + @subsection IO_REGISTER_DRIVER - Register a device driver |
---|
171 | + |
---|
172 | + @cindex register a device driver |
---|
173 | + |
---|
174 | + @subheading CALLING SEQUENCE: |
---|
175 | + |
---|
176 | + @ifset is-C |
---|
177 | + @findex rtems_io_register_driver |
---|
178 | + @example |
---|
179 | + rtems_status_code rtems_io_register_driver( |
---|
180 | + rtems_device_major_number major, |
---|
181 | + rtems_driver_address_table *driver_table, |
---|
182 | + rtems_device_major_number *registered_major |
---|
183 | + ); |
---|
184 | + @end example |
---|
185 | + @end ifset |
---|
186 | + |
---|
187 | + @ifset is-Ada |
---|
188 | + @example |
---|
189 | + No Ada implementation. |
---|
190 | + @end example |
---|
191 | + @end ifset |
---|
192 | + |
---|
193 | + @subheading DIRECTIVE STATUS CODES: |
---|
194 | + @code{@value{RPREFIX}SUCCESSFUL} - successfully registered@* |
---|
195 | + @code{@value{RPREFIX}INVALID_NUMBER} - invalid major device number@* |
---|
196 | + @code{@value{RPREFIX}TOO_MANY} - no available major device table slot@* |
---|
197 | + @code{@value{RPREFIX}RESOURCE_IN_USE} - major device number entry in use |
---|
198 | + |
---|
199 | + @subheading DESCRIPTION: |
---|
200 | + |
---|
201 | + This directive attempts to add a new device driver to the Device Driver |
---|
202 | + Table. The user can specify a specific major device number via the |
---|
203 | + directive's @code{major} parameter, or let the registration routine find |
---|
204 | + the next available major device number by specifing a major number of |
---|
205 | + @code{0}. The selected major device number is returned via the |
---|
206 | + @code{registered_major} directive parameter. The directive automatically |
---|
207 | + allocation major device numbers from the highest value down. |
---|
208 | + |
---|
209 | + This directive automatically invokes the IO_INITIALIZE directive if |
---|
210 | + the driver address table has an initialization and open entry. |
---|
211 | + |
---|
212 | + The directive returns @value{RPREFIX}TOO_MANY if Device Driver Table is |
---|
213 | + full, and @value{RPREFIX}RESOURCE_IN_USE if a specific major device |
---|
214 | + number is requested and it is already in use. |
---|
215 | + |
---|
216 | + @subheading NOTES: |
---|
217 | + |
---|
218 | + The Device Driver Table size is specified in the Configuration Table |
---|
219 | + condiguration. This needs to be set to maximum size the application |
---|
220 | + requires. |
---|
221 | + |
---|
222 | + |
---|
223 | + @c |
---|
224 | + @c |
---|
225 | + @c |
---|
226 | + @page |
---|
227 | + @subsection IO_UNREGISTER_DRIVER - Unregister a device driver |
---|
228 | + |
---|
229 | + @cindex unregister a device driver |
---|
230 | + |
---|
231 | + @subheading CALLING SEQUENCE: |
---|
232 | + |
---|
233 | + @ifset is-C |
---|
234 | + @findex rtems_io_unregister_driver |
---|
235 | + @example |
---|
236 | + rtems_status_code rtems_io_register_driver( |
---|
237 | + rtems_device_major_number major |
---|
238 | + ); |
---|
239 | + @end example |
---|
240 | + @end ifset |
---|
241 | + |
---|
242 | + @ifset is-Ada |
---|
243 | + @example |
---|
244 | + No Ada implementation. |
---|
245 | + @end example |
---|
246 | + @end ifset |
---|
247 | + |
---|
248 | + @subheading DIRECTIVE STATUS CODES: |
---|
249 | + @code{@value{RPREFIX}SUCCESSFUL} - successfully registered@* |
---|
250 | + @code{@value{RPREFIX}INVALID_NUMBER} - invalid major device number |
---|
251 | + |
---|
252 | + @subheading DESCRIPTION: |
---|
253 | + |
---|
254 | + This directive removes a device driver from the Device Driver Table. |
---|
255 | + |
---|
256 | + @subheading NOTES: |
---|
257 | + |
---|
258 | + Currently no specific checks are made and the driver is not closed. |
---|
259 | + |
---|
260 | |
---|
261 | @c |
---|
262 | @c |
---|
263 | 0a1,5 |
---|
264 | > 2002-03-22 Chris Johns <ccj@acm.org> |
---|
265 | > |
---|
266 | > * io.t, conf.t: PR 160. Added the IO Manager's register and |
---|
267 | > unregister interface documentation. |
---|
268 | > |
---|