Performs platform-specific DMA mapping for a single page.
#include <sys/dma.h> #include <sys/xmem.h> int d_map_page(*handle, flags, baddr, *busaddr, *xmp) struct d_handle *handle; int flags; caddr_t baddr; uint *busaddr; struct xmem *xmp;
int d_map_page(*handle, flags, baddr, *busaddr, *xmp) struct d_handle *handle; int flags; unsigned long long baddr; unsigned long long *busaddr; struct xmem *xmp;
The d_map_page kernel service is a bus-specific utility routine determined by the d_map_init kernel service that performs platform specific mapping of a single 4KB or less transfer for DMA master devices. The d_map_page kernel service is a fast-path version of the d_map_list service. The entire transfer amount must fit within a single page in order to use this service. This service accepts a virtual address and completes the appropriate bus address for the device to use in the DMA transfer. Unless the DMA_BYPASS flag is set, this service also verifies access permissions to the page.
If the buffer is a global kernel space buffer, the cross-memory descriptor can be set to point to the exported GLOBAL cross-memory descriptor, xmem_global.
If the transfer is unable to be mapped due to resource restrictions, the d_map_page service returns DMA_NORES. If the transfer is unable to be mapped due to page access violations, this service returns DMA_NOACC.
DMA_NORES | Indicates that resources are unavailable. |
DMA_NOACC | Indicates no access permission to the page. |
DMA_SUCC | Indicates that the busaddr parameter contains the bus address to use for the device transfer. |
The d_alloc_dmamem kernel service,d_map_init kernel service, d_map_list kernel service.