source: rtems/c/src/lib/libbsp/powerpc/mbx8xx/README @ 310a2ec

4.104.114.84.95
Last change on this file since 310a2ec was 8ef3818, checked in by Joel Sherrill <joel.sherrill@…>, on 06/12/00 at 19:57:02

Patch from John Cotton <john.cotton@…>, Charles-Antoine Gauthier
<charles.gauthier@…>, and Darlene A. Stewart
<Darlene.Stewart@…> to add support for a number of very
significant things:

+ BSPs for many variations on the Motorola MBX8xx board series
+ Cache Manager including initial support for m68040

and PowerPC

+ Rework of mpc8xx libcpu code so all mpc8xx CPUs now use

same code base.

+ Rework of eth_comm BSP to utiltize above.

John reports this works on the 821 and 860

  • Property mode set to 100644
File size: 11.3 KB
Line 
1This is a README file for the MBX860/MBX821 port of RTEMS 4.5.0
2
3Please send any comments, improvements, or bug reports to:
4
5Darlene A. Stewart
6Software Engineering Group
7Institute for Information Technology
8National Research Council of Canada
9Ottawa, ON, K1A 0R6
10Canada
11
12Darlene.Stewart@nrc.ca
13 
14
15
16Disclaimer
17----------
18
19The National Research Council of Canada is distributing this RTEMS
20board support package for the Motorola MBX860 and MBX821 as free
21software; you can redistribute it and/or modify it under terms of
22the GNU General Public License as published by the Free Software
23Foundation; either version 2, or (at your option) any later version.
24This software is distributed in the hope that it will be useful, but
25WITHOUT ANY WARRANTY; without even the implied warranty of
26MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27General Public License for more details. You should have received a
28copy of the GNU General Public License along with RTEMS; see file
29COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
30Cambridge, MA 02139, USA.
31
32Under no circumstances will the National Research Council of Canada
33nor Her Majesty the Queen in right of Canada assume any liablility
34for the use this software, nor any responsibility for its quality or
35its support.
36
37
38Summary
39-------
40
41BSP NAME:           mbx8xx
42BOARD:              Motorola MBX860 and MBX821 Embedded Controllers
43BUS:                No backplane. On-board ISA, PCI, PC/104 and PCMCIA.
44CPU FAMILY:         PowerPC
45CPU:                PowerPC MPC860 or MPC821
46COPROCESSORS:       Built-in Motorola QUICC
47MODE:               32 bit mode
48
49DEBUG MONITOR:      EPPC-Bug
50
51PERIPHERALS
52===========
53TIMERS:             PIT / Timebase
54  RESOLUTION:       1 microsecond / frequency = clock-speed / 16
55SERIAL PORTS:       2 or 4 SCCs (SCC1 is hardwired for Ethernet)
56                    2 SMC
57                    1 SIO
58REAL-TIME CLOCK:    Many. Look at documentation.
59DMA:                Each SCC and SMC.
60VIDEO:              None on-board. MPC821 has a built-in LCD panel driver.
61SCSI:               None on-board.
62NETWORKING:         Ethernet (10 Mbps) on SCC1
63                   
64
65DRIVER INFORMATION
66==================
67CLOCK DRIVER:       yes
68CONSOLE DRIVER:     yes
69SHMSUPP:            N/A
70TIMER DRIVER:       yes
71NETWORK DRIVER:     yes
72
73NOTES
74=====
75On-chip resources:
76        SCC1            network or console
77        SCC2            serial port
78        SMC1            gdb debug console/application console
79        SMC2            application console
80        CLK1            network
81        CLK2            network
82        CLK3
83        CLK4
84        CLK5
85        CLK6
86        CLK7
87        CLK8
88        BRG1            console
89        BRG2            console
90        BRG3            console
91        BRG4            console
92        RTC
93        PIT             clock
94        TB
95        DEC
96        SWT     
97        *CS0            FLASH
98        *CS1            DRAM bank (onboard)
99        *CS2            DRAM bank 0 (1st half of DIMM)
100        *CS3            DRAM bank 1 (2nd half of DIMM)
101        *CS4            Battery-Backed SRAM
102        *CS5            QSPAN PCI
103        *CS6            QSPAN
104        *CS7            Boot ROM
105        UPMA
106        UPMB
107        IRQ0
108        IRQ1
109        IRQ2           
110        IRQ3           
111        IRQ4           
112        IRQ5   
113        IRQ6
114        IRQ7
115        IRQ_LVL0       
116        IRQ_LVL1
117        IRQ_LVL2
118        IRQ_LVL3
119        IRQ_LVL4
120        IRQ_LVL5
121        IRQ_LVL6
122        IRQ_LVL7
123       
124
125Board description
126-----------------
127Clock rate:     50MHz Entry level boards, 40 MHz others.
128Bus width:      8/32 bit Flash, 32 bit DRAM
129FLASH:          2-4MB, 120ns
130RAM:            4-16MB EDO, 60ns DRAM DIMM
131
132
133Installation
134------------
135
136All MBX821/MBX860 ports share the same source code base. The MPC821 does
137not have SCC3 and SCC4. Instead, it has an LCD panel driver. Otherwise,
138the MBX821 and MBX860 boards are essentially identical. Entry level boards
139do not have all connectors and peripheral devices present. This has no
140impact on the source code base; it merely means that some functionality
141is not available on these entry level boards. For the most part, the port
142uses the standard build process for powerpc targets. However, you must
143specify the EXACT model of MBX board that you are building for as the
144argument to the RTEMS_BSP make variable. If you do not, the build process
145will build for a MBX860-002. Look at rtems/make/custom/mbx8xx.cfg for the
146specific list of boards supported and their corresponding names. An
147example build command is:
148
149        make RTEMS_BSP=mbx821_001 all debug
150
151This will build the optimized and debug versions of all RTEMS libraries,
152samples and tests (if the latter are enabled).
153
154The Software Engineering Group of the Institute for Information Technology
155only owns an MBX821-001 and MBX86-002. The only provided config files are
156mbx821_001.cfg and mbx860_002.cfg. A SPECIFIC CONFIG FILE IS REQUIRED. Use
157one of the provided files as a template to create a specific config file for
158another model.
159 
160We rely on EPPC-BUG to download to the targets. We use the 'PLH" command.
161We enabled a TFTP deamon on our development host.
162
163
164Port Description
165Console driver
166---------------
167
168This BSP includes an termios-capable console driver that supports SMC1,
169SMC2, SCC2, and SCC3 and SCC4 if present. The RTEMS console is selected
170in rtems/make/custom/mbx8xx.cfg with the CONSOLE_MINOR variable. We
171normally run with the RTEMS application console on SMC1.
172
173Support is provided for polled and interrupt-driven terminal I/O. Interrupt-
174driven I/O is selected by setting the UARTS_USE_INTERRUPTS variable in
175rtems/make/custom/mbx8xx.cfg. If the variable is not set, or if it is set
176to zero, polled I/O is used. If the EPPCBUG_SMC1 variable is set in
177rtems/make/custom/mbx8xx.cfg, SMC1 will be used in polled mode with all
178I/O done by EPPC-Bug rather than the supplied device driver. This mode
179should be used if the application console is shared with EPPC-Bug.
180
181Polled I/O must be used when running the timing tests. It must also be used
182to run some other tests and some samples, such as the cdtest. Applications
183would normally use interrupt-driven I/O.
184
185
186EPPC-Bug and I/O
187----------------
188
189Be warned that when EPPC-Bug does I/O through a serial port, all interrupts
190get turned off in the SIMASK register! This is a definite bug in release 1.1
191of the firmware. It may have been fixed in later releases.
192
193To solve this problem that occurs when GDB communicates with EPPC-Bug,
194whenever the BSP manipulates the SIMASK, it makes copy of the written
195in a global variable called 'simask_copy'. That value must be restored by
196GDB before execution resumes. The following commands placed in the .gdbinit
197file takes care of this:
198
199# GDB Initialization file for EPPCBug.
200
201define hook-stepi
202set language c
203set *(int *)0xFA200014=simask_copy
204set language auto
205end
206
207define hook-step
208set language c
209set *(int *)0xFA200014=simask_copy
210set language auto
211end
212
213define hook-continue
214set language c
215set *(int *)0xFA200014=simask_copy
216set language auto
217end
218
219define hook-nexti
220set language c
221set *(int *)0xFA200014=simask_copy
222set language auto
223end
224
225define hook-next
226set language c
227set *(int *)0xFA200014=simask_copy
228set language auto
229end
230
231define hook-finish
232set language c
233set *(int *)0xFA200014=simask_copy
234set language auto
235end
236
237
238Floating-point
239--------------
240
241The MPC860 and MPC821 do not have floating-point units. All code should
242get compiled with the appropriate -mcpu flag. The nof variants of the gcc
243runtime libraries should be used for linking.
244
245
246Miscellaneous
247-------------
248
249All development was based on the eth_comm port.
250
251
252Host System
253-----------
254
25512345678901234567890123456789012345678901234567890123456789012345678901234567890
256The port was developed on Pentiums II and III running RedHat Linux 6.0 and
2576.1. The following tools were used:
258
259    - GNU gcc snapshot dated 19991208 configured for powerpc-rtems;
260    - GNU binutils 2.9.1 configured for powerpc-rtems;
261
262Gcc 2.95.2 also worked. Gcc 2.95.1 will not compile the console driver with
263-O4 or -O3. Compile it manually with -O2.
264
265
266Known Problems
267--------------
268
269The cdtest will not run with interrupt-driven I/O. The reason is that the
270constructors for the static objects are called at boot time when the
271interrupts are still disabled. The output buffer fills up, but never empties,
272and the application goes into an infinite loop waiting for buffer space. This
273should have been documented in the rtems/c/src/tests/PROBLEMS file. The moral
274of this story is: do not do I/O from the constructors or destructors of static
275objects.
276
277The cpuuse and malloctest tests do not work properly, either with polled I/O
278or interrupt-driven I/O. They are known not to work with interrupt-driven I/O,
279but should work with polled I/O?
280
281Output stops prematurely in the termios test when the console is operating in
282interrupt-driven mode because the serial port is re-initialized before all
283characters in the last raw output buffer are sent. Adding calls to tcdrain()
284in the test task helps, but it does not solve the problem. What happens is
285that the CD2401 raises a transmit interrupt when the last character in the
286DMA buffer is written into the transmit FIFO, not when the last character
287has been transmitted. When tcdrain() returns, there might be up to 16
288characters in the output FIFO. The call to tcsetattr() causes the serial port
289to re-initialize, at which point the output FIFO is cleared. We could not find
290a way to detect whether characters are still in the FIFO and to wait for them
291to be transmitted.
292
293The first raw buffer to be transmitted after the console is re-initialized
294with tcsetattr() is garbled. At this time, it does not seem worth while to
295track this problem down.
296
297In the stackchk test, an access fault exception is raised after the stack is
298blown. This is one case were overwritting the first or last 16 bytes of the
299stack does cause problems (but hey, an exception occurred, which is better
300than propagating the error).
301
302In the stackchk test, an access fault exception is raised after the stack is
303blown. This is one case were overwritting the first or last 16 bytes of the
304stack does cause problems (but hey, an exception occurred, which is better
305than propagating the error).
306
307When using interrupt-driven I/O, psx08 produces all the expected output, but
308it does not return control to 167Bug. Is this test supposed to work with
309interrupt-driven console I/O?
310
311
312What's new
313----------
314
315All known problems with use of the caches on the MBX860-002 and MBX821-001
316have been resolved.
317
318
319Thanks
320------
321
322- to Jay Monkman (jmonkman@frasca.com) of Frasca International, Inc.
323  for his eth_comm port.
324 
325- to On-Line Applications Research Corporation (OAR) for developing
326  RTEMS and making it available on a Technology Transfer basis;
327
328- to the FSF and to Cygnus Support for great free software;
329
330
331Test Configuration
332------------------
333
334Board:                MBX821-001, MBX860-002
335CPU:                  Motorola MPC821, MPC860
336Clock Speed:          50 MHz, 40 MHz
337RAM:                  4 MBytes of 32-bit DRAM
338Cache Configuration:  Instruction cache on; data cache on, copyback mode.
339Times Reported in:    clock ticks: TMBCLK = system clock / 16.
340Timer Source:         Timebase clock
341GCC Flags:            -O4 -fno-keep-inline-functions -mcpu=(821/860)
342Console:              Operates in polled mode on SMC2. No I/O through EPPC-Bug.   
343
344
345Test Results
346------------
347
348Single processor tests:  All tests passed, except the following ones:
349
350  - paranoia required the FPSP and the default variants of libm (and libc and
351    libgcc) for us. It may work with the msoft-float variants for you, but it
352    does require the FPSP.
353 
354  - cpuuse and malloctest did not work.
355 
356  - The stackchk test got an access fault exception before the RTEMS stack
357    checker had had a chance to detect the corrupted stack.
358                         
359                         
360Multi-processort tests:  not applicable -- No MPCI layer yet.
361
362
363Timing tests:
364        See the times-mbx821 and times-860 files for the results of the
365        timing tests.
366
367
368Network tests:
369       Network driver is being implemented.
370
371
372
Note: See TracBrowser for help on using the repository browser.