Fix crash if key bindings specified in profile cannot be found. Improve
[personal-kdebase.git] / apps / kinfocenter / pci / kpci_private.h
blobfd9e6071adfd31b71da414a2145e8dffb4af57c9
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
15 #include "kpci.h"
17 #include <QString>
19 #include <klocale.h>
21 //pci lookup buffer size
22 #define NAME_BUFFER_SIZE 256
24 //common used strings
25 static const char* strEnabled=I18N_NOOP("Enabled");
26 static const char* strDisabled=I18N_NOOP("Disabled");
27 static const char* strYes=I18N_NOOP("Yes");
28 static const char* strNo=I18N_NOOP("No");
29 static const char* strUnknown=I18N_NOOP("Unknown");
31 struct id2name {
32 int id;
33 QString name;
36 struct id3name {
37 int id,id2;
38 QString name;
41 struct id4name {
42 int id,id2,id3;
43 QString name;
46 union pciInfo{
47 unsigned char raw[256];
48 struct {
49 unsigned short vendor;
50 unsigned short device;
51 union {
52 unsigned short command;
53 struct {
54 unsigned comIo:1;
55 unsigned comMemory:1;
56 unsigned comMaster:1;
57 unsigned comSpecial:1;
58 unsigned comInvalidate:1;
59 unsigned comVgaPalette:1;
60 unsigned comParity:1;
61 unsigned comWait:1;
62 unsigned comSerr:1;
63 unsigned comFastBack:1;
64 unsigned comInterrupt:1;
65 unsigned comUnk:5;
66 } KDE_PACKED;
67 } KDE_PACKED;
68 union {
69 unsigned short status;
70 struct {
71 unsigned statUnk:3;
72 unsigned statInterrupt:1;
73 unsigned statCapList:1;
74 unsigned stat66MHz:1;
75 unsigned statUdf:1;
76 unsigned statFastBack:1;
77 unsigned statParity:1;
78 unsigned statDevsel:2;
79 unsigned statSigTargetAbort:1;
80 unsigned statRecTargetAbort:1;
81 unsigned statRecMasterAbort:1;
82 unsigned statSigSystemError:1;
83 unsigned statDetectedParity:1;
84 } KDE_PACKED;
85 } KDE_PACKED;
86 unsigned char revision;
87 union {
88 unsigned char devProgIface;
89 struct {
90 unsigned progPriOperMode:1;
91 unsigned progPriProgInd:1;
92 unsigned progSecOperMode:1;
93 unsigned progSecProgInd:1;
94 unsigned progUnk:3;
95 unsigned progIdeMaster:1;
96 } KDE_PACKED;
97 } KDE_PACKED;
98 unsigned char devSubClass;
99 unsigned char devClass;
100 unsigned char cacheLineSize;
101 unsigned char latencyTimer;
102 union {
103 unsigned char headerTypeFull:1;
104 struct {
105 unsigned headerType:7;
106 unsigned multifunctional:1;
107 } KDE_PACKED;
108 } KDE_PACKED;
109 union {
110 unsigned char bist;
111 struct {
112 unsigned bistCode:4;
113 unsigned bistUnk:2;
114 unsigned bistStart:1;
115 unsigned bistCapable:1;
116 } KDE_PACKED;
117 } KDE_PACKED;
118 union {
119 struct { //header0
120 union {
121 unsigned baseAddress;
122 struct {
123 unsigned baseAddressMap:1;
124 unsigned baseAddressType:2;
125 unsigned baseAddressPref:1;
126 unsigned baseAddressAddr:28;
127 } KDE_PACKED;
128 } KDE_PACKED mapping[6];
129 unsigned cardbusCis;
130 unsigned short subVendor;
131 unsigned short subDevice;
132 union {
133 unsigned romAddress;
134 struct {
135 unsigned romEnabled:1;
136 unsigned romUnk:10;
137 unsigned romAddr:21;
138 } KDE_PACKED;
139 } KDE_PACKED;
140 unsigned char capabilityList;
141 unsigned char reserved1[7];
142 unsigned char interruptLine;
143 unsigned char interruptPin;
144 unsigned char minGnt;
145 unsigned char maxLat;
146 } KDE_PACKED;
147 struct{ //header1
148 unsigned baseAddress0_2;
149 unsigned baseAddress1_2;
150 unsigned char primaryBus;
151 unsigned char secondaryBus;
152 unsigned char subordinateBus;
153 unsigned char secLatencyTimer;
154 union {
155 unsigned char ioBase;
156 struct {
157 unsigned ioBaseType:1;
158 unsigned ioBaseUnk:3;
159 unsigned ioBaseAddr:4;
160 } KDE_PACKED;
161 } KDE_PACKED;
162 unsigned char ioLimit;
163 union {
164 unsigned short secStatus;
165 struct {
166 unsigned secStatUnk:3;
167 unsigned secStatInterrupt:1;
168 unsigned secStatCapList:1;
169 unsigned secStat66MHz:1;
170 unsigned secStatUdf:1;
171 unsigned secStatFastBack:1;
172 unsigned secStatParity:1;
173 unsigned secStatDevsel:2;
174 unsigned secStatSigTargetAbort:1;
175 unsigned secStatRecTargetAbort:1;
176 unsigned secStatRecMasterAbort:1;
177 unsigned secStatSigSystemError:1;
178 unsigned secStatDetectedParity:1;
179 } KDE_PACKED;
180 } KDE_PACKED;
181 union {
182 unsigned short memoryBase;
183 struct {
184 unsigned memoryType:1;
185 unsigned memoryUnk:3;
186 unsigned memoryAddr:4;
187 } KDE_PACKED;
188 } KDE_PACKED;
189 unsigned short memoryLimit;
190 union {
191 unsigned short prefMemoryBase;
192 struct {
193 unsigned prefMemoryType:1;
194 unsigned prefMemoryUnk:3;
195 unsigned prefMemoryAddr:4;
196 } KDE_PACKED;
197 } KDE_PACKED;
198 unsigned short prefMemoryLimit;
199 unsigned prefBaseUpper32;
200 unsigned prefLimitUpper32;
201 unsigned short ioBaseUpper16;
202 unsigned short ioLimitUpper16;
203 unsigned char capabilityList_2;
204 unsigned char reserved2[3];
205 unsigned romAddress1;
206 unsigned char interruptLine_2;
207 unsigned char interruptPin_2;
208 union {
209 unsigned short bridgeControl;
210 struct {
211 unsigned bridgeControlParity:1;
212 unsigned bridgeControlSerr:1;
213 unsigned bridgeControlIsa:1;
214 unsigned bridgeControlVga:1;
215 unsigned bridgeControlUnk:1;
216 unsigned bridgeControlMasterAbort:1;
217 unsigned bridgeControlBusReset:1;
218 unsigned bridgeControlFastBack:1;
219 unsigned bridgeControlPriDisTim:1;
220 unsigned bridgeControlSecDisTim:1;
221 unsigned bridgeControlDisTimStat:1;
222 unsigned bridgeControlDisTimeSerr:1;
223 unsigned bridgeControlUnk2:4;
224 } KDE_PACKED;
225 } KDE_PACKED;
226 } KDE_PACKED;
227 struct{ //header2
228 unsigned baseAddress0_3;
229 union {
230 unsigned short cbSecStatus;
231 struct {
232 unsigned cbSecStatUnk:3;
233 unsigned cbSecStatInterrupt:1;
234 unsigned cbSecStatCapList:1;
235 unsigned cbSecStat66MHz:1;
236 unsigned cbSecStatUdf:1;
237 unsigned cbSecStatFastBack:1;
238 unsigned cbSecStatParity:1;
239 unsigned cbSecStatDevsel:2;
240 unsigned cbSecStatSigTargetAbort:1;
241 unsigned cbSecStatRecTargetAbort:1;
242 unsigned cbSecStatRecMasterAbort:1;
243 unsigned cbSecStatSigSystemError:1;
244 unsigned cbSecStatDetectedParity:1;
245 } KDE_PACKED;
246 } KDE_PACKED;
247 unsigned char cbPrimaryBus;
248 unsigned char cbCardBus;
249 unsigned char cbSubordinateBus;
250 unsigned char cbLatencyTimer;
251 struct {
252 unsigned cbMemoryBase;
253 unsigned cbMemoryLimit;
254 } KDE_PACKED cbMemory[2];
255 struct {
256 union {
257 unsigned cbIoBase;
258 struct {
259 unsigned cbIoBaseType:1;
260 unsigned coIoBaseUnk:1;
261 unsigned cbIoBaseAddr:30;
262 } KDE_PACKED;
263 } KDE_PACKED;
264 unsigned cbIoLimit;
265 } KDE_PACKED cbIo[2];
266 unsigned char interruptLine_3;
267 unsigned char interruptPin_3;
268 union {
269 unsigned short cbControl;
270 struct {
271 unsigned cbControlParity:1;
272 unsigned cbControlSerr:1;
273 unsigned cbControlIsa:1;
274 unsigned cbControlVga:1;
275 unsigned cbControlUnk:1;
276 unsigned cbControlMasterAbort:1;
277 unsigned cbControlBusReset:1;
278 unsigned cbControl16Int:1;
279 unsigned cbControlPref0:1;
280 unsigned cbControlPref1:1;
281 unsigned cbControlPostWrites:1;
282 unsigned cbControlUnk2:5;
283 } KDE_PACKED;
284 } KDE_PACKED;
285 unsigned short cbSubVendor;
286 unsigned short cbSubDevice;
287 unsigned short cbLegacyModeBase;
288 } KDE_PACKED;
289 } KDE_PACKED;
290 } KDE_PACKED;
291 } KDE_PACKED;
293 union agpInfo{
294 unsigned char raw[10];
295 struct {
296 struct {
297 unsigned revMinor:4;
298 unsigned revMaior:4;
299 unsigned char unk;
300 } KDE_PACKED;
301 union {
302 unsigned status;
303 struct {
304 unsigned statusEnhRate:4;
305 unsigned statusUnk:28;
306 } KDE_PACKED;
307 struct {
308 unsigned statusRate:3;
309 unsigned statusMode:1;
310 unsigned statusFastWrite:1;
311 unsigned statusOver4gb:1;
312 unsigned statusHtrans:1;
313 unsigned statusGart64b:1;
314 unsigned statusItaCoh:1;
315 unsigned statusSba:1;
316 unsigned statusCalCycle:3;
317 unsigned statusOptReqSize:3;
318 unsigned statusUnk1:1;
319 unsigned statusIsochSupp:1;
320 unsigned statusUnk2:6;
321 unsigned statusReq:8;
322 } KDE_PACKED;
323 } KDE_PACKED;
324 union {
325 unsigned config;
326 struct {
327 unsigned configEnhRate:4;
328 unsigned configUnk:28;
329 } KDE_PACKED;
330 struct {
331 unsigned configRate:3;
332 unsigned configUnk1:1;
333 unsigned configFastWrite:1;
334 unsigned configOver4gb:1;
335 unsigned configUnk2:1;
336 unsigned configGart64b:1;
337 unsigned configAgp:1;
338 unsigned configSba:1;
339 unsigned configCalCycle:3;
340 unsigned configOptReqSize:3;
341 unsigned configUnk3:8;
342 unsigned configReq:8;
343 } KDE_PACKED;
344 } KDE_PACKED;
345 } KDE_PACKED;
346 } KDE_PACKED;
348 union pmInfo {
349 unsigned char raw[6];
350 struct {
351 union {
352 unsigned short caps;
353 struct {
354 unsigned capsVer:3;
355 unsigned capsClock:1;
356 unsigned capsUnk:1;
357 unsigned capsDsi:1;
358 unsigned capsAuxCur:3;
359 unsigned capsD1Supp:1;
360 unsigned capsD2Supp:1;
361 unsigned capsPmeD0:1;
362 unsigned capsPmeD1:1;
363 unsigned capsPmeD2:1;
364 unsigned capsPmeD3hot:1;
365 unsigned capsPmeD3cold:1;
366 } KDE_PACKED;
367 } KDE_PACKED;
368 union {
369 unsigned short status;
370 struct {
371 unsigned statPower:2;
372 unsigned statUnk:6;
373 unsigned statPme:1;
374 unsigned statDataSelect:4;
375 unsigned statDataScale:2;
376 unsigned statPmeStat:1;
377 } KDE_PACKED;
378 } KDE_PACKED;
379 union {
380 unsigned char statusBridge;
381 struct {
382 unsigned statBridgeUnk:6;
383 unsigned statBridgeBx:1;
384 unsigned statBridgeClock:1;
385 } KDE_PACKED;
386 } KDE_PACKED;
387 unsigned char data;
388 } KDE_PACKED;
389 } KDE_PACKED;
391 union vpdInfo {
392 unsigned char raw[6];
393 struct {
394 unsigned vpdAddress:15;
395 unsigned vpdTransfer:1;
396 unsigned vpdData;
397 } KDE_PACKED;
398 } KDE_PACKED;
400 union msiInfo {
401 unsigned char raw[22];
402 struct {
403 union {
404 unsigned short msiControl;
405 struct {
406 unsigned msiEnable:1;
407 unsigned msiMmCapable:3;
408 unsigned msiMmEnable:3;
409 unsigned msi64bit:1;
410 unsigned msiPerVector:1;
411 unsigned msiUnk0:7;
412 } KDE_PACKED;
413 } KDE_PACKED;
414 unsigned msiAddress;
415 union {
416 struct {
417 unsigned msiUpperAddress;
418 unsigned short msiData64;
419 unsigned short msiUnk64;
420 unsigned msiMask64;
421 unsigned msiPending64;
422 } KDE_PACKED;
423 struct {
424 unsigned short msiData;
425 unsigned short msiUnk;
426 unsigned msiMask;
427 unsigned msiPending;
428 } KDE_PACKED;
429 } KDE_PACKED;
430 } KDE_PACKED;
431 } KDE_PACKED;
433 //In following arrays -1 mean default value
435 //keep -1 in last position
436 //device classes list
437 static const id2name devClass[]={{ 0x00, i18n("Unclassified device")},
438 { 0x01, i18n("Mass storage controller")},
439 { 0x02, i18n("Network controller")},
440 { 0x03, i18n("Display controller")},
441 { 0x04, i18n("Multimedia controller")},
442 { 0x05, i18n("Memory controller")},
443 { 0x06, i18n("Bridge")},
444 { 0x07, i18n("Communication controller")},
445 { 0x08, i18n("Generic system peripheral")},
446 { 0x09, i18n("Input device controller")},
447 { 0x0A, i18n("Docking station")},
448 { 0x0B, i18n("Processor")},
449 { 0x0C, i18n("Serial bus controller")},
450 { 0x0D, i18n("Wireless controller")},
451 { 0x0E, i18n("Intelligent controller")},
452 { 0x0F, i18n("Satellite communications controller")},
453 { 0x10, i18n("Encryption controller")},
454 { 0x11, i18n("Signal processing controller")},
455 { -1, i18n("Unknown device class")}
458 //keep -1 in last position in "id"
459 //and in last position in "id2" with certain "id"
460 //subdevice classes list
461 static const id3name devSubclass[]={ { 0x00, 0x00, i18n("Non-VGA unclassified device")},
462 { 0x00, 0x01, i18n("VGA unclassified device")},
463 { 0x00, -1, i18n("Unknown unclassified device")},
465 { 0x01, 0x00, i18n("SCSI storage controller")},
466 { 0x01, 0x01, i18n("IDE controller")},
467 { 0x01, 0x02, i18n("Floppy disk controller")},
468 { 0x01, 0x03, i18n("IPI bus controller")},
469 { 0x01, 0x04, i18n("RAID bus controller")},
470 { 0x01, 0x05, i18n("ATA controller")},
471 { 0x01, 0x06, i18n("Serial ATA direct port access")},
472 { 0x01, 0x80, i18n("Mass storage controller")},
473 { 0x01, -1, i18n("Unknown storage controller")},
475 { 0x02, 0x00, i18n("Ethernet controller")},
476 { 0x02, 0x01, i18n("Token ring network controller")},
477 { 0x02, 0x02, i18n("FDDI network controller")},
478 { 0x02, 0x03, i18n("ATM network controller")},
479 { 0x02, 0x04, i18n("ISDN controller")},
480 { 0x02, 0x05, i18n("WorldFip controller")},
481 { 0x02, 0x06, i18n("PICMG 2.14 multi computing")},
482 { 0x02, 0x80, i18n("Network controller")},
483 { 0x02, -1, i18n("Unknown network controller")},
485 { 0x03, 0x00, i18n("VGA compatible controller")},
486 { 0x03, 0x01, i18n("XGA compatible controller")},
487 { 0x03, 0x02, i18n("3D controller")},
488 { 0x03, 0x80, i18n("Display controller")},
489 { 0x03, -1, i18n("Unknown display controller")},
491 { 0x04, 0x00, i18n("Multimedia video controller")},
492 { 0x04, 0x01, i18n("Multimedia audio controller")},
493 { 0x04, 0x02, i18n("Computer telephony device")},
494 { 0x04, 0x80, i18n("Multimedia controller")},
495 { 0x04, -1, i18n("Unknown multimedia controller")},
497 { 0x05, 0x00, i18n("RAM memory")},
498 { 0x05, 0x01, i18n("FLASH memory")},
499 { 0x05, 0x80, i18n("Memory controller")},
500 { 0x05, -1, i18n("Unknown memory controller")},
502 { 0x06, 0x00, i18n("Host bridge")},
503 { 0x06, 0x01, i18n("ISA bridge")},
504 { 0x06, 0x02, i18n("EISA bridge")},
505 { 0x06, 0x03, i18n("MicroChannel bridge")},
506 { 0x06, 0x04, i18n("PCI bridge")},
507 { 0x06, 0x05, i18n("PCMCIA bridge")},
508 { 0x06, 0x06, i18n("NuBus bridge")},
509 { 0x06, 0x07, i18n("CardBus bridge")},
510 { 0x06, 0x08, i18n("RACEway bridge")},
511 { 0x06, 0x09, i18n("Semi-transparent PCI-to-PCI bridge")},
512 { 0x06, 0x0A, i18n("InfiniBand to PCI host bridge")},
513 { 0x06, 0x80, i18n("Bridge")},
514 { 0x06, -1, i18n("Unknown bridge")},
516 { 0x07, 0x00, i18n("Serial controller")},
517 { 0x07, 0x01, i18n("Parallel controller")},
518 { 0x07, 0x02, i18n("Multiport serial controller")},
519 { 0x07, 0x03, i18n("Modem")},
520 { 0x07, 0x04, i18n("GPIB (IEEE 488.1/2) controller")},
521 { 0x07, 0x05, i18n("Smart card")},
522 { 0x07, 0x80, i18n("Communication controller")},
523 { 0x07, -1, i18n("Unknown communication controller")},
525 { 0x08, 0x00, i18n("PIC")},
526 { 0x08, 0x01, i18n("DMA controller")},
527 { 0x08, 0x02, i18n("Timer")},
528 { 0x08, 0x03, i18n("RTC")},
529 { 0x08, 0x04, i18n("PCI Hot-plug controller")},
530 { 0x08, 0x80, i18n("System peripheral")},
531 { 0x08, -1, i18n("Unknown system peripheral")},
533 { 0x09, 0x00, i18n("Keyboard controller")},
534 { 0x09, 0x01, i18n("Digitizer Pen")},
535 { 0x09, 0x02, i18n("Mouse controller")},
536 { 0x09, 0x03, i18n("Scanner controller")},
537 { 0x09, 0x04, i18n("Gameport controller")},
538 { 0x09, 0x80, i18n("Input device controller")},
539 { 0x09, -1, i18n("Unknown input device controller")},
541 { 0x0A, 0x00, i18n("Generic docking station")},
542 { 0x0A, 0x80, i18n("Docking station")},
543 { 0x0A, -1, i18n("Unknown docking station")},
545 { 0x0B, 0x00, i18n("386")},
546 { 0x0B, 0x01, i18n("486")},
547 { 0x0B, 0x02, i18n("Pentium")},
548 { 0x0B, 0x10, i18n("Alpha")},
549 { 0x0B, 0x20, i18n("Power PC")},
550 { 0x0B, 0x30, i18n("MIPS")},
551 { 0x0B, 0x40, i18n("Co-processor")},
552 { 0x0B, -1, i18n("Unknown processor")},
554 { 0x0C, 0x00, i18n("FireWire (IEEE 1394)")},
555 { 0x0C, 0x01, i18n("ACCESS bus")},
556 { 0x0C, 0x02, i18n("SSA")},
557 { 0x0C, 0x03, i18n("USB controller")},
558 { 0x0C, 0x04, i18n("Fibre channel")},
559 { 0x0C, 0x05, i18n("SMBus")},
560 { 0x0C, 0x06, i18n("InfiniBand")},
561 { 0x0C, 0x07, i18n("IPMI interface")},
562 { 0x0C, 0x08, i18n("SERCOS interface")},
563 { 0x0C, 0x09, i18n("CANbus")},
564 { 0x0C, -1, i18n("Unknown serial bus controller")},
566 { 0x0D, 0x00, i18n("IRDA controller")},
567 { 0x0D, 0x01, i18n("Consumer IR controller")},
568 { 0x0D, 0x10, i18n("RF controller")},
569 { 0x0D, 0x11, i18n("Bluetooth")},
570 { 0x0D, 0x12, i18n("Broadband")},
571 { 0x0D, 0x20, i18n("Ethernet (802.11a - 5 GHz)")},
572 { 0x0D, 0x21, i18n("Ethernet (802.11b - 2.4 GHz)")},
573 { 0x0D, 0x80, i18n("Wireless controller")},
574 { 0x0D, -1, i18n("Unknown wireless controller")},
576 { 0x0E, 0x00, i18n("I2O")},
577 { 0x0E, -1, i18n("Unknown intelligent controller")},
579 { 0x0F, 0x01, i18n("Satellite TV controller")},
580 { 0x0F, 0x02, i18n("Satellite audio communication controller")},
581 { 0x0F, 0x03, i18n("Satellite voice communication controller")},
582 { 0x0F, 0x04, i18n("Satellite data communication controller")},
583 { 0x0F, -1, i18n("Unknown satellite communications controller")},
585 { 0x10, 0x00, i18n("Network and computing encryption device")},
586 { 0x10, 0x10, i18n("Entertainment encryption device")},
587 { 0x10, 0x80, i18n("Encryption controller")},
588 { 0x10, -1, i18n("Unknown encryption controller")},
590 { 0x11, 0x00, i18n("DPIO module")},
591 { 0x11, 0x01, i18n("Performance counters")},
592 { 0x11, 0x10, i18n("Communication synchronizer")},
593 { 0x11, 0x20, i18n("Management card")},
594 { 0x11, 0x80, i18n("Signal processing controller")},
595 { 0x11, -1, i18n("Unknown signal processing controller")},
597 { -1, -1, i18n("Unknown subdevice class")}
600 //keep -1 in last position in "id",
601 //in last position in "id2" with certain "id",
602 //and in last position in "id3" with certain "id2"
603 //device programming interface list
604 static const id4name devInterface[]={ { 0x01, 0x05, 0x20, i18n("single DMA")},
605 { 0x01, 0x05, 0x30, i18n("chained DMA")},
607 { 0x03, 0x00, 0x00, i18n("VGA compatible")},
608 { 0x03, 0x00, 0x01, i18n("8514 compatible")},
610 { 0x06, 0x04, 0x00, i18n("Normal decode")},
611 { 0x06, 0x04, 0x01, i18n("Subtractive decode")},
613 { 0x06, 0x08, 0x00, i18n("Transparent mode")},
614 { 0x06, 0x08, 0x01, i18n("Endpoint mode")},
616 { 0x06, 0x09, 0x40, i18n("Primary bus towards host CPU")},
617 { 0x06, 0x09, 0x40, i18n("Secondary bus towards host CPU")},
619 { 0x07, 0x00, 0x00, i18n("8250")},
620 { 0x07, 0x00, 0x01, i18n("16450")},
621 { 0x07, 0x00, 0x02, i18n("16550")},
622 { 0x07, 0x00, 0x03, i18n("16650")},
623 { 0x07, 0x00, 0x04, i18n("16750")},
624 { 0x07, 0x00, 0x05, i18n("16850")},
625 { 0x07, 0x00, 0x06, i18n("16950")},
627 { 0x07, 0x01, 0x00, i18n("SPP")},
628 { 0x07, 0x01, 0x01, i18n("BiDir")},
629 { 0x07, 0x01, 0x02, i18n("ECP")},
630 { 0x07, 0x01, 0x03, i18n("IEEE1284")},
631 { 0x07, 0x01, 0xFE, i18n("IEEE1284 Target")},
633 { 0x07, 0x03, 0x00, i18n("Generic")},
634 { 0x07, 0x03, 0x01, i18n("Hayes/16450")},
635 { 0x07, 0x03, 0x02, i18n("Hayes/16550")},
636 { 0x07, 0x03, 0x03, i18n("Hayes/16650")},
637 { 0x07, 0x03, 0x04, i18n("Hayes/16750")},
639 { 0x08, 0x00, 0x00, i18n("8259")},
640 { 0x08, 0x00, 0x01, i18n("ISA PIC")},
641 { 0x08, 0x00, 0x02, i18n("EISA PIC")},
642 { 0x08, 0x00, 0x03, i18n("IO-APIC")},
643 { 0x08, 0x00, 0x04, i18n("IO(X)-APIC")},
645 { 0x08, 0x01, 0x00, i18n("8237")},
646 { 0x08, 0x01, 0x01, i18n("ISA DMA")},
647 { 0x08, 0x01, 0x01, i18n("EISA DMA")},
649 { 0x08, 0x02, 0x00, i18n("8254")},
650 { 0x08, 0x02, 0x01, i18n("ISA timer")},
651 { 0x08, 0x02, 0x01, i18n("EISA timers")},
653 { 0x08, 0x03, 0x00, i18n("Generic")},
654 { 0x08, 0x03, 0x01, i18n("ISA RTC")},
656 { 0x09, 0x04, 0x00, i18n("Generic")},
657 { 0x09, 0x04, 0x01, i18n("Extended")},
659 { 0x0C, 0x00, 0x00, i18n("Generic")},
660 { 0x0C, 0x00, 0x01, i18n("OHCI")},
662 { 0x0C, 0x03, 0x00, i18n("UHCI")},
663 { 0x0C, 0x03, 0x10, i18n("OHCI")},
664 { 0x0C, 0x03, 0x20, i18n("EHCI")},
665 { 0x0C, 0x03, 0x80, i18n("Unspecified")},
666 { 0x0C, 0x03, 0xFE, i18n("USB Device")},
668 { 0x0C, 0x07, 0x00, i18n("SMIC")},
669 { 0x0C, 0x07, 0x01, i18n("Keyboard controller style")},
670 { 0x0C, 0x07, 0x02, i18n("Block transfer")},
672 { -1, -1, -1, i18n(strUnknown)}
676 //keep -1 in last position
677 //capabilities list
678 static const id2name capNames[]={{ 0x01, i18n("Power management")},
679 { 0x02, i18n("AGP")},
680 { 0x03, i18n("Vital product data")},
681 { 0x04, i18n("Slot identification")},
682 { 0x05, i18n("Message signaled interrupts")},
683 { 0x06, i18n("CompactPCI hot swap")},
684 { 0x07, i18n("PCI-X")},
685 { 0x08, i18n("HyperTransport")},
686 { 0x09, i18n("Vendor specific")},
687 { 0x0A, i18n("Debug port")},
688 { 0x0B, i18n("CompactPCI central resource control")},
689 { 0x0C, i18n("PCI hot-plug")},
690 { 0x0E, i18n("AGP x8")},
691 { 0x0F, i18n("Secure device")},
692 { 0x10, i18n("PCI express")},
693 { 0x11, i18n("MSI-X")},
694 { -1, i18n(strUnknown)}
697 //keep -1 in last position
698 //device selection timing
699 static const id2name devSel[]={ { 0x00, i18n("Fast")},
700 { 0x01, i18n("Medium")},
701 { 0x02, i18n("Slow")},
702 { -1, i18n(strUnknown)}
705 //keep -1 in last position
706 //mapping type
707 static const id2name mappingType[]={{ 0x00, i18n("32 bit")},
708 { 0x01, i18n("Below 1M")},
709 { 0x02, i18n("64 bit")},
710 { -1, i18n(strUnknown)}
713 //keep -1 in last position
714 //header type
715 static const id2name headerType[]={ { 0x00, i18n("Standard")},
716 { 0x01, i18n("Bridge")},
717 { 0x02, i18n("CardBus")},
718 { -1, i18n(strUnknown)}
721 //keep -1 in last position
722 //AGP rate
723 static const id2name agpRate[]={{ 0x01, i18n("1X")},
724 { 0x02, i18n("2X")},
725 { 0x03, i18n("1X & 2X")},
726 { 0x04, i18n("4X")},
727 { 0x05, i18n("1X & 4X")},
728 { 0x06, i18n("2X & 4X")},
729 { 0x07, i18n("1X & 2X & 4X")},
730 { 0x09, i18n("4X")},
731 { 0x0A, i18n("8X")},
732 { 0x0B, i18n("4X & 8X")},
733 { -1, i18n(strUnknown)}
736 //keep -1 in last position
737 //AGP calibrating cycle
738 static const id2name calCycle[]={ { 0x00, i18n("4 ms")},
739 { 0x01, i18n("16 ms")},
740 { 0x02, i18n("64 ms")},
741 { 0x03, i18n("256 ms")},
742 { 0x07, i18n("Not needed")},
743 { -1, i18n(strUnknown)}
746 //keep -1 in last position
747 //PM auxiliary current
748 static const id2name auxCur[]={ { 0x00, i18n("0 (self powered)")},
749 { 0x01, i18n("55 mA")},
750 { 0x02, i18n("100 mA")},
751 { 0x03, i18n("160 mA")},
752 { 0x04, i18n("220 mA")},
753 { 0x05, i18n("270 mA")},
754 { 0x06, i18n("320 mA")},
755 { 0x07, i18n("375 mA")},
756 { -1, i18n(strUnknown)}
759 //keep -1 in last position
760 //PM power state
761 static const id2name powerState[]={ { 0x00, i18n("D0")},
762 { 0x01, i18n("D1")},
763 { 0x02, i18n("D2")},
764 { 0x03, i18n("D3 hot")},
765 { -1, i18n(strUnknown)}
768 //keep -1 in last position
769 //MSI multiple message
770 static const id2name multipleMessage[]={{ 0x00, i18n("1 vector")},
771 { 0x01, i18n("2 vectors")},
772 { 0x02, i18n("4 vectors")},
773 { 0x03, i18n("8 vectors")},
774 { 0x04, i18n("16 vectors")},
775 { 0x05, i18n("32 vectors")},
776 { -1, i18n(strUnknown)}
779 static const QString& getNameById(const id2name *const table,int id);
780 static const QString& getNameBy2Id(const id3name *const table,int id,int id2);
781 static const QString& getNameBy3Id(const id4name *const table,int id,int id2, int id3);
783 #endif //KCONTROL_KPCI_PRIVATE_H