OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [m68k/] [mvme167/] [README] - Blame information for rev 562

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
#
2
#  $Id: README,v 1.2 2001-09-27 12:00:19 chris Exp $
3
#
4
 
5
This is a README file for the MVME167 port of RTEMS 4.5.0.
6
 
7
Please send any comments, improvements, or bug reports to:
8
 
9
Charles-Antoine Gauthier
10
charles.gauthier@nrc.ca
11
or
12
 
13
Darlene Stewart
14
Darlene.Stewart@nrc.ca
15
 
16
Software Engineering Group
17
Institute for Information Technology
18
National Research Council of Canada
19
Ottawa, ON, K1A 0R6
20
Canada
21
 
22
 
23
WARNING:
24
--------
25
 
26
The network driver is currently being worked on. It is somewhat functional,
27
but it does run out of buffers under certain conditions. The code is
28
also undergoing a substantial reorganization. Before making any changes,
29
you should check with us for the availability of updates.
30
 
31
Note from Joel:  The ttcp performance reported is very nice even if the
32
driver is still early in its life. :)
33
 
34
 
35
 
36
Disclaimer
37
----------
38
 
39
The National Research Council of Canada is distributing this RTEMS
40
board support package for the Motorola MVME167 as free software; you
41
can redistribute it and/or modify it under terms of the GNU General
42
Public License as published by the Free Software Foundation; either
43
version 2, or (at your option) any later version.  This software is
44
distributed in the hope that it will be useful, but WITHOUT ANY
45
WARRANTY; without even the implied warranty of MERCHANTABILITY or
46
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
47
for more details. You should have received a copy of the GNU General
48
Public License along with RTEMS; see file COPYING. If not, write to
49
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
50
 
51
Under no circumstances will the National Research Council of Canada
52
nor Her Majesty the Queen in right of Canada assume any liablility
53
for the use this software, nor any responsibility for its quality or
54
its support.
55
 
56
 
57
Installation
58
------------
59
 
60
Nothing unique to the MVME167. It uses the standard build process for
61
m68k targets. You will need to edit linkcmds to put in the start address
62
of your board. We do TFTP transfers to our target. The mvme167.cfg file
63
builds only the ELF images, which we download to the target, skipping
64
over the first 0x54 bytes; Motorola S-records are not generated. Edit
65
this file if you want S-records.
66
 
67
 
68
Port Description
69
Console driver
70
 
71
---------------
72
 
73
This BSP includes an termios-capable console driver that supports all
74
four serial ports on the MVME167 model. The RTEMS console, /dev/console,
75
corresponds to channel 1 in the CD2401. This corresponds to Serial Port
76
2/TTY01 on the MVME712M. Serial Port 1/Console is normally used by 167Bug;
77
do not open /dev/tty00 if you are debugging using 167Bug.
78
 
79
The console is initialized with whatever parameters are set up in termios
80
before it calls the firtOpen driver callback, EXCEPT THAT HARDWARE
81
HANDSHAKING IS TURNED OFF, i.e. CLOCAL is set in the struct termios
82
c_cflag field. We use 3-wire cables for I/O, and find hardware handshaking
83
a pain. If you enable hardware handshaking, you must drive CTS* low on the
84
CD2401 for output to occur. If the port is in the DTE configuration, you
85
must drive the RS-232 CTS line to space; if the port is in the DCE
86
configuration, you must drive the RS-232 RTS line to space.
87
 
88
Limited support is provided for polled terminal I/O. This is used when
89
running the timing tests. Set the CD2401_POLLED_IO manifest constant to 1
90
in rtems/c/src/lib/libbsp/m68k/mvme167/console/console.c to enable polled
91
I/O. In this case, I/O is done through 167Bug, usually to the Serial Port
92
1/Console port. Interrupt-driven and polled I/O cannot be mixed in the
93
MVME167.
94
 
95
 
96
Floating-point
97
 
98
The MC68040 has a built-in FPU. This FPU does not implement all the
99
instruction of the MC68881/MC68882 floating-point coprocessors in
100
hardware. The -m68040 compilation options instructs gcc to not generate
101
the missing instructions. All of the RTEMS code is built this way. Some
102
of the missing functionality must be supplied by external libraries. The
103
required functions are part of libgcc.a.
104
 
105
The issue gets complicated because libc, libm and libgcc do not come as
106
m68040-specific variants. The default variants of these libraries are for the
107
MC68020 and MC68030. There are specific variants for the MC68000 (which has
108
limited addressing modes with respect to later family members), and specific
109
variants for systems without a floating-point unit, either a built-in FPU or
110
a coprocessor. These latter variants will be referred to as the msoft-float
111
variants. There is a msoft-float variant for the MC68000, and one for the
112
other family members.
113
 
114
The default variants of libc, libm and libgcc appear to work just fine for the
115
MC68040, AS LONG AS NO FLOATING POINT FUNCTIONS ARE CALLED. In particular,
116
printf() and scanf() raise unimplemented floating-point instruction exceptions
117
at run time. Expect almost every function that must compute a floating-point
118
result to also raise unimplemented floating-point instruction exceptions. Do
119
not use these variants if your application does any floating-point operations,
120
unless you use the Motorola FPSP package (described further down).
121
 
122
The msoft-float variants do print out floating-point numbers properly, but we
123
have not tested them extensively, so use them with caution. In particular,
124
the Paranoia test fails when linked with the msoft-float variants of the
125
libraries; it goes into an infinite loop after milestone 40.
126
 
127
MSOFT_FLOAT VARIANTS MUST BE USED TOGETHER. If you use the msoft-float variant
128
of libc and libm, you must also linked with the msoft-float variant of libgcc,
129
otherwise calls such as printf() print out floating-point values incorrectly.
130
 
131
RTEMS comes with the Motorola FPSP (Floating-Point Support Package) for the
132
MC68040 (rtems/c/src/lib/libcp/m68k/m68040/fpsp). This package emulates the
133
missing floating-point instructions. It is built automatically for the
134
MVME167 and installed in bsp_start().
135
 
136
The FPSP allows the use of the default variants of libc, libm and libgcc.
137
It also runs the paranoia test properly, and prints out the correct results.
138
It should probably be used in preference to the msoft-float libraries, as it
139
appears to work better. The disadvantage of the FPSP is that it increases the
140
size of the executable by about 60KB and that it relies on run time
141
exceptions.
142
 
143
If your application does not do any floating-point operations at all, you
144
should consider disabling the FPSP. In bsp_start(), emove the call to
145
M68KFPSPInstallExceptionHandlers(), and uncomment the three lines in
146
mvme167.cfg that redefine which variants of libc, libm and libgcc to link
147
against.
148
 
149
 
150
Cache Control and Memory Mapping
151
 
152
If Jumper J1-7 is installed, the data cache will be turned on. If Jumper
153
J1-6 is installed, the instruction cache will be turned on. Removing the
154
jumper causes the corresponding cache to be left disabled.
155
 
156
If Jumper J1-5 is installed, the data cache will be placed in copyback
157
mode. If it is removed, it will be placed in writethrough mode.
158
 
159
Currently, block address translation is set up to map the virtual
160
0x00000000--0x7FFFFFFF to the physical range 0x00000000--0x7FFFFFFF. The
161
port relies on the hardware to raise exceptions when addressing
162
non-existent memory. Caching is not controllable on a finer grain.
163
 
164
 
165
Miscellaneous
166
 
167
The timer and clock drivers were patterned after the MVME162 and MVME152
168
ports.
169
 
170
At this time, we do not have an MPCI layer for the MVME167. We are planning
171
to write one.
172
 
173
This port supplies its own fatal_error_handler, which attempts to print some
174
error message through 167Bug (on the Serial Port 1/Console on the MVME712M).
175
 
176
 
177
Host System
178
-----------
179
 
180
The port was initially developed on an RS-6000 running AIX 4.2. The following
181
tools were used:
182
 
183
    - GNU gcc 2.8.1 configured for a powerpc-ibm-aix4.2.0.0 host and
184
      m68k-rtems target;
185
    - GNU binutils 2.9.1 configured for a powerpc-ibm-aix4.2.0.0 host and
186
      m68k-rtems target;
187
 
188
It was also tested on a Pentium II-based PC running Windows NT Workstation 4.0
189
and the Cygnus Cygwin32 release b20.1 environment, with the following tools:
190
 
191
    - EGCS 1.1.1 configured for a i586-cygwin32 host and m68k-rtems target;
192
    - GNU binutils 2.9.4 configured for a i586-cygwin32 host and m68k-rtems
193
      target;
194
 
195
With the latter environment, be patient; builds take a very looong time...
196
 
197
Current development is done on a Pentium III PC running RedHat Linux 6.1.
198
At the time this README was composed, the latest working compiler that was
199
used successfully was gcc version 2.96 20000213 (experimental). Both the C
200
and C++ compilers were working. Binutils 2.9.1 are used.
201
 
202
 
203
Known Problems
204
--------------
205
 
206
The cdtest will not run with interrupt-driven I/O. The reason is that the
207
constructors for the static objects are called at boot time when the
208
interrupts are still disabled. The output buffer fills up, but never empties,
209
and the application goes into an infinite loop waiting for buffer space. This
210
should have been documented in the rtems/c/src/tests/PROBLEMS file. The moral
211
of this story is: do not do I/O from the constructors or destructors of static
212
objects.
213
 
214
The cpuuse and malloctest tests do not work properly, either with polled I/O
215
or interrupt-driven I/O. They are known not to work with interrupt-driven I/O,
216
but should work with polled I/O?
217
 
218
Output stops prematurely in the termios test when the console is operating in
219
interrupt-driven mode because the serial port is re-initialized before all
220
characters in the last raw output buffer are sent. Adding calls to tcdrain()
221
in the test task helps, but it does not solve the problem. What happens is
222
that the CD2401 raises a transmit interrupt when the last character in the
223
DMA buffer is written into the transmit FIFO, not when the last character
224
has been transmitted. When tcdrain() returns, there might be up to 16
225
characters in the output FIFO. The call to tcsetattr() causes the serial port
226
to re-initialize, at which point the output FIFO is cleared. We could not find
227
a way to detect whether characters are still in the FIFO and to wait for them
228
to be transmitted.
229
 
230
The first raw buffer to be transmitted after the console is re-initialized
231
with tcsetattr() is garbled. At this time, it does not seem worth while to
232
track this problem down.
233
 
234
In the stackchk test, an access fault exception is raised after the stack is
235
blown. This is one case were overwritting the first or last 16 bytes of the
236
stack does cause problems (but hey, an exception occurred, which is better
237
than propagating the error).
238
 
239
In the stackchk test, an access fault exception is raised after the stack is
240
blown. This is one case were overwritting the first or last 16 bytes of the
241
stack does cause problems (but hey, an exception occurred, which is better
242
than propagating the error).
243
 
244
When using interrupt-driven I/O, psx08 produces all the expected output, but
245
it does not return control to 167Bug. Is this test supposed to work with
246
interrupt-driven console I/O?
247
 
248
 
249
What's new
250
----------
251
 
252
Support for Java is being actively worked on.
253
 
254
 
255
Thanks
256
------
257
 
258
- to On-Line Applications Research Corporation (OAR) for developing
259
RTEMS and making it available on a Technology Transfer basis;
260
 
261
- to FSF and Cygnus Support for great free software;
262
 
263
 
264
Test Configuration
265
------------------
266
 
267
Board:                Motorola MVME167
268
CPU:                  Motorola MC68040
269
Clock Speed:          25 MHz
270
RAM:                  4 MBytes of 32-bit DRAM with parity
271
Cache Configuration:  Instruction cache on; data cache on, copyback mode.
272
Times Reported in:    microseconds
273
Timer Source:         VMEchip2 Tick Timer 1
274
GCC Flags:            -m68040 -g -O4 -fomit-frame-pointer
275
Console:              Operate in polled mode. Set CD2401_POLLED_IO to 1 in
276
                      rtems/c/src/lib/libbsp/m68k/mvme167/console/console.c.
277
 
278
 
279
Test Results
280
------------
281
 
282
Single processor tests:  All tests passed, except the following ones:
283
 
284
  - paranoia required the FPSP and the default variants of libm (and libc and
285
    libgcc) for us. It may work with the msoft-float variants for you, but it
286
    does require the FPSP.
287
 
288
  - cpuuse and malloctest did not work.
289
 
290
  - The stackchk test got an access fault exception before the RTEMS stack
291
    checker had had a chance to detect the corrupted stack.
292
 
293
 
294
Multi-processort tests:  not applicable -- No MPCI layer yet.
295
 
296
 
297
Timing tests:
298
 
299
        Context Switch
300
 
301
    context switch: no floating point contexts 12
302
    context switch: self 3
303
    context switch: to another task 3
304
    fp context switch: restore 1st FP task 14
305
    fp context switch: save idle, restore initialized 5
306
    fp context switch: save idle, restore idle 15
307
    fp context switch: save initialized, restore initialized 5
308
 
309
 
310
  Miscellaneous
311
 
312
    _ISR_Disable 1
313
    _ISR_Flash 0
314
    _ISR_Enable 0
315
 
316
    _Thread_Disable_dispatch 0
317
    _Thread_Enable_dispatch 3
318
    _Thread_Set_state 9
319
    _Thread_Disptach (NO FP) 16
320
    _Thread_Resume 6
321
    _Thread_Unblock 4
322
    _Thread_Ready 6
323
    _Thread_Get 3
324
    _Thread_Get: invalid id 0
325
 
326
    _Semaphore_Get 2
327
 
328
 
329
        Task Manager
330
 
331
    rtems_task_create 56
332
    rtems_task_ident 106
333
    rtems_task_start 21
334
    rtems_task_restart: calling task 24
335
    rtems_task_restart: suspended task -- returns to caller 27
336
    rtems_task_restart: blocked task -- returns to caller 36
337
    rtems_task_restart: ready task -- returns to caller 27
338
    rtems_task_restart: suspended task -- preempts caller 40
339
    rtems_task_restart: blocked task -- preempts caller 51
340
    rtems_task_restart: ready task -- preempts caller 52
341
    rtems_task_delete: calling task 67
342
    rtems_task_delete: suspended task 52
343
    rtems_task_delete: blocked task 54
344
    rtems_task_delete: ready task 54
345
    rtems_task_suspend: calling task 23
346
    rtems_task_suspend: returns to caller 12
347
    rtems_task_resume: task readied -- returns to caller 13
348
    rtems_task_resume: task readied -- preempts caller 22
349
    rtems_task_set_priority: obtain current priority 8
350
    rtems_task_set_priority: returns to caller 16
351
    rtems_task_set_priority: preempts caller 34
352
    rtems_task_mode: obtain current mode 4
353
    rtems_task_mode: no reschedule 5
354
    rtems_task_mode: reschedule -- returns to caller 12
355
    rtems_task_mode: reschedule -- preempts caller 26
356
    rtems_task_get_note 8
357
    rtems_task_set_note 8
358
    rtems_task_wake_after: yield -- returns to caller 4
359
    rtems_task_wake_after: yields -- preempts caller 19
360
    rtems_task_wake_when 36
361
 
362
 
363
        Interrupt Manager
364
 
365
    interrupt entry overhead: returns to nested interrupt 5
366
    interrupt entry overhead: returns to interrupted task 9
367
    interrupt entry overhead: returns to preempting task 7
368
    interrupt exit overhead: returns to nested interrupt 1
369
    interrupt exit overhead: returns to interrupted task 2
370
    interrupt exit overhead: returns to preempting task 26
371
 
372
 
373
        Clock Manager
374
 
375
    rtems_clock_set 20
376
    rtems_clock_get <1
377
    rtems_clock_tick 8
378
 
379
 
380
        Timer Manager
381
 
382
    rtems_timer_create 8
383
        rtems_timer_ident 104
384
    rtems_timer_delete: inactive 12
385
    rtems_timer_delete: active 13
386
    rtems_timer_fire_after: inactive 17
387
    rtems_timer_fire_after: active 18
388
    rtems_timer_fire_when: inactive 23
389
    rtems_timer_fire_when: active 23
390
    rtems_timer_reset: inactive 16
391
    rtems_timer_reset: active 17
392
    rtems_timer_cancel: inactive 9
393
    rtems_timer_cancel: active 10
394
 
395
 
396
        Semaphore Manager
397
 
398
    rtems_semaphore_create 22
399
    rtems_semaphore_ident 119
400
    rtems_semaphore_delete 24
401
    rtems_semaphore_obtain: available 10
402
    rtems_semaphore_obtain: not available -- NO_WAIT 10
403
    rtems_semaphore_obtain: not available -- caller blocks 35
404
    rtems_semaphore_release: no waiting tasks 11
405
    rtems_semaphore_release: task readied -- returns to caller 17
406
    rtems_semaphore_release: task readied -- preempts caller 27
407
 
408
 
409
        Message Queue Manager
410
 
411
    rtems_message_queue_create 85
412
    rtems_message_queue_ident 103
413
    rtems_message_queue_delete 32
414
    rtems_message_queue_send: no waiting tasks 25
415
    rtems_message_queue_send: task readied -- returns to caller 27
416
    rtems_message_queue_send: task readied -- preempts caller 39
417
    rtems_message_queue_urgent: no waiting tasks 26
418
    rtems_message_queue_urgent: task readied -- returns to caller 28
419
    rtems_message_queue_urgent: task readied -- preempts caller 39
420
    rtems_message_queue_broadcast: no waiting tasks 13
421
    rtems_message_queue_broadcast: task readied -- returns to caller 37
422
    rtems_message_queue_broadcast: task readied -- preempts caller 45
423
    rtems_message_queue_receive: available 21
424
    rtems_message_queue_receive: not available -- NO_WAIT 11
425
    rtems_message_queue_receive: not available -- caller blocks 37
426
    rtems_message_queue_flush: no messages flushed 7
427
    rtems_message_queue_flush: messages flushed 10
428
 
429
 
430
        Event Manager
431
 
432
    rtems_event_send: no task readied 7
433
    rtems_event_send: task readied -- returns to caller 18
434
    rtems_event_send: task readied -- preempts caller 29
435
    rtems_event_receive: obtain current events <1
436
    rtems_event_receive: available 10
437
    rtems_event_receive: not available -- NO_WAIT 5
438
    rtems_event_receive: not available -- caller blocks 28
439
 
440
 
441
        Signal Manager
442
 
443
    rtems_signal_catch 5
444
    rtems_signal_send: returns to caller 15
445
    rtems_signal_send: signal to self 24
446
    exit ASR overhead: returns to calling task 20
447
    exit ASR overhead: returns to preempting task 21
448
 
449
 
450
        Partition Manager
451
 
452
    rtems_partition_create 30
453
    rtems_partition_ident 103
454
    rtems_partition_delete 14
455
    rtems_partition_get_buffer: available 14
456
    rtems_partition_get_buffer: not available 9
457
    rtems_partition_return_buffer 18
458
 
459
 
460
        Region Manager
461
 
462
    rtems_region_create 25
463
    rtems_region_ident 105
464
    rtems_region_delete 13
465
    rtems_region_get_segment: available 13
466
    rtems_region_get_segment: not available -- NO_WAIT 17
467
    rtems_region_get_segment: not available -- caller blocks 49
468
    rtems_region_return_segment: no waiting tasks 16
469
    rtems_region_return_segment: task readied -- returns to caller 35
470
    rtems_region_return_segment: task readied -- preempts caller 58
471
 
472
 
473
        Dual-Ported Memory Manager
474
 
475
    rtems_port_create 13
476
          rtems_port_ident 103
477
    rtems_port_delete 14
478
    rtems_port_external_to_internal 5
479
    rtems_port_internal_to_external 5
480
 
481
 
482
        IO Manager
483
 
484
    rtems_io_initialize <1
485
    rtems_io_open <1
486
    rtems_io_close <1
487
    rtems_io_read <1
488
    rtems_io_write <1
489
    rtems_io_control <1
490
 
491
 
492
        Rate Monotonic Manager
493
 
494
    rtems_rate_monotonic_create 15
495
          rtems_rate_monotonic_ident 103
496
    rtems_rate_monotonic_cancel 16
497
    rtems_rate_monotonic_delete: active 18
498
    rtems_rate_monotonic_delete: inactive 20
499
    rtems_rate_monotonic_period: initiate period -- returns to caller 23
500
    rtems_rate_monotonic_period: conclude periods -- caller blocks 25
501
    rtems_rate_monotonic_period: obtain status 13
502
 
503
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.