dma_physreq(D3) dma_physreq(D3)
NAME
dma_physreq - apply constraints for DMA channel and path size
SYNOPSIS
#include <sys/dma.h>
#include <sys/kmem.h>
#include <sys/ddi.h>
void dma_physreq(int chan, int datapath, physreq_t *preqp);
Arguments
chan DMA channel number.
datapath Path size of the DMA channel, as defined in
dma_cb(D4).
preqp Pointer to a physreq(D4) structure.
DESCRIPTION
dma_physreq determines physical constraints needed by the
specified DMA channel and applies them to the physreq
structure pointed to by preqp.
The physreq structure is used by routines such as
kmem_alloc_physcontig(D3) and buf_breakup(D3) to define
alignment constraints on physical addresses.
Return Values
None.
USAGE
dma_physreq should be used when DMA is to be done using
standard DMA channels in non-cascade mode [usually by calling
dma_prog(D3)]. If an I/O board is acting as a bus master and
providing DMA addresses itself, either by using a DMA channel
in cascade mode [dma_cascade(D3)] or because it is an EISA bus
master, the driver should instead set the physreq fields
itself, since the driver knows its board's address-generation
constraints.
After calling dma_physreq, physreq_prep(D3) must be called
before using the physreq structure for allocations or
transfers.
Level
Initialization or Base.
Copyright 1994 Novell, Inc. Page 1
dma_physreq(D3) dma_physreq(D3)
Synchronization Constraints
Does not sleep.
Driver-defined basic locks, read/write locks, and sleep locks
may be held across calls to this function.
REFERENCES
buf_breakup(D3), dma_cb(D4), kmem_alloc_physcontig(D3),
physreq_alloc(D3), physreq_free(D3), physreq_prep(D3),
physreq(D4)
NOTICES
Portability
AT-compatible architectures
Applicability
ddi: 5, 5mp, 6, 6mp, 7, 7mp
Future Directions
This interface is expected to be replaced or modified in a
future release.
Copyright 1994 Novell, Inc. Page 2