Visit Our UNIX and Linux User Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #51
Difficulty: Easy
The term 'IoT' means the 'Internet of Tomorrow'.
True or False?
Linux & Unix Commands - Search Man Pages

ddi_dma_htoc(9f) [bsd man page]

ddi_dma_htoc(9F)					   Kernel Functions for Drivers 					  ddi_dma_htoc(9F)

NAME
ddi_dma_htoc - convert a DMA handle to a DMA address cookie SYNOPSIS
#include <sys/conf.h> #include <sys/ddi.h> #include <sys/sunddi.h> int ddi_dma_htoc(ddi_dma_handle_t handle, off_t off, ddi_dma_cookie_t *cookiep); INTERFACE LEVEL
This interface is obsolete. ddi_dma_addr_bind_handle(9F) or ddi_dma_buf_bind_handle(9F) should be used instead. PARAMETERS
handle The handle filled in by a call to ddi_dma_setup(9F). off An offset into the object that handle maps. cookiep A pointer to a ddi_dma_cookie(9S) structure. DESCRIPTION
ddi_dma_htoc() takes a DMA handle (established by ddi_dma_setup(9F)), and fills in the cookie pointed to by cookiep with the appropriate address, length, and bus type to be used to program the DMA engine. RETURN VALUES
ddi_dma_htoc() returns: DDI_SUCCESS Successfully filled in the cookie pointed to by cookiep. DDI_FAILURE Failed to successfully fill in the cookie. CONTEXT
ddi_dma_htoc() can be called from user or interrupt context. ATTRIBUTES
See attributes(5) for a description of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Stability Level |Obsolete | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5), ddi_dma_addr_bind_handle(9F), ddi_dma_addr_setup(9F), ddi_dma_buf_bind_handle(9F), ddi_dma_buf_setup(9F), ddi_dma_setup(9F), ddi_dma_sync(9F), ddi_dma_cookie(9S) Writing Device Drivers SunOS 5.10 27 Sep 2002 ddi_dma_htoc(9F)

Check Out this Related Man Page

ddi_dma_movwin(9F)					   Kernel Functions for Drivers 					ddi_dma_movwin(9F)

NAME
ddi_dma_movwin - shift current DMA window SYNOPSIS
#include <sys/ddi.h> #include <sys/sunddi.h> int ddi_dma_movwin(ddi_dma_handle_t handle, off_t *offp, uint_t *lenp, ddi_dma_cookie_t *cookiep); INTERFACE LEVEL
This interface is obsolete. ddi_dma_getwin(9F) should be used instead. PARAMETERS
handle The DMA handle filled in by a call to ddi_dma_setup(9F). offp A pointer to an offset to set the DMA window to. Upon a successful return, it will be filled in with the new offset from the beginning of the object resources are allocated for. lenp A pointer to a value which must either be the current size of the DMA window (as known from a call to ddi_dma_curwin(9F) or from a previous call to ddi_dma_movwin()). Upon a successful return, it will be filled in with the size, in bytes, of the current window. cookiep A pointer to a DMA cookie (see ddi_dma_cookie(9S)). Upon a successful return, cookiep is filled in just as if an implicit ddi_dma_htoc(9F) had been made. DESCRIPTION
ddi_dma_movwin() shifts the current DMA window. If a DMA request allows the system to allocate resources for less than the entire object by setting the DDI_DMA_PARTIAL flag in the ddi_dma_req(9S) structure, the current DMA window can be shifted by a call to ddi_dma_movwin(). The caller must first determine the current DMA window size by a call to ddi_dma_curwin(9F). Using the current offset and size of the win- dow thus retrieved, the caller of ddi_dma_movwin() may change the window onto the object by changing the offset by a value which is some multiple of the size of the DMA window. ddi_dma_movwin() takes care of underlying resource synchronizations required to shift the window. However, if you want to access the data prior to or after moving the window, further synchronizations using ddi_dma_sync(9F) are required. This function is normally called from an interrupt routine. The first invocation of the DMA engine is done from the driver. All subsequent invocations of the DMA engine are done from the interrupt routine. The interrupt routine checks to see if the request has been completed. If it has, it returns without invoking another DMA transfer. Otherwise it calls ddi_dma_movwin() to shift the current window and starts another DMA transfer. RETURN VALUES
ddi_dma_movwin() returns: DDI_SUCCESS The current length and offset are legal and have been set. DDI_FAILURE Otherwise. CONTEXT
ddi_dma_movwin() can be called from user or interrupt context. ATTRIBUTES
See attributes(5) for a description of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Stability Level |Obsolete | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5), ddi_dma_curwin(9F), ddi_dma_getwin(9F), ddi_dma_htoc(9F), ddi_dma_setup(9F), ddi_dma_sync(9F), ddi_dma_cookie(9S), ddi_dma_req(9S) Writing Device Drivers WARNINGS
The caller must guarantee that the resources used by the object are inactive prior to calling this function. SunOS 5.10 27 Sep 2002 ddi_dma_movwin(9F)

Featured Tech Videos