15 #include <pci/pcireg.h> 18 #define PCI_INVALID_VENDORDEVICEID 0xffffffff 20 #define PCID_CLASS(class, dev) ((class << 8) | dev) 21 #define PCID_PCI2PCI_BRIDGE PCID_CLASS(PCIC_BRIDGE, PCIS_BRIDGE_PCI) 23 #include <pci/access.h> 56 enum pci_system_type {
59 PCI_SYSTEM_PERIPHERAL = 2,
61 extern enum pci_system_type pci_system_type;
68 PCI_LITTLE_ENDIAN = 0,
71 extern int pci_endian;
74 extern int pci_bus_count(
void);
79 extern void pci_print(
void);
84 extern void pci_print_dev(pci_dev_t dev);
85 extern void pci_print_device(
int bus,
int slot,
int function);
99 extern int pci_for_each(
int (*func)(pci_dev_t,
void*),
void *arg);
108 extern int pci_find(uint16_t ven, uint16_t dev,
int index, pci_dev_t *pdev);