1 '\" te
   2 .\"  Copyright (c) 1997, 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_FORMAT 9F "Jan 24, 1997"
   7 .SH NAME
   8 csx_Parse_CISTPL_FORMAT \- parse the Data Recording Format tuple
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 #include <sys/pccard.h>
  13 
  14 
  15 
  16 \fBint32_t\fR \fBcsx_Parse_CISTPL_FORMAT\fR(\fBclient_handle_t\fR \fIch\fR, \fBtuple_t *\fR\fItu\fR,
  17      \fBcistpl_format_t *\fR\fIpt\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\fIpt\fR\fR
  48 .ad
  49 .RS 6n
  50 Pointer to a \fBcistpl_format_t\fR structure which contains the parsed
  51 \fBCISTPL_FORMAT\fR tuple information upon return from this function.
  52 .RE
  53 
  54 .SH DESCRIPTION
  55 .sp
  56 .LP
  57 This function parses the Data Recording Format tuple, \fBCISTPL_FORMAT,\fR into
  58 a form usable by \fBPC \fRCard drivers.
  59 .sp
  60 .LP
  61 The \fBCISTPL_FORMAT\fR tuple indicates the data recording format for a device
  62 partition.
  63 .SH STRUCTURE MEMBERS
  64 .sp
  65 .LP
  66 The structure members of \fBcistpl_format_t\fR are:
  67 .sp
  68 .in +2
  69 .nf
  70 uint32_t     type;
  71 uint32_t     edc_length;
  72 uint32_t     edc_type;
  73 uint32_t     offset;
  74 uint32_t     nbytes;
  75 uint32_t     dev.disk.bksize;
  76 uint32_t     dev.disk.nblocks;
  77 uint32_t     dev.disk.edcloc;
  78 uint32_t     dev.mem.flags;
  79 uint32_t     dev.mem.reserved;
  80 caddr_t      dev.mem.address;
  81 uint32_t     dev.mem.edcloc;
  82 .fi
  83 .in -2
  84 
  85 .sp
  86 .LP
  87 The fields are defined as follows:
  88 .sp
  89 .ne 2
  90 .na
  91 \fB\fBtype\fR\fR
  92 .ad
  93 .RS 20n
  94 This field indicates the type of device:
  95 .sp
  96 .ne 2
  97 .na
  98 \fBTPLFMTTYPE_DISK\fR
  99 .ad
 100 .RS 19n
 101 disk-like device
 102 .RE
 103 
 104 .sp
 105 .ne 2
 106 .na
 107 \fBTPLFMTTYPE_MEM\fR
 108 .ad
 109 .RS 19n
 110 memory-like device
 111 .RE
 112 
 113 .sp
 114 .ne 2
 115 .na
 116 \fBTPLFMTTYPE_VS\fR
 117 .ad
 118 .RS 19n
 119 vendor-specific device
 120 .RE
 121 
 122 .RE
 123 
 124 .sp
 125 .ne 2
 126 .na
 127 \fB\fBedc_length\fR\fR
 128 .ad
 129 .RS 20n
 130 This field indicates the error detection code length.
 131 .RE
 132 
 133 .sp
 134 .ne 2
 135 .na
 136 \fB\fBedc_type\fR\fR
 137 .ad
 138 .RS 20n
 139 This field indicates the error detection code type.
 140 .RE
 141 
 142 .sp
 143 .ne 2
 144 .na
 145 \fB\fBoffset\fR\fR
 146 .ad
 147 .RS 20n
 148 This field indicates the offset of the first byte of data in this partition.
 149 .RE
 150 
 151 .sp
 152 .ne 2
 153 .na
 154 \fB\fBnbytes\fR\fR
 155 .ad
 156 .RS 20n
 157 This field indicates the number of bytes of data in this partition
 158 .RE
 159 
 160 .sp
 161 .ne 2
 162 .na
 163 \fB\fBdev.disk.bksize\fR\fR
 164 .ad
 165 .RS 20n
 166 This field indicates the block size, for disk devices.
 167 .RE
 168 
 169 .sp
 170 .ne 2
 171 .na
 172 \fB\fBdev.disk.nblocks\fR\fR
 173 .ad
 174 .RS 20n
 175 This field indicates the number of blocks, for disk devices.
 176 .RE
 177 
 178 .sp
 179 .ne 2
 180 .na
 181 \fB\fBdev.disk.edcloc\fR\fR
 182 .ad
 183 .RS 20n
 184 This field indicates the location of the error detection code, for disk
 185 devices.
 186 .RE
 187 
 188 .sp
 189 .ne 2
 190 .na
 191 \fB\fBdev.mem.flags\fR\fR
 192 .ad
 193 .RS 20n
 194 This field provides flags, for memory devices.  Valid flags are:
 195 .sp
 196 .ne 2
 197 .na
 198 \fBTPLFMTFLAGS_ADDR\fR
 199 .ad
 200 .RS 20n
 201 address is valid
 202 .RE
 203 
 204 .sp
 205 .ne 2
 206 .na
 207 \fBTPLFMTFLAGS_AUTO\fR
 208 .ad
 209 .RS 20n
 210 automatically map memory region
 211 .RE
 212 
 213 .RE
 214 
 215 .sp
 216 .ne 2
 217 .na
 218 \fB\fBdev.mem.reserved\fR\fR
 219 .ad
 220 .RS 20n
 221 This field is reserved.
 222 .RE
 223 
 224 .sp
 225 .ne 2
 226 .na
 227 \fB\fBdev.mem.address\fR\fR
 228 .ad
 229 .RS 20n
 230 This field indicates the physical address, for memory devices.
 231 .RE
 232 
 233 .sp
 234 .ne 2
 235 .na
 236 \fB\fBdev.mem.edcloc\fR\fR
 237 .ad
 238 .RS 20n
 239 This field indicates the location of the error detection code, for memory
 240 devices.
 241 .RE
 242 
 243 .SH RETURN VALUES
 244 .sp
 245 .ne 2
 246 .na
 247 \fB\fBCS_SUCCESS\fR\fR
 248 .ad
 249 .RS 27n
 250 Successful operation.
 251 .RE
 252 
 253 .sp
 254 .ne 2
 255 .na
 256 \fB\fBCS_BAD_HANDLE\fR\fR
 257 .ad
 258 .RS 27n
 259 Client handle is invalid.
 260 .RE
 261 
 262 .sp
 263 .ne 2
 264 .na
 265 \fB\fBCS_UNKNOWN_TUPLE\fR\fR
 266 .ad
 267 .RS 27n
 268 Parser does not know how to parse tuple.
 269 .RE
 270 
 271 .sp
 272 .ne 2
 273 .na
 274 \fB\fBCS_NO_CARD\fR\fR
 275 .ad
 276 .RS 27n
 277 No \fBPC \fRCard in socket.
 278 .RE
 279 
 280 .sp
 281 .ne 2
 282 .na
 283 \fB\fBCS_NO_CIS\fR\fR
 284 .ad
 285 .RS 27n
 286 No Card Information Structure (CIS) on \fBPC \fRCard.
 287 .RE
 288 
 289 .sp
 290 .ne 2
 291 .na
 292 \fB\fBCS_UNSUPPORTED_FUNCTION\fR\fR
 293 .ad
 294 .RS 27n
 295 No \fBPCMCIA \fRhardware installed.
 296 .RE
 297 
 298 .SH CONTEXT
 299 .sp
 300 .LP
 301 This function may be called from user or kernel context.
 302 .SH SEE ALSO
 303 .sp
 304 .LP
 305 \fBcsx_GetFirstTuple\fR(9F), \fBcsx_GetTupleData\fR(9F),
 306 \fBcsx_RegisterClient\fR(9F), \fBcsx_ValidateCIS\fR(9F), \fBtuple\fR(9S)
 307 .sp
 308 .LP
 309 \fIPC Card 95 Standard, PCMCIA/JEIDA\fR