1502 Remove conversion cruft from manpages
[unleashed.git] / usr / src / man / man9f / csx_RequestWindow.9f
blob318b4f6e0c8113374ada64aeff76d8cb808812c7
1 '\" te
2 .\"  Copyright (c) 1999, 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 CSX_REQUESTWINDOW 9F "Jul 19, 1996"
7 .SH NAME
8 csx_RequestWindow, csx_ReleaseWindow \- request or release window resources
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/pccard.h>
16 \fBint32_t\fR \fBcsx_RequestWindow\fR(\fBclient_handle_t\fR \fIch\fR, \fBwindow_handle_t *\fR\fIwh\fR,
17      \fBwin_req_t *\fR\fIwr\fR);
18 .fi
20 .LP
21 .nf
22 \fBint32_t\fR \fBcsx_ReleaseWindow\fR(\fBwindow_handle_t\fR \fIwh\fR);
23 .fi
25 .SH INTERFACE LEVEL
26 .sp
27 .LP
28 Solaris \fBDDI \fRSpecific (Solaris \fBDDI) \fR
29 .SH PARAMETERS
30 .sp
31 .ne 2
32 .na
33 \fB\fIch\fR\fR
34 .ad
35 .RS 6n
36 Client handle returned from \fBcsx_RegisterClient\fR(9F).
37 .RE
39 .sp
40 .ne 2
41 .na
42 \fB\fIwh\fR\fR
43 .ad
44 .RS 6n
45 Pointer to a \fBwindow_handle_t\fR structure.
46 .RE
48 .sp
49 .ne 2
50 .na
51 \fB\fIwr\fR\fR
52 .ad
53 .RS 6n
54 Pointer to a \fBwin_req_t\fR structure.
55 .RE
57 .SH DESCRIPTION
58 .sp
59 .LP
60 The function \fBcsx_RequestWindow()\fR requests a block of system address space
61 be assigned to a \fBPC \fRCard in a socket.
62 .sp
63 .LP
64 The function \fBcsx_ReleaseWindow()\fR releases window resources which were
65 obtained by a call to \fBcsx_RequestWindow()\fR. No adapter or socket hardware
66 is modified by this function.
67 .sp
68 .LP
69 The \fBcsx_MapMemPage\fR(9F) and \fBcsx_ModifyWindow\fR(9F) functions use the
70 window handle returned by \fBcsx_RequestWindow()\fR. This window handle must be
71 freed by calling \fBcsx_ReleaseWindow()\fR when the client is done using this
72 window.
73 .sp
74 .LP
75 The \fBPC\fR Card Attribute or Common Memory offset for this window is set by
76 \fBcsx_MapMemPage\fR(9F).
77 .SH STRUCTURE MEMBERS
78 .sp
79 .LP
80 The structure members of \fBwin_req_t\fR are:
81 .sp
82 .in +2
83 .nf
84 uint32_t      Socket;                  /* socket number */
85 uint32_t      Attributes;              /* window flags */
86 uint32_t      Base.base;               /* requested window */
87                                         /*   base address */
88 acc_handle_t  Base.handle;             /* returned handle for
89                                         /*   base of window */
90 uint32_t      Size;                    /* window size requested */
91                                         /*   or granted */
92 uint32_t      win_params.AccessSpeed;  /* window access speed */
93 uint32_t      win_params.IOAddrLines;  /* IO address lines decoded */
94 uint32_t      ReqOffset;               /* required window offest */
95 .fi
96 .in -2
98 .sp
99 .LP
100 The fields are defined as follows:
102 .ne 2
104 \fB\fBSocket\fR\fR
106 .RS 26n
107 Not used in Solaris, but for portability with other Card Services
108 implementations, it should be set to the logical socket number.
112 .ne 2
114 \fB\fBAttributes\fR\fR
116 .RS 26n
117 This field is bit-mapped and is defined as follows:
119 .ne 2
121 \fB\fBWIN_MEMORY_TYPE_IO\fR\fR
123 .sp .6
124 .RS 4n
125 Points to I/O space.
129 .ne 2
131 \fB\fBWIN_MEMORY_TYPE_CM\fR\fR
133 .sp .6
134 .RS 4n
135 Points to common memory space.
139 .ne 2
141 \fB\fBWIN_MEMORY_TYPE_AM\fR\fR
143 .sp .6
144 .RS 4n
145 These bits select which type of window is being requested. One of these bits
146 must be set.
150 .ne 2
152 \fB\fBWIN_ENABLE\fR\fR
154 .sp .6
155 .RS 4n
156 The client must set this bit to enable the window.
160 .ne 2
162 \fB\fBWIN_ACC_BIG_ENDIAN\fR\fR
164 .sp .6
165 .RS 4n
166 Describes device as big-endian.
170 .ne 2
172 \fB\fBWIN_ACC_LITTLE_ENDIAN\fR\fR
174 .sp .6
175 .RS 4n
176 These bits describe the endian characteristics of the device as big endian or
177 little endian, respectively. Even though most of the devices will have the same
178 endian characteristics as their busses, there are examples of devices with an
179 \fBI/O \fRprocessor that has opposite endian characteristics of the busses.
180 When either of these bits are set, byte swapping will automatically be
181 performed by the system if the host machine and the device data formats have
182 opposite endian characteristics. The implementation may take advantage of
183 hardware platform byte swapping capabilities.
187 .ne 2
189 \fB\fBWIN_ACC_NEVER_SWAP\fR\fR
191 .sp .6
192 .RS 4n
193 When this is specified, byte swapping will not be invoked in the data access
194 functions.
197 The ability to specify the order in which the \fBCPU\fR will reference data is
198 provided by the following \fBAttributes\fR bits, only one of which may be
199 specified:
201 .ne 2
203 \fB\fBWIN_ACC_STRICT_ORDER\fR\fR
205 .sp .6
206 .RS 4n
207 The data references must be issued by a \fBCPU \fR in program order. Strict
208 ordering is the default behavior.
212 .ne 2
214 \fB\fBWIN_ACC_UNORDERED_OK\fR\fR
216 .sp .6
217 .RS 4n
218 The \fBCPU\fR may re-order the data references. This includes all kinds of
219 re-ordering (that is, a load followed by a store may be replaced by a store
220 followed by a load).
224 .ne 2
226 \fB\fBWIN_ACC_MERGING_OK\fR\fR
228 .sp .6
229 .RS 4n
230 The \fBCPU \fRmay merge individual stores to consecutive locations. For
231 example, the \fBCPU \fRmay turn two consecutive byte stores into one halfword
232 store. It may also batch individual loads. For example, the \fBCPU \fRmay turn
233 two consecutive byte loads into one halfword load. This bit also implies
234 re-ordering.
238 .ne 2
240 \fB\fBWIN_ACC_LOADCACHING_OK\fR\fR
242 .sp .6
243 .RS 4n
244 The \fBCPU \fRmay cache the data it fetches and reuse it until another store
245 occurs. The default behavior is to fetch new data on every load. This bit also
246 implies merging and re-ordering.
250 .ne 2
252 \fB\fBWIN_ACC_STORECACHING_OK\fR\fR
254 .sp .6
255 .RS 4n
256 The \fBCPU \fRmay keep the data in the cache and push it to the device (perhaps
257 with other data) at a later time. The default behavior is to push the data
258 right away. This bit also implies load caching, merging, and re-ordering.
261 These values are advisory, not mandatory. For example, data can be ordered
262 without being merged or cached, even though a driver requests unordered, merged
263 and cached together.
265 All other bits in the \fBAttributes\fR field must be set to \fB0\fR.
267 On successful return from \fBcsx_RequestWindow()\fR, \fBWIN_OFFSET_SIZE\fR is
268 set in the \fBAttributes\fR field when the client must specify card offsets to
269 \fBcsx_MapMemPage\fR(9F) that are a multiple of the window size.
273 .ne 2
275 \fB\fBBase.base\fR\fR
277 .RS 26n
278 This field must be set to \fB0\fR on calling \fBcsx_RequestWindow()\fR.
282 .ne 2
284 \fB\fBBase.handle\fR\fR
286 .RS 26n
287 On successful return from \fBcsx_RequestWindow()\fR, the \fBBase.handle\fR
288 field contains an access handle corresponding to the first byte of the
289 allocated memory window which the client must use when accessing the \fBPC
290 \fRCard's memory space via the common access functions. A client must \fBnot\fR
291 make any assumptions as to the format of the returned \fBBase.handle\fR field
292 value.
296 .ne 2
298 \fB\fBSize\fR\fR
300 .RS 26n
301 On calling \fBcsx_RequestWindow()\fR, the \fBSize\fR field is the size in bytes
302 of the memory window requested. \fBSize\fR may be zero to indicate that Card
303 Services should provide the smallest sized window available. On successful
304 return from \fBcsx_RequestWindow()\fR, the \fBSize\fR field contains the actual
305 size of the window allocated.
309 .ne 2
311 \fB\fBwin_params.AccessSpeed\fR\fR
313 .RS 26n
314 This field specifies the access speed of the window if the client is requesting
315 a memory window. The \fBAccessSpeed\fR field bit definitions use the format of
316 the extended speed byte of the Device \fBID \fRtuple. If the mantissa is
317 \fB0\fR (noted as reserved in the \fBPC Card 95 Standard\fR), the lower bits
318 are a binary code representing a speed from the following table:
325 box;
326 l | l
327 l | l .
328 \fBCode\fR      \fBSpeed\fR
330 0       (Reserved - do not use).
332 1       250 nsec
334 2       200 nsec
336 3       150 nsec
338 4       100 nse
340 5-7     (Reserved\(emdo not use.)
345 To request a window that supports the \fBWAIT\fR signal, \fBOR-in\fR the
346 \fBWIN_USE_WAIT\fR bit to the \fBAccessSpeed\fR value before calling this
347 function.
350 It is recommended that clients use the \fBcsx_ConvertSpeed\fR(9F) function to
351 generate the appropriate \fBAccessSpeed\fR values rather than manually
352 perturbing the \fBAccessSpeed\fR field.
354 .ne 2
356 \fB\fBwin_params.IOAddrLines\fR\fR
358 .RS 26n
359 If the client is requesting an \fBI/O \fRwindow, the \fBIOAddrLines\fR field is
360 the number of \fBI/O \fRaddress lines decoded by the \fBPC \fRCard in the
361 specified socket. Access to the \fBI/O \fRwindow is not enabled until
362 \fBcsx_RequestConfiguration\fR(9F) has been invoked successfully.
366 .ne 2
368 \fB\fBReqOffset\fR\fR
370 .RS 26n
371 This field is a Solaris-specific extension that can be used by clients to
372 generate optimum window offsets passed to \fBcsx_MapMemPage\fR(9F).
375 .SH RETURN VALUES
377 .ne 2
379 \fB\fBCS_SUCCESS\fR\fR
381 .RS 27n
382 Successful operation.
386 .ne 2
388 \fB\fBCS_BAD_ATTRIBUTE\fR\fR
390 .RS 27n
391 \fBAttributes\fR are invalid.
395 .ne 2
397 \fB\fBCS_BAD_SPEED\fR\fR
399 .RS 27n
400 Speed is invalid.
404 .ne 2
406 \fB\fBCS_BAD_HANDLE\fR\fR
408 .RS 27n
409 Client handle is invalid.
413 .ne 2
415 \fB\fBCS_BAD_SIZE\fR\fR
417 .RS 27n
418 Window size is invalid.
422 .ne 2
424 \fB\fBCS_NO_CARD\fR\fR
426 .RS 27n
427 No \fBPC \fRCard in socket.
431 .ne 2
433 \fB\fBCS_OUT_OF_RESOURCE\fR\fR
435 .RS 27n
436 Unable to allocate window.
440 .ne 2
442 \fB\fBCS_UNSUPPORTED_FUNCTION\fR\fR
444 .RS 27n
445 No \fBPCMCIA \fRhardware installed.
448 .SH CONTEXT
451 These functions may be called from user or kernel context.
452 .SH SEE ALSO
455 \fBcsx_ConvertSpeed\fR(9F), \fBcsx_MapMemPage\fR(9F),
456 \fBcsx_ModifyWindow\fR(9F), \fBcsx_RegisterClient\fR(9F),
457 \fBcsx_RequestConfiguration\fR(9F)
460 \fIPC\fR \fICard\fR \fI95\fR \fIStandard,\fR PCMCIA/JEIDA