Data Structures for Drivers ddidmalimx86(9S)
NAME
ddidmalimx86 - x86 DMA limits structure
SYNOPSIS
#include
INTERFACE LEVEL
Solaris x86 DI specific (Solaris x86 DI). This interface
is obsolete.
DESCRIPTION
A ddidmalim structure describes in a generic fashion the
possible limitations of a device or its DMA engine. This
information is used by the system when it attempts to set up
DMA resources for a device. When the system is requested to
perform a DMA transfer to or from an object, the request is
broken up, if necessary, into multiple sub-requests. Each
sub-request conforms to the limitations expressed in the
ddidmalim structure.
This structure should be filled in by calling the routine
ddidmaegetlim(9F). This routine sets the values of the
structure members appropriately based on the characteristics
of the DMA engine on the driver's parent bus. If the driver
has additional limitations, it can further restrict some of
the values in the structure members. A driver should not
relax any restrictions imposed by ddidmaegetlim().
STRUCTURE MEMBERS
uintt dlimaddrlo; /* low range of 32 bit
addressing capability */
uintt dlimaddrhi; /* inclusive upper bound of
addressing capability */
uintt dlimminxfer; /* minimum effective dma transfer size */
uintt dlimversion; /* version number of structure */
uintt dlimadregmax; /* inclusive upper bound of
incrementing addr reg */
uintt dlimctregmax; /* maximum transfer count minus one */
uintt dlimgranular; /* granularity (and min size) of
transfer count */
short dlimsgllen; /* length of DMA scatter/gather list */
uintt dlimreqsize; /* maximum transfer size in bytes of
a single I/O */
The dlimaddrlo and dlimaddrhi fields specify the address
range that the device's DMA engine can access. The
dlimaddrlo field describes the lower 32-bit boundary of
the device's DMA engine. The dlimaddrhi member describes
SunOS 5.11 Last change: 12 Oct 2005 1
Data Structures for Drivers ddidmalimx86(9S)
the inclusive, upper 32-bit boundary. The system allocates
DMA resources in a way that the address for programming the
device's DMA engine will be within this range. For example,
if your device can access the whole 32-bit address range,
you can use [0,0xF]. See ddidmacookie(9S) or
ddidmasegtocookie(9F).
The dlimminxfer field describes the minimum effective DMA
transfer size (in units of bytes), which must be a power of
two. This value specifies the minimum effective granularity
of the DMA engine and describes the minimum amount of memory
that can be touched by the DMA transfer. As a resource
request is handled by the system, the dlimminxfer value can
be modified. This modification is contingent upon the pres-
ence (and use) of I/Ocaches and DMA write buffers between
the DMA engine and the object that DMA is being performed
on. After DMA resources have been allocated, you can
retrieve the resultant minimum transfer value using
ddidmadevalign(9F).
The dlimversion field specifies the version number of this
structure. Set this field to DMALIMVER0.
The dlimadregmax field describes an inclusive upper bound
for the device's DMA engine address register. This bound
handles a fairly common case where a portion of the address
register is simply a latch rather than a full register. For
example, the upper 16 bits of a 32-bit address register
might be a latch. This splits the address register into a
portion that acts as a true address register (lower 16 bits)
for a 64-kilobyte segment and a latch (upper 16 bits) to
hold a segment number. To describe these limits, you specify
0xF in the dlimadregmax structure member.
The dlimctregmax field specifies the maximum transfer
count that the DMA engine can handle in one segment or
cookie. The limit is expressed as the maximum count minus
one. This transfer count limitation is a per-segment limita-
tion. Because the limitation is used as a bit mask, it must
be one less than a power of two.
The dlimgranular field describes the granularity of the
device's DMA transfer ability, in units of bytes. This value
is used to specify, for example, the sector size of a mass
storage device. DMA requests are broken into multiples of
this value. If there is no scatter/gather capability, then
the size of each DMA transfer will be a multiple of this
SunOS 5.11 Last change: 12 Oct 2005 2
Data Structures for Drivers ddidmalimx86(9S)
value. If there is scatter/gather capability, then a single
segment cannot be smaller than the minimum transfer value,
but can be less than the granularity. However, the total
transfer length of the scatter/gather list is a multiple of
the granularity value.
The dlimsgllen field specifies the maximum number of
entries in the scatter/gather list. This value is the number
of segments or cookies that the DMA engine can consume in
one I/O request to the device. If the DMA engine has no
scatter/gather list, set this field to one.
The dlimreqsize field describes the maximum number of bytes
that the DMA engine can transmit or receive in one I/O com-
mand. This limitation is only significant if it is less than
( dlimctregmax ]1) * dlimsgllen. If the DMA engine has no
particular limitation, set this field to 0xF.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Obsolete
SEE ALSO
ddidmae(9F), ddidmaaddrsetup(9F), ddidmabufsetup(9F),
ddidmadevalign(9F), ddidmasegtocookie(9F),
ddidmasetup(9F), ddidmacookie(9S),
ddidmalimsparc(9S), ddidmareq(9S)
SunOS 5.11 Last change: 12 Oct 2005 3
|