4 #ifdef PCI_TRANSLATION_ENABLE
12 struct pci_vendor pci_vendor_table[] = {
13 {0x1013, "Cirrus Logic"},
16 {0x11c1, "Agere Systems"},
27 struct pci_device pci_device_table[] = {
28 {0x1013, 0x00b8, "CL-GD5446"},
29 {0x10ec, 0x8029, "RTL8029 - NE2K Compatible"},
30 {0x10ec, 0x8139, "RTL8139"},
31 {0x8086, 0x1237, "82441FX"},
32 {0x8086, 0x7000, "82371SB_ISA"},
33 {0x8086, 0x7010, "82371SB_IDE"},
34 {0x8086, 0x7020, "82371SB_USB"},
35 {0x8086, 0x7113, "82371AB/EB/MB_ACPI"}
39 #define PCI_DEVICE_TABLE_SZ (sizeof (pci_device_table) / sizeof (struct pci_device ))
40 #define PCI_VENDOR_TABLE_SZ (sizeof (pci_vendor_table) / sizeof (struct pci_vendor))
42 /** Too lazy to to a binary search... */
44 const char *pci_lookup_vendor (uint16_t vendor);
45 const char *pci_lookup_device (uint16_t vendor, uint16_t device);
48 pci_lookup_vendor (uint16_t vendor)
51 for (i = 0; i < PCI_VENDOR_TABLE_SZ; i++)
53 if (pci_vendor_table[i].vendor_id > vendor)
55 if (pci_vendor_table[i].vendor_id == vendor)
56 return pci_vendor_table[i].vendor;
59 return "Unknown Vendor";
63 pci_lookup_device (uint16_t vendor, uint16_t device)
66 for (i = 0; i < PCI_DEVICE_TABLE_SZ; i++)
68 if (pci_device_table[i].vendor_id > vendor)
70 if (pci_device_table[i].vendor_id == vendor &&
71 pci_device_table[i].device_id == device)
72 return pci_device_table[i].device;
75 return "Unknown Device";
80 #define pci_lookup_vendor(x) "Unknown Vendor"
81 #define pci_lookup_device(x,y) "Unknown Device"
93 struct pci_class pci_class_table[] = {
94 {0, 0, 0, "Pre-PCI 2.0 Non-VGA Device"},
95 {0, 1, 0, "Pre-PCI 2.0 VGA Device"},
96 {1, 0, 0, "SCSI Controller"},
97 {1, 1, 0, "IDE Controller"},
98 {1, 2, 0, "Floppy Disk Controller"},
99 {2, 0, 0, "Ethernet"},
100 {3, 0, 0, "VGA Controller"},
101 {3, 1, 0, "XGA Controller"},
102 {5, 0, 0, "Memory Controller - RAM"},
103 {5, 1, 0, "Memory Controller - Flash"},
104 {6, 0, 0, "PCI Host"},
105 {6, 1, 0, "PCI-ISA Bridge"},
106 {6, 2, 0, "PCI-EISA Bridge"},
107 {6, 4, 0, "PCI-PCI Bridge"},
108 {6, 5, 0, "PCI-PCMCIA Bridge"},
109 {12, 0, 0, "Firewire Adapter"},
110 {12, 3, 0, "USB 1.1 Controller (UHCI)"},
111 {12, 3, 0x10, "USB 1.1 Controller (OHCI)"},
112 {12, 3, 0x20, "USB 2.0 Controller (EHCI)"}
115 #define PCI_CLASS_TABLE_SZ (sizeof(pci_class_table) / sizeof(struct pci_class))
117 const char *pci_lookup_class (uint8_t major, uint8_t minor, uint8_t iface);
119 pci_lookup_class (uint8_t major, uint8_t minor, uint8_t iface)
122 for (i = 0; i < PCI_CLASS_TABLE_SZ; i++)
124 if (pci_class_table[i].major > major)
126 if (pci_class_table[i].major != major)
128 if (pci_class_table[i].minor != minor)
130 if (pci_class_table[i].iface != iface)
132 return pci_class_table[i].name;
135 return "Unknown Type";