1
/* Retrive information about PCI subsystem through libpci library from
2
pciutils package. This should be possible on Linux, BSD and AIX.
4
Device classes, subclasses and programming interfaces are hardcoded
5
here, since there are only few of them, and they are important and
6
should their names be translated.
8
pci.cpp private header, don't include in other files.
10
Author: Konrad Rzepecki <hannibal@megapolis.pl>
12
#ifndef KCONTROL_KPCI_PRIVATE_H
13
#define KCONTROL_KPCI_PRIVATE_H
21
//pci lookup buffer size
22
#define NAME_BUFFER_SIZE 256
25
static const char strCtxt[]="state of PCI item";
26
static const char strEnabled[]=I18N_NOOP2("state of PCI item", "Enabled");
27
static const char strDisabled[]=I18N_NOOP2("state of PCI item", "Disabled");
28
static const char strYes[]=I18N_NOOP2("state of PCI item", "Yes");
29
static const char strNo[]=I18N_NOOP2("state of PCI item", "No");
30
static const char strUnknown[]=I18N_NOOP2("state of PCI item", "Unknown");
48
unsigned char raw[256];
50
unsigned short vendor;
51
unsigned short device;
53
unsigned short command;
58
unsigned comSpecial:1;
59
unsigned comInvalidate:1;
60
unsigned comVgaPalette:1;
64
unsigned comFastBack:1;
65
unsigned comInterrupt:1;
67
} command_bits KDE_PACKED;
70
unsigned short status;
73
unsigned statInterrupt:1;
74
unsigned statCapList:1;
77
unsigned statFastBack:1;
78
unsigned statParity:1;
79
unsigned statDevsel:2;
80
unsigned statSigTargetAbort:1;
81
unsigned statRecTargetAbort:1;
82
unsigned statRecMasterAbort:1;
83
unsigned statSigSystemError:1;
84
unsigned statDetectedParity:1;
85
} status_bits KDE_PACKED;
87
unsigned char revision;
89
unsigned char devProgIface;
91
unsigned progPriOperMode:1;
92
unsigned progPriProgInd:1;
93
unsigned progSecOperMode:1;
94
unsigned progSecProgInd:1;
96
unsigned progIdeMaster:1;
97
} devProgIface_bits KDE_PACKED;
98
} devProgIface KDE_PACKED;
99
unsigned char devSubClass;
100
unsigned char devClass;
101
unsigned char cacheLineSize;
102
unsigned char latencyTimer;
104
unsigned char headerTypeFull:1;
106
unsigned headerType:7;
107
unsigned multifunctional:1;
108
} headerType_bits KDE_PACKED;
109
} headerType KDE_PACKED;
115
unsigned bistStart:1;
116
unsigned bistCapable:1;
117
} bist_bits KDE_PACKED;
122
unsigned baseAddress;
124
unsigned baseAddressMap:1;
125
unsigned baseAddressType:2;
126
unsigned baseAddressPref:1;
127
unsigned baseAddressAddr:28;
128
} baseAddress_bits KDE_PACKED;
129
} KDE_PACKED mapping[6];
131
unsigned short subVendor;
132
unsigned short subDevice;
136
unsigned romEnabled:1;
139
} romAddress_bits KDE_PACKED;
140
} romAddress KDE_PACKED;
141
unsigned char capabilityList;
142
unsigned char reserved1[7];
143
unsigned char interruptLine;
144
unsigned char interruptPin;
145
unsigned char minGnt;
146
unsigned char maxLat;
147
} header0 KDE_PACKED;
149
unsigned baseAddress0_2;
150
unsigned baseAddress1_2;
151
unsigned char primaryBus;
152
unsigned char secondaryBus;
153
unsigned char subordinateBus;
154
unsigned char secLatencyTimer;
156
unsigned char ioBase;
158
unsigned ioBaseType:1;
159
unsigned ioBaseUnk:3;
160
unsigned ioBaseAddr:4;
161
} ioBase_bits KDE_PACKED;
163
unsigned char ioLimit;
165
unsigned short secStatus;
167
unsigned secStatUnk:3;
168
unsigned secStatInterrupt:1;
169
unsigned secStatCapList:1;
170
unsigned secStat66MHz:1;
171
unsigned secStatUdf:1;
172
unsigned secStatFastBack:1;
173
unsigned secStatParity:1;
174
unsigned secStatDevsel:2;
175
unsigned secStatSigTargetAbort:1;
176
unsigned secStatRecTargetAbort:1;
177
unsigned secStatRecMasterAbort:1;
178
unsigned secStatSigSystemError:1;
179
unsigned secStatDetectedParity:1;
180
} secStatus_bits KDE_PACKED;
181
} secStatus KDE_PACKED;
183
unsigned short memoryBase;
185
unsigned memoryType:1;
186
unsigned memoryUnk:3;
187
unsigned memoryAddr:4;
188
} memoryBase_bits KDE_PACKED;
189
} memoryBase KDE_PACKED;
190
unsigned short memoryLimit;
192
unsigned short prefMemoryBase;
194
unsigned prefMemoryType:1;
195
unsigned prefMemoryUnk:3;
196
unsigned prefMemoryAddr:4;
197
} prefMemoryBase_bits KDE_PACKED;
198
} prefMemoryBase KDE_PACKED;
199
unsigned short prefMemoryLimit;
200
unsigned prefBaseUpper32;
201
unsigned prefLimitUpper32;
202
unsigned short ioBaseUpper16;
203
unsigned short ioLimitUpper16;
204
unsigned char capabilityList_2;
205
unsigned char reserved2[3];
206
unsigned romAddress1;
207
unsigned char interruptLine_2;
208
unsigned char interruptPin_2;
210
unsigned short bridgeControl;
212
unsigned bridgeControlParity:1;
213
unsigned bridgeControlSerr:1;
214
unsigned bridgeControlIsa:1;
215
unsigned bridgeControlVga:1;
216
unsigned bridgeControlUnk:1;
217
unsigned bridgeControlMasterAbort:1;
218
unsigned bridgeControlBusReset:1;
219
unsigned bridgeControlFastBack:1;
220
unsigned bridgeControlPriDisTim:1;
221
unsigned bridgeControlSecDisTim:1;
222
unsigned bridgeControlDisTimStat:1;
223
unsigned bridgeControlDisTimeSerr:1;
224
unsigned bridgeControlUnk2:4;
225
} bridgeControl_bits KDE_PACKED;
226
} bridgeControl KDE_PACKED;
227
} header1 KDE_PACKED;
229
unsigned baseAddress0_3;
231
unsigned short cbSecStatus;
233
unsigned cbSecStatUnk:3;
234
unsigned cbSecStatInterrupt:1;
235
unsigned cbSecStatCapList:1;
236
unsigned cbSecStat66MHz:1;
237
unsigned cbSecStatUdf:1;
238
unsigned cbSecStatFastBack:1;
239
unsigned cbSecStatParity:1;
240
unsigned cbSecStatDevsel:2;
241
unsigned cbSecStatSigTargetAbort:1;
242
unsigned cbSecStatRecTargetAbort:1;
243
unsigned cbSecStatRecMasterAbort:1;
244
unsigned cbSecStatSigSystemError:1;
245
unsigned cbSecStatDetectedParity:1;
246
} cbSecStatus_bits KDE_PACKED;
247
} cbSecStatus KDE_PACKED;
248
unsigned char cbPrimaryBus;
249
unsigned char cbCardBus;
250
unsigned char cbSubordinateBus;
251
unsigned char cbLatencyTimer;
253
unsigned cbMemoryBase;
254
unsigned cbMemoryLimit;
255
} KDE_PACKED cbMemory[2];
260
unsigned cbIoBaseType:1;
261
unsigned coIoBaseUnk:1;
262
unsigned cbIoBaseAddr:30;
263
} cbIoBase_bits KDE_PACKED;
264
} cbIoBase KDE_PACKED;
266
} KDE_PACKED cbIo[2];
267
unsigned char interruptLine_3;
268
unsigned char interruptPin_3;
270
unsigned short cbControl;
272
unsigned cbControlParity:1;
273
unsigned cbControlSerr:1;
274
unsigned cbControlIsa:1;
275
unsigned cbControlVga:1;
276
unsigned cbControlUnk:1;
277
unsigned cbControlMasterAbort:1;
278
unsigned cbControlBusReset:1;
279
unsigned cbControl16Int:1;
280
unsigned cbControlPref0:1;
281
unsigned cbControlPref1:1;
282
unsigned cbControlPostWrites:1;
283
unsigned cbControlUnk2:5;
284
} cbControl_bits KDE_PACKED;
285
} cbControl KDE_PACKED;
286
unsigned short cbSubVendor;
287
unsigned short cbSubDevice;
288
unsigned short cbLegacyModeBase;
289
} header2 KDE_PACKED;
295
unsigned char raw[10];
301
} revision KDE_PACKED;
305
unsigned statusEnhRate:4;
306
unsigned statusUnk:28;
307
} status_bits0 KDE_PACKED;
309
unsigned statusRate:3;
310
unsigned statusMode:1;
311
unsigned statusFastWrite:1;
312
unsigned statusOver4gb:1;
313
unsigned statusHtrans:1;
314
unsigned statusGart64b:1;
315
unsigned statusItaCoh:1;
316
unsigned statusSba:1;
317
unsigned statusCalCycle:3;
318
unsigned statusOptReqSize:3;
319
unsigned statusUnk1:1;
320
unsigned statusIsochSupp:1;
321
unsigned statusUnk2:6;
322
unsigned statusReq:8;
323
} status_bits1 KDE_PACKED;
328
unsigned configEnhRate:4;
329
unsigned configUnk:28;
330
} config_bits0 KDE_PACKED;
332
unsigned configRate:3;
333
unsigned configUnk1:1;
334
unsigned configFastWrite:1;
335
unsigned configOver4gb:1;
336
unsigned configUnk2:1;
337
unsigned configGart64b:1;
338
unsigned configAgp:1;
339
unsigned configSba:1;
340
unsigned configCalCycle:3;
341
unsigned configOptReqSize:3;
342
unsigned configUnk3:8;
343
unsigned configReq:8;
344
} config_bits1 KDE_PACKED;
350
unsigned char raw[6];
356
unsigned capsClock:1;
359
unsigned capsAuxCur:3;
360
unsigned capsD1Supp:1;
361
unsigned capsD2Supp:1;
362
unsigned capsPmeD0:1;
363
unsigned capsPmeD1:1;
364
unsigned capsPmeD2:1;
365
unsigned capsPmeD3hot:1;
366
unsigned capsPmeD3cold:1;
367
} caps_bits KDE_PACKED;
370
unsigned short status;
372
unsigned statPower:2;
375
unsigned statDataSelect:4;
376
unsigned statDataScale:2;
377
unsigned statPmeStat:1;
378
} status_bits KDE_PACKED;
381
unsigned char statusBridge;
383
unsigned statBridgeUnk:6;
384
unsigned statBridgeBx:1;
385
unsigned statBridgeClock:1;
386
} statusBridge_bits KDE_PACKED;
387
} statusBridge KDE_PACKED;
393
unsigned char raw[6];
395
unsigned vpdAddress:15;
396
unsigned vpdTransfer:1;
402
unsigned char raw[22];
405
unsigned short msiControl;
407
unsigned msiEnable:1;
408
unsigned msiMmCapable:3;
409
unsigned msiMmEnable:3;
411
unsigned msiPerVector:1;
413
} msiControl_bits KDE_PACKED;
414
} msiControl KDE_PACKED;
418
unsigned msiUpperAddress;
419
unsigned short msiData64;
420
unsigned short msiUnk64;
422
unsigned msiPending64;
423
} address KDE_PACKED;
425
unsigned short msiData;
426
unsigned short msiUnk;
430
} payload KDE_PACKED;
434
//In following arrays -1 mean default value
436
//keep -1 in last position
437
//device classes list
438
static const id2name devClass[]={{ 0x00, i18n("Unclassified device")},
439
{ 0x01, i18n("Mass storage controller")},
440
{ 0x02, i18n("Network controller")},
441
{ 0x03, i18n("Display controller")},
442
{ 0x04, i18n("Multimedia controller")},
443
{ 0x05, i18n("Memory controller")},
444
{ 0x06, i18n("Bridge")},
445
{ 0x07, i18n("Communication controller")},
446
{ 0x08, i18n("Generic system peripheral")},
447
{ 0x09, i18n("Input device controller")},
448
{ 0x0A, i18n("Docking station")},
449
{ 0x0B, i18n("Processor")},
450
{ 0x0C, i18n("Serial bus controller")},
451
{ 0x0D, i18n("Wireless controller")},
452
{ 0x0E, i18n("Intelligent controller")},
453
{ 0x0F, i18n("Satellite communications controller")},
454
{ 0x10, i18n("Encryption controller")},
455
{ 0x11, i18n("Signal processing controller")},
456
{ -1, i18n("Unknown device class")}
459
//keep -1 in last position in "id"
460
//and in last position in "id2" with certain "id"
461
//subdevice classes list
462
static const id3name devSubclass[]={ { 0x00, 0x00, i18n("Non-VGA unclassified device")},
463
{ 0x00, 0x01, i18n("VGA unclassified device")},
464
{ 0x00, -1, i18n("Unknown unclassified device")},
466
{ 0x01, 0x00, i18n("SCSI storage controller")},
467
{ 0x01, 0x01, i18n("IDE controller")},
468
{ 0x01, 0x02, i18n("Floppy disk controller")},
469
{ 0x01, 0x03, i18n("IPI bus controller")},
470
{ 0x01, 0x04, i18n("RAID bus controller")},
471
{ 0x01, 0x05, i18n("ATA controller")},
472
{ 0x01, 0x06, i18n("Serial ATA direct port access")},
473
{ 0x01, 0x80, i18n("Mass storage controller")},
474
{ 0x01, -1, i18n("Unknown storage controller")},
476
{ 0x02, 0x00, i18n("Ethernet controller")},
477
{ 0x02, 0x01, i18n("Token ring network controller")},
478
{ 0x02, 0x02, i18n("FDDI network controller")},
479
{ 0x02, 0x03, i18n("ATM network controller")},
480
{ 0x02, 0x04, i18n("ISDN controller")},
481
{ 0x02, 0x05, i18n("WorldFip controller")},
482
{ 0x02, 0x06, i18n("PICMG 2.14 multi computing")},
483
{ 0x02, 0x80, i18n("Network controller")},
484
{ 0x02, -1, i18n("Unknown network controller")},
486
{ 0x03, 0x00, i18n("VGA compatible controller")},
487
{ 0x03, 0x01, i18n("XGA compatible controller")},
488
{ 0x03, 0x02, i18n("3D controller")},
489
{ 0x03, 0x80, i18n("Display controller")},
490
{ 0x03, -1, i18n("Unknown display controller")},
492
{ 0x04, 0x00, i18n("Multimedia video controller")},
493
{ 0x04, 0x01, i18n("Multimedia audio controller")},
494
{ 0x04, 0x02, i18n("Computer telephony device")},
495
{ 0x04, 0x80, i18n("Multimedia controller")},
496
{ 0x04, -1, i18n("Unknown multimedia controller")},
498
{ 0x05, 0x00, i18n("RAM memory")},
499
{ 0x05, 0x01, i18n("FLASH memory")},
500
{ 0x05, 0x80, i18n("Memory controller")},
501
{ 0x05, -1, i18n("Unknown memory controller")},
503
{ 0x06, 0x00, i18n("Host bridge")},
504
{ 0x06, 0x01, i18n("ISA bridge")},
505
{ 0x06, 0x02, i18n("EISA bridge")},
506
{ 0x06, 0x03, i18n("MicroChannel bridge")},
507
{ 0x06, 0x04, i18n("PCI bridge")},
508
{ 0x06, 0x05, i18n("PCMCIA bridge")},
509
{ 0x06, 0x06, i18n("NuBus bridge")},
510
{ 0x06, 0x07, i18n("CardBus bridge")},
511
{ 0x06, 0x08, i18n("RACEway bridge")},
512
{ 0x06, 0x09, i18n("Semi-transparent PCI-to-PCI bridge")},
513
{ 0x06, 0x0A, i18n("InfiniBand to PCI host bridge")},
514
{ 0x06, 0x80, i18n("Bridge")},
515
{ 0x06, -1, i18n("Unknown bridge")},
517
{ 0x07, 0x00, i18n("Serial controller")},
518
{ 0x07, 0x01, i18n("Parallel controller")},
519
{ 0x07, 0x02, i18n("Multiport serial controller")},
520
{ 0x07, 0x03, i18n("Modem")},
521
{ 0x07, 0x04, i18n("GPIB (IEEE 488.1/2) controller")},
522
{ 0x07, 0x05, i18n("Smart card")},
523
{ 0x07, 0x80, i18n("Communication controller")},
524
{ 0x07, -1, i18n("Unknown communication controller")},
526
{ 0x08, 0x00, i18n("PIC")},
527
{ 0x08, 0x01, i18n("DMA controller")},
528
{ 0x08, 0x02, i18n("Timer")},
529
{ 0x08, 0x03, i18n("RTC")},
530
{ 0x08, 0x04, i18n("PCI Hot-plug controller")},
531
{ 0x08, 0x80, i18n("System peripheral")},
532
{ 0x08, -1, i18n("Unknown system peripheral")},
534
{ 0x09, 0x00, i18n("Keyboard controller")},
535
{ 0x09, 0x01, i18n("Digitizer Pen")},
536
{ 0x09, 0x02, i18n("Mouse controller")},
537
{ 0x09, 0x03, i18n("Scanner controller")},
538
{ 0x09, 0x04, i18n("Gameport controller")},
539
{ 0x09, 0x80, i18n("Input device controller")},
540
{ 0x09, -1, i18n("Unknown input device controller")},
542
{ 0x0A, 0x00, i18n("Generic docking station")},
543
{ 0x0A, 0x80, i18n("Docking station")},
544
{ 0x0A, -1, i18n("Unknown docking station")},
546
{ 0x0B, 0x00, i18n("386")},
547
{ 0x0B, 0x01, i18n("486")},
548
{ 0x0B, 0x02, i18n("Pentium")},
549
{ 0x0B, 0x10, i18n("Alpha")},
550
{ 0x0B, 0x20, i18n("Power PC")},
551
{ 0x0B, 0x30, i18n("MIPS")},
552
{ 0x0B, 0x40, i18n("Co-processor")},
553
{ 0x0B, -1, i18n("Unknown processor")},
555
{ 0x0C, 0x00, i18n("FireWire (IEEE 1394)")},
556
{ 0x0C, 0x01, i18n("ACCESS bus")},
557
{ 0x0C, 0x02, i18n("SSA")},
558
{ 0x0C, 0x03, i18n("USB controller")},
559
{ 0x0C, 0x04, i18n("Fibre channel")},
560
{ 0x0C, 0x05, i18n("SMBus")},
561
{ 0x0C, 0x06, i18n("InfiniBand")},
562
{ 0x0C, 0x07, i18n("IPMI interface")},
563
{ 0x0C, 0x08, i18n("SERCOS interface")},
564
{ 0x0C, 0x09, i18n("CANbus")},
565
{ 0x0C, -1, i18n("Unknown serial bus controller")},
567
{ 0x0D, 0x00, i18n("IRDA controller")},
568
{ 0x0D, 0x01, i18n("Consumer IR controller")},
569
{ 0x0D, 0x10, i18n("RF controller")},
570
{ 0x0D, 0x11, i18n("Bluetooth")},
571
{ 0x0D, 0x12, i18n("Broadband")},
572
{ 0x0D, 0x20, i18n("Ethernet (802.11a - 5 GHz)")},
573
{ 0x0D, 0x21, i18n("Ethernet (802.11b - 2.4 GHz)")},
574
{ 0x0D, 0x80, i18n("Wireless controller")},
575
{ 0x0D, -1, i18n("Unknown wireless controller")},
577
{ 0x0E, 0x00, i18n("I2O")},
578
{ 0x0E, -1, i18n("Unknown intelligent controller")},
580
{ 0x0F, 0x01, i18n("Satellite TV controller")},
581
{ 0x0F, 0x02, i18n("Satellite audio communication controller")},
582
{ 0x0F, 0x03, i18n("Satellite voice communication controller")},
583
{ 0x0F, 0x04, i18n("Satellite data communication controller")},
584
{ 0x0F, -1, i18n("Unknown satellite communications controller")},
586
{ 0x10, 0x00, i18n("Network and computing encryption device")},
587
{ 0x10, 0x10, i18n("Entertainment encryption device")},
588
{ 0x10, 0x80, i18n("Encryption controller")},
589
{ 0x10, -1, i18n("Unknown encryption controller")},
591
{ 0x11, 0x00, i18n("DPIO module")},
592
{ 0x11, 0x01, i18n("Performance counters")},
593
{ 0x11, 0x10, i18n("Communication synchronizer")},
594
{ 0x11, 0x20, i18n("Management card")},
595
{ 0x11, 0x80, i18n("Signal processing controller")},
596
{ 0x11, -1, i18n("Unknown signal processing controller")},
598
{ -1, -1, i18n("Unknown subdevice class")}
601
//keep -1 in last position in "id",
602
//in last position in "id2" with certain "id",
603
//and in last position in "id3" with certain "id2"
604
//device programming interface list
605
static const id4name devInterface[]={ { 0x01, 0x05, 0x20, i18n("single DMA")},
606
{ 0x01, 0x05, 0x30, i18n("chained DMA")},
608
{ 0x03, 0x00, 0x00, i18n("VGA compatible")},
609
{ 0x03, 0x00, 0x01, i18n("8514 compatible")},
611
{ 0x06, 0x04, 0x00, i18n("Normal decode")},
612
{ 0x06, 0x04, 0x01, i18n("Subtractive decode")},
614
{ 0x06, 0x08, 0x00, i18n("Transparent mode")},
615
{ 0x06, 0x08, 0x01, i18n("Endpoint mode")},
617
{ 0x06, 0x09, 0x40, i18n("Primary bus towards host CPU")},
618
{ 0x06, 0x09, 0x40, i18n("Secondary bus towards host CPU")},
620
{ 0x07, 0x00, 0x00, i18n("8250")},
621
{ 0x07, 0x00, 0x01, i18n("16450")},
622
{ 0x07, 0x00, 0x02, i18n("16550")},
623
{ 0x07, 0x00, 0x03, i18n("16650")},
624
{ 0x07, 0x00, 0x04, i18n("16750")},
625
{ 0x07, 0x00, 0x05, i18n("16850")},
626
{ 0x07, 0x00, 0x06, i18n("16950")},
628
{ 0x07, 0x01, 0x00, i18n("SPP")},
629
{ 0x07, 0x01, 0x01, i18n("BiDir")},
630
{ 0x07, 0x01, 0x02, i18n("ECP")},
631
{ 0x07, 0x01, 0x03, i18n("IEEE1284")},
632
{ 0x07, 0x01, 0xFE, i18n("IEEE1284 Target")},
634
{ 0x07, 0x03, 0x00, i18n("Generic")},
635
{ 0x07, 0x03, 0x01, i18n("Hayes/16450")},
636
{ 0x07, 0x03, 0x02, i18n("Hayes/16550")},
637
{ 0x07, 0x03, 0x03, i18n("Hayes/16650")},
638
{ 0x07, 0x03, 0x04, i18n("Hayes/16750")},
640
{ 0x08, 0x00, 0x00, i18n("8259")},
641
{ 0x08, 0x00, 0x01, i18n("ISA PIC")},
642
{ 0x08, 0x00, 0x02, i18n("EISA PIC")},
643
{ 0x08, 0x00, 0x03, i18n("IO-APIC")},
644
{ 0x08, 0x00, 0x04, i18n("IO(X)-APIC")},
646
{ 0x08, 0x01, 0x00, i18n("8237")},
647
{ 0x08, 0x01, 0x01, i18n("ISA DMA")},
648
{ 0x08, 0x01, 0x01, i18n("EISA DMA")},
650
{ 0x08, 0x02, 0x00, i18n("8254")},
651
{ 0x08, 0x02, 0x01, i18n("ISA timer")},
652
{ 0x08, 0x02, 0x01, i18n("EISA timers")},
654
{ 0x08, 0x03, 0x00, i18n("Generic")},
655
{ 0x08, 0x03, 0x01, i18n("ISA RTC")},
657
{ 0x09, 0x04, 0x00, i18n("Generic")},
658
{ 0x09, 0x04, 0x01, i18n("Extended")},
660
{ 0x0C, 0x00, 0x00, i18n("Generic")},
661
{ 0x0C, 0x00, 0x01, i18n("OHCI")},
663
{ 0x0C, 0x03, 0x00, i18n("UHCI")},
664
{ 0x0C, 0x03, 0x10, i18n("OHCI")},
665
{ 0x0C, 0x03, 0x20, i18n("EHCI")},
666
{ 0x0C, 0x03, 0x80, i18n("Unspecified")},
667
{ 0x0C, 0x03, 0xFE, i18n("USB Device")},
669
{ 0x0C, 0x07, 0x00, i18n("SMIC")},
670
{ 0x0C, 0x07, 0x01, i18n("Keyboard controller style")},
671
{ 0x0C, 0x07, 0x02, i18n("Block transfer")},
673
{ -1, -1, -1, i18n(strUnknown)}
677
//keep -1 in last position
679
static const id2name capNames[]={{ 0x01, i18n("Power management")},
680
{ 0x02, i18n("AGP")},
681
{ 0x03, i18n("Vital product data")},
682
{ 0x04, i18n("Slot identification")},
683
{ 0x05, i18n("Message signaled interrupts")},
684
{ 0x06, i18n("CompactPCI hot swap")},
685
{ 0x07, i18n("PCI-X")},
686
{ 0x08, i18n("HyperTransport")},
687
{ 0x09, i18n("Vendor specific")},
688
{ 0x0A, i18n("Debug port")},
689
{ 0x0B, i18n("CompactPCI central resource control")},
690
{ 0x0C, i18n("PCI hot-plug")},
691
{ 0x0E, i18n("AGP x8")},
692
{ 0x0F, i18n("Secure device")},
693
{ 0x10, i18n("PCI express")},
694
{ 0x11, i18n("MSI-X")},
695
{ -1, i18n(strUnknown)}
698
//keep -1 in last position
699
//device selection timing
700
static const id2name devSel[]={ { 0x00, i18n("Fast")},
701
{ 0x01, i18n("Medium")},
702
{ 0x02, i18n("Slow")},
703
{ -1, i18n(strUnknown)}
706
//keep -1 in last position
708
static const id2name mappingType[]={{ 0x00, i18n("32 bit")},
709
{ 0x01, i18n("Below 1M")},
710
{ 0x02, i18n("64 bit")},
711
{ -1, i18n(strUnknown)}
714
//keep -1 in last position
716
static const id2name headerType[]={ { 0x00, i18n("Standard")},
717
{ 0x01, i18n("Bridge")},
718
{ 0x02, i18n("CardBus")},
719
{ -1, i18n(strUnknown)}
722
//keep -1 in last position
724
static const id2name agpRate[]={{ 0x01, i18n("1X")},
726
{ 0x03, i18n("1X & 2X")},
728
{ 0x05, i18n("1X & 4X")},
729
{ 0x06, i18n("2X & 4X")},
730
{ 0x07, i18n("1X & 2X & 4X")},
733
{ 0x0B, i18n("4X & 8X")},
734
{ -1, i18n(strUnknown)}
737
//keep -1 in last position
738
//AGP calibrating cycle
739
static const id2name calCycle[]={ { 0x00, i18n("4 ms")},
740
{ 0x01, i18n("16 ms")},
741
{ 0x02, i18n("64 ms")},
742
{ 0x03, i18n("256 ms")},
743
{ 0x07, i18n("Not needed")},
744
{ -1, i18n(strUnknown)}
747
//keep -1 in last position
748
//PM auxiliary current
749
static const id2name auxCur[]={ { 0x00, i18n("0 (self powered)")},
750
{ 0x01, i18n("55 mA")},
751
{ 0x02, i18n("100 mA")},
752
{ 0x03, i18n("160 mA")},
753
{ 0x04, i18n("220 mA")},
754
{ 0x05, i18n("270 mA")},
755
{ 0x06, i18n("320 mA")},
756
{ 0x07, i18n("375 mA")},
757
{ -1, i18n(strUnknown)}
760
//keep -1 in last position
762
static const id2name powerState[]={ { 0x00, i18n("D0")},
765
{ 0x03, i18n("D3 hot")},
766
{ -1, i18n(strUnknown)}
769
//keep -1 in last position
770
//MSI multiple message
771
static const id2name multipleMessage[]={{ 0x00, i18n("1 vector")},
772
{ 0x01, i18n("2 vectors")},
773
{ 0x02, i18n("4 vectors")},
774
{ 0x03, i18n("8 vectors")},
775
{ 0x04, i18n("16 vectors")},
776
{ 0x05, i18n("32 vectors")},
777
{ -1, i18n(strUnknown)}
780
static const QString& getNameById(const id2name *const table,int id);
781
static const QString& getNameBy2Id(const id3name *const table,int id,int id2);
782
static const QString& getNameBy3Id(const id4name *const table,int id,int id2, int id3);
784
#endif //KCONTROL_KPCI_PRIVATE_H