Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mvc(4S) — SunOS 4.1.3B

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ioctl(2)

open(2)

mem(4s)

mmap(2)

MVC(4S)  —  DEVICES AND NETWORK INTERFACES

NAME

mvc − driver for VMEbus

CONFIG — SUN-4RF/VMEbus SYSTEMS ONLY

device-driver mvc

AVAILABILITY

This device is available with SUN-4RF/VMEbus systems only. 

SYNOPSIS

#include <rfdev/mvcio.h>

DESCRIPTION

The mvc hierarchical driver manages the Fujitsu MB86986 MBus to VMEbus interface (MVIC).  It is required on all SUN-4RF systems which have a VMEbus. 

The mvc driver also provides user access to the MVIC’s generalized MBus/VMEbus DMA controller.  See the next section for details. 

IOCTLS

MIOCDMACOPY The argument is a pointer to a struct mvc_dmacopy, which is defined in <rfdev/mvcio.h> as

 struct mvc_dmacopy {
unsigned dma_flags;/∗ flags ∗/
caddr_t dma_source;/∗ source address ∗/
caddr_t dma_dest;/∗ destination address ∗/
unsigned dma_count;/∗ byte count ∗/
};
 

The MVIC’s DMA engine is used to copy dma_count bytes from dma_source to dma_dest.  The source and destination virtual addresses may represent normal memory, or mappings to the VMEbus obtained through the /dev/vme∗ interface.  The calling process is blocked until the DMA is complete. 
The MVIC supports only 8-byte aligned DMA copies, so dma_source, dma_dest, and dma_count must all be 8-byte aligned.  If the alignment requirements aren’t met, the error EINVAL is returned. 
The dma_flags field is used to control how the DMA operation is performed.  The only flag currently defined is MVC_DMABLKXFR.  If either or both of the source and destination addresses are on the VMEbus and MVC_DMABLKXFR is set, then the driver will attempt to use block-mode transactions on the VMEbus. 
The driver will queue DMA requests from multiple processes and perform them in the order received.  If the device is opened with the O_EXCL flag set, then further opens will return the EBUSY error.  If the device has already been opened and an open with the O_EXCL flag is attempted, EBUSY is also returned.  EBUSY can be returned by the ioctl call itself if there are too many outstanding requests.  (The number of outstanding requests supported is currently approximately 1060, so an EBUSY error from the ioctl would never happen in any normal configuration.) 
Other error returns from the ioctl call include EFAULT which will be returned if the pointer to the struct mvc_dmacopy is invalid, or if the source or destination addresses are invalid. 

SEE ALSO

ioctl(2) open(2) mem(4s) mmap(2)

Sun Release 4.1  —  Last change: 19 August 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026