source: rtems/c/src/lib/libbsp/m68k/mvme167/README @ df49c60

4.104.114.84.95
Last change on this file since df49c60 was df49c60, checked in by Joel Sherrill <joel.sherrill@…>, on 06/12/00 at 15:00:15

Merged from 4.5.0-beta3a

  • Property mode set to 100644
File size: 18.2 KB
Line 
1#
2#  $Id$
3#
4
5This is a README file for the MVME167 port of RTEMS 4.5.0.
6
7Please send any comments, improvements, or bug reports to:
8
9Charles-Antoine Gauthier
10charles.gauthier@nrc.ca
11or
12
13Darlene Stewart
14Darlene.Stewart@nrc.ca
15
16Software Engineering Group
17Institute for Information Technology
18National Research Council of Canada
19Ottawa, ON, K1A 0R6
20Canada
21
22
23WARNING:
24--------
25
26The network driver is currently being worked on. It is somewhat functional,
27but it does run out of buffers under certain conditions. The code is
28also undergoing a substantial reorganization. Before making any changes,
29you should check with us for the availability of updates.
30
31Note from Joel:  The ttcp performance reported is very nice even if the
32driver is still early in its life. :)
33
34 
35
36Disclaimer
37----------
38
39The National Research Council of Canada is distributing this RTEMS
40board support package for the Motorola MVME167 as free software; you
41can redistribute it and/or modify it under terms of the GNU General
42Public License as published by the Free Software Foundation; either
43version 2, or (at your option) any later version.  This software is
44distributed in the hope that it will be useful, but WITHOUT ANY
45WARRANTY; without even the implied warranty of MERCHANTABILITY or
46FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
47for more details. You should have received a copy of the GNU General
48Public License along with RTEMS; see file COPYING. If not, write to
49the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
50
51Under no circumstances will the National Research Council of Canada
52nor Her Majesty the Queen in right of Canada assume any liablility
53for the use this software, nor any responsibility for its quality or
54its support.
55
56
57Installation
58------------
59
60Nothing unique to the MVME167. It uses the standard build process for
61m68k targets. You will need to edit linkcmds to put in the start address
62of your board. We do TFTP transfers to our target. The mvme167.cfg file
63builds only the ELF images, which we download to the target, skipping
64over the first 0x54 bytes; Motorola S-records are not generated. Edit
65this file if you want S-records.
66
67
68Port Description
69Console driver
70
71---------------
72
73This BSP includes an termios-capable console driver that supports all
74four serial ports on the MVME167 model. The RTEMS console, /dev/console,
75corresponds to channel 1 in the CD2401. This corresponds to Serial Port
762/TTY01 on the MVME712M. Serial Port 1/Console is normally used by 167Bug;
77do not open /dev/tty00 if you are debugging using 167Bug.
78
79The console is initialized with whatever parameters are set up in termios
80before it calls the firtOpen driver callback, EXCEPT THAT HARDWARE
81HANDSHAKING IS TURNED OFF, i.e. CLOCAL is set in the struct termios
82c_cflag field. We use 3-wire cables for I/O, and find hardware handshaking
83a pain. If you enable hardware handshaking, you must drive CTS* low on the
84CD2401 for output to occur. If the port is in the DTE configuration, you
85must drive the RS-232 CTS line to space; if the port is in the DCE
86configuration, you must drive the RS-232 RTS line to space.
87
88Limited support is provided for polled terminal I/O. This is used when
89running the timing tests. Set the CD2401_POLLED_IO manifest constant to 1
90in rtems/c/src/lib/libbsp/m68k/mvme167/console/console.c to enable polled
91I/O. In this case, I/O is done through 167Bug, usually to the Serial Port
921/Console port. Interrupt-driven and polled I/O cannot be mixed in the
93MVME167.
94
95
96Floating-point
97
98The MC68040 has a built-in FPU. This FPU does not implement all the
99instruction of the MC68881/MC68882 floating-point coprocessors in
100hardware. The -m68040 compilation options instructs gcc to not generate
101the missing instructions. All of the RTEMS code is built this way. Some
102of the missing functionality must be supplied by external libraries. The
103required functions are part of libgcc.a.
104
105The issue gets complicated because libc, libm and libgcc do not come as
106m68040-specific variants. The default variants of these libraries are for the
107MC68020 and MC68030. There are specific variants for the MC68000 (which has
108limited addressing modes with respect to later family members), and specific
109variants for systems without a floating-point unit, either a built-in FPU or
110a coprocessor. These latter variants will be referred to as the msoft-float
111variants. There is a msoft-float variant for the MC68000, and one for the
112other family members.
113
114The default variants of libc, libm and libgcc appear to work just fine for the
115MC68040, AS LONG AS NO FLOATING POINT FUNCTIONS ARE CALLED. In particular,
116printf() and scanf() raise unimplemented floating-point instruction exceptions
117at run time. Expect almost every function that must compute a floating-point
118result to also raise unimplemented floating-point instruction exceptions. Do
119not use these variants if your application does any floating-point operations,
120unless you use the Motorola FPSP package (described further down).
121
122The msoft-float variants do print out floating-point numbers properly, but we
123have not tested them extensively, so use them with caution. In particular,
124the Paranoia test fails when linked with the msoft-float variants of the
125libraries; it goes into an infinite loop after milestone 40.
126
127MSOFT_FLOAT VARIANTS MUST BE USED TOGETHER. If you use the msoft-float variant
128of libc and libm, you must also linked with the msoft-float variant of libgcc,
129otherwise calls such as printf() print out floating-point values incorrectly.
130
131RTEMS comes with the Motorola FPSP (Floating-Point Support Package) for the
132MC68040 (rtems/c/src/lib/libcp/m68k/m68040/fpsp). This package emulates the
133missing floating-point instructions. It is built automatically for the
134MVME167 and installed in bsp_start().
135
136The FPSP allows the use of the default variants of libc, libm and libgcc.
137It also runs the paranoia test properly, and prints out the correct results.
138It should probably be used in preference to the msoft-float libraries, as it
139appears to work better. The disadvantage of the FPSP is that it increases the
140size of the executable by about 60KB and that it relies on run time
141exceptions.
142
143If your application does not do any floating-point operations at all, you
144should consider disabling the FPSP. In bsp_start(), emove the call to
145M68KFPSPInstallExceptionHandlers(), and uncomment the three lines in
146mvme167.cfg that redefine which variants of libc, libm and libgcc to link
147against.
148
149
150Cache Control and Memory Mapping
151
152If Jumper J1-7 is installed, the data cache will be turned on. If Jumper
153J1-6 is installed, the instruction cache will be turned on. Removing the
154jumper causes the corresponding cache to be left disabled.
155
156If Jumper J1-5 is installed, the data cache will be placed in copyback
157mode. If it is removed, it will be placed in writethrough mode.
158
159Currently, block address translation is set up to map the virtual
1600x00000000--0x7FFFFFFF to the physical range 0x00000000--0x7FFFFFFF. The
161port relies on the hardware to raise exceptions when addressing
162non-existent memory. Caching is not controllable on a finer grain.
163
164
165Miscellaneous
166
167The timer and clock drivers were patterned after the MVME162 and MVME152
168ports.
169
170At this time, we do not have an MPCI layer for the MVME167. We are planning
171to write one.
172
173This port supplies its own fatal_error_handler, which attempts to print some
174error message through 167Bug (on the Serial Port 1/Console on the MVME712M).
175
176
177Host System
178-----------
179
180The port was initially developed on an RS-6000 running AIX 4.2. The following
181tools 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
188It was also tested on a Pentium II-based PC running Windows NT Workstation 4.0
189and 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
195With the latter environment, be patient; builds take a very looong time...
196
197Current development is done on a Pentium III PC running RedHat Linux 6.1.
198At the time this README was composed, the latest working compiler that was
199used successfully was gcc version 2.96 20000213 (experimental). Both the C
200and C++ compilers were working. Binutils 2.9.1 are used.
201
202
203Known Problems
204--------------
205
206The cdtest will not run with interrupt-driven I/O. The reason is that the
207constructors for the static objects are called at boot time when the
208interrupts are still disabled. The output buffer fills up, but never empties,
209and the application goes into an infinite loop waiting for buffer space. This
210should have been documented in the rtems/c/src/tests/PROBLEMS file. The moral
211of this story is: do not do I/O from the constructors or destructors of static
212objects.
213
214The cpuuse and malloctest tests do not work properly, either with polled I/O
215or interrupt-driven I/O. They are known not to work with interrupt-driven I/O,
216but should work with polled I/O?
217
218Output stops prematurely in the termios test when the console is operating in
219interrupt-driven mode because the serial port is re-initialized before all
220characters in the last raw output buffer are sent. Adding calls to tcdrain()
221in the test task helps, but it does not solve the problem. What happens is
222that the CD2401 raises a transmit interrupt when the last character in the
223DMA buffer is written into the transmit FIFO, not when the last character
224has been transmitted. When tcdrain() returns, there might be up to 16
225characters in the output FIFO. The call to tcsetattr() causes the serial port
226to re-initialize, at which point the output FIFO is cleared. We could not find
227a way to detect whether characters are still in the FIFO and to wait for them
228to be transmitted.
229
230The first raw buffer to be transmitted after the console is re-initialized
231with tcsetattr() is garbled. At this time, it does not seem worth while to
232track this problem down.
233
234In the stackchk test, an access fault exception is raised after the stack is
235blown. This is one case were overwritting the first or last 16 bytes of the
236stack does cause problems (but hey, an exception occurred, which is better
237than propagating the error).
238
239In the stackchk test, an access fault exception is raised after the stack is
240blown. This is one case were overwritting the first or last 16 bytes of the
241stack does cause problems (but hey, an exception occurred, which is better
242than propagating the error).
243
244When using interrupt-driven I/O, psx08 produces all the expected output, but
245it does not return control to 167Bug. Is this test supposed to work with
246interrupt-driven console I/O?
247
248
249What's new
250----------
251
252Support for Java is being actively worked on.
253
254
255Thanks
256------
257
258- to On-Line Applications Research Corporation (OAR) for developing
259RTEMS and making it available on a Technology Transfer basis;
260
261- to FSF and Cygnus Support for great free software;
262
263
264Test Configuration
265------------------
266
267Board:                Motorola MVME167
268CPU:                  Motorola MC68040
269Clock Speed:          25 MHz
270RAM:                  4 MBytes of 32-bit DRAM with parity
271Cache Configuration:  Instruction cache on; data cache on, copyback mode.
272Times Reported in:    microseconds
273Timer Source:         VMEchip2 Tick Timer 1
274GCC Flags:            -m68040 -g -O4 -fomit-frame-pointer
275Console:              Operate in polled mode. Set CD2401_POLLED_IO to 1 in
276                      rtems/c/src/lib/libbsp/m68k/mvme167/console/console.c.     
277
278
279Test Results
280------------
281
282Single 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                         
294Multi-processort tests:  not applicable -- No MPCI layer yet.
295
296
297Timing 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
Note: See TracBrowser for help on using the repository browser.