Cleans up after a direct memory access (DMA) transfer.
#include <sys/types.h> #include <sys/errno.h> #include <sys/dma.h> #include <sys/xmem.h>
int d_complete
(channel_id, flags, baddr,
count, dp, daddr)
int channel_id;
int flags;
caddr_t baddr;
size_t count;
struct xmem * dp;
caddr_t daddr;
channel_id | Specifies the DMA channel identifier returned by the d_init service. |
flags | Describes the DMA transfer. The /usr/include/dma.h file describes these flags. |
baddr | Designates the address of the memory buffer. |
count | Specifies the length of the transfer in bytes. |
dp | Specifies the address of the cross-memory descriptor. |
daddr | Designates the address used to program the DMA master. A value of null is specified for DMA slaves. |
The d_complete kernel service completes the processing of a DMA transfer. It also indicates any DMA error detected by the system hardware. The d_complete service must be called after each DMA transfer.
The d_complete service performs machine-dependent processing, which entails:
"Understanding Direct Memory Access (DMA) Transfers" in AIX 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts further describes DMA transfers.
The d_complete kernel service can be called from either the process or interrupt environment.
DMA_SUCC | Indicates a successful completion. |
DMA_INVALID | Indicates an operation that is not valid. A load or store that was not valid was performed to the I/O bus. |
DMA_LIMIT | Indicates a limit check. A load or store to the I/O bus occurred that was not sufficiently authorized to access the I/O bus address. |
DMA_NO_RESPONSE | Indicates no response. No device responded to the I/O bus access. |
DMA_CONFLICT | Indicates an address conflict. A daddr parameter was specified to the d_master service for a system memory transfer, where this transfer conflicts with the bus memory address of an I/O bus device. |
DMA_AUTHORITY | Indicates an authority error. A protection exception occurred while accessing an I/O bus memory address. |
DMA_PAGE_FAULT | Indicates a page fault. A reference was made to a page not currently located in system memory. |
DMA_BAD_ADDR | Indicates an address that is not valid. A bus address that is not valid or was unsupported was used. A daddr parameter that was not valid was specified to the d_master service. |
DMA_CHECK | Indicates a channel check. A channel check was generated during the bus cycle. This typically occurs when a device detects a data parity error. |
DMA_DATA | Indicates a system-detected data parity error. |
DMA_ADDRESS | Indicates a system-detected address parity error. |
DMA_EXTRA | Indicates an extra request. This typically occurs when the count parameter was specified incorrectly to the d_slave service. |
DMA_SYSTEM | Indicates a system error. The system detected an internal error in system hardware. This is typically a parity error on an internal bus or register. |
The d_init kernel service, d_master kernel service, d_slave kernel service.
I/O Kernel Services and Understanding Direct Memory Access (DMA) Transfers in AIX 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts.