Initializes a block-mode direct memory access (DMA) transfer for a DMA slave.
#include <sys/types.h> #include <sys/errno.h> #include <sys/dma.h> #include <sys/xmem.h>
void d_slave (channel_id, flags, baddr, count, dp) int channel_id; int flags; caddr_t baddr; size_t count; struct xmem *dp;
|channel_id||Specifies the DMA channel identifier returned by the d_init service.|
|flags||Control the DMA transfer. The /usr/include/sys/dma.h file contains valid values for these flags.|
|baddr||Designates the address of the memory buffer.|
|count||Specifies the length of the transfer in bytes.|
|dp||Designates the address of the cross-memory descriptor.|
The d_slave kernel service sets up the DMA channel specified by the channel_id parameter to perform a block-mode DMA transfer for a DMA slave. The flags parameter controls the operation of the d_slave service. "Understanding Direct Memory Access (DMA)" in AIX Kernel Extensions and Device Support Programming Concepts describes DMA slaves and masters.
The d_slave service does not initiate the DMA transfer. The device initiates all DMA memory references. The d_slave service sets up the system address-generation hardware to indicate the specified buffer.
The d_slave service supports three different buffer locations:
The d_unmask and d_mask services typically do not need to be called for the DMA slave transfers. The DMA channel is automatically enabled by the d_slave service and automatically disabled by the hardware when the last byte specified by the count parameter is transferred.
The d_slave service performs machine-dependent processing, including the following tasks:
- The memory buffer must remain pinned from the time the d_slave service is called until the DMA transfer is completed and the d_complete service is called.
- The device driver or device handler must not access the buffer once the d_slave service is called until the DMA transfer is completed and the d_complete service is called.
- The d_slave service, as with all DMA services, should not be called unless the DMA channel has been allocated with the d_init service.
The d_slave kernel service can be called from either the process or interrupt environment.
The d_slave service has no return values.
The d_slave kernel service is part of Base Operating System (BOS) Runtime.
The d_complete kernel service, d_init kernel service, d_mask kernel service, d_unmask kernel service, xmattach kernel service.
I/O Kernel Services and Understanding Direct Memory Access (DMA) Transfers in AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts.