1 '\" te
   2 .\"  Copyright (c) 1996, 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_PARSE_CISTPL_CONFIG 9F "Dec 20, 1996"
   7 .SH NAME
   8 csx_Parse_CISTPL_CONFIG \- parse Configuration tuple
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 #include <sys/pccard.h>
  13 
  14 
  15 
  16 \fBint32_t\fR \fBcsx_Parse_CISTPL_CONFIG\fR(\fBclient_handle_t\fR \fIch\fR, \fBtuple_t *\fR\fItu\fR,
  17      \fBcistpl_config_t *\fR\fIcc\fR);
  18 .fi
  19 
  20 .SH INTERFACE LEVEL
  21 .sp
  22 .LP
  23 Solaris \fBDDI \fRSpecific (Solaris \fBDDI) \fR
  24 .SH PARAMETERS
  25 .sp
  26 .ne 2
  27 .na
  28 \fB\fIch\fR\fR
  29 .ad
  30 .RS 6n
  31 Client handle returned from \fBcsx_RegisterClient\fR(9F).
  32 .RE
  33 
  34 .sp
  35 .ne 2
  36 .na
  37 \fB\fItu\fR\fR
  38 .ad
  39 .RS 6n
  40 Pointer to a \fBtuple_t\fR structure (see \fBtuple\fR(9S)) returned by a call
  41 to \fBcsx_GetFirstTuple\fR(9F) or \fBcsx_GetNextTuple\fR(9F).
  42 .RE
  43 
  44 .sp
  45 .ne 2
  46 .na
  47 \fB\fIcc\fR\fR
  48 .ad
  49 .RS 6n
  50 Pointer to a \fBcistpl_config_t\fR structure which contains the parsed
  51 \fBCISTPL_CONFIG\fR tuple information upon return from this function.
  52 .RE
  53 
  54 .SH DESCRIPTION
  55 .sp
  56 .LP
  57 This function parses the Configuration tuple, \fBCISTPL_CONFIG,\fR into a form
  58 usable by \fBPC \fRCard drivers. The \fBCISTPL_CONFIG\fR tuple is used to
  59 describe the general characteristics of 16-bit \fBPC \fRCards containing \fBI/O
  60 \fRdevices or using custom interfaces. It may also describe \fBPC \fRCards,
  61 including Memory Only cards, which exceed nominal power supply specifications,
  62 or which need descriptions of their power requirements or other information.
  63 .SH STRUCTURE MEMBERS
  64 .sp
  65 .LP
  66 The structure members of \fBcistpl_config_t\fR are:
  67 .sp
  68 .in +2
  69 .nf
  70 uint32_t     present;     /* register present flags */
  71 uint32_t     nr;          /* number of config registers found */
  72 uint32_t     hr;          /* highest config register index found */
  73 uint32_t     regs[CISTPL_CONFIG_MAX_CONFIG_REGS];    /* reg offsets */
  74 uint32_t     base;        /* base offset of config registers */
  75 uint32_t     last;        /* last config index */
  76 .fi
  77 .in -2
  78 
  79 .sp
  80 .LP
  81 The fields are defined as follows:
  82 .sp
  83 .ne 2
  84 .na
  85 \fB\fBpresent\fR\fR
  86 .ad
  87 .RS 11n
  88 This field indicates which configuration registers are present on the \fBPC
  89 \fRCard.
  90 .sp
  91 .ne 2
  92 .na
  93 \fBCONFIG_OPTION_REG_PRESENT\fR
  94 .ad
  95 .RS 30n
  96 Configuration Option Register present
  97 .RE
  98 
  99 .sp
 100 .ne 2
 101 .na
 102 \fBCONFIG_STATUS_REG_PRESENT\fR
 103 .ad
 104 .RS 30n
 105 Configuration Status Register present
 106 .RE
 107 
 108 .sp
 109 .ne 2
 110 .na
 111 \fBCONFIG_PINREPL_REG_PRESENT\fR
 112 .ad
 113 .RS 30n
 114 Pin Replacement Register present
 115 .RE
 116 
 117 .sp
 118 .ne 2
 119 .na
 120 \fBCONFIG_COPY_REG_PRESENT\fR
 121 .ad
 122 .RS 30n
 123 Copy Register present
 124 .RE
 125 
 126 .sp
 127 .ne 2
 128 .na
 129 \fBCONFIG_EXSTAT_REG_PRESENT\fR
 130 .ad
 131 .RS 30n
 132 Extended Status Register present
 133 .RE
 134 
 135 .sp
 136 .ne 2
 137 .na
 138 \fBCONFIG_IOBASE0_REG_PRESENT\fR
 139 .ad
 140 .RS 30n
 141 IO Base 0 Register present
 142 .RE
 143 
 144 .sp
 145 .ne 2
 146 .na
 147 \fBCONFIG_IOBASE1_REG_PRESENT\fR
 148 .ad
 149 .RS 30n
 150 IO Base 1 Register present
 151 .RE
 152 
 153 .sp
 154 .ne 2
 155 .na
 156 \fBCONFIG_IOBASE2_REG_PRESENT\fR
 157 .ad
 158 .RS 30n
 159 IO Base2 Register present
 160 .RE
 161 
 162 .sp
 163 .ne 2
 164 .na
 165 \fBCONFIG_IOBASE3_REG_PRESENT\fR
 166 .ad
 167 .RS 30n
 168 IO Base3 Register present
 169 .RE
 170 
 171 .sp
 172 .ne 2
 173 .na
 174 \fBCONFIG_IOLIMIT_REG_PRESENT\fR
 175 .ad
 176 .RS 30n
 177 IO Limit Register present
 178 .RE
 179 
 180 .RE
 181 
 182 .sp
 183 .ne 2
 184 .na
 185 \fB\fBnr\fR\fR
 186 .ad
 187 .RS 11n
 188 This field specifies the number of configuration registers that are present on
 189 the \fBPC \fRCard.
 190 .RE
 191 
 192 .sp
 193 .ne 2
 194 .na
 195 \fB\fBhr\fR\fR
 196 .ad
 197 .RS 11n
 198 This field specifies the highest configuration register number that is present
 199 on the \fBPC \fRCard.
 200 .RE
 201 
 202 .sp
 203 .ne 2
 204 .na
 205 \fB\fBregs\fR\fR
 206 .ad
 207 .RS 11n
 208 This array contains the offset from the start of Attribute Memory space for
 209 each configuration register that is present on the \fBPC \fRCard. If a
 210 configuration register is not present on the \fBPC \fRCard, the value in the
 211 corresponding entry in the \fBregs\fR array is undefined.
 212 .RE
 213 
 214 .sp
 215 .ne 2
 216 .na
 217 \fB\fBbase\fR\fR
 218 .ad
 219 .RS 11n
 220 This field contains the offset from the start of Attribute Memory space to the
 221 base of the \fBPC \fRCard configuration register space.
 222 .RE
 223 
 224 .sp
 225 .ne 2
 226 .na
 227 \fB\fBlast\fR\fR
 228 .ad
 229 .RS 11n
 230 This field contains the value of the last valid configuration index for this
 231 \fBPC \fRCard.
 232 .RE
 233 
 234 .SH RETURN VALUES
 235 .sp
 236 .ne 2
 237 .na
 238 \fB\fBCS_SUCCESS\fR\fR
 239 .ad
 240 .RS 27n
 241 Successful operation.
 242 .RE
 243 
 244 .sp
 245 .ne 2
 246 .na
 247 \fB\fBCS_BAD_HANDLE\fR\fR
 248 .ad
 249 .RS 27n
 250 Client handle is invalid.
 251 .RE
 252 
 253 .sp
 254 .ne 2
 255 .na
 256 \fB\fBCS_UNKNOWN_TUPLE\fR\fR
 257 .ad
 258 .RS 27n
 259 Parser does not know how to parse tuple.
 260 .RE
 261 
 262 .sp
 263 .ne 2
 264 .na
 265 \fB\fBCS_NO_CARD\fR\fR
 266 .ad
 267 .RS 27n
 268 No \fBPC \fRCard in socket.
 269 .RE
 270 
 271 .sp
 272 .ne 2
 273 .na
 274 \fB\fBCS_NO_CIS\fR\fR
 275 .ad
 276 .RS 27n
 277 No Card Information Structure (CIS) on \fBPC \fRCard.
 278 .RE
 279 
 280 .sp
 281 .ne 2
 282 .na
 283 \fB\fBCS_UNSUPPORTED_FUNCTION\fR\fR
 284 .ad
 285 .RS 27n
 286 No \fBPCMCIA \fRhardware installed.
 287 .RE
 288 
 289 .SH CONTEXT
 290 .sp
 291 .LP
 292 This function may be called from user or kernel context.
 293 .SH SEE ALSO
 294 .sp
 295 .LP
 296 \fBcsx_GetFirstTuple\fR(9F), \fBcsx_GetTupleData\fR(9F),
 297 \fBcsx_Parse_CISTPL_CFTABLE_ENTRY\fR(9F), \fBcsx_RegisterClient\fR(9F),
 298 \fBcsx_ValidateCIS\fR(9F), \fBtuple\fR(9S)
 299 .sp
 300 .LP
 301 \fIPC Card 95 Standard, PCMCIA/JEIDA\fR
 302 .SH NOTES
 303 .sp
 304 .LP
 305 \fBPC \fRCard drivers should not attempt to use configurations beyond the
 306 "last" member in the \fBcistpl_config_t\fR structure.