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* 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");
47 unsigned char raw
[256];
49 unsigned short vendor
;
50 unsigned short device
;
52 unsigned short command
;
57 unsigned comSpecial
:1;
58 unsigned comInvalidate
:1;
59 unsigned comVgaPalette
:1;
63 unsigned comFastBack
:1;
64 unsigned comInterrupt
:1;
69 unsigned short status
;
72 unsigned statInterrupt
:1;
73 unsigned statCapList
: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;
86 unsigned char revision
;
88 unsigned char devProgIface
;
90 unsigned progPriOperMode
:1;
91 unsigned progPriProgInd
:1;
92 unsigned progSecOperMode
:1;
93 unsigned progSecProgInd
:1;
95 unsigned progIdeMaster
:1;
98 unsigned char devSubClass
;
99 unsigned char devClass
;
100 unsigned char cacheLineSize
;
101 unsigned char latencyTimer
;
103 unsigned char headerTypeFull
:1;
105 unsigned headerType
:7;
106 unsigned multifunctional
:1;
114 unsigned bistStart
:1;
115 unsigned bistCapable
:1;
121 unsigned baseAddress
;
123 unsigned baseAddressMap
:1;
124 unsigned baseAddressType
:2;
125 unsigned baseAddressPref
:1;
126 unsigned baseAddressAddr
:28;
128 } KDE_PACKED mapping
[6];
130 unsigned short subVendor
;
131 unsigned short subDevice
;
135 unsigned romEnabled
:1;
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
;
148 unsigned baseAddress0_2
;
149 unsigned baseAddress1_2
;
150 unsigned char primaryBus
;
151 unsigned char secondaryBus
;
152 unsigned char subordinateBus
;
153 unsigned char secLatencyTimer
;
155 unsigned char ioBase
;
157 unsigned ioBaseType
:1;
158 unsigned ioBaseUnk
:3;
159 unsigned ioBaseAddr
:4;
162 unsigned char ioLimit
;
164 unsigned short secStatus
;
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;
182 unsigned short memoryBase
;
184 unsigned memoryType
:1;
185 unsigned memoryUnk
:3;
186 unsigned memoryAddr
:4;
189 unsigned short memoryLimit
;
191 unsigned short prefMemoryBase
;
193 unsigned prefMemoryType
:1;
194 unsigned prefMemoryUnk
:3;
195 unsigned prefMemoryAddr
:4;
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
;
209 unsigned short bridgeControl
;
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;
228 unsigned baseAddress0_3
;
230 unsigned short cbSecStatus
;
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;
247 unsigned char cbPrimaryBus
;
248 unsigned char cbCardBus
;
249 unsigned char cbSubordinateBus
;
250 unsigned char cbLatencyTimer
;
252 unsigned cbMemoryBase
;
253 unsigned cbMemoryLimit
;
254 } KDE_PACKED cbMemory
[2];
259 unsigned cbIoBaseType
:1;
260 unsigned coIoBaseUnk
:1;
261 unsigned cbIoBaseAddr
:30;
265 } KDE_PACKED cbIo
[2];
266 unsigned char interruptLine_3
;
267 unsigned char interruptPin_3
;
269 unsigned short cbControl
;
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;
285 unsigned short cbSubVendor
;
286 unsigned short cbSubDevice
;
287 unsigned short cbLegacyModeBase
;
294 unsigned char raw
[10];
304 unsigned statusEnhRate
:4;
305 unsigned statusUnk
:28;
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;
327 unsigned configEnhRate
:4;
328 unsigned configUnk
:28;
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;
349 unsigned char raw
[6];
355 unsigned capsClock
: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;
369 unsigned short status
;
371 unsigned statPower
:2;
374 unsigned statDataSelect
:4;
375 unsigned statDataScale
:2;
376 unsigned statPmeStat
:1;
380 unsigned char statusBridge
;
382 unsigned statBridgeUnk
:6;
383 unsigned statBridgeBx
:1;
384 unsigned statBridgeClock
:1;
392 unsigned char raw
[6];
394 unsigned vpdAddress
:15;
395 unsigned vpdTransfer
:1;
401 unsigned char raw
[22];
404 unsigned short msiControl
;
406 unsigned msiEnable
:1;
407 unsigned msiMmCapable
:3;
408 unsigned msiMmEnable
:3;
410 unsigned msiPerVector
:1;
417 unsigned msiUpperAddress
;
418 unsigned short msiData64
;
419 unsigned short msiUnk64
;
421 unsigned msiPending64
;
424 unsigned short msiData
;
425 unsigned short msiUnk
;
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
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
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
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
723 static const id2name agpRate
[]={{ 0x01, i18n("1X")},
725 { 0x03, i18n("1X & 2X")},
727 { 0x05, i18n("1X & 4X")},
728 { 0x06, i18n("2X & 4X")},
729 { 0x07, i18n("1X & 2X & 4X")},
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
761 static const id2name powerState
[]={ { 0x00, i18n("D0")},
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