Kernel Functions for Drivers ddidmamovwin(9F)
NAME
ddidmamovwin - shift current DMA window
SYNOPSIS
#include
#include
int ddidmamovwin(ddidmahandlet handle, offt *offp,
uintt *lenp, ddidmacookiet *cookiep);
INTERFACE LEVEL
This interface is obsolete. ddidmagetwin(9F) should be
used instead.
PARAMETERS
handle The DMA handle filled in by a call to
ddidmasetup(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 ddidmacurwin(9F) or from a previous
call to ddidmamovwin()). 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
ddidmacookie(9S)). Upon a successful return,
cookiep is filled in just as if an implicit
ddidmahtoc(9F) had been made.
DESCRIPTION
The ddidmamovwin() function shifts the current DMA window.
If a DMA request allows the system to allocate resources for
less than the entire object by setting the DIDMAPARTIAL
flag in the ddidmareq(9S) structure, the current DMA win-
dow can be shifted by a call to ddidmamovwin().
The caller must first determine the current DMA window size
by a call to ddidmacurwin(9F). Using the current offset
SunOS 5.11 Last change: 16 Jan 2006 1
Kernel Functions for Drivers ddidmamovwin(9F)
and size of the window thus retrieved, the caller of
ddidmamovwin() 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.
The ddidmamovwin() function takes care of underlying
resource synchronizations required to shift the window. How-
ever, if you want to access the data prior to or after mov-
ing the window, further synchronizations using
ddidmasync(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 ddidmamovwin() to shift the current window and
starts another DMA transfer.
RETURN VALUES
The ddidmamovwin() function returns:
DISUCES The current length and offset are legal and
have been set.
DIFAILURE Otherwise.
CONTEXT
The ddidmamovwin() function can be called from user,
interrupt, or kernel context.
ATRIBUTES
See attributes(5) for a description of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Stability Level Obsolete
SEE ALSO
attributes(5), ddidmacurwin(9F), ddidmagetwin(9F),
ddidmahtoc(9F), ddidmasetup(9F), ddidmasync(9F),
SunOS 5.11 Last change: 16 Jan 2006 2
Kernel Functions for Drivers ddidmamovwin(9F)
ddidmacookie(9S), ddidmareq(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.11 Last change: 16 Jan 2006 3
|