[b599faa] | 1 | Some information about this BSP |
---|
| 2 | ================================ |
---|
| 3 | |
---|
| 4 | ACKNOWLEDGEMENTS |
---|
| 5 | ---------------- |
---|
| 6 | Acknowledgements: |
---|
| 7 | |
---|
| 8 | Valuable information was obtained from the following drivers |
---|
| 9 | |
---|
| 10 | linux: (BCM54xx) Maciej W. Rozycki, Amy Fong. |
---|
| 11 | |
---|
| 12 | This BSP also builds on top of the work of others who have contributed |
---|
| 13 | to similar RTEMS (powerpc) BSPs, most notably Eric Valette, Eric Norum |
---|
| 14 | and others. |
---|
| 15 | |
---|
| 16 | This BSP was produced by the Stanford Linear Accelerator Center, |
---|
| 17 | Stanford University under contract with the US Department of Energy. |
---|
| 18 | |
---|
| 19 | LICENSE |
---|
| 20 | ------- |
---|
| 21 | See ./LICENSE file. |
---|
| 22 | |
---|
| 23 | Note that not all files that are part of this BSP were written by |
---|
| 24 | myself. Consult individual file headers for copyright |
---|
| 25 | and authorship information. |
---|
| 26 | |
---|
| 27 | HARDWARE SUPPORT |
---|
| 28 | =============== |
---|
| 29 | (some of the headers mentioned below contain more |
---|
| 30 | detailed information) |
---|
| 31 | |
---|
| 32 | NOTE: The BSP supports the mvme3100 board. |
---|
| 33 | |
---|
[a7775cb] | 34 | WARNING: It is extremely important that a MOTLoad "waitProbe", "netShut" |
---|
| 35 | sequence be executed before booting RTEMS. Otherwise, network |
---|
| 36 | interface interrupt handlers installed by MOTLoad may cause memory |
---|
| 37 | corruption |
---|
| 38 | |
---|
[b599faa] | 39 | CONSOLE: 2 serial devices, UART driver from 'shared' - no surprises |
---|
| 40 | ("/dev/ttyS0", [="/dev/console"], "/dev/ttyS1"). (Only |
---|
| 41 | /dev/ttyS0 is accessible from the front panel.) |
---|
| 42 | |
---|
| 43 | CLOCK: Decrementer, same as other PPC BSPs. (FIXME: a openpic timer |
---|
| 44 | could be used.) The bookE decrementer is slightly different |
---|
| 45 | from the classic PPC decrementer but the differences are |
---|
| 46 | hidden from the user. |
---|
| 47 | |
---|
| 48 | PIC (interrupt controller) (bsp/irq.h): OpenPIC integrated with |
---|
| 49 | the MPC8540. (see also: bsp/openpic.h). |
---|
| 50 | |
---|
| 51 | PCI (bsp/pci.h): |
---|
| 52 | In addition to rtems' PCI API, a call is available to scan |
---|
| 53 | all devices executing a user callback on each device. |
---|
| 54 | BSP_pciConfigDump() is a convenience wrapper dumping essential |
---|
| 55 | information (IDs, BAs, IRQ pin/line) to the console or a file. |
---|
| 56 | |
---|
| 57 | MEMORY MAP: MotLoad; all addresses (MEM + I/O) read from PCI config. space |
---|
| 58 | are CPU addresses. For sake of portability, drivers should still |
---|
| 59 | use the _IO_BASE, PCI_MEM_BASE, PCI_DRAM_OFFSET constants. |
---|
| 60 | |
---|
| 61 | NVRAM: No NVRAM. |
---|
| 62 | |
---|
| 63 | FLASH (bsp/flashPgm.h): Routines to write flash. Highest level |
---|
| 64 | wrapper writes a file to flash. |
---|
| 65 | NOTE: Writing to flash is disabled by default; |
---|
| 66 | call BSP_flashWriteEnable(). |
---|
| 67 | |
---|
| 68 | I2C (bsp.h, rtems/libi2c.h, libchip/i2c-xxx.h): temp. sensor, eeprom |
---|
| 69 | and real-time clock (RTC) are available as device files (bsp.h); |
---|
| 70 | lower-level interface is provided by libi2c.h. |
---|
| 71 | |
---|
| 72 | Available i2c devices are: |
---|
| 73 | |
---|
| 74 | /dev/i2c0.vpd-eeprom |
---|
| 75 | /dev/i2c0.usr-eeprom |
---|
| 76 | /dev/i2c0.usr1-eeprom |
---|
| 77 | /dev/i2c0.ds1621 |
---|
| 78 | /dev/i2c0.ds1621-raw |
---|
| 79 | /dev/i2c0.ds1375-raw |
---|
| 80 | |
---|
| 81 | You can e.g., read the board temperature: |
---|
| 82 | fd = open("/dev/i2c0.ds1621",O_RDONLY) |
---|
| 83 | read(fd,&temp,1) |
---|
| 84 | close(fd); |
---|
| 85 | printf("Board Temp. is %idegC\n",(int)temp); |
---|
| 86 | |
---|
| 87 | VME: (bsp/VME.h, bsp/vme_am_defs.h, bsp/VMEDMA.h). |
---|
| 88 | *always* use VME.h API, if possible; do *not* use chip driver |
---|
| 89 | (vmeTsi148.h) directly unless you know what you are |
---|
| 90 | doing (i.e., if you need specific features provided by the particular |
---|
| 91 | chip) |
---|
| 92 | |
---|
| 93 | VMEConfig.h should not be used by applications as it makes them |
---|
| 94 | dependent on BSP internals. VMEConfig.h is intended to be used |
---|
| 95 | by BSP designers only. |
---|
| 96 | |
---|
| 97 | VME interrupt priorities: the VME bridge(s) do not implement |
---|
| 98 | priorities in hardware. |
---|
| 99 | However, on the 3100 multiple physical interrupt |
---|
| 100 | lines/wires connect the VME bridge to the PIC. Hence, it is possible |
---|
| 101 | to assign the different wires different priorities at the PIC |
---|
| 102 | (see bsp/openpic.h) and to route VME interrupts to different |
---|
| 103 | wires according to their priority. |
---|
| 104 | You need to call driver specific routines |
---|
| 105 | for this (vmeXXXIntRoute()), however (for driver-specific API |
---|
| 106 | consult bsp/vmeTsi148.h). |
---|
| 107 | |
---|
| 108 | For VME DMA *always* use the bsp/VMEDMA.h API. DO NOT use |
---|
| 109 | chip-specific features. Applications written using the bsp/VMEDMA.h |
---|
| 110 | API are portable between the UniverseII and the Tsi148. |
---|
| 111 | |
---|
| 112 | HARDWARE TIMERS: (bsp/openpic.h). Programmable general-purpose |
---|
| 113 | timers. Routines are provided to setup, start and stop |
---|
| 114 | GPTs. The setup routine allows for specifying single-shot or periodic |
---|
| 115 | mode and dispatches a user ISR when the GPT expires. |
---|
| 116 | |
---|
| 117 | NETWORK: (bsp/if_tsec_pub.h). In addition to the standard bsdnet |
---|
| 118 | 'attach' function the driver offers a low-level API that |
---|
| 119 | can be used to implement alternate communication links |
---|
| 120 | which are totally decoupled from BSDNET. |
---|
| 121 | |
---|
| 122 | Consult 'KNOWN_PROBLEMS'. |
---|
| 123 | |
---|
| 124 | VPD: (bsp/vpd.h). The board's VPD (vital-product-data such as S/N, |
---|
| 125 | MAC addresses and so forth) can be retrieved. |
---|
| 126 | |
---|
| 127 | BOOTING: BSP has a relocator-header. Clear MSR and jump to the first |
---|
| 128 | instruction in the binary. R3 and R4, if non-null, point to the |
---|
| 129 | start/end of an optional command line string that is copied into |
---|
| 130 | BSP_commandline_string. The BSP is compatible with 'netboot'. |
---|
| 131 | |
---|
| 132 | Have fun. |
---|
| 133 | |
---|
| 134 | -- Till Straumann <strauman@slac.stanford.edu>, 2007. |
---|