This chapter intoduces a device driver exerciser program,
dmaex_test, which is provided in C source format on the
Digital UNIX CD-ROM. The dmaex_test program
illustrates how to perform several common VMEbus I/O operations from
application code.
The dmaex_test program exercises read,
write, mmap,
ioctl, and other interfaces provided by the
/dev/dmaex example device driver described in Chapter 6. The program includes detailed annotation,
including instructions for invoking the major tests.
The dmaex_test exerciser program illustrates the
following VMEbus I/O operations, which of course must be supported by
a given VMEbus driver in order to be exercised:
-
Using mmap for mapping sparse and dense memory
-
Using read and write for programmed
I/O transfers
-
Using read and write for block DMA
transfers
-
Using read and write for device DMA
transfers
-
Using ioctl and signal catching to map and unmap system
memory
-
Using ioctl to read and write user space buffers
-
Using mmap and ioctl to map, read,
and write kernel space buffers
-
Using an ioctl to post a VMEbus interrupt request and
wait for acknowledgement
-
Using an ioctl to clear a posted VMEbus interrupt request