xref: /freebsd/share/man/man4/xdma.4 (revision 85debf7f6e3ef3bfc55df76c8525d7d4b08c5d77)
1*85debf7fSRuslan Bukin.\" Copyright (c) 2016 Ruslan Bukin <br@bsdpad.com>
2*85debf7fSRuslan Bukin.\" All rights reserved.
3*85debf7fSRuslan Bukin.\"
4*85debf7fSRuslan Bukin.\" This software was developed by SRI International and the University of
5*85debf7fSRuslan Bukin.\" Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237
6*85debf7fSRuslan Bukin.\" ("CTSRD"), as part of the DARPA CRASH research programme.
7*85debf7fSRuslan Bukin.\"
8*85debf7fSRuslan Bukin.\" Redistribution and use in source and binary forms, with or without
9*85debf7fSRuslan Bukin.\" modification, are permitted provided that the following conditions
10*85debf7fSRuslan Bukin.\" are met:
11*85debf7fSRuslan Bukin.\" 1. Redistributions of source code must retain the above copyright
12*85debf7fSRuslan Bukin.\"    notice, this list of conditions and the following disclaimer.
13*85debf7fSRuslan Bukin.\" 2. Redistributions in binary form must reproduce the above copyright
14*85debf7fSRuslan Bukin.\"    notice, this list of conditions and the following disclaimer in the
15*85debf7fSRuslan Bukin.\"    documentation and/or other materials provided with the distribution.
16*85debf7fSRuslan Bukin.\"
17*85debf7fSRuslan Bukin.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18*85debf7fSRuslan Bukin.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19*85debf7fSRuslan Bukin.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20*85debf7fSRuslan Bukin.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21*85debf7fSRuslan Bukin.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22*85debf7fSRuslan Bukin.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23*85debf7fSRuslan Bukin.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24*85debf7fSRuslan Bukin.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25*85debf7fSRuslan Bukin.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26*85debf7fSRuslan Bukin.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27*85debf7fSRuslan Bukin.\" SUCH DAMAGE.
28*85debf7fSRuslan Bukin.\"
29*85debf7fSRuslan Bukin.\" $FreeBSD$
30*85debf7fSRuslan Bukin.\"
31*85debf7fSRuslan Bukin.Dd December 12, 2016
32*85debf7fSRuslan Bukin.Dt XDMA 4
33*85debf7fSRuslan Bukin.Os
34*85debf7fSRuslan Bukin.Sh NAME
35*85debf7fSRuslan Bukin.Nm xdma
36*85debf7fSRuslan Bukin.Nd DMA abstraction layer
37*85debf7fSRuslan Bukin.Sh SYNOPSIS
38*85debf7fSRuslan BukinTo compile xDMA device support into the kernel, place the following line
39*85debf7fSRuslan Bukinin your kernel configuration file:
40*85debf7fSRuslan Bukin.Bd -ragged -offset indent
41*85debf7fSRuslan Bukin.Cd "device xdma"
42*85debf7fSRuslan Bukin.Ed
43*85debf7fSRuslan Bukin.Pp
44*85debf7fSRuslan BukinTo compile xDMA FDT-based test driver, place the following line as well:
45*85debf7fSRuslan Bukin.Bd -literal -offset indent
46*85debf7fSRuslan Bukin.Cd "device xdma_test"
47*85debf7fSRuslan Bukin.Ed
48*85debf7fSRuslan Bukin.Sh DESCRIPTION
49*85debf7fSRuslan BukinxDMA is a DMA framework designed to abstract the interaction between device
50*85debf7fSRuslan Bukindrivers and DMA engines.
51*85debf7fSRuslan Bukin.Pp
52*85debf7fSRuslan BukinxDMA defines an interface for efficient interaction between the device driver
53*85debf7fSRuslan Bukinand DMA controller.
54*85debf7fSRuslan BukinThe
55*85debf7fSRuslan Bukin.Nm
56*85debf7fSRuslan Bukindevice provides a virtual DMA controller and virtual channels called xchans.
57*85debf7fSRuslan BukinThe controller provides virtual channels management (allocation, deallocation,
58*85debf7fSRuslan Bukinconfiguration) and interrupt notification esteblishment needed to receive
59*85debf7fSRuslan Bukinevents from the hardware DMA controller.
60*85debf7fSRuslan Bukin.Nm
61*85debf7fSRuslan Bukinsupports the following transfer types:
62*85debf7fSRuslan Bukin.Bl -hang -offset indent -width xxxxxxxx
63*85debf7fSRuslan Bukin.It Nm Cyclic
64*85debf7fSRuslan BukinA non-stop periodic transfer designed for applications like audio.
65*85debf7fSRuslan Bukin.It Nm Memcpy
66*85debf7fSRuslan BukinA memory-to-memory transfer.
67*85debf7fSRuslan Bukin.El
68*85debf7fSRuslan Bukin.Sh SEE ALSO
69*85debf7fSRuslan Bukin.Xr bus_dma 9
70*85debf7fSRuslan Bukin.Sh HISTORY
71*85debf7fSRuslan BukinSupport for xDMA first appeared in
72*85debf7fSRuslan Bukin.Fx 12.0 .
73*85debf7fSRuslan Bukin.Sh AUTHORS
74*85debf7fSRuslan Bukin.An -nosplit
75*85debf7fSRuslan Bukin.Fx
76*85debf7fSRuslan BukinxDMA framework was first added by
77*85debf7fSRuslan Bukin.An Ruslan Bukin Aq Mt br@FreeBSD.org .
78