Merge commit '9276b3991ba20d5a5660887ba81b0bc7bed25a0c'
[unleashed.git] / share / man / man9f / ldi_devmap.9f
blob2c7be8f57fb9c30af339e96647bab6d4fadbf458
1 '\" te
2 .\"  Copyright (c) 2003, Sun Microsystems, Inc.,  All Rights Reserved
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH LDI_DEVMAP 9F "Jun 3, 2003"
7 .SH NAME
8 ldi_devmap \- Issue a devmap request to a device
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/sunldi.h>
14 \fBint\fR \fBldi_devmap\fR(\fBldi_handle_t\fR \fIlh\fR, \fBdevmap_cookie_t\fR \fIdhp\fR, \fBoffset_t\fR \fIoff\fR,
15      \fBsize_t\fR \fIlen\fR, \fBsize_t *\fR\fImaplen\fR, \fBuint_t\fR \fImodel\fR);
16 .fi
18 .SH PARAMETERS
19 .sp
20 .ne 2
21 .na
22 \fB\fIlh\fR\fR
23 .ad
24 .RS 10n
25 Layered handle.
26 .RE
28 .sp
29 .ne 2
30 .na
31 \fB\fIdhp\fR\fR
32 .ad
33 .RS 10n
34 Opaque mapping handle used by the system to describe mapping.
35 .RE
37 .sp
38 .ne 2
39 .na
40 \fB\fIoff\fR\fR
41 .ad
42 .RS 10n
43 User offset within the logical device memory at which mapping begins.
44 .RE
46 .sp
47 .ne 2
48 .na
49 \fB\fIlen\fR\fR
50 .ad
51 .RS 10n
52 Mapping length (in bytes).
53 .RE
55 .sp
56 .ne 2
57 .na
58 \fB\fImaplen\fR\fR
59 .ad
60 .RS 10n
61 Pointer to length (in bytes) of validated mapping.  (Less than or equal to
62 \fIlen\fR).
63 .RE
65 .sp
66 .ne 2
67 .na
68 \fB\fImodel\fR\fR
69 .ad
70 .RS 10n
71 Data model type of current thread.
72 .RE
74 .SH DESCRIPTION
75 .sp
76 .LP
77 The \fBldi_devmap()\fR function passes an devmap request to the device entry
78 point for the device specified by the layered handle. This operation is
79 supported for character devices.
80 .SH RETURN VALUES
81 .sp
82 .LP
83 The \fBldi_devmap()\fR function returns \fB0\fR upon success. If a failure
84 occurs before the request is passed to the device, possible return values are
85 shown below. Otherwise any other error number may be returned by the device.
86 .sp
87 .ne 2
88 .na
89 \fBEINVAL\fR
90 .ad
91 .RS 11n
92 Invalid input parameters.
93 .RE
95 .sp
96 .ne 2
97 .na
98 \fBENOTSUP\fR
99 .ad
100 .RS 11n
101 Operation is not supported for this device.
104 .SH CONTEXT
107 This function may be called from user or kernel context.