source: rtems/c/src/lib/libbsp/powerpc/mbx8xx/README @ 39ee704e

4.115
Last change on this file since 39ee704e was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 17.1 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
5Charles-Antoine Gauthier
6charles.gauthier@nrc.ca
7
8or
9
10Darlene Stewart
11Darlene.Stewart@nrc.ca
12 
13Software Engineering Group
14Institute for Information Technology
15National Research Council of Canada
16Ottawa, ON, K1A 0R6
17Canada 
18
19
20Disclaimer
21----------
22
23The National Research Council of Canada is distributing this RTEMS
24board support package for the Motorola MBX860 and MBX821 as free
25software; you can redistribute it and/or modify it under terms of
26the GNU General Public License as published by the Free Software
27Foundation; either version 2, or (at your option) any later version.
28This software is distributed in the hope that it will be useful, but
29WITHOUT ANY WARRANTY; without even the implied warranty of
30MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
31General Public License for more details. You should have received a
32copy of the GNU General Public License along with RTEMS; see file
33COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
34Cambridge, MA 02139, USA.
35
36Under no circumstances will the National Research Council of Canada
37nor Her Majesty the Queen in right of Canada assume any liablility
38for the use this software, nor any responsibility for its quality or
39its support.
40
41
42Summary
43-------
44
45BSP NAME:           mbx8xx
46BOARD:              Motorola MBX860 and MBX821 Embedded Controllers
47BUS:                No backplane. On-board ISA, PCI, PC/104 and PCMCIA.
48CPU FAMILY:         PowerPC
49CPU:                PowerPC MPC860 or MPC821
50COPROCESSORS:       Built-in Motorola QUICC
51MODE:               32 bit mode
52
53DEBUG MONITOR:      EPPC-Bug
54
55PERIPHERALS
56===========
57TIMERS:             PIT / Timebase
58  RESOLUTION:       1 microsecond / frequency = clock-speed / 16
59SERIAL PORTS:       2 or 4 SCCs (SCC1 is hardwired for Ethernet)
60                    2 SMC
61                    1 SIO
62REAL-TIME CLOCK:    Many. Look at documentation.
63DMA:                Each SCC and SMC.
64VIDEO:              None on-board. MPC821 has a built-in LCD panel driver.
65SCSI:               None on-board.
66NETWORKING:         Ethernet (10 Mbps) on SCC1
67                   
68
69DRIVER INFORMATION
70==================
71CLOCK DRIVER:       yes
72CONSOLE DRIVER:     yes
73SHMSUPP:            N/A
74TIMER DRIVER:       yes
75NETWORK DRIVER:     yes
76
77NOTES
78=====
79On-chip resources:
80        SCC1            network or console
81        SCC2            serial port
82        SMC1            gdb debug console/application console
83        SMC2            application console
84        CLK1            network
85        CLK2            network
86        CLK3
87        CLK4
88        CLK5
89        CLK6
90        CLK7
91        CLK8
92        BRG1            console
93        BRG2            console
94        BRG3            console
95        BRG4            console
96        RTC
97        PIT             clock
98        TB
99        DEC
100        SWT     
101        *CS0            FLASH
102        *CS1            DRAM bank (onboard)
103        *CS2            DRAM bank 0 (1st half of DIMM)
104        *CS3            DRAM bank 1 (2nd half of DIMM)
105        *CS4            Battery-Backed SRAM
106        *CS5            QSPAN PCI
107        *CS6            QSPAN
108        *CS7            Boot ROM
109        UPMA
110        UPMB
111        IRQ0
112        IRQ1
113        IRQ2           
114        IRQ3           
115        IRQ4           
116        IRQ5   
117        IRQ6
118        IRQ7
119        IRQ_LVL0       
120        IRQ_LVL1
121        IRQ_LVL2
122        IRQ_LVL3
123        IRQ_LVL4
124        IRQ_LVL5
125        IRQ_LVL6
126        IRQ_LVL7
127       
128
129Board description
130-----------------
131Clock rate:     50MHz Entry level boards, 40 MHz others.
132Bus width:      8/32 bit Flash, 32 bit DRAM
133FLASH:          2-4MB, 120ns
134RAM:            4-16MB EDO, 60ns DRAM DIMM
135
136
137Installation
138------------
139
140All MBX821/MBX860 ports share the same source code base. The MPC821 does
141not have SCC3 and SCC4. Instead, it has an LCD panel driver. Otherwise,
142the MBX821 and MBX860 boards are essentially identical. Entry level boards
143do not have all connectors and peripheral devices present. This has no
144impact on the source code base; it merely means that some functionality
145is not available on these entry level boards. For the most part, the port
146uses the standard build process for powerpc targets. However, you must
147specify the EXACT model of MBX board that you are building for as the
148argument to the RTEMS_BSP make variable. If you do not, the build process
149will build for a MBX860-002. Look at rtems/make/custom/mbx8xx.cfg for the
150specific list of boards supported and their corresponding names. An
151example build command is:
152
153        make RTEMS_BSP=mbx821_001 VARIANT=DEBUG
154
155This will build the debug version of all RTEMS libraries, samples and tests
156(if the latter are enabled).
157
158The Software Engineering Group of the Institute for Information Technology
159only owns an MBX821-001 and MBX86-002. The only provided config files are
160mbx821_001.cfg and mbx860_002.cfg. A SPECIFIC CONFIG FILE IS REQUIRED. Use
161one of the provided files as a template to create a specific config file for
162another model.
163 
164We rely on EPPC-BUG to download to the targets. We use the "PLH" command.
165We enabled a TFTP deamon on our development host.
166
167
168Port Description
169Console driver
170---------------
171
172This BSP includes an termios-capable asynchronous serial line driver that
173supports SMC1, SMC2, SCC2, and SCC3 and SCC4 if present. The RTEMS console is
174selected in rtems/make/custom/mbx8xx.cfg with the CONSOLE_MINOR variable, or
175in NVRAM if that option is enabled in the rtems/make/custom/mbx8xx.cfg file.
176We normally run with the RTEMS application console on SMC2. SMC1 is used by
177the debugger.
178
179Support is provided for five different modes of operation:
180
181  1. polled I/O done by EPPC-Bug with termios support,
182  2. polled I/O done by EPPC-Bug without termios support,
183  3. polled I/O done by the supplied device driver with termios support,
184  4. polled I/O done by the supplied device driver without termios support,
185  5. interrupt-driven I/O done by the supplied device driver with termios
186     support.
187     
188If NVRAM_CONFIGURE is set to 1 in rtems/make/custom/mbx8xx.cfg, the mode of
189operation of the driver is determined at boot time from the values stored
190in the user area in NVRAM. See the Configuration Parameters section below for
191instructions on setting up NVRAM. Otherwise, the mode of operation of the
192serial driver is determined at build time in part by the value of the
193UARTS_IO_MODE constant in rtems/make/custom/mbx8xx.cfg. Edit the file to select
194the type of I/O desired before building RTEMS. The choices are:
195
196  0 - polled I/O done by the supplied device driver,
197  1 - interrupt-driven I/O done by the supplied device driver,
198  2 - polled I/O done by EPPC-Bug.
199 
200Also, if NVRAM_CONFIGURE is not set to 1 in rtems/make/custom/mbx8xx.cfg, set
201the value of UARTS_USE_TERMIOS to select whether termios should be used to
202perform buffering and input/output processing. Without termios support, input
203processing is limited to the substitution of LF for a received CR, and output
204processing is limited to the transmission of a CR following the transmission of
205a LF. The choices for UARTS_USE_TERMIOS are:
206
207  0 - do not use termios
208  1 - use termios
209
210In most real-time applications, the driver should be configured to use
211termios and interrupt-driven I/O. Special requirements may dictate otherwise.
212
213Polled I/O must be used when running the timing tests. It must also be used
214to run some other tests and some samples, such as the cdtest. Some tests
215change the interrupt mask and will hang interrupt-driven I/O indefinitely.
216Others, such as cdtest, perform console output from the static constructors
217before the console is opened, causing the test to hang. Still other tests
218produce output that is supposed to be in some specific order. For these
219tests, termios should not be used, as termios buffers output and the
220transmission of the buffers occur at somewhat unpredictable times.
221
222The real solution is to fix the tests so that they work with interrupt-driven
223I/O and termios.
224
225
226printk() and debug output
227-----------------------
228
229The implementation of printk() in RTEMS is mostly independent of most system
230services. The printk() function can therefore be used to print messages to a
231debug console, particularly when debugging startup code or device drivers,
232i.e. code that runs before the console driver is opened or that runs with
233interrupts disabled.
234
235Support is provided to send printk output to any port. Specify the desired
236port at build time in rtems/make/custom/mbx8xx.cfg by setting the value
237of PRINTK_MINOR to one of SMC1_MINOR, SMC2_MINOR, SCC2_MINOR, SCC3_MINOR,
238or SCC4_MINOR. Alternatively, if NVRAM_CONFIGURE is set to 1 in
239rtems/make/custom/mbx8xx.cfg, the printk port is selected based on data that
240is stored in the user area in NVRAM. See the Configuration Parameters section
241below for instructions on setting up NVRAM.
242
243Select the type of output desired for printk() by setting the value of
244PRINTK_IO_MODE in rtems/make/custom/mbx8xx.cfg. The choices are:
245
246  0 - polled I/O done by the supplied device driver,
247  1 - polled I/O done by the supplied device driver,
248  2 - polled I/O done by EPPC-Bug.
249 
250printk() does not use termios.
251
252If the printk() port is opened by RTEMS, then PRINK_IO_MODE mode must have
253the same value as UARTS_IO_MODE, otherwise the I/O functions will be in
254conflict. Interrupt-driven printk() output did not work, although we think
255that it should have. It would have been of dubious value anyways. If
256interrupt-driven I/O is selected (value of 1), the driver defaults to using
257polled I/O through the RTEMS driver.
258
259IMPORTANT: Polled I/O through the RTEMS driver requires that the driver be
260initialized. Consequently, to debug startup code using printk prior to the
261initialization of the serial driver, use mode 2: polled I/O through EPPC-Bug,
262and read the next section.
263
264
265EPPC-Bug and I/O
266----------------
267
268IMPORTANT: When using EPPC-Bug 1.1 for polled I/O, only the SMC1 port is
269usable. This is a deficiency of the firmware which may be fixed in later
270revision. When using this monitor with UARTS_IO_MODE set to 2, CONSOLE_MINOR
271must be set to SMC1_MINOR. Similarly, if PRINTK_IO_MODE set to 2,
272PRINTK_MINOR must be set to SMC1_MINOR. When UARTS_IO_MODE is set to 2,
273only SMC1 is usable.
274
275Be warned that when EPPC-Bug does I/O through a serial port, all interrupts
276get turned off in the SIMASK register! This is a definite bug in release 1.1
277of the firmware. It may have been fixed in later releases. EPPB-Bug does
278I/O through its debug port whenever it is given control, e.g. after a
279breakpoint is hit, not just when it is used to perform polled I/O on behalf
280of RTEMS applications. In particular, in our configuration, we have gdb
281communication with EPPC-Bug through SMC1.
282
283To solve this problem, whenever the BSP manipulates the SIMASK, it makes a
284copy of the written value in a global variable called 'simask_copy'. That
285value must be restored by GDB before execution resumes. The following commands
286placed in the .gdbinit file takes care of this:
287
288# GDB Initialization file for EPPC-Bug.
289
290define hook-stepi
291set language c
292set *(int *)0xFA200014=simask_copy
293set language auto
294end
295
296define hook-step
297set language c
298set *(int *)0xFA200014=simask_copy
299set language auto
300end
301
302define hook-continue
303set language c
304set *(int *)0xFA200014=simask_copy
305set language auto
306end
307
308define hook-nexti
309set language c
310set *(int *)0xFA200014=simask_copy
311set language auto
312end
313
314define hook-next
315set language c
316set *(int *)0xFA200014=simask_copy
317set language auto
318end
319
320define hook-finish
321set language c
322set *(int *)0xFA200014=simask_copy
323set language auto
324end
325
326IMPORTANT: When using EPPC-Bug on SMC1, either for debugging or for polled I/O,
327EPPCBUG_SMC1 must be defined in rtems/make/custom/mbx8xx.cfg, or the eppc_bug
328field set to non-zero in NVRAM. Defining this constant prevents the device
329driver from re-initializing SMC1. It also causes the network driver, the clock
330driver, and the asynchronous serial line driver to maintain simask_copy for use
331by gdb.
332
333Polled I/O through EPPC-Bug is pretty funky... If your are old enough, it might
334bring back fond memories of the days of 300 baud modems. If not, you can
335experience for yourself what the state of the art used to be.
336
337
338Floating-point
339--------------
340
341The MPC860 and MPC821 do not have floating-point units. All code should
342get compiled with the appropriate -mcpu flag. The nof variants of the gcc
343runtime libraries should be used for linking.
344
345
346Configuration Parameters
347------------------------
348
349If NVRAM_CONFIGURE is set in rtems/make/custom/mbx8xx.cfg, certain
350configuration parameters will be read from the first 31 bytes of the  NVRAM
351User Area, which starts at 0xFA001000. The user is responsible for writing
352the appropriate values in NVRAM (via EPPC-Bug). The paramaters
353that are configurable and their default settings are described below.
354               
355  Cache Mode (0xFA001000 - 1 byte)
356    Set the following bits in the byte to control the caches:
357      bit 0
358        0 - data cache disable
359        1 - data cache enable
360      bit 1
361        0 - instruction cache disable
362        1 - instruction cache enable
363    If enabled, all of RAM except for the last 512 KB will be cached using
364    copyback mode. The last 512 KB of RAMis for the use of EPPC-Bug.
365   
366  Console driver I/O mode (0xFA001001 - 1 byte)
367    Set the following bits in the byte to set the desired I/O mode
368    for the rtems ports:
369      bit 0
370        0 - do not use termios
371        1 - use termios
372      bit 2 & 1
373        00 - polled I/O through RTEMS driver
374        01 - interrupt-driven I/O
375        10 - polled I/O through EPPC-Bug
376    Set the following bits in the byte to set the desired I/O mode
377    for printk:
378      bit 5 & 4
379        00 - polled I/O through RTEMS driver
380        01 - polled I/O through RTEMS driver
381        10 - polled I/O through EPPC-Bug
382
383  Console driver ports (0xFA001002 - 1 byte)
384    Set the following bits in the byte to select the console and printk ports:
385    bit 2, 1  & 0 select the RTEMS console port
386        000 - /dev/tty0, SMC1
387        001 - /dev/tty1, SMC2
388        011 - /dev/tty2, SCC2
389        100 - /dev/tty3, SCC3
390        101 - /dev/tty4, SCC4
391    bit 6, 5 & 4 select the RTEMS printk port
392        000 - /dev/tty0, SMC1
393        001 - /dev/tty1, SMC2
394        011 - /dev/tty2, SCC2
395        100 - /dev/tty3, SCC3
396        101 - /dev/tty4, SCC4
397  If the printk port is the same as some other port that will be opened by an
398  RTEMS application, then the driver must use polled I/O, or the printk port
399  must not be used.
400
401  EPPC-Bug in use on SMC1 (0xFA001003 - 1 byte)
402    Set to non-zero to indicate that EPPC-Bug is using SMC1. This will prevent
403    the SMC1 port from being re-initialized.
404
405  IP Address (0xFA001004 - 4 bytes)
406    Write the hexadecimal representation of the IP address of the board in this
407    location, e.g. 192.168.1.2 = 0xC0A80102
408
409  Netmask (0xFA001008 - 4 bytes)
410    Write the hexadecimal representation of the netmask in this location
411    for example, 255.255.255.0 = 0xFFFFFF00
412
413  Ethernet Address (0xFA00100C - 6 bytes)
414    Write the Ethernet address of the board in this location
415
416  Processor ID (0xFA001012 - 2 bytes)
417    Reserved for future use
418               
419  RMA start (0xFA001014 - 4 bytes)
420    Reserved for future use
421               
422  VMA start (0xFA001018 - 4 bytes)
423    Reserved for future use
424               
425  RamSize (0xFA00101C - 4 bytes)
426    Reserved for future use
427
428
429Miscellaneous
430-------------
431
432All development was based on the eth_comm port.
433
434
435Host System
436-----------
437
438The port was developed on Pentiums II and III running RedHat Linux 6.0 and
4396.1. The following tools were used:
440
441    - GNU gcc snapshot dated 20000214 configured for powerpc-rtems;
442    - GNU binutils 2.10 configured for powerpc-rtems;
443
444Gcc 2.95.2 also worked. Gcc 2.95.1 will not compile the console driver with
445-O4 or -O3. Compile it manually with -O2.
446
447
448Known Problems
449--------------
450
451The cdtest will not run with interrupt-driven I/O. The reason is that the
452constructors for the static objects are called at boot time when the
453interrupts are still disabled. The output buffer fills up, but never empties,
454and the application goes into an infinite loop waiting for buffer space. This
455should have been documented in the rtems/c/src/tests/PROBLEMS file. The moral
456of this story is: do not do I/O from the constructors or destructors of static
457objects.
458
459When using interrupt-driven I/O, psx08 fails with an internal assertion error.
460
461
462What is new
463----------
464
465All known problems with use of the caches on the MBX860-002 and MBX821-001
466have been resolved.
467
468Configuration of the console and network is now possible at boot time through
469NVRAM parameters.
470
471
472Thanks
473------
474
475- to Jay Monkman (jmonkman@frasca.com) of Frasca International, Inc.
476  for his eth_comm port.
477 
478- to On-Line Applications Research Corporation (OAR) for developing
479  RTEMS and making it available on a Technology Transfer basis;
480
481- to the FSF and to Cygnus Support for great free software;
482
483
484Test Configuration
485------------------
486
487Board:                MBX821-001, MBX860-002
488CPU:                  Motorola MPC821, MPC860
489Clock Speed:          50 MHz, 40 MHz
490RAM:                  4 MBytes of 32-bit DRAM
491Cache Configuration:  Instruction cache on; data cache on, copyback mode.
492Times Reported in:    clock ticks: TMBCLK = system clock / 16.
493Timer Source:         Timebase clock
494GCC Flags:            -O4 -fno-keep-inline-functions -mcpu=(821/860)
495Console:              Operates in polled mode on SMC2. No I/O through EPPC-Bug.   
496
497
498Test Results
499------------
500
501Single processor tests:  All tests passed, except the following ones:
502 
503  - cpuuse and malloctest did not work.
504 
505  - The stackchk test got an access fault exception before the RTEMS stack
506    checker had had a chance to detect the corrupted stack.
507                         
508                         
509Multi-processort tests:  not applicable.
510
511
512Timing tests:
513        See the times-mbx821 and times-mbx860 files for the results of the
514        timing tests.
515
516
517Network tests:
518       Worked.
519
520
521
Note: See TracBrowser for help on using the repository browser.