Next | Prev | Up | Top | Contents | Index

VME Master Addressing

When a VME device uses DMA to access main memory, it acts as a "VME master." Silicon Graphics systems support both A24 and A32 VME master addressing. Although there are a few minor differences in the addressing modes supported (non-privileged versus supervisor), the main difference is that the 4D/100, 4D/200, 4D/300, 4D/400, and Crimson series systems support dynamic address mapping. This allows IP5, IP7, IP9, and IP17 CPUs to access all of physical memory for A24 addressing and allows scatter-gather for both A24 and A32 addressing.

You can still write an IRIS-portable device driver if the dma_mapalloc() function does not return -1 and if the device driver can take advantage of the DMA mapping functions described in Chapter 5, "Writing a SCSI Device Driver." Otherwise, you must use one of the other DMA methods.

Table A-6 describes the mapping between the address generated by a VME device and physical memory. You can perform A32 master addressing on the IP5, IP7, IP9, and IP17 in either mapped or unmapped mode.

A32 VME-bus/Physical Address Mapping
System CPUVME AddressPhysical AddressSize (MB)VME ModifierMap
IP4/6/120x0 -
0x0FFFFFFF
0x0 -
0x0FFFFFFF
256 0x9No
IP5/7/9/170x0 - 0x0FFFFFFF0x0 -
0x0FFFFFFF
256 0x9No
IP5/7/9/170x80000000 - 0x8FFFFFFF0x -
0x0FFFFFFF
256 0x9Yes
IP19/21Must be mapped by the driverMust be mapped by the driver   

On POWER Series workstations, ranges of VME-bus address space were mapped one-to-one with K2 segment addresses. This made accessing the VME bus easy but was also limiting. Only a small amount of K2 space is available for use by VME, so very little of the VME address space was made available. Even worse, for dual VME-bus systems, the space previously available was now cut in half as it was shared between the two buses.

The CHALLENGE series supports up to five VME buses. Since K2 space is a limited resource, and dividing up what is available by five would make the extra VME buses next to useless, a new approach was tried. The CHALLENGE series does not have a direct K2 address map into VME-bus space. Each VME bus adapter has the ability to map fifteen 8 MB windows of VME-bus space into K2 space. These windows can be slid around at will to give the illusion of a much larger address space.

To access a VME space, a user must allocate a PIO map, which provides a translation between a kernel address and VME space. These mappings can be "FIXED" or "UNFIXED." As on POWER Series platforms, a FIXED mapping is a one-to-one mapping of a range of VME-bus space into the driver's address space. An UNFIXED window takes advantage of the sliding window ability on the CHALLENGE series, which supports both FIXED and UNFIXED mappings.

In an UNFIXED map, VME-bus space cannot be accessed directly; instead, access is provided through special bcopy() routines used to move data between VME space and kernel buffers. While it is not always possible to get a FIXED mapping, an UNFIXED mapping is always available. The special bcopy() routines work for both FIXED and UNFIXED mappings. On POWER Series and earlier workstations, UNFIXED mappings are treated as FIXED mappings.

The PIO mapping routines also have a general interface that allows them to be used for mapping in bus spaces other than VME.

The support routines for PIO mapping are:

pio_mapallocAllocate a PIO map.
pio_mapaddrMap bus space to a driver accessible address (FIXED maps only).
pio_mapfreeFree a previously allocated PIO map.
pio_badaddrCheck to see whether a bus address is equipped.
pio_wbadaddrCheck to see whether a bus address is equipped.
pio_bcopyinCopy data from bus space to kernel buffer.
pio_bcopyoutCopy data from kernel buffer to bus space.

These PIO maps are normally set up in the driver's drvedtinit() routine.



Next | Prev | Up | Top | Contents | Index