diff options
Diffstat (limited to 'usr/src/man/man9f')
-rw-r--r-- | usr/src/man/man9f/Intro.9f | 20 | ||||
-rw-r--r-- | usr/src/man/man9f/Makefile | 33 | ||||
-rw-r--r-- | usr/src/man/man9f/ddi_dma_addr_setup.9f | 156 | ||||
-rw-r--r-- | usr/src/man/man9f/ddi_dma_buf_setup.9f | 138 | ||||
-rw-r--r-- | usr/src/man/man9f/ddi_dma_coff.9f | 117 | ||||
-rw-r--r-- | usr/src/man/man9f/ddi_dma_curwin.9f | 113 | ||||
-rw-r--r-- | usr/src/man/man9f/ddi_dma_devalign.9f | 113 | ||||
-rw-r--r-- | usr/src/man/man9f/ddi_dma_free.9f | 95 | ||||
-rw-r--r-- | usr/src/man/man9f/ddi_dma_get_attr.9f | 93 | ||||
-rw-r--r-- | usr/src/man/man9f/ddi_dma_htoc.9f | 114 | ||||
-rw-r--r-- | usr/src/man/man9f/ddi_dma_movwin.9f | 155 | ||||
-rw-r--r-- | usr/src/man/man9f/ddi_dma_nextseg.9f | 144 | ||||
-rw-r--r-- | usr/src/man/man9f/ddi_dma_nextwin.9f | 155 | ||||
-rw-r--r-- | usr/src/man/man9f/ddi_dma_segtocookie.9f | 149 | ||||
-rw-r--r-- | usr/src/man/man9f/ddi_dma_setup.9f | 182 | ||||
-rw-r--r-- | usr/src/man/man9f/ddi_dmae.9f | 24 | ||||
-rw-r--r-- | usr/src/man/man9f/ddi_iopb_alloc.9f | 163 | ||||
-rw-r--r-- | usr/src/man/man9f/ddi_mem_alloc.9f | 180 |
18 files changed, 25 insertions, 2119 deletions
diff --git a/usr/src/man/man9f/Intro.9f b/usr/src/man/man9f/Intro.9f index 6b31e63e6b..e88df92fc2 100644 --- a/usr/src/man/man9f/Intro.9f +++ b/usr/src/man/man9f/Intro.9f @@ -1,9 +1,10 @@ '\" te +.\" Copyright 2012 Garrett D'Amore <garrett@damore.org>. All rights reserved. .\" Copyright (c) 2005, Sun Microsystems, Inc., All Rights Reserved .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH INTRO 9F "Mar 11, 2008" +.TH INTRO 9F "Feb 06, 2012" .SH NAME Intro, intro \- introduction to DDI/DKI functions .SH DESCRIPTION @@ -351,29 +352,16 @@ _ \fBddi_device_zero\fR Solaris DDI \fBddi_devmap_segmap\fR Solaris DDI \fBddi_dma_addr_bind_handle\fR Solaris DDI -\fBddi_dma_addr_setup\fR Solaris DDI \fBddi_dma_alloc_handle\fR Solaris DDI \fBddi_dma_buf_bind_handle\fR Solaris DDI -\fBddi_dma_buf_setup\fR Solaris DDI \fBddi_dma_burstsizes\fR Solaris DDI -\fBddi_dma_coff\fR Solaris SPARC DDI -\fBddi_dma_curwin\fR Solaris SPARC DDI -\fBddi_dma_devalign\fR Solaris DDI -\fBddi_dma_free\fR Solaris DDI \fBddi_dma_free_handle\fR Solaris DDI \fBddi_dma_getwin\fR Solaris DDI -\fBddi_dma_get_attr\fR Solaris DDI -\fBddi_dma_htoc\fR Solaris SPARC DDI \fBddi_dma_mem_alloc\fR Solaris DDI \fBddi_dma_mem_free\fR Solaris DDI -\fBddi_dma_movwin\fR Solaris SPARC DDI \fBddi_dma_nextcookie\fR Solaris DDI -\fBddi_dma_nextseg\fR Solaris DDI -\fBddi_dma_nextwin\fR Solaris DDI \fBddi_dma_numwin\fR Solaris DDI -\fBddi_dma_segtocookie\fR Solaris DDI \fBddi_dma_set_sbus64\fR Solaris DDI -\fBddi_dma_setup\fR Solaris DDI \fBddi_dma_sync\fR Solaris DDI \fBddi_dma_unbind_handle\fR Solaris DDI \fBddi_dmae\fR Solaris x86 DDI @@ -475,16 +463,12 @@ _ \fBddi_io_rep_putl\fR Solaris DDI \fBddi_io_rep_putw\fR Solaris DDI \fBddi_iomin\fR Solaris DDI -\fBddi_iopb_alloc\fR Solaris DDI -\fBddi_iopb_free\fR Solaris DDI \fBddi_log_sysevent\fR Solaris DDI \fBddi_map_regs\fR Solaris DDI \fBddi_mapdev\fR Solaris DDI \fBddi_mapdev_intercept\fR Solaris DDI \fBddi_mapdev_nointercept\fR Solaris DDI \fBddi_mapdev_set_device_acc_attr\fR Solaris DDI -\fBddi_mem_alloc\fR Solaris DDI -\fBddi_mem_free\fR Solaris DDI \fBddi_mem_get16\fR Solaris DDI \fBddi_mem_get32\fR Solaris DDI \fBddi_mem_get64\fR Solaris DDI diff --git a/usr/src/man/man9f/Makefile b/usr/src/man/man9f/Makefile index 719a150e50..ce8b852e26 100644 --- a/usr/src/man/man9f/Makefile +++ b/usr/src/man/man9f/Makefile @@ -1,4 +1,16 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + # Copyright 2011, Richard Lowe +# Copyright 2012 Garrett D'Amore <garrett@damore>. All rights reserved. include ../../Makefile.master @@ -132,29 +144,16 @@ MANFILES = ASSERT.9f \ ddi_device_zero.9f \ ddi_devid_compare.9f \ ddi_dma_addr_bind_handle.9f \ - ddi_dma_addr_setup.9f \ ddi_dma_alloc_handle.9f \ ddi_dma_buf_bind_handle.9f \ - ddi_dma_buf_setup.9f \ ddi_dma_burstsizes.9f \ - ddi_dma_coff.9f \ - ddi_dma_curwin.9f \ - ddi_dma_devalign.9f \ - ddi_dma_free.9f \ ddi_dma_free_handle.9f \ - ddi_dma_get_attr.9f \ ddi_dma_getwin.9f \ - ddi_dma_htoc.9f \ ddi_dma_mem_alloc.9f \ ddi_dma_mem_free.9f \ - ddi_dma_movwin.9f \ ddi_dma_nextcookie.9f \ - ddi_dma_nextseg.9f \ - ddi_dma_nextwin.9f \ ddi_dma_numwin.9f \ - ddi_dma_segtocookie.9f \ ddi_dma_set_sbus64.9f \ - ddi_dma_setup.9f \ ddi_dma_sync.9f \ ddi_dma_unbind_handle.9f \ ddi_dmae.9f \ @@ -200,10 +199,8 @@ MANFILES = ASSERT.9f \ ddi_io_rep_get8.9f \ ddi_io_rep_put8.9f \ ddi_iomin.9f \ - ddi_iopb_alloc.9f \ ddi_log_sysevent.9f \ ddi_map_regs.9f \ - ddi_mem_alloc.9f \ ddi_mem_get8.9f \ ddi_mem_put8.9f \ ddi_mem_rep_get8.9f \ @@ -752,8 +749,6 @@ MANSOFILES = SIZEOF_PTR.9f \ ddi_io_rep_putb.9f \ ddi_io_rep_putl.9f \ ddi_io_rep_putw.9f \ - ddi_iopb_free.9f \ - ddi_mem_free.9f \ ddi_mem_get16.9f \ ddi_mem_get32.9f \ ddi_mem_get64.9f \ @@ -1478,12 +1473,8 @@ ddi_io_rep_putb.9f := SOSRC = man9f/ddi_io_rep_put8.9f ddi_io_rep_putl.9f := SOSRC = man9f/ddi_io_rep_put8.9f ddi_io_rep_putw.9f := SOSRC = man9f/ddi_io_rep_put8.9f -ddi_iopb_free.9f := SOSRC = man9f/ddi_iopb_alloc.9f - ddi_unmap_regs.9f := SOSRC = man9f/ddi_map_regs.9f -ddi_mem_free.9f := SOSRC = man9f/ddi_mem_alloc.9f - ddi_mem_get16.9f := SOSRC = man9f/ddi_mem_get8.9f ddi_mem_get32.9f := SOSRC = man9f/ddi_mem_get8.9f ddi_mem_get64.9f := SOSRC = man9f/ddi_mem_get8.9f diff --git a/usr/src/man/man9f/ddi_dma_addr_setup.9f b/usr/src/man/man9f/ddi_dma_addr_setup.9f deleted file mode 100644 index 52f3a367be..0000000000 --- a/usr/src/man/man9f/ddi_dma_addr_setup.9f +++ /dev/null @@ -1,156 +0,0 @@ -'\" te -.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH DDI_DMA_ADDR_SETUP 9F "Apr 04, 2006" -.SH NAME -ddi_dma_addr_setup \- easier DMA setup for use with virtual addresses -.SH SYNOPSIS -.LP -.nf -#include <sys/ddi.h> -#include <sys/sunddi.h> - -\fBint\fR \fBddi_dma_addr_setup\fR(\fBdev_info_t *\fR\fIdip\fR, \fBstruct as *\fR\fIas\fR, \fBcaddr_t\fR \fIaddr\fR, - \fBsize_t\fR \fIlen\fR, \fBuint_t\fR \fIflags\fR, \fBint (*\fR\fIwaitfp\fR) (caddr_t), \fBcaddr_t\fR \fIarg\fR, - \fBddi_dma_lim_t *\fR \fIlim\fR, \fBddi_dma_handle_t *\fR\fIhandlep\fR); -.fi - -.SH INTERFACE LEVEL -.sp -.LP -This interface is obsolete. \fBddi_dma_addr_bind_handle\fR(9F) should be used -instead. -.SH PARAMETERS -.sp -.ne 2 -.na -\fB\fIdip\fR\fR -.ad -.RS 11n -A pointer to the device's \fBdev_info\fR structure. -.RE - -.sp -.ne 2 -.na -\fB\fIas\fR\fR -.ad -.RS 11n -A pointer to an address space structure. Should be set to \fINULL\fR, which -implies kernel address space. -.RE - -.sp -.ne 2 -.na -\fB\fIaddr\fR\fR -.ad -.RS 11n -Virtual address of the memory object. -.RE - -.sp -.ne 2 -.na -\fB\fIlen\fR\fR -.ad -.RS 11n -Length of the memory object in bytes. -.RE - -.sp -.ne 2 -.na -\fB\fIflags\fR\fR -.ad -.RS 11n -Flags that would go into the \fBddi_dma_req\fR structure (see -\fBddi_dma_req\fR(9S)). -.RE - -.sp -.ne 2 -.na -\fB\fIwaitfp\fR\fR -.ad -.RS 11n -The address of a function to call back later if resources aren't available now. -The special function addresses \fBDDI_DMA_SLEEP\fR and \fBDDI_DMA_DONTWAIT\fR -(see \fBddi_dma_req\fR(9S)) are taken to mean, respectively, wait until -resources are available or, do not wait at all and do not schedule a callback. -.RE - -.sp -.ne 2 -.na -\fB\fIarg\fR\fR -.ad -.RS 11n -Argument to be passed to a callback function, if such a function is specified. -.RE - -.sp -.ne 2 -.na -\fB\fIlim\fR\fR -.ad -.RS 11n -A pointer to a \fBDMA\fR limits structure for this device (see -\fBddi_dma_lim_sparc\fR(9S) or \fBddi_dma_lim_x86\fR(9S)). If this pointer is -\fINULL\fR, a default set of \fBDMA\fR limits is assumed. -.RE - -.sp -.ne 2 -.na -\fB\fIhandlep\fR\fR -.ad -.RS 11n -Pointer to a \fBDMA\fR handle. See \fBddi_dma_setup\fR(9F) for a discussion of -handle. -.RE - -.SH DESCRIPTION -.sp -.LP -The \fBddi_dma_addr_setup()\fR function is an interface to -\fBddi_dma_setup\fR(9F). It uses its arguments to construct an appropriate -\fBddi_dma_req\fR structure and calls \fBddi_dma_setup\fR(9F) with it. -.SH RETURN VALUES -.sp -.LP -See \fBddi_dma_setup\fR(9F) for the possible return values for this function. -.SH CONTEXT -.sp -.LP -The \fBddi_dma_addr_setup()\fR can be called from user, interrupt, or kernel -context, except when \fIwaitfp\fR is set to \fBDDI_DMA_SLEEP\fR, in which case -it cannot be called from interrupt context. -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for a description of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Stability Level Obsolete -.TE - -.SH SEE ALSO -.sp -.LP -\fBattributes\fR(5), \fBddi_dma_buf_setup\fR(9F), \fBddi_dma_free\fR(9F), -\fBddi_dma_htoc\fR(9F), \fBddi_dma_setup\fR(9F), \fBddi_dma_sync\fR(9F), -\fBddi_iopb_alloc\fR(9F), \fBddi_dma_lim_sparc\fR(9S), -\fBddi_dma_lim_x86\fR(9S), \fBddi_dma_req\fR(9S) -.sp -.LP -\fIWriting Device Drivers\fR diff --git a/usr/src/man/man9f/ddi_dma_buf_setup.9f b/usr/src/man/man9f/ddi_dma_buf_setup.9f deleted file mode 100644 index 017aae75eb..0000000000 --- a/usr/src/man/man9f/ddi_dma_buf_setup.9f +++ /dev/null @@ -1,138 +0,0 @@ -'\" te -.\" Copyright (c) 2006, Sun Microsystems, Inc. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH DDI_DMA_BUF_SETUP 9F "Jan 16, 2006" -.SH NAME -ddi_dma_buf_setup \- easier DMA setup for use with buffer structures -.SH SYNOPSIS -.LP -.nf -#include <sys/ddi.h> -#include <sys/sunddi.h> - - - -\fBint\fR \fBddi_dma_buf_setup\fR(\fBdev_info_t *\fR\fIdip\fR, \fBstruct buf *\fR\fIbp\fR, \fBuint_t\fR \fIflags\fR, - \fBint (*\fR\fIwaitfp\fR) (caddr_t),, \fBcaddr_t\fR \fIarg\fR, \fBddi_dma_lim_t *\fR\fIlim\fR, - \fBddi_dma_handle_t *\fR\fIhandlep\fR); -.fi - -.SH INTERFACE LEVEL -.sp -.LP -This interface is obsolete. \fBddi_dma_buf_bind_handle\fR(9F) should be used -instead. -.SH PARAMETERS -.sp -.ne 2 -.na -\fB\fIdip\fR\fR -.ad -.RS 11n -A pointer to the device's \fBdev_info\fR structure. -.RE - -.sp -.ne 2 -.na -\fB\fIbp\fR\fR -.ad -.RS 11n -A pointer to a system buffer structure (see \fBbuf\fR(9S)). -.RE - -.sp -.ne 2 -.na -\fB\fIflags\fR\fR -.ad -.RS 11n -Flags that go into a \fBddi_dma_req\fR structure (see \fBddi_dma_req\fR(9S)). -.RE - -.sp -.ne 2 -.na -\fB\fIwaitfp\fR\fR -.ad -.RS 11n -The address of a function to call back later if resources aren't available now. -The special function addresses \fBDDI_DMA_SLEEP\fR and \fBDDI_DMA_DONTWAIT\fR -(see \fBddi_dma_req\fR(9S)) are taken to mean, respectively, wait until -resources are available, or do not wait at all and do not schedule a callback. -.RE - -.sp -.ne 2 -.na -\fB\fIarg\fR\fR -.ad -.RS 11n -Argument to be passed to a callback function, if such a function is specified. -.RE - -.sp -.ne 2 -.na -\fB\fIlim\fR\fR -.ad -.RS 11n -A pointer to a \fBDMA\fR limits structure for this device (see -\fBddi_dma_lim_sparc\fR(9S) or \fBddi_dma_lim_x86\fR(9S)). If this pointer is -\fINULL\fR, a default set of \fBDMA\fR limits is assumed. -.RE - -.sp -.ne 2 -.na -\fB\fIhandlep\fR\fR -.ad -.RS 11n -Pointer to a \fBDMA\fR handle. See \fBddi_dma_setup\fR(9F) for a discussion of -handle. -.RE - -.SH DESCRIPTION -.sp -.LP -The \fBddi_dma_buf_setup()\fR function is an interface to -\fBddi_dma_setup\fR(9F). It uses its arguments to construct an appropriate -\fBddi_dma_req\fR structure and calls \fBddi_dma_setup()\fR with it. -.SH RETURN VALUES -.sp -.LP -See \fBddi_dma_setup\fR(9F) for the possible return values for this function. -.SH CONTEXT -.sp -.LP -The \fBddi_dma_buf_setup()\fR function can be called from user, interrupt, or -kernel context, except when \fIwaitfp\fR is set to \fBDDI_DMA_SLEEP\fR, in -which case it cannot be called from interrupt context. -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for a description of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Stability Level Obsolete -.TE - -.SH SEE ALSO -.sp -.LP -\fBattributes\fR(5), \fBddi_dma_addr_setup\fR(9F), \fBddi_dma_free\fR(9F), -\fBddi_dma_htoc\fR(9F), \fBddi_dma_setup\fR(9F), \fBddi_dma_sync\fR(9F), -\fBphysio\fR(9F), \fBbuf\fR(9S), \fBddi_dma_lim_sparc\fR(9S), -\fBddi_dma_lim_x86\fR(9S), \fBddi_dma_req\fR(9S) -.sp -.LP -\fIWriting Device Drivers\fR diff --git a/usr/src/man/man9f/ddi_dma_coff.9f b/usr/src/man/man9f/ddi_dma_coff.9f deleted file mode 100644 index b8609b2fd0..0000000000 --- a/usr/src/man/man9f/ddi_dma_coff.9f +++ /dev/null @@ -1,117 +0,0 @@ -'\" te -.\" Copyright (c) 2006, Sun Microsystems, Inc. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH DDI_DMA_COFF 9F "Jan 16, 2006" -.SH NAME -ddi_dma_coff \- convert a DMA cookie to an offset within a DMA handle. -.SH SYNOPSIS -.LP -.nf -#include <sys/conf.h> -#include <sys/ddi.h> -#include <sys/sunddi.h> - - - -\fBint\fR \fBddi_dma_coff\fR(\fBddi_dma_handle_t\fR \fIhandle\fR, \fBddi_dma_cookie_t *\fR\fIcookiep\fR, - \fBoff_t *\fR\fIoffp\fR); -.fi - -.SH INTERFACE LEVEL -.sp -.LP -Solaris SPARC DDI (Solaris SPARC DDI). This interface is obsolete. -.SH PARAMETERS -.sp -.ne 2 -.na -\fB\fIhandle\fR\fR -.ad -.RS 11n -The \fIhandle\fR filled in by a call to \fBddi_dma_setup\fR(9F). -.RE - -.sp -.ne 2 -.na -\fB\fIcookiep\fR\fR -.ad -.RS 11n -A pointer to a \fBDMA\fR cookie (see \fBddi_dma_cookie\fR(9S)) that contains -the appropriate address, length and bus type to be used in programming the -\fBDMA\fR engine. -.RE - -.sp -.ne 2 -.na -\fB\fIoffp\fR\fR -.ad -.RS 11n -A pointer to an offset to be filled in. -.RE - -.SH DESCRIPTION -.sp -.LP -The \fBddi_dma_coff()\fR function converts the values in \fBDMA\fR cookie -pointed to by \fIcookiep\fR to an offset (in bytes) from the beginning of the -object that the DMA\fBhandle\fR has mapped. -.sp -.LP -The \fBddi_dma_coff()\fR function allows a driver to update a \fBDMA\fR cookie -with values it reads from its device's \fBDMA\fR engine after a transfer -completes and convert that value into an offset into the object that is mapped -for \fBDMA\fR. -.SH RETURN VALUES -.sp -.LP -The \fBddi_dma_coff()\fR function returns: -.sp -.ne 2 -.na -\fB\fBDDI_SUCCESS\fR\fR -.ad -.RS 15n -Successfully filled in \fIoffp\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBDDI_FAILURE\fR\fR -.ad -.RS 15n -Failed to successfully fill in \fIoffp\fR. -.RE - -.SH CONTEXT -.sp -.LP -The \fBddi_dma_coff()\fR function can be called from user, interrupt, or kernel -context. -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Obsolete -.TE - -.SH SEE ALSO -.sp -.LP -\fBddi_dma_setup\fR(9F), \fBddi_dma_sync\fR(9F), \fBddi_dma_cookie\fR(9S) -.sp -.LP -\fIWriting Device Drivers\fR diff --git a/usr/src/man/man9f/ddi_dma_curwin.9f b/usr/src/man/man9f/ddi_dma_curwin.9f deleted file mode 100644 index b04a98c114..0000000000 --- a/usr/src/man/man9f/ddi_dma_curwin.9f +++ /dev/null @@ -1,113 +0,0 @@ -'\" te -.\" Copyright (c) 2006, Sun Microsystems, Inc. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH DDI_DMA_CURWIN 9F "Jan 16, 2006" -.SH NAME -ddi_dma_curwin \- report current DMA window offset and size -.SH SYNOPSIS -.LP -.nf -#include <sys/conf.h> -#include <sys/ddi.h> -#include <sys/sunddi.h> - - - -\fBint\fR \fBddi_dma_curwin\fR(\fBddi_dma_handle_t\fR \fIhandle\fR, \fBoff_t *\fR\fIoffp\fR, \fBuint_t *\fR\fIlenp\fR); -.fi - -.SH INTERFACE LEVEL -.sp -.LP -This interface is obsolete. \fBddi_dma_getwin\fR(9F) should be used instead. -.SH PARAMETERS -.sp -.ne 2 -.na -\fB\fIhandle\fR\fR -.ad -.RS 10n -The \fBDMA\fR handle filled in by a call to \fBddi_dma_setup\fR(9F). -.RE - -.sp -.ne 2 -.na -\fB\fIoffp\fR\fR -.ad -.RS 10n -A pointer to a value which will be filled in with the current offset from the -beginning of the object that is mapped for \fBDMA\fR. -.RE - -.sp -.ne 2 -.na -\fB\fIlenp\fR\fR -.ad -.RS 10n -A pointer to a value which will be filled in with the size, in bytes, of the -current window onto the object that is mapped for \fBDMA\fR. -.RE - -.SH DESCRIPTION -.sp -.LP -The \fBddi_dma_curwin()\fR function reports the current \fBDMA\fR window offset -and size. If a \fBDMA\fR mapping allows partial mapping, that is if the -\fBDDI_DMA_PARTIAL\fR flag in the \fBddi_dma_req\fR(9S) structure is set, its -current (effective) \fBDMA\fR window offset and size can be obtained by a call -to \fBddi_dma_curwin()\fR. -.SH RETURN VALUES -.sp -.LP -The \fBddi_dma_curwin()\fR function returns: -.sp -.ne 2 -.na -\fB\fBDDI_SUCCESS\fR\fR -.ad -.RS 15n -The current length and offset can be established. -.RE - -.sp -.ne 2 -.na -\fB\fBDDI_FAILURE\fR\fR -.ad -.RS 15n -Otherwise. -.RE - -.SH CONTEXT -.sp -.LP -The \fBddi_dma_curwin()\fR function can be called from user, interrupt, or -kernel context. -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for a description of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Stability Level Obsolete -.TE - -.SH SEE ALSO -.sp -.LP -\fBattributes\fR(5), \fBddi_dma_getwin\fR(9F), \fBddi_dma_movwin\fR(9F), -\fBddi_dma_setup\fR(9F), \fBddi_dma_req\fR(9S) -.sp -.LP -\fIWriting Device Drivers\fR diff --git a/usr/src/man/man9f/ddi_dma_devalign.9f b/usr/src/man/man9f/ddi_dma_devalign.9f deleted file mode 100644 index 913c73e6f2..0000000000 --- a/usr/src/man/man9f/ddi_dma_devalign.9f +++ /dev/null @@ -1,113 +0,0 @@ -'\" te -.\" Copyright (c) 2006, Sun Microsystems, Inc. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH DDI_DMA_DEVALIGN 9F "Apr 04, 2006" -.SH NAME -ddi_dma_devalign \- find DMA mapping alignment and minimum transfer size -.SH SYNOPSIS -.LP -.nf -#include <sys/conf.h> -#include <sys/ddi.h> -#include <sys/sunddi.h> - - - -\fBint\fR \fBddi_dma_devalign\fR(\fBddi_dma_handle_t\fR \fIhandle\fR, \fBuint_t *\fR\fIalignment\fR, - \fBuint_t *\fR\fIminxfr\fR); -.fi - -.SH INTERFACE LEVEL -.sp -.LP -Solaris DDI specific (Solaris DDI). This interface is obsolete. -.SH PARAMETERS -.sp -.ne 2 -.na -\fB\fIhandle\fR\fR -.ad -.RS 13n -The DMA\fBhandle\fR filled in by a successful call to \fBddi_dma_setup\fR(9F). -.RE - -.sp -.ne 2 -.na -\fB\fIalignment\fR\fR -.ad -.RS 13n -A pointer to an unsigned integer to be filled in with the minimum required -alignment for \fBDMA\fR. The alignment is guaranteed to be a power of two. -.RE - -.sp -.ne 2 -.na -\fB\fIminxfr\fR\fR -.ad -.RS 13n -A pointer to an unsigned integer to be filled in with the minimum effective -transfer size (see \fBddi_iomin\fR(9F), \fBddi_dma_lim_sparc\fR(9S) and -\fBddi_dma_lim_x86\fR(9S)). This also is guaranteed to be a power of two. -.RE - -.SH DESCRIPTION -.sp -.LP -The \fBddi_dma_devalign()\fR Function determines after a successful \fBDMA\fR -mapping (see \fBddi_dma_setup\fR(9F)) the minimum required data alignment and -minimum \fBDMA\fR transfer size. -.SH RETURN VALUES -.sp -.LP -The \fBddi_dma_devalign()\fR function returns: -.sp -.ne 2 -.na -\fB\fBDDI_SUCCESS\fR\fR -.ad -.RS 15n -The \fIalignment\fR and \fIminxfr\fR values have been filled. -.RE - -.sp -.ne 2 -.na -\fB\fBDDI_FAILURE\fR\fR -.ad -.RS 15n -The handle was illegal. -.RE - -.SH CONTEXT -.sp -.LP -The \fBddi_dma_devalign()\fR function can be called from user, interrupt, or -kernel context. -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Obsolete -.TE - -.SH SEE ALSO -.sp -.LP -\fBddi_dma_setup\fR(9F), \fBddi_iomin\fR(9F), \fBddi_dma_lim_sparc\fR(9S), -\fBddi_dma_lim_x86\fR(9S), \fBddi_dma_req\fR(9S) -.sp -.LP -\fIWriting Device Drivers\fR diff --git a/usr/src/man/man9f/ddi_dma_free.9f b/usr/src/man/man9f/ddi_dma_free.9f deleted file mode 100644 index 4d9a794846..0000000000 --- a/usr/src/man/man9f/ddi_dma_free.9f +++ /dev/null @@ -1,95 +0,0 @@ -'\" te -.\" Copyright (c) 2006, Sun Microsystems, Inc. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH DDI_DMA_FREE 9F "Jan 16, 2006" -.SH NAME -ddi_dma_free \- release system DMA resources -.SH SYNOPSIS -.LP -.nf -#include <sys/ddi.h> -#include <sys/sunddi.h> - - - -\fBint\fR \fBddi_dma_free\fR(\fBddi_dma_handle_t\fR \fIhandle\fR); -.fi - -.SH INTERFACE LEVEL -.sp -.LP -This interface is obsolete. \fBddi_dma_free_handle\fR(9F) should be used -instead. -.SH PARAMETERS -.sp -.ne 2 -.na -\fB\fIhandle\fR\fR -.ad -.RS 10n -The handle filled in by a call to \fBddi_dma_setup\fR(9F). -.RE - -.SH DESCRIPTION -.sp -.LP -The \fBddi_dma_free()\fR function releases system \fBDMA\fR resources set up by -\fBddi_dma_setup\fR(9F). When a \fBDMA\fR transfer completes, the driver should -free up system \fBDMA\fR resources established by a call to -\fBddi_dma_setup\fR(9F). This is done by a call to \fBddi_dma_free()\fR. -\fBddi_dma_free()\fR does an implicit \fBddi_dma_sync\fR(9F) for you so any -further synchronization steps are not necessary. -.SH RETURN VALUES -.sp -.LP -The \fBddi_dma_free()\fR function returns: -.sp -.ne 2 -.na -\fB\fBDDI_SUCCESS\fR\fR -.ad -.RS 15n -Successfully released resources -.RE - -.sp -.ne 2 -.na -\fB\fBDDI_FAILURE\fR\fR -.ad -.RS 15n -Failed to free resources -.RE - -.SH CONTEXT -.sp -.LP -The \fBddi_dma_free()\fR function can be called from user, interrupt, or kernel -context. -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for a description of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Stability Level Obsolete -.TE - -.SH SEE ALSO -.sp -.LP -\fBattributes\fR(5), \fBddi_dma_addr_setup\fR(9F), \fBddi_dma_buf_setup\fR(9F), -\fBddi_dma_free_handle\fR(9F), \fBddi_dma_htoc\fR(9F), \fBddi_dma_sync\fR(9F), -\fBddi_dma_req\fR(9S) -.sp -.LP -\fIWriting Device Drivers\fR diff --git a/usr/src/man/man9f/ddi_dma_get_attr.9f b/usr/src/man/man9f/ddi_dma_get_attr.9f deleted file mode 100644 index 5557280c5e..0000000000 --- a/usr/src/man/man9f/ddi_dma_get_attr.9f +++ /dev/null @@ -1,93 +0,0 @@ -'\" te -.\" Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH DDI_DMA_GET_ATTR 9F "Oct 12, 2005" -.SH NAME -ddi_dma_get_attr \- get the device DMA attribute structure from a DMA handle -.SH SYNOPSIS -.LP -.nf -#include <sys/ddi.h> -#include <sys/sunddi.h> - - - -\fBint\fR \fBddi_dma_get_attr\fR(\fBddi_dma_handle_t\fR \fIhandle\fR, \fBddi_dma_attr_t *\fR\fIattrp\fR); -.fi - -.SH INTERFACE LEVEL -.sp -.LP -Solaris DDI specific (Solaris DDI). This interface is obsolete. -.SH PARAMETERS -.sp -.ne 2 -.na -\fB\fIhandle\fR\fR -.ad -.RS 10n -The handle filled in by a call to \fBddi_dma_alloc_handle\fR(9F). -.RE - -.sp -.ne 2 -.na -\fB\fIattrp\fR\fR -.ad -.RS 10n -Pointer to a buffer suitable for holding a DMA attribute structure. See -\fBddi_dma_attr\fR(9S). -.RE - -.SH DESCRIPTION -.sp -.LP -\fBddi_dma_get_attr()\fR is used to get a \fBddi_dma_attr\fR(9S) structure. -This structure describes the attributes of the DMA data path to which any -memory object bound to the given handle will be subject. -.SH RETURN VALUES -.sp -.ne 2 -.na -\fB\fBDDI_SUCCESS\fR\fR -.ad -.RS 19n -Successfully passed back attribute structure in buffer pointed to by -\fIattrp\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBDDI_DMA_BADATTR\fR\fR -.ad -.RS 19n -A valid attribute structure could not be passed back. -.RE - -.SH CONTEXT -.sp -.LP -\fBddi_dma_get_attr()\fR can be called from any context. -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Obsolete -.TE - -.SH SEE ALSO -.sp -.LP -\fBddi_dma_alloc_handle\fR(9F), \fBddi_dma_attr\fR(9S) diff --git a/usr/src/man/man9f/ddi_dma_htoc.9f b/usr/src/man/man9f/ddi_dma_htoc.9f deleted file mode 100644 index f2157ba6d8..0000000000 --- a/usr/src/man/man9f/ddi_dma_htoc.9f +++ /dev/null @@ -1,114 +0,0 @@ -'\" te -.\" Copyright (c) 2006, Sun Microsystems, Inc. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH DDI_DMA_HTOC 9F "Jan 16, 2006" -.SH NAME -ddi_dma_htoc \- convert a DMA handle to a DMA address cookie -.SH SYNOPSIS -.LP -.nf -#include <sys/conf.h> -#include <sys/ddi.h> -#include <sys/sunddi.h> - - - -\fBint\fR \fBddi_dma_htoc\fR(\fBddi_dma_handle_t\fR \fIhandle\fR, \fBoff_t\fR \fIoff\fR, - \fBddi_dma_cookie_t *\fR\fIcookiep\fR); -.fi - -.SH INTERFACE LEVEL -.sp -.LP -This interface is obsolete. \fBddi_dma_addr_bind_handle\fR(9F) or -\fBddi_dma_buf_bind_handle\fR(9F) should be used instead. -.SH PARAMETERS -.sp -.ne 2 -.na -\fB\fIhandle\fR\fR -.ad -.RS 11n -The handle filled in by a call to \fBddi_dma_setup\fR(9F). -.RE - -.sp -.ne 2 -.na -\fB\fIoff\fR\fR -.ad -.RS 11n -An offset into the object that \fIhandle\fR maps. -.RE - -.sp -.ne 2 -.na -\fB\fIcookiep\fR\fR -.ad -.RS 11n -A pointer to a \fBddi_dma_cookie\fR(9S) structure. -.RE - -.SH DESCRIPTION -.sp -.LP -The \fBddi_dma_htoc()\fR function takes a \fBDMA\fR handle (established by -\fBddi_dma_setup\fR(9F)), and fills in the cookie pointed to by \fIcookiep\fR -with the appropriate address, length, and bus type to be used to program the -\fBDMA\fR engine. -.SH RETURN VALUES -.sp -.LP -The \fBddi_dma_htoc()\fR function returns: -.sp -.ne 2 -.na -\fB\fBDDI_SUCCESS\fR\fR -.ad -.RS 15n -Successfully filled in the cookie pointed to by \fIcookiep\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBDDI_FAILURE\fR\fR -.ad -.RS 15n -Failed to successfully fill in the cookie. -.RE - -.SH CONTEXT -.sp -.LP -The \fBddi_dma_htoc()\fR function can be called from user, interrupt, or kernel -context. -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for a description of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Stability Level Obsolete -.TE - -.SH SEE ALSO -.sp -.LP -\fBattributes\fR(5), \fBddi_dma_addr_bind_handle\fR(9F), -\fBddi_dma_addr_setup\fR(9F), \fBddi_dma_buf_bind_handle\fR(9F), -\fBddi_dma_buf_setup\fR(9F), \fBddi_dma_setup\fR(9F), \fBddi_dma_sync\fR(9F), -\fBddi_dma_cookie\fR(9S) -.sp -.LP -\fIWriting Device Drivers\fR diff --git a/usr/src/man/man9f/ddi_dma_movwin.9f b/usr/src/man/man9f/ddi_dma_movwin.9f deleted file mode 100644 index 52ebc3170f..0000000000 --- a/usr/src/man/man9f/ddi_dma_movwin.9f +++ /dev/null @@ -1,155 +0,0 @@ -'\" te -.\" Copyright (c) 2006, Sun Microsystems, Inc. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH DDI_DMA_MOVWIN 9F "Jan 16, 2006" -.SH NAME -ddi_dma_movwin \- shift current DMA window -.SH SYNOPSIS -.LP -.nf -#include <sys/ddi.h> -#include <sys/sunddi.h> - - - -\fBint\fR \fBddi_dma_movwin\fR(\fBddi_dma_handle_t\fR \fIhandle\fR, \fBoff_t *\fR\fIoffp\fR, - \fBuint_t *\fR\fIlenp\fR, \fBddi_dma_cookie_t *\fR\fIcookiep\fR); -.fi - -.SH INTERFACE LEVEL -.sp -.LP -This interface is obsolete. \fBddi_dma_getwin\fR(9F) should be used instead. -.SH PARAMETERS -.sp -.ne 2 -.na -\fB\fIhandle\fR\fR -.ad -.RS 11n -The \fBDMA\fR handle filled in by a call to \fBddi_dma_setup\fR(9F). -.RE - -.sp -.ne 2 -.na -\fB\fIoffp\fR\fR -.ad -.RS 11n -A pointer to an offset to set the \fBDMA\fR 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. -.RE - -.sp -.ne 2 -.na -\fB\fIlenp\fR\fR -.ad -.RS 11n -A pointer to a value which must either be the current size of the \fBDMA\fR -window (as known from a call to \fBddi_dma_curwin\fR(9F) or from a previous -call to \fBddi_dma_movwin()\fR). Upon a successful return, it will be filled in -with the size, in bytes, of the current window. -.RE - -.sp -.ne 2 -.na -\fB\fIcookiep\fR\fR -.ad -.RS 11n -A pointer to a \fBDMA\fR cookie (see \fBddi_dma_cookie\fR(9S)). Upon a -successful return, cookiep is filled in just as if an implicit -\fBddi_dma_htoc\fR(9F) had been made. -.RE - -.SH DESCRIPTION -.sp -.LP -The \fBddi_dma_movwin()\fR function shifts the current \fBDMA\fR window. If a -\fBDMA\fR request allows the system to allocate resources for less than the -entire object by setting the \fBDDI_DMA_PARTIAL\fR flag in the -\fBddi_dma_req\fR(9S) structure, the current \fBDMA\fR window can be shifted by -a call to \fBddi_dma_movwin()\fR. -.sp -.LP -The caller must first determine the current \fBDMA\fR window size by a call to -\fBddi_dma_curwin\fR(9F). Using the current offset and size of the window thus -retrieved, the caller of \fBddi_dma_movwin()\fR may change the window onto the -object by changing the offset by a value which is some multiple of the size of -the \fBDMA\fR window. -.sp -.LP -The \fBddi_dma_movwin()\fR function takes care of underlying resource -synchronizations required to \fBshift\fR the window. However, if you want to -\fBaccess\fR the data prior to or after moving the window, further -synchronizations using \fBddi_dma_sync\fR(9F) are required. -.sp -.LP -This function is normally called from an interrupt routine. The first -invocation of the \fBDMA\fR engine is done from the driver. All subsequent -invocations of the \fBDMA\fR 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 \fBDMA\fR transfer. Otherwise it calls -\fBddi_dma_movwin()\fR to shift the current window and starts another \fBDMA\fR -transfer. -.SH RETURN VALUES -.sp -.LP -The \fBddi_dma_movwin()\fR function returns: -.sp -.ne 2 -.na -\fB\fBDDI_SUCCESS\fR\fR -.ad -.RS 15n -The current length and offset are legal and have been set. -.RE - -.sp -.ne 2 -.na -\fB\fBDDI_FAILURE\fR\fR -.ad -.RS 15n -Otherwise. -.RE - -.SH CONTEXT -.sp -.LP -The \fBddi_dma_movwin()\fR function can be called from user, interrupt, or -kernel context. -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for a description of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Stability Level Obsolete -.TE - -.SH SEE ALSO -.sp -.LP -\fBattributes\fR(5), \fBddi_dma_curwin\fR(9F), \fBddi_dma_getwin\fR(9F), -\fBddi_dma_htoc\fR(9F), \fBddi_dma_setup\fR(9F), \fBddi_dma_sync\fR(9F), -\fBddi_dma_cookie\fR(9S), \fBddi_dma_req\fR(9S) -.sp -.LP -\fIWriting Device Drivers\fR -.SH WARNINGS -.sp -.LP -The caller must guarantee that the resources used by the object are inactive -prior to calling this function. diff --git a/usr/src/man/man9f/ddi_dma_nextseg.9f b/usr/src/man/man9f/ddi_dma_nextseg.9f deleted file mode 100644 index 7b791d1ada..0000000000 --- a/usr/src/man/man9f/ddi_dma_nextseg.9f +++ /dev/null @@ -1,144 +0,0 @@ -'\" te -.\" Copyright (c) 2006, Sun Microsystems, Inc. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH DDI_DMA_NEXTSEG 9F "Apr 04, 2006" -.SH NAME -ddi_dma_nextseg \- get next DMA segment -.SH SYNOPSIS -.LP -.nf -#include <sys/ddi.h> -#include <sys/sunddi.h> - - - -\fBint\fR \fBddi_dma_nextseg\fR(\fBddi_dma_win_t\fR \fIwin\fR, \fBddi_dma_seg_t\fR \fIseg\fR, - \fBddi_dma_seg_t *\fR\fInseg\fR); -.fi - -.SH INTERFACE LEVEL -.sp -.LP -This interface is obsolete. \fBddi_dma_nextcookie\fR(9F) should be used -instead. -.SH PARAMETERS -.sp -.ne 2 -.na -\fB\fIwin\fR\fR -.ad -.RS 8n -A \fBDMA\fR window. -.RE - -.sp -.ne 2 -.na -\fB\fIseg\fR\fR -.ad -.RS 8n -The current \fBDMA\fR segment or \fINULL\fR. -.RE - -.sp -.ne 2 -.na -\fB\fInseg\fR\fR -.ad -.RS 8n -A pointer to the next \fBDMA\fR segment to be filled in. If \fIseg\fR is -\fINULL\fR, a pointer to the first segment within the specified window is -returned. -.RE - -.SH DESCRIPTION -.sp -.LP -The \fBddi_dma_nextseg()\fR function gets the next \fBDMA\fR segment within the -specified window \fIwin\fR. If the current segment is \fINULL\fR, the first -\fBDMA\fR segment within the window is returned. -.sp -.LP -A \fBDMA\fR segment is always required for a \fBDMA\fR window. A \fBDMA\fR -segment is a contiguous portion of a \fBDMA\fR window (see -\fBddi_dma_nextwin\fR(9F)) which is entirely addressable by the device for a -data transfer operation. -.sp -.LP -An example where multiple \fBDMA\fR segments are allocated is where the system -does not contain \fBDVMA\fR capabilities and the object may be non-contiguous. -In this example the object will be broken into smaller contiguous \fBDMA\fR -segments. Another example is where the device has an upper limit on its -transfer size (for example an 8-bit address register) and has expressed this in -the \fBDMA\fR limit structure (see \fBddi_dma_lim_sparc\fR(9S) or -\fBddi_dma_lim_x86\fR(9S)). In this example the object will be broken into -smaller addressable \fBDMA\fR segments. -.SH RETURN VALUES -.sp -.LP -The \fBddi_dma_nextseg()\fR function returns: -.sp -.ne 2 -.na -\fB\fBDDI_SUCCESS\fR\fR -.ad -.RS 17n -Successfully filled in the next segment pointer. -.RE - -.sp -.ne 2 -.na -\fB\fBDDI_DMA_DONE\fR\fR -.ad -.RS 17n -There is no next segment. The current segment is the final segment within the -specified window. -.RE - -.sp -.ne 2 -.na -\fB\fBDDI_DMA_STALE\fR\fR -.ad -.RS 17n -\fIwin\fR does not refer to the currently active window. -.RE - -.SH CONTEXT -.sp -.LP -The \fBddi_dma_nextseg()\fR function can be called from user, interrupt, or -kernel context. -.SH EXAMPLES -.sp -.LP -For an example, see \fBddi_dma_segtocookie\fR(9F). -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for a description of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Stability Level Obsolete -.TE - -.SH SEE ALSO -.sp -.LP -\fBattributes\fR(5), \fBddi_dma_addr_setup\fR(9F), \fBddi_dma_buf_setup\fR(9F), -\fBddi_dma_nextcookie\fR(9F), \fBddi_dma_nextwin\fR(9F), -\fBddi_dma_segtocookie\fR(9F), \fBddi_dma_sync\fR(9F), -\fBddi_dma_lim_sparc\fR(9S), \fBddi_dma_lim_x86\fR(9S), \fBddi_dma_req\fR(9S) -.sp -.LP -\fIWriting Device Drivers\fR diff --git a/usr/src/man/man9f/ddi_dma_nextwin.9f b/usr/src/man/man9f/ddi_dma_nextwin.9f deleted file mode 100644 index d6beb38562..0000000000 --- a/usr/src/man/man9f/ddi_dma_nextwin.9f +++ /dev/null @@ -1,155 +0,0 @@ -'\" te -.\" Copyright (c) 2006, Sun Microsystems, Inc. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH DDI_DMA_NEXTWIN 9F "Jan 16, 2006" -.SH NAME -ddi_dma_nextwin \- get next DMA window -.SH SYNOPSIS -.LP -.nf -#include <sys/ddi.h> -#include <sys/sunddi.h> - - - -\fBint\fR \fBddi_dma_nextwin\fR(\fBddi_dma_handle_t\fR \fIhandle\fR, \fBddi_dma_win_t\fR \fIwin\fR, - \fBddi_dma_win_t *\fR\fInwin\fR); -.fi - -.SH INTERFACE LEVEL -.sp -.LP -This interface is obsolete. \fBddi_dma_getwin\fR(9F) should be used instead. -.SH PARAMETERS -.sp -.ne 2 -.na -\fB\fIhandle\fR\fR -.ad -.RS 10n -A \fBDMA\fR handle. -.RE - -.sp -.ne 2 -.na -\fB\fIwin\fR\fR -.ad -.RS 10n -The current \fBDMA\fR window or \fINULL\fR. -.RE - -.sp -.ne 2 -.na -\fB\fInwin\fR\fR -.ad -.RS 10n -A pointer to the next \fBDMA\fR window to be filled in. If \fIwin\fR is -\fINULL\fR, a pointer to the first window within the object is returned. -.RE - -.SH DESCRIPTION -.sp -.LP -The \fBddi_dma_nextwin()\fR function shifts the current \fBDMA\fR window -\fIwin\fR within the object referred to by \fIhandle\fR to the next \fBDMA\fR -window \fInwin\fR. If the current window is \fINULL\fR, the first window within -the object is returned. A \fBDMA\fR window is a portion of a \fBDMA\fR object -or might be the entire object. A \fBDMA\fR window has system resources -allocated to it and is prepared to accept data transfers. Examples of system -resources are \fBDVMA\fR mapping resources and intermediate transfer buffer -resources. -.sp -.LP -All \fBDMA\fR objects require a window. If the \fBDMA\fR window represents the -whole \fBDMA\fR object it has system resources allocated for the entire data -transfer. However, if the system is unable to setup the entire \fBDMA\fR object -due to system resource limitations, the driver writer may allow the system to -allocate system resources for less than the entire \fBDMA\fR object. This can -be accomplished by specifying the \fBDDI_DMA_PARTIAL\fR flag as a parameter to -\fBddi_dma_buf_setup\fR(9F) or \fBddi_dma_addr_setup\fR(9F) or as part of a -\fBddi_dma_req\fR(9S) structure in a call to \fBddi_dma_setup\fR(9F). -.sp -.LP -Only the window that has resources allocated is valid per object at any one -time. The currently valid window is the one that was most recently returned -from \fBddi_dma_nextwin()\fR. Furthermore, because a call to -\fBddi_dma_nextwin()\fR will reallocate system resources to the new window, the -previous window will become invalid. It is a \fBsevere\fR error to call -\fBddi_dma_nextwin()\fR before any transfers into the current window are -complete. -.sp -.LP -The \fBddi_dma_nextwin()\fR function takes care of underlying memory -synchronizations required to shift the window. However, if you want to access -the data before or after moving the window, further synchronizations using -\fBddi_dma_sync\fR(9F) are required. -.SH RETURN VALUES -.sp -.LP -The \fBddi_dma_nextwin()\fR function returns: -.sp -.ne 2 -.na -\fB\fBDDI_SUCCESS\fR\fR -.ad -.RS 17n -Successfully filled in the next window pointer. -.RE - -.sp -.ne 2 -.na -\fB\fBDDI_DMA_DONE\fR\fR -.ad -.RS 17n -There is no next window. The current window is the final window within the -specified object. -.RE - -.sp -.ne 2 -.na -\fB\fBDDI_DMA_STALE\fR\fR -.ad -.RS 17n -\fIwin\fR does not refer to the currently active window. -.RE - -.SH CONTEXT -.sp -.LP -The \fBddi_dma_nextwin()\fR function can be called from user, interrupt, or -kernel context. -.SH EXAMPLES -.sp -.LP -For an example see \fBddi_dma_segtocookie\fR(9F). -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for a description of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Stability Level Obsolete -.TE - -.SH SEE ALSO -.sp -.LP -\fBattributes\fR(5), \fBddi_dma_addr_setup\fR(9F), \fBddi_dma_buf_setup\fR(9F), -\fBddi_dma_getwin\fR(9F), \fBddi_dma_nextseg\fR(9F), -\fBddi_dma_segtocookie\fR(9F), \fBddi_dma_sync\fR(9F), \fBddi_dma_req\fR(9S) -.sp -.LP -\fIWriting Device Drivers\fR diff --git a/usr/src/man/man9f/ddi_dma_segtocookie.9f b/usr/src/man/man9f/ddi_dma_segtocookie.9f deleted file mode 100644 index 26fe29913f..0000000000 --- a/usr/src/man/man9f/ddi_dma_segtocookie.9f +++ /dev/null @@ -1,149 +0,0 @@ -'\" te -.\" Copyright (c) 2006, Sun Microsystems, Inc. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH DDI_DMA_SEGTOCOOKIE 9F "Jan 16, 2006" -.SH NAME -ddi_dma_segtocookie \- convert a DMA segment to a DMA address cookie -.SH SYNOPSIS -.LP -.nf -#include <sys/ddi.h> -#include <sys/sunddi.h> - - - -\fBint\fR \fBddi_dma_segtocookie\fR(\fBddi_dma_seg_t\fR \fIseg\fR, \fBoff_t *\fR\fIoffp\fR, \fBoff_t *\fR\fIlenp\fR, - \fBddi_dma_cookie_t *\fR\fIcookiep\fR); -.fi - -.SH INTERFACE LEVEL -.sp -.LP -This interface is obsolete. \fBddi_dma_nextcookie\fR(9F) should be used -instead. -.SH PARAMETERS -.sp -.ne 2 -.na -\fB\fIseg\fR\fR -.ad -.RS 11n -A \fBDMA\fR segment. -.RE - -.sp -.ne 2 -.na -\fB\fIoffp\fR\fR -.ad -.RS 11n -A pointer to an \fBoff_t\fR. Upon a successful return, it is filled in with the -offset. This segment is addressing within the object. -.RE - -.sp -.ne 2 -.na -\fB\fIlenp\fR\fR -.ad -.RS 11n -The byte length. This segment is addressing within the object. -.RE - -.sp -.ne 2 -.na -\fB\fIcookiep\fR\fR -.ad -.RS 11n -A pointer to a \fBDMA\fR cookie (see \fBddi_dma_cookie\fR(9S)). -.RE - -.SH DESCRIPTION -.sp -.LP -The \fBddi_dma_segtocookie()\fR function takes a \fBDMA\fR segment and fills in -the cookie pointed to by \fIcookiep\fR with the appropriate address, length, -and bus type to be used to program the \fBDMA\fR engine. -\fBddi_dma_segtocookie()\fR also fills in \fI*offp\fR and \fI*lenp\fR, which -specify the range within the object. -.SH RETURN VALUES -.sp -.LP -The \fBddi_dma_segtocookie()\fR function returns: -.sp -.ne 2 -.na -\fB\fBDDI_SUCCESS\fR\fR -.ad -.RS 15n -Successfully filled in all values. -.RE - -.sp -.ne 2 -.na -\fB\fBDDI_FAILURE\fR\fR -.ad -.RS 15n -Failed to successfully fill in all values. -.RE - -.SH CONTEXT -.sp -.LP -The \fBddi_dma_segtocookie()\fR function can be called from user, interrupt, or -kernel context. -.SH EXAMPLES -.LP -\fBExample 1 \fR\fBddi_dma_segtocookie()\fR example -.sp -.in +2 -.nf -for (win = NULL; (retw = ddi_dma_nextwin(handle, win, &nwin)) != - DDI_DMA_DONE; win = nwin) { - if (retw != DDI_SUCCESS) { - /* do error handling */ - } else { - for (seg = NULL; (rets = ddi_dma_nextseg(nwin, seg, &nseg)) != - DDI_DMA_DONE; seg = nseg) { - if (rets != DDI_SUCCESS) { - - /* do error handling */ - } else { - ddi_dma_segtocookie(nseg, &off, &len, &cookie); - - /* program DMA engine */ - } - } - } -} -.fi -.in -2 - -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for a description of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Stability Level Obsolete -.TE - -.SH SEE ALSO -.sp -.LP -\fBattributes\fR(5), \fBddi_dma_nextcookie\fR(9F). \fBddi_dma_nextseg\fR(9F), -\fBddi_dma_nextwin\fR(9F), \fBddi_dma_sync\fR(9F), \fBddi_dma_cookie\fR(9S) -.sp -.LP -\fIWriting Device Drivers\fR diff --git a/usr/src/man/man9f/ddi_dma_setup.9f b/usr/src/man/man9f/ddi_dma_setup.9f deleted file mode 100644 index fd245658ad..0000000000 --- a/usr/src/man/man9f/ddi_dma_setup.9f +++ /dev/null @@ -1,182 +0,0 @@ -'\" te -.\" Copyright (c) 2006, Sun Microsystems, Inc. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH DDI_DMA_SETUP 9F "Jan 16, 2006" -.SH NAME -ddi_dma_setup \- setup DMA resources -.SH SYNOPSIS -.LP -.nf -#include <sys/ddi.h> -#include <sys/sunddi.h> - - - -\fBint\fR \fBddi_dma_setup\fR(\fBdev_info_t *\fR\fIdip\fR, \fBddi_dma_req_t *\fR\fIdmareqp\fR, - \fBddi_dma_handle_t *\fR\fIhandlep\fR); -.fi - -.SH INTERFACE LEVEL -.sp -.LP -This interface is obsolete. The functions \fBddi_dma_addr_bind_handle\fR(9F), -\fBddi_dma_alloc_handle\fR(9F), \fBddi_dma_buf_bind_handle\fR(9F), -\fBddi_dma_free_handle\fR(9F), and \fBddi_dma_unbind_handle\fR(9F) should be -used instead. -.SH PARAMETERS -.sp -.ne 2 -.na -\fB\fIdip\fR\fR -.ad -.RS 11n -A pointer to the device's \fBdev_info\fR structure. -.RE - -.sp -.ne 2 -.na -\fB\fIdmareqp\fR\fR -.ad -.RS 11n -A pointer to a \fBDMA\fR request structure (see \fBddi_dma_req\fR(9S)). -.RE - -.sp -.ne 2 -.na -\fB\fIhandlep\fR\fR -.ad -.RS 11n -A pointer to a \fBDMA\fR handle to be filled in. See below for a discussion of -a handle. If \fIhandlep\fR is \fINULL\fR, the call to \fBddi_dma_setup()\fR is -considered an advisory call, in which case no resources are allocated, but a -value indicating the legality and the feasibility of the request is returned. -.RE - -.SH DESCRIPTION -.sp -.LP -The \fBddi_dma_setup()\fR function allocates resources for a memory object such -that a device can perform \fBDMA\fR to or from that object. -.sp -.LP -A call to \fBddi_dma_setup()\fR informs the system that device referred to by -\fIdip\fR wishes to perform \fBDMA\fR to or from a memory object. The memory -object, the device's \fBDMA\fR capabilities, the device driver's policy on -whether to wait for resources, are all specified in the \fBddi_dma_req\fR -structure pointed to by \fIdmareqp\fR. -.sp -.LP -A successful call to \fBddi_dma_setup()\fR fills in the value pointed to by -\fIhandlep\fR. This is an opaque object called a \fBDMA\fR handle. This handle -is then used in subsequent \fBDMA\fR calls, until \fBddi_dma_free\fR(9F) is -called. -.sp -.LP -Again a \fBDMA\fR handle is opaque\(emdrivers may \fBnot\fR attempt to -interpret its value. When a driver wants to enable its \fBDMA\fR engine, it -must retrieve the appropriate address to supply to its \fBDMA\fR engine using a -call to \fBddi_dma_htoc\fR(9F), which takes a pointer to a \fBDMA\fR handle -and returns the appropriate \fBDMA\fR address. -.sp -.LP -When \fBDMA\fR transfer completes, the driver should free up the allocated -\fBDMA\fR resources by calling \fBddi_dma_free()\fR -.SH RETURN VALUES -.sp -.LP -The \fBddi_dma_setup()\fR function returns: -.sp -.ne 2 -.na -\fB\fBDDI_DMA_MAPPED\fR\fR -.ad -.RS 23n -Successfully allocated resources for the object. In the case of an -\fBadvisory\fR call, this indicates that the request is legal. -.RE - -.sp -.ne 2 -.na -\fB\fBDDI_DMA_PARTIAL_MAP\fR\fR -.ad -.RS 23n -Successfully allocated resources for a \fBpart\fR of the object. This is -acceptable when partial transfers are allowed using a flag setting in the -\fBddi_dma_req\fR structure (see \fBddi_dma_req\fR(9S) and -\fBddi_dma_movwin\fR(9F)). -.RE - -.sp -.ne 2 -.na -\fB\fBDDI_DMA_NORESOURCES\fR\fR -.ad -.RS 23n -When no resources are available. -.RE - -.sp -.ne 2 -.na -\fB\fBDDI_DMA_NOMAPPING\fR\fR -.ad -.RS 23n -The object cannot be reached by the device requesting the resources. -.RE - -.sp -.ne 2 -.na -\fB\fBDDI_DMA_TOOBIG\fR\fR -.ad -.RS 23n -The object is too big and exceeds the available resources. The maximum size -varies depending on machine and configuration. -.RE - -.SH CONTEXT -.sp -.LP -The \fBddi_dma_setup()\fR function can be called from user, interrupt, or -kernel context, except when the \fBdmar_fp\fR member of the \fBddi_dma_req\fR -structure pointed to by \fIdmareqp\fR is set to \fBDDI_DMA_SLEEP\fR, in which -case it cannot be called from interrupt context. -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for a description of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Stability Level Obsolete -.TE - -.SH SEE ALSO -.sp -.LP -\fBattributes\fR(5), \fBddi_dma_addr_bind_handle\fR(9F), -\fBddi_dma_alloc_handle\fR(9F), \fBddi_dma_buf_bind_handle\fR(9F), -\fBddi_dma_free_handle\fR(9F), -\fBddi_dma_unbind_handle\fR(9F)\fBddi_dma_addr_setup\fR(9F), -\fBddi_dma_buf_setup\fR(9F), \fBddi_dma_free\fR(9F), \fBddi_dma_htoc\fR(9F), -\fBddi_dma_movwin\fR(9F), \fBddi_dma_sync\fR(9F), \fBddi_dma_req\fR(9S) -.sp -.LP -\fIWriting Device Drivers\fR -.SH NOTES -.sp -.LP -The construction of the \fBddi_dma_req\fR structure is complicated. Use of the -provided interface functions such as \fBddi_dma_buf_setup\fR(9F) simplifies -this task. diff --git a/usr/src/man/man9f/ddi_dmae.9f b/usr/src/man/man9f/ddi_dmae.9f index 449b3a965a..e54621aa15 100644 --- a/usr/src/man/man9f/ddi_dmae.9f +++ b/usr/src/man/man9f/ddi_dmae.9f @@ -1,9 +1,10 @@ '\" te .\" Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved. +.\" Copyright 2012 Garrett D'Amore <garrett@damore.org>. All rights reserved. .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH DDI_DMAE 9F "Apr 04, 2006" +.TH DDI_DMAE 9F "Feb 02, 2012" .SH NAME ddi_dmae, ddi_dmae_alloc, ddi_dmae_release, ddi_dmae_prog, ddi_dmae_disable, ddi_dmae_enable, ddi_dmae_stop, ddi_dmae_getcnt, ddi_dmae_1stparty, @@ -139,8 +140,8 @@ A pointer to a \fBDMA\fR engine request structure. See \fBddi_dmae_req\fR(9S). \fB\fIcookiep\fR\fR .ad .RS 12n -A pointer to a \fBddi_dma_cookie\fR(9S) object, obtained from -\fBddi_dma_segtocookie\fR(9F), which contains the address and count. +A pointer to a \fBddi_dma_cookie\fR(9S) object, +which contains the address and count. .RE .sp @@ -185,8 +186,7 @@ functions: If the device is capable of acting as a true bus master, then the driver should program the device's \fBDMA\fR registers directly and not make use of the \fBDMA\fR engine functions described here. The driver should obtain the -\fBDMA\fR address and count from \fBddi_dma_segtocookie\fR(9F). See -\fBddi_dma_cookie\fR(9S) for a description of a \fBDMA\fR cookie. +\fBDMA\fR address and count from \fBddi_dma_cookie\fR(9S). .RE .sp @@ -254,15 +254,15 @@ count. Once the channel has been programmed, subsequent calls to no changes to the programming are required other than the address and count values. It disables the channel prior to setup, and enables the channel before returning. The \fBDMA\fR address and count are specified by passing -\fBddi_dmae_prog()\fR a cookie obtained from \fBddi_dma_segtocookie\fR(9F). +\fBddi_dmae_prog()\fR a \fBDMA\fR cookie. Other \fBDMA\fR engine parameters are specified by the \fBDMA\fR engine request structure passed in through \fIdmaereqp\fR. The fields of that structure are documented in \fBddi_dmae_req\fR(9S). .sp .LP Before using \fBddi_dmae_prog()\fR, you must allocate system \fBDMA\fR -resources using \fBDMA\fR setup functions such as \fBddi_dma_buf_setup\fR(9F). -\fBddi_dma_segtocookie\fR(9F) can then be used to retrieve a cookie which +resources using \fBDMA\fR setup functions such as \fBddi_dma_mem_alloc\fR(9F). +\fBddi_dma_addr_bind_handle\fR(9F) can then be used to retrieve a cookie which contains the address and count. Then this cookie is passed to \fBddi_dmae_prog()\fR. .SS "\fBddi_dmae_disable()\fR" @@ -299,7 +299,7 @@ When operating in \fBddi_dmae_1stparty()\fR mode, the \fBDMA\fR channel must first be allocated using \fBddi_dmae_alloc()\fR and then configured using \fBddi_dmae_1stparty()\fR. The driver then programs the device to perform the I/O, including the necessary \fBDMA\fR address and count values obtained from -\fBddi_dma_segtocookie\fR(9F). +the \fBddi_dma_cookie\fR(9S). .SS "\fBddi_dmae_getlim()\fR" .sp .LP @@ -313,8 +313,7 @@ engine. Drivers for devices that perform their own bus mastering or use first-party \fBDMA\fR must create and initialize their own \fBDMA\fR limit structures; they should not use \fBddi_dmae_getlim()\fR. The \fBDMA\fR limit structure must be passed to the \fBDMA\fR setup routines so that they will know -how to break the \fBDMA\fR request into windows and segments (see -\fBddi_dma_nextseg\fR(9F) and \fBddi_dma_nextwin\fR(9F)). If the device has any +how to break the \fBDMA\fR request into windows. If the device has any particular restrictions on transfer size or granularity (such as the size of disk sector), the driver should further restrict the values in the structure members before passing them to the \fBDMA\fR setup routines. The driver must @@ -393,7 +392,6 @@ Architecture x86 .LP \fBisa\fR(4), \fBattributes\fR(5), \fBddi_dma_buf_setup\fR(9F), \fBddi_dma_getwin\fR(9F), \fBddi_dma_nextcookie\fR(9F), -\fBddi_dma_nextseg\fR(9F), \fBddi_dma_nextwin\fR(9F), -\fBddi_dma_segtocookie\fR(9F), \fBddi_dma_setup\fR(9F), \fBddi_dma_attr\fR(9S), +\fBddi_dma_mem_alloc\fR(9F), \fBddi_dma_addr_bind_handle\fR(9F), \fBddi_dma_attr\fR(9S), \fBddi_dma_cookie\fR(9S), \fBddi_dma_lim_x86\fR(9S), \fBddi_dma_req\fR(9S), \fBddi_dmae_req\fR(9S) diff --git a/usr/src/man/man9f/ddi_iopb_alloc.9f b/usr/src/man/man9f/ddi_iopb_alloc.9f deleted file mode 100644 index fbbbb0ca70..0000000000 --- a/usr/src/man/man9f/ddi_iopb_alloc.9f +++ /dev/null @@ -1,163 +0,0 @@ -'\" te -.\" Copyright (c) 2006, Sun Microsystems, Inc. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH DDI_IOPB_ALLOC 9F "Apr 04, 2006" -.SH NAME -ddi_iopb_alloc, ddi_iopb_free \- allocate and free non-sequentially accessed -memory -.SH SYNOPSIS -.LP -.nf -#include <sys/ddi.h> -#include <sys/sunddi.h> - -\fBint\fR \fBddi_iopb_alloc\fR(\fBdev_info_t *\fR\fIdip\fR, \fBddi_dma_lim_t *\fR\fIlimits\fR, - \fBuint_t\fR \fIlength\fR, \fBcaddr_t *\fR\fIiopbp\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBddi_iopb_free\fR(\fBcaddr_t\fR \fIiopb\fR); -.fi - -.SH INTERFACE LEVEL -.sp -.LP -These interfaces are obsolete. Use \fBddi_dma_mem_alloc\fR(9F) instead of -\fBddi_iopb_alloc()\fR. Use \fBddi_dma_mem_free\fR(9F) instead of -\fBddi_iopb_free()\fR. -.SH PARAMETERS -.SS "\fBddi_iopb_alloc()\fR" -.sp -.ne 2 -.na -\fB\fIdip\fR\fR -.ad -.RS 10n -A pointer to the device's \fBdev_info\fR structure. -.RE - -.sp -.ne 2 -.na -\fB\fIlimits\fR\fR -.ad -.RS 10n -A pointer to a \fBDMA \fRlimits structure for this device (see -\fBddi_dma_lim_sparc\fR(9S) or \fBddi_dma_lim_x86\fR(9S)). If this pointer is -\fINULL\fR, a default set of \fBDMA \fRlimits is assumed. -.RE - -.sp -.ne 2 -.na -\fB\fIlength\fR\fR -.ad -.RS 10n -The length in bytes of the desired allocation. -.RE - -.sp -.ne 2 -.na -\fB\fIiopbp\fR\fR -.ad -.RS 10n -A pointer to a \fBcaddr_t\fR. On a successful return, \fI*iopbp\fR points to -the allocated storage. -.RE - -.SS "\fBddi_iopb_free()\fR" -.sp -.ne 2 -.na -\fB\fIiopb\fR\fR -.ad -.RS 8n -The \fIiopb\fR returned from a successful call to \fBddi_iopb_alloc()\fR. -.RE - -.SH DESCRIPTION -.sp -.LP -The \fBddi_iopb_alloc()\fR function allocates memory for \fBDMA\fR transfers -and should be used if the device accesses memory in a non-sequential fashion, -or if synchronization steps using \fBddi_dma_sync\fR(9F) should be as -lightweight as possible, due to frequent use on small objects. This type of -access is commonly known as \fIconsistent\fR access. The allocation will obey -the alignment and padding constraints as specified in the \fIlimits\fR argument -and other limits imposed by the system. -.sp -.LP -Note that you still must use \fBDMA\fR resource allocation functions (see -\fBddi_dma_setup\fR(9F)) to establish \fBDMA\fR resources for the memory -allocated using \fBddi_iopb_alloc()\fR. -.sp -.LP -In order to make the view of a memory object shared between a \fBCPU\fR and a -\fBDMA\fR device consistent, explicit synchronization steps using -\fBddi_dma_sync\fR(9F) or \fBddi_dma_free\fR(9F) are still required. The -\fBDMA\fR resources will be allocated so that these synchronization steps are -as efficient as possible. -.sp -.LP -The \fBddi_iopb_free()\fR function frees up memory allocated by -\fBddi_iopb_alloc()\fR. -.SH RETURN VALUES -.sp -.LP -The \fBddi_iopb_alloc()\fR function returns: -.sp -.ne 2 -.na -\fB\fBDDI_SUCCESS\fR\fR -.ad -.RS 15n -Memory successfully allocated. -.RE - -.sp -.ne 2 -.na -\fB\fBDDI_FAILURE\fR\fR -.ad -.RS 15n -Allocation failed. -.RE - -.SH CONTEXT -.sp -.LP -These functions can be called from user, interrupt, or kernel context. -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for a description of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Stability Level Obsolete -.TE - -.SH SEE ALSO -.sp -.LP -\fBattributes\fR(5), \fBddi_dma_free\fR(9F), \fBddi_dma_mem_alloc\fR(9F), -\fBddi_dma_mem_free\fR(9F), \fBddi_dma_setup\fR(9F), \fBddi_dma_sync\fR(9F), -\fBddi_mem_alloc\fR(9F), \fBddi_dma_lim_sparc\fR(9S), -\fBddi_dma_lim_x86\fR(9S), \fBddi_dma_req\fR(9S) -.sp -.LP -\fIWriting Device Drivers\fR -.SH NOTES -.sp -.LP -This function uses scarce system resources. Use it selectively. diff --git a/usr/src/man/man9f/ddi_mem_alloc.9f b/usr/src/man/man9f/ddi_mem_alloc.9f deleted file mode 100644 index c8baf915f3..0000000000 --- a/usr/src/man/man9f/ddi_mem_alloc.9f +++ /dev/null @@ -1,180 +0,0 @@ -'\" te -.\" Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH DDI_MEM_ALLOC 9F "Apr 04, 2006" -.SH NAME -ddi_mem_alloc, ddi_mem_free \- allocate and free sequentially accessed memory -.SH SYNOPSIS -.LP -.nf -#include <sys/ddi.h> -#include <sys/sunddi.h> - -\fBint\fR \fBddi_mem_alloc\fR(\fBdev_info_t *\fR\fIdip\fR, \fBddi_dma_lim_t *\fR\fIlimits\fR, - \fBuint_t\fR \fIlength\fR, \fBuint_t\fR \fIflags\fR, \fBcaddr_t *\fR\fIkaddrp\fR, - \fBuint_t *\fR\fIreal_length\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBddi_mem_free\fR(\fBcaddr_t\fR \fIkaddr\fR); -.fi - -.SH INTERFACE LEVEL -.sp -.LP -These interfaces are obsolete. \fBddi_dma_mem_alloc\fR(9F) and -\fBddi_dma_mem_free\fR(9F) should be used instead. -.SH PARAMETERS -.SS "\fBddi_mem_alloc()\fR" -.sp -.ne 2 -.na -\fB\fIdip\fR\fR -.ad -.RS 15n -A pointer to the device's \fBdev_info\fR structure. -.RE - -.sp -.ne 2 -.na -\fB\fIlimits\fR\fR -.ad -.RS 15n -A pointer to a \fBDMA\fR limits structure for this device (see -\fBddi_dma_lim_sparc\fR(9S) or \fBddi_dma_lim_x86\fR(9S)). If this pointer is -\fINULL\fR, a default set of \fBDMA\fR limits is assumed. -.RE - -.sp -.ne 2 -.na -\fB\fIlength\fR\fR -.ad -.RS 15n -The length in bytes of the desired allocation. -.RE - -.sp -.ne 2 -.na -\fB\fIflags\fR\fR -.ad -.RS 15n -The possible flags \fB1\fR and \fB0\fR are taken to mean, respectively, wait -until memory is available, or do not wait. -.RE - -.sp -.ne 2 -.na -\fB\fIkaddrp\fR\fR -.ad -.RS 15n -On a successful return, *\fIkaddrp\fR points to the allocated memory. -.RE - -.sp -.ne 2 -.na -\fB\fIreal_length\fR\fR -.ad -.RS 15n -The length in bytes that was allocated. Alignment and padding requirements may -cause \fBddi_mem_alloc()\fR to allocate more memory than requested in -\fIlength\fR. -.RE - -.SS "\fBddi_mem_free()\fR" -.sp -.ne 2 -.na -\fB\fIkaddr\fR\fR -.ad -.RS 9n -The memory returned from a successful call to \fBddi_mem_alloc()\fR. -.RE - -.SH DESCRIPTION -.sp -.LP -The \fBddi_mem_alloc()\fR function allocates memory for \fBDMA\fR transfers and -should be used if the device is performing sequential, unidirectional, -block-sized and block-aligned transfers to or from memory. This type of access -is commonly known as \fBstreaming\fR access. The allocation will obey the -alignment and padding constraints as specified by the \fIlimits\fR argument and -other limits imposed by the system. -.sp -.LP -Note that you must still use \fBDMA\fR resource allocation functions (see -\fBddi_dma_setup\fR(9F)) to establish \fBDMA\fR resources for the memory -allocated using \fBddi_mem_alloc()\fR. \fBddi_mem_alloc()\fR returns the actual -size of the allocated memory object. Because of padding and alignment -requirements, the actual size might be larger than the requested size. -\fBddi_dma_setup\fR(9F) requires the actual length. -.sp -.LP -In order to make the view of a memory object shared between a \fBCPU\fR and a -\fBDMA\fR device consistent, explicit synchronization steps using -\fBddi_dma_sync\fR(9F) or \fBddi_dma_free\fR(9F) are required. -.sp -.LP -The \fBddi_mem_free()\fR function frees up memory allocated by -\fBddi_mem_alloc()\fR. -.SH RETURN VALUES -.sp -.LP -The \fBddi_mem_alloc()\fR function returns: -.sp -.ne 2 -.na -\fB\fBDDI_SUCCESS\fR\fR -.ad -.RS 15n -Memory successfully allocated. -.RE - -.sp -.ne 2 -.na -\fB\fBDDI_FAILURE\fR\fR -.ad -.RS 15n -Allocation failed. -.RE - -.SH CONTEXT -.sp -.LP -The \fBddi_mem_alloc()\fR function can be called from user, interrupt, or -kernel context, except when \fIflags\fR is set to \fB1\fR, in which case it -cannot be called from interrupt context. -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for a description of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Stability Level Obsolete -.TE - -.SH SEE ALSO -.sp -.LP -\fBattributes\fR(5), \fBddi_dma_free\fR(9F), \fBddi_dma_mem_alloc\fR(9F), -\fBddi_dma_mem_free\fR(9F), \fBddi_dma_setup\fR(9F), \fBddi_dma_sync\fR(9F), -\fBddi_iopb_alloc\fR(9F), \fBddi_dma_lim_sparc\fR(9S), -\fBddi_dma_lim_x86\fR(9S), \fBddi_dma_req\fR(9S) -.sp -.LP -\fIWriting Device Drivers\fR |