Back to home page

LXR

 
 

    


Warning, /bsps/powerpc/beatnik/README.md is written in an unsupported language. File is not indexed.

0001 Beatnik
0002 =======
0003 
0004  Valuable information was obtained from the following drivers
0005    netbsd: Allegro Networks Inc; Wasabi Systems Inc.
0006     linux: MontaVista, Software, Inc; Chris Zankel, Mark A. Greer.
0007                Matthew Dharm, rabeeh, Manish Lachwani, Ralf Baechle.  
0008     rtems: Brookhaven National Laboratory; Shuchen Kate Feng
0009  This BSP also builds on top of the work of others who have contributed
0010  to similar RTEMS (powerpc) BSPs, most notably Eric Valette, Eric Norum
0011  and others.
0012 
0013  In particular, the Author wishes to thank Shuchen Kate Feng (BNL) for many
0014  inspiring discussions and Dayle Kotturi (SLAC) for her contributions, support
0015  and extensive testing.
0016 
0017 
0018 LICENSE
0019 -------
0020 See ./LICENSE file.
0021 
0022 Note that not all files that are part of this BSP were written by
0023 me (most notably, the ethernet drivers if_gfe [netbsd port] and
0024 if_em [freebsd port]). Consult individual file headers for copyright
0025 and authorship information.
0026 
0027 
0028 BUILD INFO
0029 ----------
0030 (relevant only if you received this BSP unbundled from the RTEMS distribution)
0031 
0032   prepare:
0033   - get up-to date RTEMS release
0034   - untar beatnik.tgz into c/src/lib/libbsp/powerpc
0035   - copy beatnik.cfg into make/custom
0036   - patch c/src/lib/libsp/powerpc/acinclude.ac
0037   - run 'bootstrap' from top directory; make sure RTEMS
0038     autoXXX are found first in your PATH
0039   configure:
0040   - configure with your favorite options. BSP name is 'beatnik'
0041     I recommend passing RTEMS_CFLAGS=-g to 'configure'
0042 
0043 
0044 TARGET
0045 ------
0046 Even though this BSP is binary compatible with the MVME5500 it's primary
0047 target was and is the MVME6100 board which in some respects is quite different.
0048 In particular, the discovery chip and the VME bridge exhibit significant
0049 differences.
0050 I am sometimes asked why this BSP provides yet another port of the gfe
0051 and em BSD drivers (which had previously been ported for the mvme5500
0052 BSP by Shuchen Kate Feng [BNL]). The answer is simply a matter of time:
0053 Once support for the 6100 board was completed I found it easier to use
0054 the set of 'quick-and-dirty' wrappers (found in network/porting) that I had
0055 developed for other projects and to do a new port from scratch using that
0056 framework rather than modifying the mvme5500 BSP's drivers. mvme5500 support was
0057 added to this BSP because we own a few of those boards we occasionally
0058 play with but we don't want to build and support an additional BSP for them.
0059 An important detail -- hardware cache snooping -- was borrowed from
0060 Shuchen Kate Feng's gfe driver port, though.
0061 
0062 
0063 HARDWARE SUPPORT
0064 ---------------
0065 (some of the headers mentioned below contain more
0066 detailed information)
0067 
0068 NOTE:  The BSP supports both, the mvme6100 and the mvme5500 boards.
0069        It detects relevant hardware at run-time.
0070 
0071 WARNING: It is extremely important that a MOTLoad "waitProbe", "netShut"
0072          sequence be executed before booting RTEMS. Otherwise, network
0073          interface interrupt handlers installed by MOTLoad may cause memory
0074          corruption
0075 
0076 CONSOLE: 2 serial devices, UART driver from 'shared' - no surprises
0077        ("/dev/ttyS0", [="/dev/console"], "/dev/ttyS1"). (Only
0078        /dev/ttyS0 is accessible from the front panel.)
0079 
0080 CLOCK: Decrementer, same as other PPC BSPs. (FIXME: a discovery timer
0081        could be used.)
0082 
0083 PIC (interrupt controller) (bsp/irq.h): Marvell hostbridge
0084        does not implement interrupt priorities. The driver supports
0085        priorities in software (masking lower priority lines during
0086        execution of higher priority ISR). I believe the design of the
0087        IRQ subsystem is as efficient as possible with focus on low
0088        latencies.
0089        In addition to the rtems IRQ API, calls are available to
0090        change IRQ priority and to enable/disable interrupts at the PIC.
0091 
0092 EXCEPTIONS: (bspException.h) Routines to install a user callback
0093        for (PPC) exception handling.
0094 
0095 PCI (bsp/pci.h): The BSP hides the fact that there are effectively
0096        two 'root' busses (AKA 'hoses') behind the discovery bridge.
0097            Devices are addressed by bus/slot/function-triples and the PCI
0098            subsystem transparently figures out what hose to use.
0099        In addition to rtems' PCI API, a call is available to scan
0100        all devices executing a user callback on each device.
0101        BSP_pciConfigDump() is a convenience wrapper dumping essential
0102        information (IDs, BAs, IRQ pin/line) to the console or a file.
0103 
0104 MEMORY MAP: CHRP; all addresses (MEM + I/O) read from PCI config. space
0105        are CPU addresses. For sake of portability, drivers should still
0106        use the _IO_BASE, PCI_MEM_BASE, PCI_DRAM_OFFSET constants.
0107 
0108 NVRAM: Address constants are defined in bsp.h
0109 
0110 FLASH (bsp/flashPgm.h): Routines to write flash. Highest level
0111       wrapper writes a file to flash.
0112           NOTE: Writing to flash is disabled by default;
0113                 call BSP_flashWriteEnable().
0114 
0115 I2C (bsp.h, rtems/libi2c.h, libchip/i2c-xxx.h):  temp. sensor and eeprom
0116       are available as device files (bsp.h); lower-level interface is
0117       provided by libi2c.h.
0118           NOTE: The I2C devices are not registered and the driver is not
0119                 initialized by default. Call BSP_i2c_initialize() to do that;
0120                         this will create
0121                                 /dev/i2c0.vpd-eeprom
0122                                 /dev/i2c0.usr-eeprom
0123                                 /dev/i2c0.ds1621
0124                 You can then read the board temperature:
0125                             fd = open("/dev/i2c0.ds1621",O_RDONLY)
0126                                 read(fd,&temp,1)
0127                                 close(fd);
0128                                 printf("Board Temp. is %idegC\n",(int)temp);
0129 
0130 VME: (bsp/VME.h, bsp/vme_am_defs.h, bsp/VMEDMA.h).
0131       *always* use VME.h API, if possible; do *not* use chip drivers
0132           (vmeUniverse.h, vmeTsi148.h) directly unless you know what you are
0133           doing (i.e., if you need specific features provided by the particular
0134           chip; currently, both of the mentioned chip drivers expose entry points
0135           that are designed to be compatible).
0136 
0137       VMEConfig.h should not be used by applications as it makes them
0138       dependent on BSP internals. VMEConfig.h is intended to be used
0139           by BSP designers only.
0140 
0141       VME interrupt priorities: the VME bridge(s) do not implement
0142       priorities in hardware.
0143       However, on the 5500/6100 multiple physical interrupt
0144       lines/wires connect the VME bridge to the PIC. Hence, it is possible
0145       to assign the different wires different priorities at the PIC
0146       (see above) and to route VME interrupts to different wires according
0147       to their priority. You need to call driver specific routines
0148       for this (vmeXXXIntRoute()), however (for driver-specific API
0149           consult bsp/vmeUniverse.h, bsp/vmeTsi148.h).
0150 
0151           For VME DMA *always* use the bsp/VMEDMA.h API. DO NOT use
0152           chip-specific features. Applications written using the bsp/VMEDMA.h
0153           API are portable between the UniverseII and the Tsi148.
0154 
0155 HARDWARE TIMERS: (bsp/gt_timer.h). Programmable general-purpose (GPT) and
0156       watchdog timers. Routines are provided to setup, start and stop
0157           GPTs. The setup routine allows for specifying single-shot or periodic
0158           mode and dispatches a user ISR when the GPT expires.
0159 
0160           The watchdog timer - when started - issues a hard-reset of the
0161           board if not 'petted' within a configurable timeout period.
0162 
0163 NETWORK: (bsp/bsp_bsdnet_attach.h). The BSP offers a call to list
0164       all available interfaces (name, description, 'attach'-method)
0165       for the application to make a selection.
0166       Alternatively, there are BSP_auto_network_driver_name and
0167       BSP_auto_enet_attach(), the latter with the capability to configure
0168       the first NIC with a 'live' link status.
0169       All drivers (rewritten 'mve' for the mv64360 NIC (6100) and BSD ports
0170       'gfe'/'em' (5500)) support the SIOCSIFMEDIA/SIOCGIFMEDIA ioctls
0171       (rtems/rtems_mii_ioctl.h provides helpers to convert strings from/to
0172       control words).
0173 
0174 VPD: (bsp/vpd.h). The board's VPD (vital-product-data such as S/N,
0175       MAC addresses and so forth) can be retrieved.
0176 
0177 BOOTING: BSP has a relocator-header. Clear MSR and jump to the first
0178       instruction in the binary. R3 and R4, if non-null, point to the
0179       start/end of an optional command line string that is copied into
0180       BSP_commandline_string. The BSP is compatible with 'netboot'.
0181 
0182 Have fun.
0183 
0184 -- Till Straumann <strauman@slac.stanford.edu>, 2005-2007.