Go to the documentation of this file.
   38 } 
pciClasses[] = { { 0x00, 0x00, 0x00, 
"Undefined" }, { 0x00, 0x01, 0x00, 
"VGA" },
 
   40 { 0x01, 0x00, 0x00, 
"SCSI" }, { 0x01, 0x01, 0x00, 
"IDE" }, { 0x01, 0x01, 0x8A, 
"IDE" }, { 0x01, 0x02, 0x00, 
"Floppy" }, { 0x01, 0x03, 0x00, 
"IPI" }, { 0x01, 0x04, 0x00, 
"RAID" }, { 0x01, 0x80, 0x00, 
"Other" },
 
   42 { 0x02, 0x00, 0x00, 
"Ethernet" }, { 0x02, 0x01, 0x00, 
"Token Ring" }, { 0x02, 0x02, 0x00, 
"FDDI" }, { 0x02, 0x03, 0x00, 
"ATM" }, { 0x02, 0x04, 0x00, 
"ISDN" }, { 0x02, 0x80, 0x00, 
"Other" },
 
   44 { 0x03, 0x00, 0x00, 
"VGA" }, { 0x03, 0x00, 0x01, 
"VGA+8514" }, { 0x03, 0x01, 0x00, 
"XGA" }, { 0x03, 0x02, 0x00, 
"3D" }, { 0x03, 0x80, 0x00, 
"VGA Other" },
 
   46 { 0x04, 0x00, 0x00, 
"Video" }, { 0x04, 0x01, 0x00, 
"Audio" }, { 0x04, 0x02, 0x00, 
"Telephony" }, { 0x04, 0x80, 0x00, 
"Other" },
 
   48 { 0x05, 0x00, 0x00, 
"RAM" }, { 0x05, 0x01, 0x00, 
"Flash" }, { 0x05, 0x80, 0x00, 
"Other" },
 
   50 { 0x06, 0x00, 0x00, 
"PCI to HOST" }, { 0x06, 0x01, 0x00, 
"PCI to ISA" }, { 0x06, 0x02, 0x00, 
"PCI to EISA" }, { 0x06, 0x03, 0x00, 
"PCI to MCA" }, { 0x06, 0x04, 0x00, 
"PCI to PCI" }, { 0x06, 0x04, 0x01, 
"PCI to PCI (Subtractive Decode)" }, { 0x06, 0x05, 0x00, 
"PCI to PCMCIA" }, { 0x06, 0x06, 0x00, 
"PCI to NuBUS" }, { 0x06, 0x07, 0x00, 
"PCI to Cardbus" }, { 0x06, 0x08, 0x00, 
"PCI to RACEway" }, { 0x06, 0x09, 0x00, 
"PCI to PCI" }, { 0x06, 0x0A, 0x00, 
"PCI to InfiBand" }, { 0x06, 0x80, 0x00, 
"PCI to Other" },
 
   52 { 0x07, 0x00, 0x00, 
"Serial" }, { 0x07, 0x00, 0x01, 
"Serial - 16450" }, { 0x07, 0x00, 0x02, 
"Serial - 16550" }, { 0x07, 0x00, 0x03, 
"Serial - 16650" }, { 0x07, 0x00, 0x04, 
"Serial - 16750" }, { 0x07, 0x00, 0x05, 
"Serial - 16850" }, { 0x07, 0x00, 0x06, 
"Serial - 16950" }, { 0x07, 0x01, 0x00, 
"Parallel" }, { 0x07, 0x01, 0x01, 
"Parallel - BiDir" }, { 0x07, 0x01, 0x02, 
"Parallel - ECP" }, { 0x07, 0x01, 0x03, 
"Parallel - IEEE1284" }, { 0x07, 0x01, 0xFE, 
"Parallel - IEEE1284 Target" }, { 0x07, 0x02, 0x00, 
"Multiport Serial" }, { 0x07, 0x03, 0x00, 
"Hayes Compatible Modem" }, { 0x07, 0x03, 0x01, 
"Hayes Compatible Modem, 16450" }, { 0x07, 0x03, 0x02, 
"Hayes Compatible Modem, 16550" }, { 0x07, 0x03, 0x03, 
"Hayes Compatible Modem, 16650" }, { 0x07, 0x03, 0x04, 
"Hayes Compatible Modem, 16750" }, { 0x07, 0x80, 0x00, 
"Other" },
 
   54 { 0x08, 0x00, 0x00, 
"PIC" }, { 0x08, 0x00, 0x01, 
"ISA PIC" }, { 0x08, 0x00, 0x02, 
"EISA PIC" }, { 0x08, 0x00, 0x10, 
"I/O APIC" }, { 0x08, 0x00, 0x20, 
"I/O(x) APIC" }, { 0x08, 0x01, 0x00, 
"DMA" }, { 0x08, 0x01, 0x01, 
"ISA DMA" }, { 0x08, 0x01, 0x02, 
"EISA DMA" }, { 0x08, 0x02, 0x00, 
"Timer" }, { 0x08, 0x02, 0x01, 
"ISA Timer" }, { 0x08, 0x02, 0x02, 
"EISA Timer" }, { 0x08, 0x03, 0x00, 
"RTC" }, { 0x08, 0x03, 0x00, 
"ISA RTC" }, { 0x08, 0x03, 0x00, 
"Hot-Plug" }, { 0x08, 0x80, 0x00, 
"Other" },
 
   56 { 0x09, 0x00, 0x00, 
"Keyboard" }, { 0x09, 0x01, 0x00, 
"Pen" }, { 0x09, 0x02, 0x00, 
"Mouse" }, { 0x09, 0x03, 0x00, 
"Scanner" }, { 0x09, 0x04, 0x00, 
"Game Port" }, { 0x09, 0x80, 0x00, 
"Other" },
 
   58 { 0x0a, 0x00, 0x00, 
"Generic" }, { 0x0a, 0x80, 0x00, 
"Other" },
 
   60 { 0x0b, 0x00, 0x00, 
"386" }, { 0x0b, 0x01, 0x00, 
"486" }, { 0x0b, 0x02, 0x00, 
"Pentium" }, { 0x0b, 0x03, 0x00, 
"PentiumPro" }, { 0x0b, 0x10, 0x00, 
"DEC Alpha" }, { 0x0b, 0x20, 0x00, 
"PowerPC" }, { 0x0b, 0x30, 0x00, 
"MIPS" }, { 0x0b, 0x40, 0x00, 
"Coprocessor" }, { 0x0b, 0x80, 0x00, 
"Other" },
 
   62 { 0x0c, 0x00, 0x00, 
"FireWire" }, { 0x0c, 0x00, 0x10, 
"OHCI FireWire" }, { 0x0c, 0x01, 0x00, 
"Access.bus" }, { 0x0c, 0x02, 0x00, 
"SSA" }, { 0x0c, 0x03, 0x00, 
"USB (UHCI)" }, { 0x0c, 0x03, 0x10, 
"USB (OHCI)" }, { 0x0c, 0x03, 0x80, 
"USB" }, { 0x0c, 0x03, 0xFE, 
"USB Device" }, { 0x0c, 0x04, 0x00, 
"Fiber" }, { 0x0c, 0x05, 0x00, 
"SMBus Controller" }, { 0x0c, 0x06, 0x00, 
"InfiniBand" }, { 0x0c, 0x80, 0x00, 
"Other" },
 
   64 { 0x0d, 0x00, 0x00, 
"iRDA" }, { 0x0d, 0x01, 0x00, 
"Consumer IR" }, { 0x0d, 0x10, 0x00, 
"RF" }, { 0x0d, 0x80, 0x00, 
"Other" },
 
   66 { 0x0e, 0x00, 0x00, 
"I2O" }, { 0x0e, 0x80, 0x00, 
"Other" },
 
   68 { 0x0f, 0x01, 0x00, 
"TV" }, { 0x0f, 0x02, 0x00, 
"Audio" }, { 0x0f, 0x03, 0x00, 
"Voice" }, { 0x0f, 0x04, 0x00, 
"Data" }, { 0x0f, 0x80, 0x00, 
"Other" },
 
   70 { 0x10, 0x00, 0x00, 
"Network" }, { 0x10, 0x10, 0x00, 
"Entertainment" }, { 0x10, 0x80, 0x00, 
"Other" },
 
   72 { 0x11, 0x00, 0x00, 
"DPIO Modules" }, { 0x11, 0x01, 0x00, 
"Performance Counters" }, { 0x11, 0x10, 0x00, 
"Comm Sync, Time+Frequency Measurement" }, { 0x11, 0x80, 0x00, 
"Other" },
 
   94   base = 0xCFC + (
reg & 0x03);
 
  122   u.c.reg = 
reg & 0xFC;
 
  124   base = 0xCFC + (
reg & 0x03);
 
  149   for (i = 0; i < 4; i++) {
 
  153     if (cfg->
vendorID == 0x1022 && i == 1) {
 
  154       kprintf(
"got it: 0x%X", word[i]);
 
  155       word[i] &= 0xffff0000;
 
  158       kprintf(
"set it: 0x%X\n", word[i]);
 
  183       for (i = 4; i <= 16; i++) {
 
  194       kprintf(
"  * PCI <-> PCI Bridge\n");
 
  197       kprintf(
"  * PCI <-> CardBus Bridge\n");
 
  200       kprintf(
"  * Unknown Header Type\n");
 
  
 
void outportDWord(unsigned int port, unsigned long value)
outputut one double word to specified port
unsigned long inportDWord(unsigned int)
input one double word from specified port
unsigned short int uInt16
void outportWord(unsigned int, unsigned short)
outputut one word to specified port
void outportByte(unsigned int, unsigned char)
outputut one byte to specified port
void kfree(void *baseAddr)
void pciWrite(int bus, int dev, int func, int reg, uInt32 v, int bytes)
const struct @29 pciClasses[]
unsigned char inportByte(unsigned int)
input one byte from specified port
unsigned short inportWord(unsigned int)
input one word from specified port
void * kmalloc(uInt32 len)
void * memset(void *dst, int c, size_t length)
int kprintf(const char *,...)
uint32_t pciProbe(int bus, int dev, int func)
uInt32 pciRead(int bus, int dev, int func, int reg, int bytes)