xref: /freebsd/share/man/man4/xdma.4 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
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.Dd December 12, 2016
30*85debf7fSRuslan Bukin.Dt XDMA 4
31*85debf7fSRuslan Bukin.Os
32*85debf7fSRuslan Bukin.Sh NAME
33*85debf7fSRuslan Bukin.Nm xdma
34*85debf7fSRuslan Bukin.Nd DMA abstraction layer
35*85debf7fSRuslan Bukin.Sh SYNOPSIS
36*85debf7fSRuslan BukinTo compile xDMA device support into the kernel, place the following line
37*85debf7fSRuslan Bukinin your kernel configuration file:
38*85debf7fSRuslan Bukin.Bd -ragged -offset indent
39*85debf7fSRuslan Bukin.Cd "device xdma"
40*85debf7fSRuslan Bukin.Ed
41*85debf7fSRuslan Bukin.Pp
42*85debf7fSRuslan BukinTo compile xDMA FDT-based test driver, place the following line as well:
43*85debf7fSRuslan Bukin.Bd -literal -offset indent
44*85debf7fSRuslan Bukin.Cd "device xdma_test"
45*85debf7fSRuslan Bukin.Ed
46*85debf7fSRuslan Bukin.Sh DESCRIPTION
47*85debf7fSRuslan BukinxDMA is a DMA framework designed to abstract the interaction between device
48*85debf7fSRuslan Bukindrivers and DMA engines.
49*85debf7fSRuslan Bukin.Pp
50*85debf7fSRuslan BukinxDMA defines an interface for efficient interaction between the device driver
51*85debf7fSRuslan Bukinand DMA controller.
52*85debf7fSRuslan BukinThe
53*85debf7fSRuslan Bukin.Nm
54*85debf7fSRuslan Bukindevice provides a virtual DMA controller and virtual channels called xchans.
55*85debf7fSRuslan BukinThe controller provides virtual channels management (allocation, deallocation,
56*85debf7fSRuslan Bukinconfiguration) and interrupt notification esteblishment needed to receive
57*85debf7fSRuslan Bukinevents from the hardware DMA controller.
58*85debf7fSRuslan Bukin.Nm
59*85debf7fSRuslan Bukinsupports the following transfer types:
60*85debf7fSRuslan Bukin.Bl -hang -offset indent -width xxxxxxxx
61*85debf7fSRuslan Bukin.It Nm Cyclic
62*85debf7fSRuslan BukinA non-stop periodic transfer designed for applications like audio.
63*85debf7fSRuslan Bukin.It Nm Memcpy
64*85debf7fSRuslan BukinA memory-to-memory transfer.
65*85debf7fSRuslan Bukin.El
66*85debf7fSRuslan Bukin.Sh SEE ALSO
67*85debf7fSRuslan Bukin.Xr bus_dma 9
68*85debf7fSRuslan Bukin.Sh HISTORY
69*85debf7fSRuslan BukinSupport for xDMA first appeared in
70*85debf7fSRuslan Bukin.Fx 12.0 .
71*85debf7fSRuslan Bukin.Sh AUTHORS
72*85debf7fSRuslan Bukin.An -nosplit
73*85debf7fSRuslan Bukin.Fx
74*85debf7fSRuslan BukinxDMA framework was first added by
75*85debf7fSRuslan Bukin.An Ruslan Bukin Aq Mt br@FreeBSD.org .
76