vi50_map(3) CLIX vi50_map(3)
NAME
vi50_map - Maps the VI50 into user space
LIBRARY
Intergraph Device Library (libix.a)
SYNOPSIS
#include <sys/xio/xerr.h>
#include <sys/xio/evme.h>
int vi50_map(
int channel ,
int vme_phys ,
int nbytes ,
int swap ,
char *user_virt );
PARAMETERS
channel
vme_phys
Specifies the starting address for the area to be mapped.
nbytes Specifies the number of bytes to be mapped into user space.
swap Specifies the swap mode to be applied to the data. Valid values
for swap, as defined in <evme.h> are as follows:
EVME_SWAP_BYTES (0)
EVME_SWAP_WORDS (1)
EVME_SWAP_NONE (3)
user_virt
Points to the location of the base address of the mapped area.
DESCRIPTION
The vi50_map() function maps nbytes, starting at address vme_phys, into
user space, marking the pages to treat data according to swap mode, and
returning the base address of the mapped area in location pointed to by
user_virt.
CAUTIONS
2/94 - Intergraph Corporation 1
vi50_map(3) CLIX vi50_map(3)
Once VME space is mapped by a process, the process may PIO directly to the
VI50 device. However, if a PIO access is attempted while a dma transfer
is in progress, the system may hang or panic. Any requests for mapping
that are received during a dma transfer also cause a panic.
RETURN VALUES
The vi50_map() function returns a value of 0 if successful. If not
successful, one of the failure codes listed in the ERRORS section is
returned.
ERRORS
The vi50_map() function fails if one of the following is true:
[XIO_FAILURE]
The system does not contain the driver needed to support the
request.
[VI50_INVALID_DEVICE]
There is no hardware corresponding to the channel.
[VI50_NOT_OWNER]
The device specified by channel is not open.
[VI50_NO_ACCESS]
The requesting process does not have access to the device specified
by channel.
[VI50_COPY_FAIL]
The driver could not copy parameters into kernel space, or could
not copy return pointer value to user space.
[VI50_OUT_OF_RANGE]
The address range specified by vme_phys and nbytes does not lie
completely within VI50 address space.
[VI50_MAP_FAIL]
The driver could not allocate the resources necessary to map the
address range into the requesting process' space.
RELATED INFORMATION
Functions: vi50_ioctl(3), vi50_open(3), vi50_unmap(3)
Files: xvi50(7)
2 Intergraph Corporation - 2/94