summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/mvme3100/README
blob: 36fa28a398183a22601927e94d6857f510bf8956 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
Some information about this BSP
================================

ACKNOWLEDGEMENTS
----------------
Acknowledgements:

 Valuable information was obtained from the following drivers

    linux: (BCM54xx) Maciej W. Rozycki, Amy Fong.

 This BSP also builds on top of the work of others who have contributed
 to similar RTEMS (powerpc) BSPs, most notably Eric Valette, Eric Norum
 and others.

 This BSP was produced by the Stanford Linear Accelerator Center, 
 Stanford University under contract with the US Department of Energy.

LICENSE
-------
See ./LICENSE file.

Note that not all files that are part of this BSP were written by
myself. Consult individual file headers for copyright
and authorship information.

HARDWARE SUPPORT
===============
(some of the headers mentioned below contain more
detailed information)

NOTE:  The BSP supports the mvme3100 board.

WARNING: It is extremely important that a MOTLoad "waitProbe", "netShut"
         sequence be executed before booting RTEMS. Otherwise, network
         interface interrupt handlers installed by MOTLoad may cause memory
         corruption

CONSOLE: 2 serial devices, UART driver from 'shared' - no surprises
       ("/dev/ttyS0", [="/dev/console"], "/dev/ttyS1"). (Only
       /dev/ttyS0 is accessible from the front panel.)

CLOCK: Decrementer, same as other PPC BSPs. (FIXME: a openpic timer
       could be used.) The bookE decrementer is slightly different
	   from the classic PPC decrementer but the differences are
	   hidden from the user.

PIC (interrupt controller) (bsp/irq.h): OpenPIC integrated with
       the MPC8540. (see also: bsp/openpic.h).

PCI (bsp/pci.h): 
       In addition to rtems' PCI API, a call is available to scan
       all devices executing a user callback on each device.
       BSP_pciConfigDump() is a convenience wrapper dumping essential
       information (IDs, BAs, IRQ pin/line) to the console or a file.

MEMORY MAP: MotLoad; all addresses (MEM + I/O) read from PCI config. space
       are CPU addresses. For sake of portability, drivers should still
       use the _IO_BASE, PCI_MEM_BASE, PCI_DRAM_OFFSET constants.

NVRAM: No NVRAM.

FLASH (bsp/flashPgm.h): Routines to write flash. Highest level
      wrapper writes a file to flash.
	  NOTE: Writing to flash is disabled by default;
	        call BSP_flashWriteEnable().

I2C (bsp.h, rtems/libi2c.h, libchip/i2c-xxx.h):  temp. sensor, eeprom
      and real-time clock (RTC) are available as device files (bsp.h);
	  lower-level interface is provided by libi2c.h.

	  Available i2c devices are:

				/dev/i2c0.vpd-eeprom
				/dev/i2c0.usr-eeprom
				/dev/i2c0.usr1-eeprom
				/dev/i2c0.ds1621
				/dev/i2c0.ds1621-raw
				/dev/i2c0.ds1375-raw

      You can e.g., read the board temperature:
			    fd = open("/dev/i2c0.ds1621",O_RDONLY)
				read(fd,&temp,1)
				close(fd);
				printf("Board Temp. is %idegC\n",(int)temp);

VME: (bsp/VME.h, bsp/vme_am_defs.h, bsp/VMEDMA.h).
      *always* use VME.h API, if possible; do *not* use chip driver
	  (vmeTsi148.h) directly unless you know what you are
	  doing (i.e., if you need specific features provided by the particular
	  chip)

      VMEConfig.h should not be used by applications as it makes them
      dependent on BSP internals. VMEConfig.h is intended to be used
	  by BSP designers only.

      VME interrupt priorities: the VME bridge(s) do not implement
      priorities in hardware.
      However, on the 3100 multiple physical interrupt
      lines/wires connect the VME bridge to the PIC. Hence, it is possible
      to assign the different wires different priorities at the PIC
      (see bsp/openpic.h) and to route VME interrupts to different
	  wires according to their priority.
	  You need to call driver specific routines
      for this (vmeXXXIntRoute()), however (for driver-specific API
	  consult bsp/vmeTsi148.h).

	  For VME DMA *always* use the bsp/VMEDMA.h API. DO NOT use
	  chip-specific features. Applications written using the bsp/VMEDMA.h
	  API are portable between the UniverseII and the Tsi148.

HARDWARE TIMERS: (bsp/openpic.h). Programmable general-purpose 
      timers. Routines are provided to setup, start and stop
	  GPTs. The setup routine allows for specifying single-shot or periodic
	  mode and dispatches a user ISR when the GPT expires.

NETWORK: (bsp/if_tsec_pub.h). In addition to the standard bsdnet
      'attach' function the driver offers a low-level API that
	  can be used to implement alternate communication links
	  which are totally decoupled from BSDNET.

	  Consult 'KNOWN_PROBLEMS'.

VPD: (bsp/vpd.h). The board's VPD (vital-product-data such as S/N,
      MAC addresses and so forth) can be retrieved.

BOOTING: BSP has a relocator-header. Clear MSR and jump to the first
      instruction in the binary. R3 and R4, if non-null, point to the
      start/end of an optional command line string that is copied into
      BSP_commandline_string. The BSP is compatible with 'netboot'.

Have fun.

-- Till Straumann <strauman@slac.stanford.edu>, 2007.