1 | -- |
---|
2 | -- SPTEST / SPECIFICATION |
---|
3 | -- |
---|
4 | -- DESCRIPTION: |
---|
5 | -- |
---|
6 | -- This package is the specification for Test 9 of the RTEMS |
---|
7 | -- Single Processor Test Suite. |
---|
8 | -- |
---|
9 | -- DEPENDENCIES: |
---|
10 | -- |
---|
11 | -- |
---|
12 | -- |
---|
13 | -- COPYRIGHT (c) 1989-1997. |
---|
14 | -- On-Line Applications Research Corporation (OAR). |
---|
15 | -- Copyright assigned to U.S. Government, 1994. |
---|
16 | -- |
---|
17 | -- The license and distribution terms for this file may in |
---|
18 | -- the file LICENSE in this distribution or at |
---|
19 | -- http://www.OARcorp.com/rtems/license.html. |
---|
20 | -- |
---|
21 | -- $Id$ |
---|
22 | -- |
---|
23 | |
---|
24 | with CLOCK_DRIVER; |
---|
25 | with RTEMS; |
---|
26 | with SYSTEM; |
---|
27 | with System.Storage_Elements; |
---|
28 | |
---|
29 | package SPTEST is |
---|
30 | |
---|
31 | -- |
---|
32 | -- These arrays contain the IDs and NAMEs of all RTEMS tasks created |
---|
33 | -- by this test. |
---|
34 | -- |
---|
35 | |
---|
36 | TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 11 ) of RTEMS.ID; |
---|
37 | TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 11 ) of RTEMS.NAME; |
---|
38 | |
---|
39 | -- |
---|
40 | -- These arrays contain the IDs and NAMEs of all RTEMS timers created |
---|
41 | -- by this test. |
---|
42 | -- |
---|
43 | |
---|
44 | TIMER_ID : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.ID; |
---|
45 | TIMER_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.NAME; |
---|
46 | |
---|
47 | -- |
---|
48 | -- These arrays contain the IDs and NAMEs of all RTEMS semaphores created |
---|
49 | -- by this test. |
---|
50 | -- |
---|
51 | |
---|
52 | SEMAPHORE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID; |
---|
53 | SEMAPHORE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME; |
---|
54 | |
---|
55 | -- |
---|
56 | -- These arrays contain the IDs and NAMEs of all RTEMS message queues |
---|
57 | -- created by this test. |
---|
58 | -- |
---|
59 | |
---|
60 | QUEUE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID; |
---|
61 | QUEUE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME; |
---|
62 | |
---|
63 | -- |
---|
64 | -- These arrays contain the IDs and NAMEs of all RTEMS partitions created |
---|
65 | -- by this test. |
---|
66 | -- |
---|
67 | |
---|
68 | PARTITION_ID : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.ID; |
---|
69 | PARTITION_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.NAME; |
---|
70 | |
---|
71 | -- |
---|
72 | -- These arrays contain the IDs and NAMEs of all RTEMS regions created |
---|
73 | -- by this test. |
---|
74 | -- |
---|
75 | |
---|
76 | REGION_ID : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.ID; |
---|
77 | REGION_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.NAME; |
---|
78 | |
---|
79 | -- |
---|
80 | -- These arrays contain the IDs and NAMEs of all RTEMS ports created |
---|
81 | -- by this test. |
---|
82 | -- |
---|
83 | |
---|
84 | PORT_ID : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.ID; |
---|
85 | PORT_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.NAME; |
---|
86 | |
---|
87 | -- |
---|
88 | -- These arrays contain the IDs and NAMEs of all RTEMS periods created |
---|
89 | -- by this test. |
---|
90 | -- |
---|
91 | |
---|
92 | PERIOD_ID : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.ID; |
---|
93 | PERIOD_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.NAME; |
---|
94 | |
---|
95 | -- |
---|
96 | -- This variable is used as the output ID on directives which return |
---|
97 | -- an ID but are invoked in a manner which returns a non-SUCCESSFUL |
---|
98 | -- status code. |
---|
99 | -- |
---|
100 | |
---|
101 | JUNK_ID : RTEMS.ID; |
---|
102 | |
---|
103 | -- |
---|
104 | -- The following area defines a memory area to be used as the |
---|
105 | -- internal address space of the port. |
---|
106 | -- |
---|
107 | |
---|
108 | INTERNAL_PORT_AREA_ADDRESS : constant System.Address := |
---|
109 | System.Storage_Elements.To_Address(16#00001000#); |
---|
110 | |
---|
111 | INTERNAL_PORT_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 ) |
---|
112 | of RTEMS.UNSIGNED8; |
---|
113 | for INTERNAL_PORT_AREA use at INTERNAL_PORT_AREA_ADDRESS; |
---|
114 | |
---|
115 | -- |
---|
116 | -- The following area defines a memory area to be used as the |
---|
117 | -- external address space of the port. |
---|
118 | -- |
---|
119 | |
---|
120 | EXTERNAL_PORT_AREA_ADDRESS : constant System.Address := |
---|
121 | System.Storage_Elements.To_Address(16#00002000#); |
---|
122 | |
---|
123 | EXTERNAL_PORT_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 ) |
---|
124 | of RTEMS.UNSIGNED8; |
---|
125 | for EXTERNAL_PORT_AREA use at EXTERNAL_PORT_AREA_ADDRESS; |
---|
126 | |
---|
127 | -- |
---|
128 | -- The following area defines a memory area to be used as the |
---|
129 | -- memory space for a partition. |
---|
130 | -- |
---|
131 | |
---|
132 | PARTITION_GOOD_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 ) |
---|
133 | of RTEMS.UNSIGNED8; |
---|
134 | for PARTITION_GOOD_AREA'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT; |
---|
135 | |
---|
136 | -- |
---|
137 | -- The following area defines a memory area to be used as the |
---|
138 | -- memory space for a partition which starts at an invalid address. |
---|
139 | -- |
---|
140 | |
---|
141 | PARTITION_BAD_AREA_ADDRESS : constant System.Address := |
---|
142 | System.Storage_Elements.To_Address(16#00000006#); |
---|
143 | |
---|
144 | PARTITION_BAD_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 ) |
---|
145 | of RTEMS.UNSIGNED8; |
---|
146 | for PARTITION_BAD_AREA use at PARTITION_BAD_AREA_ADDRESS; |
---|
147 | |
---|
148 | -- |
---|
149 | -- The following area defines a memory area to be used as the |
---|
150 | -- memory space for a region and constants used to define the regions |
---|
151 | -- starting area and length. |
---|
152 | -- |
---|
153 | |
---|
154 | REGION_GOOD_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 4095 ) |
---|
155 | of RTEMS.UNSIGNED32; |
---|
156 | for REGION_GOOD_AREA'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT; |
---|
157 | |
---|
158 | REGION_START_OFFSET : constant RTEMS.UNSIGNED32 := 1024; |
---|
159 | REGION_LENGTH : constant RTEMS.UNSIGNED32 := 512; |
---|
160 | |
---|
161 | -- |
---|
162 | -- The following area defines a memory area to be used as the |
---|
163 | -- memory space for a region which starts at an invalid address. |
---|
164 | -- |
---|
165 | |
---|
166 | REGION_BAD_AREA_ADDRESS : constant System.Address := |
---|
167 | System.Storage_Elements.To_Address(16#00000006#); |
---|
168 | |
---|
169 | REGION_BAD_AREA : array ( RTEMS.UNSIGNED32 range 0 .. 255 ) |
---|
170 | of RTEMS.UNSIGNED8; |
---|
171 | for REGION_BAD_AREA use at REGION_BAD_AREA_ADDRESS; |
---|
172 | |
---|
173 | -- |
---|
174 | -- INIT |
---|
175 | -- |
---|
176 | -- DESCRIPTION: |
---|
177 | -- |
---|
178 | -- This RTEMS task initializes the application. |
---|
179 | -- |
---|
180 | |
---|
181 | procedure INIT ( |
---|
182 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
183 | ); |
---|
184 | |
---|
185 | -- |
---|
186 | -- DELAYED_SUBPROGRAM |
---|
187 | -- |
---|
188 | -- DESCRIPTION: |
---|
189 | -- |
---|
190 | -- This subprogram is scheduled as a timer service routine. |
---|
191 | -- It performs no actions if it fires. |
---|
192 | -- |
---|
193 | |
---|
194 | procedure DELAYED_SUBPROGRAM ( |
---|
195 | IGNORED_ID : in RTEMS.ID; |
---|
196 | IGNORED_ADDRESS : in RTEMS.ADDRESS |
---|
197 | ); |
---|
198 | |
---|
199 | -- |
---|
200 | -- TASK_1 |
---|
201 | -- |
---|
202 | -- DESCRIPTION: |
---|
203 | -- |
---|
204 | -- This RTEMS task tests numerous error conditions. |
---|
205 | -- |
---|
206 | |
---|
207 | procedure TASK_1 ( |
---|
208 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
209 | ); |
---|
210 | |
---|
211 | -- |
---|
212 | -- TASK_2 |
---|
213 | -- |
---|
214 | -- DESCRIPTION: |
---|
215 | -- |
---|
216 | -- This RTEMS task tests numerous error conditions. |
---|
217 | -- |
---|
218 | |
---|
219 | procedure TASK_2 ( |
---|
220 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
221 | ); |
---|
222 | |
---|
223 | -- |
---|
224 | -- TASK_3 |
---|
225 | -- |
---|
226 | -- DESCRIPTION: |
---|
227 | -- |
---|
228 | -- This RTEMS task tests numerous error conditions. |
---|
229 | -- |
---|
230 | |
---|
231 | procedure TASK_3 ( |
---|
232 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
233 | ); |
---|
234 | |
---|
235 | -- |
---|
236 | -- TASK_4 |
---|
237 | -- |
---|
238 | -- DESCRIPTION: |
---|
239 | -- |
---|
240 | -- This RTEMS task tests numerous error conditions. |
---|
241 | -- |
---|
242 | |
---|
243 | procedure TASK_4 ( |
---|
244 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
245 | ); |
---|
246 | |
---|
247 | -- |
---|
248 | -- SERVICE_ROUTINE |
---|
249 | -- |
---|
250 | -- DESCRIPTION: |
---|
251 | -- |
---|
252 | -- This subprogram serves as a dummy ISR which is installed at an |
---|
253 | -- illegal vector number. |
---|
254 | -- |
---|
255 | |
---|
256 | procedure SERVICE_ROUTINE ( |
---|
257 | IGNORED : in RTEMS.VECTOR_NUMBER |
---|
258 | ); |
---|
259 | |
---|
260 | -- |
---|
261 | -- SCREEN_1 |
---|
262 | -- |
---|
263 | -- DESCRIPTION: |
---|
264 | -- |
---|
265 | -- This subprogram processes the a single output screen of this test. |
---|
266 | -- |
---|
267 | |
---|
268 | procedure SCREEN_1; |
---|
269 | |
---|
270 | -- |
---|
271 | -- SCREEN_2 |
---|
272 | -- |
---|
273 | -- DESCRIPTION: |
---|
274 | -- |
---|
275 | -- This subprogram processes the a single output screen of this test. |
---|
276 | -- |
---|
277 | |
---|
278 | procedure SCREEN_2; |
---|
279 | |
---|
280 | -- |
---|
281 | -- SCREEN_3 |
---|
282 | -- |
---|
283 | -- DESCRIPTION: |
---|
284 | -- |
---|
285 | -- This subprogram processes the a single output screen of this test. |
---|
286 | -- |
---|
287 | |
---|
288 | procedure SCREEN_3; |
---|
289 | |
---|
290 | -- |
---|
291 | -- SCREEN_4 |
---|
292 | -- |
---|
293 | -- DESCRIPTION: |
---|
294 | -- |
---|
295 | -- This subprogram processes the a single output screen of this test. |
---|
296 | -- |
---|
297 | |
---|
298 | procedure SCREEN_4; |
---|
299 | |
---|
300 | -- |
---|
301 | -- SCREEN_5 |
---|
302 | -- |
---|
303 | -- DESCRIPTION: |
---|
304 | -- |
---|
305 | -- This subprogram processes the a single output screen of this test. |
---|
306 | -- |
---|
307 | |
---|
308 | procedure SCREEN_5; |
---|
309 | |
---|
310 | -- |
---|
311 | -- SCREEN_6 |
---|
312 | -- |
---|
313 | -- DESCRIPTION: |
---|
314 | -- |
---|
315 | -- This subprogram processes the a single output screen of this test. |
---|
316 | -- |
---|
317 | |
---|
318 | procedure SCREEN_6; |
---|
319 | |
---|
320 | -- |
---|
321 | -- SCREEN_7 |
---|
322 | -- |
---|
323 | -- DESCRIPTION: |
---|
324 | -- |
---|
325 | -- This subprogram processes the a single output screen of this test. |
---|
326 | -- |
---|
327 | |
---|
328 | procedure SCREEN_7; |
---|
329 | |
---|
330 | -- |
---|
331 | -- SCREEN_8 |
---|
332 | -- |
---|
333 | -- DESCRIPTION: |
---|
334 | -- |
---|
335 | -- This subprogram processes the a single output screen of this test. |
---|
336 | -- |
---|
337 | |
---|
338 | procedure SCREEN_8; |
---|
339 | |
---|
340 | -- |
---|
341 | -- SCREEN_9 |
---|
342 | -- |
---|
343 | -- DESCRIPTION: |
---|
344 | -- |
---|
345 | -- This subprogram processes the a single output screen of this test. |
---|
346 | -- |
---|
347 | |
---|
348 | procedure SCREEN_9; |
---|
349 | |
---|
350 | -- |
---|
351 | -- SCREEN_10 |
---|
352 | -- |
---|
353 | -- DESCRIPTION: |
---|
354 | -- |
---|
355 | -- This subprogram processes the a single output screen of this test. |
---|
356 | -- |
---|
357 | |
---|
358 | procedure SCREEN_10; |
---|
359 | |
---|
360 | -- |
---|
361 | -- SCREEN_11 |
---|
362 | -- |
---|
363 | -- DESCRIPTION: |
---|
364 | -- |
---|
365 | -- This subprogram processes the a single output screen of this test. |
---|
366 | -- |
---|
367 | |
---|
368 | procedure SCREEN_11; |
---|
369 | |
---|
370 | -- |
---|
371 | -- SCREEN_12 |
---|
372 | -- |
---|
373 | -- DESCRIPTION: |
---|
374 | -- |
---|
375 | -- This subprogram processes the a single output screen of this test. |
---|
376 | -- |
---|
377 | |
---|
378 | procedure SCREEN_12; |
---|
379 | |
---|
380 | -- |
---|
381 | -- SCREEN_13 |
---|
382 | -- |
---|
383 | -- DESCRIPTION: |
---|
384 | -- |
---|
385 | -- This subprogram processes the a single output screen of this test. |
---|
386 | -- |
---|
387 | |
---|
388 | procedure SCREEN_13; |
---|
389 | |
---|
390 | -- |
---|
391 | -- This is the Driver Address Table for this test. |
---|
392 | -- |
---|
393 | |
---|
394 | DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) := |
---|
395 | (1=> |
---|
396 | ( |
---|
397 | CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization |
---|
398 | RTEMS.NO_DRIVER_ENTRY, -- Open |
---|
399 | RTEMS.NO_DRIVER_ENTRY, -- Close |
---|
400 | RTEMS.NO_DRIVER_ENTRY, -- Read |
---|
401 | RTEMS.NO_DRIVER_ENTRY, -- Write |
---|
402 | RTEMS.NO_DRIVER_ENTRY -- Control |
---|
403 | ) |
---|
404 | ); |
---|
405 | |
---|
406 | -- |
---|
407 | -- This is the Initialization Tasks Table for this test. |
---|
408 | -- |
---|
409 | |
---|
410 | INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := |
---|
411 | (1=> |
---|
412 | ( |
---|
413 | RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name |
---|
414 | 2048, -- stack size |
---|
415 | 1, -- priority |
---|
416 | RTEMS.DEFAULT_ATTRIBUTES, -- attributes |
---|
417 | SPTEST.INIT'ACCESS, -- entry point |
---|
418 | RTEMS.NO_PREEMPT, -- initial mode |
---|
419 | 0 -- argument list |
---|
420 | ) |
---|
421 | ); |
---|
422 | |
---|
423 | -- |
---|
424 | -- This is the Configuration Table for this test. |
---|
425 | -- |
---|
426 | |
---|
427 | CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := ( |
---|
428 | RTEMS.NULL_ADDRESS, -- will be replaced by BSP |
---|
429 | 64 * 1024, -- executive RAM size |
---|
430 | 10, -- maximum # tasks |
---|
431 | 1, -- maximum # timers |
---|
432 | 2, -- maximum # semaphores |
---|
433 | 1, -- maximum # message queues |
---|
434 | 2, -- maximum # messages |
---|
435 | 1, -- maximum # partitions |
---|
436 | 1, -- maximum # regions |
---|
437 | 0, -- maximum # dp memory areas |
---|
438 | 1, -- maximum # periods |
---|
439 | 0, -- maximum # user extensions |
---|
440 | RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick |
---|
441 | 100 -- # ticks in a timeslice |
---|
442 | ); |
---|
443 | |
---|
444 | end SPTEST; |
---|