1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
|
'\" te
.\" Copyright (c) 1996, 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 CSX_PARSE_CISTPL_CFTABLE_ENTRY 9F "Dec 20, 1996"
.SH NAME
csx_Parse_CISTPL_CFTABLE_ENTRY \- parse 16-bit Card Configuration Table Entry
tuple
.SH SYNOPSIS
.nf
#include <sys/pccard.h>
\fBint32_t\fR \fBcsx_Parse_CISTPL_CFTABLE_ENTRY\fR(\fBclient_handle_t\fR \fIch\fR, \fBtuple_t *\fR\fItu\fR,
\fBcistpl_cftable_entry_t *\fR\fIcft\fR);
.fi
.SH INTERFACE LEVEL
illumos \fBDDI \fRSpecific (illumos \fBDDI) \fR
.SH PARAMETERS
.ne 2
.na
\fB\fIch\fR\fR
.ad
.RS 7n
Client handle returned from \fBcsx_RegisterClient\fR(9F).
.RE
.sp
.ne 2
.na
\fB\fItu\fR\fR
.ad
.RS 7n
Pointer to a \fBtuple_t\fR structure (see \fBtuple\fR(9S)) returned by a call
to \fBcsx_GetFirstTuple\fR(9F) or \fBcsx_GetNextTuple\fR(9F).
.RE
.sp
.ne 2
.na
\fB\fIcft\fR\fR
.ad
.RS 7n
Pointer to a \fBcistpl_cftable_entry_t\fR structure which contains the parsed
\fBCISTPL_CFTABLE_ENTRY\fR tuple information upon return from this function.
.RE
.SH DESCRIPTION
This function parses the 16 bit Card Configuration Table Entry tuple,
\fBCISTPL_CFTABLE_ENTRY,\fR into a form usable by \fBPC \fRCard drivers.
.sp
.LP
The \fBCISTPL_CFTABLE_ENTRY\fR tuple is used to describe each possible
configuration of a \fBPC \fRCard and to distinguish among the permitted
configurations. The \fBCISTPL_CONFIG\fR tuple must precede all
\fBCISTPL_CFTABLE_ENTRY\fR tuples.
.SH STRUCTURE MEMBERS
The structure members of \fBcistpl_cftable_entry_t\fR are:
.sp
.in +2
.nf
uint32_t flags; /* valid descriptions */
uint32_t ifc; /* interface description */
/* information */
uint32_t pin; /* values for PRR */
uint32_t index; /* configuration index number */
cistpl_cftable_entry_pd_t pd; /* power requirements */
/* description */
cistpl_cftable_entry_speed_t speed; /* device speed description */
cistpl_cftable_entry_io_t io; /* device I/O map */
cistpl_cftable_entry_irq_t irq; /* device IRQ utilization */
cistpl_cftable_entry_mem_t mem; /* device memory space */
cistpl_cftable_entry_misc_t misc; /* miscellaneous
/* device features */
.fi
.in -2
.sp
.LP
The \fBflags\fR field is defined and bit-mapped as follows:
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_DEFAULT\fR
.ad
.sp .6
.RS 4n
This is a default configuration
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_IF\fR
.ad
.sp .6
.RS 4n
If configuration byte exists
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_FS_PWR\fR
.ad
.sp .6
.RS 4n
Power information exists
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_FS_TD\fR
.ad
.sp .6
.RS 4n
Timing information exists
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_FS_IO\fR
.ad
.sp .6
.RS 4n
I/O information exists
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_FS_IRQ\fR
.ad
.sp .6
.RS 4n
IRQ information exists
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_FS_MEM\fR
.ad
.sp .6
.RS 4n
MEM space information exists
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_FS_MISC\fR
.ad
.sp .6
.RS 4n
MISC information exists
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_FS_STCE_EV\fR
.ad
.sp .6
.RS 4n
STCE_EV exists
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_FS_STCE_PD\fR
.ad
.sp .6
.RS 4n
STCE_PD exists
.RE
.sp
.LP
If the \fBCISTPL_CFTABLE_TPCE_IF\fR flag is set, the \fBifc\fR field is
bit-mapped and defined as follows:
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_IF_MEMORY\fR
.ad
.sp .6
.RS 4n
Memory interface
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_IF_IO_MEM\fR
.ad
.sp .6
.RS 4n
IO and memory
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_IF_CUSTOM_0\fR
.ad
.sp .6
.RS 4n
Custom interface 0
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_IF_CUSTOM_1\fR
.ad
.sp .6
.RS 4n
Custom interface 1
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_IF_CUSTOM_2\fR
.ad
.sp .6
.RS 4n
Custom interface 2
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_IF_CUSTOM_3\fR
.ad
.sp .6
.RS 4n
Custom interface 3
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_IF_MASK\fR
.ad
.sp .6
.RS 4n
Interface type mask
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_IF_BVD\fR
.ad
.sp .6
.RS 4n
BVD active in PRR
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_IF_WP\fR
.ad
.sp .6
.RS 4n
WP active in PRR
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_IF_RDY\fR
.ad
.sp .6
.RS 4n
RDY active in PRR
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_IF_MWAIT\fR
.ad
.sp .6
.RS 4n
WAIT - mem cycles
.RE
.sp
.LP
\fBpin\fR is a value for the Pin Replacement Register.
.sp
.LP
\fBindex\fR is a configuration index number.
.sp
.LP
The structure members of \fBcistpl_cftable_entry_pd_t\fR are:
.sp
.in +2
.nf
uint32_t flags; /* which descriptions are valid */
cistpl_cftable_entry_pwr_t pd_vcc; /* VCC power description */
cistpl_cftable_entry_pwr_t pd_vpp1; /* Vpp1 power description */
cistpl_cftable_entry_pwr_t pd_vpp2; /* Vpp2 power description */
.fi
.in -2
.sp
.LP
This \fBflags\fR field is bit-mapped and defined as follows:
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_FS_PWR_VCC\fR
.ad
.sp .6
.RS 4n
Vcc description valid
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_FS_PWR_VPP1\fR
.ad
.sp .6
.RS 4n
Vpp1 description valid
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_FS_PWR_VPP2\fR
.ad
.sp .6
.RS 4n
Vpp2 description valid
.RE
.sp
.LP
The structure members of \fBcistpl_cftable_entry_pwr_t\fR are:
.sp
.in +2
.nf
uint32_t nomV; /* nominal supply voltage */
uint32_t nomV_flags;
uint32_t minV; /* minimum supply voltage */
uint32_t minV_flags;
uint32_t maxV; /* maximum supply voltage */
uint32_t maxV_flags;
uint32_t staticI; /* continuous supply current */
uint32_t staticI_flags;
uint32_t avgI; /* max current required averaged over 1 sec. */
uint32_t avgI_flags;
uint32_t peakI; /* max current required averaged over 10mS */
uint32_t peakI_flags;
uint32_t pdownI; /* power down supply current required */
uint32_t pdownI_flags;
.fi
.in -2
.sp
.LP
\fBnomV\fR, \fBminV\fR, \fBmaxV\fR, \fBstaticI\fR, \fBavgI\fR,
\fBpeakI_flag\fR, and \fBpdownI\fR are defined and bit-mapped as follows:
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_PD_NOMV\fR
.ad
.RS 29n
Nominal supply voltage
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_PD_MINV\fR
.ad
.RS 29n
Minimum supply voltage
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_PD_MAXV\fR
.ad
.RS 29n
Maximum supply voltage
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_PD_STATICI\fR
.ad
.RS 29n
Continuous supply current
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_PD_AVGI\fR
.ad
.RS 29n
Maximum current required averaged over 1 second
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_PD_PEAKI\fR
.ad
.RS 29n
Maximum current required averaged over 10mS
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_PD_PDOWNI\fR
.ad
.RS 29n
Power down supply current required
.RE
.sp
.LP
\fBnomV_flags\fR, \fBminV_flags\fR, \fBmaxV_flags\fR, \fBstaticI_flags\fR,
\fBavgI_flags\fR, \fBpeakI_flags\fR, and \fBpdownI_flags\fR are defined and
bit-mapped as follows:
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_PD_EXISTS\fR
.ad
.RS 30n
This parameter exists
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_PD_MUL10\fR
.ad
.RS 30n
Multiply return value by 10
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_PD_NC_SLEEP\fR
.ad
.RS 30n
No connection on sleep/power down
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_PD_ZERO\fR
.ad
.RS 30n
Zero value required
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_PD_NC\fR
.ad
.RS 30n
No connection ever
.RE
.sp
.LP
The structure members of \fBcistpl_cftable_entry_speed_t\fR are:
.sp
.in +2
.nf
uint32_t flags; /* which timing information is present */
uint32_t wait; /* max WAIT time in device speed format */
uint32_t nS_wait; /* max WAIT time in nS */
uint32_t rdybsy; /* max RDY/BSY time in device speed format */
uint32_t nS_rdybsy; /* max RDY/BSY time in nS */
uint32_t rsvd; /* max RSVD time in device speed format */
uint32_t nS_rsvd; /* max RSVD time in nS */
.fi
.in -2
.sp
.LP
The \fBflags\fR field is bit-mapped and defined as follows:
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_FS_TD_WAIT\fR
.ad
.sp .6
.RS 4n
WAIT timing exists
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_FS_TD_RDY\fR
.ad
.sp .6
.RS 4n
RDY/BSY timing exists
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_FS_TD_RSVD\fR
.ad
.sp .6
.RS 4n
RSVD timing exists
.RE
.sp
.LP
The structure members of \fBcistpl_cftable_entry_io_t\fR are:
.sp
.in +2
.nf
uint32_t flags; /* direct copy of TPCE_IO byte in tuple */
uint32_t addr_lines; /* number of decoded I/O address lines */
uint32_t ranges; /* number of I/O ranges */
cistpl_cftable_entry_io_range_t
range[CISTPL_CFTABLE_ENTRY_MAX_IO_RANGES];
.fi
.in -2
.sp
.LP
The \fBflags\fR field is defined and bit-mapped as follows:
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_FS_IO_BUS\fR
.ad
.sp .6
.RS 4n
Bus width mask
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_FS_IO_BUS8\fR
.ad
.sp .6
.RS 4n
8-bit flag
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_FS_IO_BUS16\fR
.ad
.sp .6
.RS 4n
16-bit flag
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_FS_IO_RANGE\fR
.ad
.sp .6
.RS 4n
IO address ranges exist
.RE
.sp
.LP
The structure members of \fBcistpl_cftable_entry_io_range_t\fR are:
.sp
.in +2
.nf
uint32_t addr; /* I/O start address */
uint32_t length; /* I/O register length */
.fi
.in -2
.sp
.LP
The structure members of \fBcistpl_cftable_entry_irq_t\fR are:
.sp
.in +2
.nf
uint32_t flags; /* direct copy of TPCE_IR byte in tuple */
uint32_t irqs; /* bit mask for each allowed IRQ */
.fi
.in -2
.sp
.LP
The structure members of \fBcistpl_cftable_entry_mem_t\fR are:
.sp
.in +2
.nf
uint32_t flags; /* memory descriptor type and host addr info */
uint32_t windows; /* number of memory space descriptors */
cistpl_cftable_entry_mem_window_t
window[CISTPL_CFTABLE_ENTRY_MAX_MEM_WINDOWS];
.fi
.in -2
.sp
.LP
The \fBflags\fR field is defined and bit-mapped as follows:
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_FS_MEM3\fR
.ad
.sp .6
.RS 4n
Space descriptors
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_FS_MEM2\fR
.ad
.sp .6
.RS 4n
\fBhost_addr\fR=\fBcard_addr\fR
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_FS_MEM1\fR
.ad
.sp .6
.RS 4n
Card address=0 any host address
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_FS_MEM_HOST\fR
.ad
.sp .6
.RS 4n
If host address is present in MEM3
.RE
.sp
.LP
The structure members of \fBcistpl_cftable_entry_mem_window_t\fR are:
.sp
.in +2
.nf
uint32_t length; /* length of this window */
uint32_t card_addr; /* card address */
uint32_t host_addr; /* host address */
.fi
.in -2
.sp
.LP
The structure members of \fBcistpl_cftable_entry_misc_t\fR are:
.sp
.in +2
.nf
uint32_t flags; /* miscellaneous features flags */
.fi
.in -2
.sp
.LP
The \fBflags\fR field is defined and bit-mapped as follows:
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_MI_MTC_MASK\fR
.ad
.sp .6
.RS 4n
Max twin cards mask
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_MI_AUDIO\fR
.ad
.sp .6
.RS 4n
Audio on BVD2
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_MI_READONLY\fR
.ad
.sp .6
.RS 4n
R/O storage
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_MI_PWRDOWN\fR
.ad
.sp .6
.RS 4n
Powerdown capable
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_MI_DRQ_MASK\fR
.ad
.sp .6
.RS 4n
DMAREQ mask
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_MI_DRQ_SPK\fR
.ad
.sp .6
.RS 4n
DMAREQ on SPKR
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_MI_DRQ_IOIS\fR
.ad
.sp .6
.RS 4n
DMAREQ on IOIS16
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_MI_DRQ_INP\fR
.ad
.sp .6
.RS 4n
DMAREQ on INPACK
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_MI_DMA_8\fR
.ad
.sp .6
.RS 4n
DMA width 8 bits
.RE
.sp
.ne 2
.na
\fBCISTPL_CFTABLE_TPCE_MI_DMA_16\fR
.ad
.sp .6
.RS 4n
DMA width 16 bits
.RE
.SH RETURN VALUES
.ne 2
.na
\fB\fBCS_SUCCESS\fR\fR
.ad
.RS 27n
Successful operation.
.RE
.sp
.ne 2
.na
\fB\fBCS_BAD_HANDLE\fR\fR
.ad
.RS 27n
Client handle is invalid.
.RE
.sp
.ne 2
.na
\fB\fBCS_UNKNOWN_TUPLE\fR\fR
.ad
.RS 27n
Parser does not know how to parse tuple.
.RE
.sp
.ne 2
.na
\fB\fBCS_NO_CARD\fR\fR
.ad
.RS 27n
No \fBPC \fRCard in socket.
.RE
.sp
.ne 2
.na
\fB\fBCS_NO_CIS\fR\fR
.ad
.RS 27n
No Card Information Structure (CIS) on \fBPC \fRCard.
.RE
.sp
.ne 2
.na
\fB\fBCS_UNSUPPORTED_FUNCTION\fR\fR
.ad
.RS 27n
No \fBPCMCIA \fRhardware installed.
.RE
.SH CONTEXT
This function may be called from user or kernel context.
.SH SEE ALSO
.BR csx_GetFirstTuple (9F),
.BR csx_GetTupleData (9F),
.BR csx_Parse_CISTPL_CONFIG (9F),
.BR csx_RegisterClient (9F),
.BR csx_ValidateCIS (9F),
.BR tuple (9S)
.sp
.LP
\fIPC Card 95 Standard, PCMCIA/JEIDA\fR
|