Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

vi50_open(3)

vi50_ioctl(3)

vi50_dma(3)

xvi50(7)



  vi50_dma(3)                         CLIX                         vi50_dma(3)



  NAME

    vi50_dma, vi50_dma_nw - Uses a hardware dma engine to move data between
    VI50 memory and user space

  LIBRARY

    Intergraph Device Library (libix.a)

  SYNOPSIS

    #include <sys/xio/xerr.h>

    #include <sys/evme.h>

    #include <sys/xio/xvi50.h>

    #include <sys/xto/xio.h>

    int vi50_dma(
      int channel ,
      int vme_phys ,
      char *user_virt ,
      int nbytes ,
      int swap ,
      int direction ,
      int timeout ,
      struct xiosb *xiosbp );

     int vi50_dma_nw(
      int channel ,
      int vme_phys ,
      char *user_virt ,
      int nbytes ,
      int swap ,
      int direction ,
      int timeout ,
      struct xiosb *xiosbp ,
      int efn );

  PARAMETERS

    channel
           Specifies the VI50 channel to move the data.

    vme_phys
           Specifies the physical VME bus address to (or from) which data will
           be transferred.

    user_virt
           Specifies the address in user space from (or to) which data will be



  2/94 - Intergraph Corporation                                              1






  vi50_dma(3)                         CLIX                         vi50_dma(3)



           transferred.

    nbytes Specifies the number of bytes to transfer.

    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)

    direction
           Specifies whether data will be transferred to or from VI50 memory.
           Valid values for direction, as defined in <sys/xio/xvi50.h>, are as
           follows:

           VI50_READ
                  Read data from VI50 memory

           VI50_WRITE
                  Write data to VI50 memory

    timeout
           Indicates the time limit in 1/60-second intervals for the data
           transfer.  Any transfer that takes longer is aborted and an
           appropriate status is returned.  A value of 0 disables the timeout
           function.

    xiospb Points to an xio status block.  Upon completion of the request,
           this structure is filled with appropriate information.

    efn    Specifies the event flag associated with the request.

  DESCRIPTION

    The vi50_dma() and vi50_dma_nw() functions provide a mechanism to transfer
    data to (or from) VI50 memory from (or to) user space.  The specified
    channel moves the data.  The channel must have been opened with the
    vi50_open() function.

    The vi50_dma_nw() function is the asynchronous version of vi50_dma(),
    providing the same capability, without waiting for the request to
    complete.

  RETURN VALUES

    Upon successful completion, a value of 0 is returned.  If not successful,
    these functions return one of the failure codes listed in the ERRORS
    section.



  2                                              Intergraph Corporation - 2/94






  vi50_dma(3)                         CLIX                         vi50_dma(3)



  ERRORS

    The vi50_dma() and vi50_dma_nw() functions fail 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_OUT_OF_RANGE]
           The address range specified by vme_phys and nbytes does not lie
           completely within VI50 address space.

    [VI50_COPY_FAIL]
           Driver either could not copy parameters into kernel space, or could
           not copy return pointer value to user space.

    [BAD_DATA_BUFFER_SIZE]
           The number of parameters passed in is incorrect or the number of
           bytes to transfer is 0.

    [VI50_BAD_DIRECTION]
           Direction is not VI50_READ or VI50_WRITE.

    [PAGE_LOCK_FAILED]
           Not enough physical memory for this request is available at this
           time.

    [BAD_DATA_BUFFER_ADDRESS]
           The data buffer pointed to by user_virt is either not long word
           aligned or is in non-writable memory space.

    [VI50_DMA_FAIL]
           The driver was unable to initiate the dma transfer.

    [VI50_TIMEOUT]
           The transfer timed-out before completing.

  RELATED INFORMATION

    Functions:  vi50_open(3), vi50_ioctl(3)



  2/94 - Intergraph Corporation                                              3






  vi50_dma(3)                         CLIX                         vi50_dma(3)



    Files:  xvi50(7)





















































  4                                              Intergraph Corporation - 2/94




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