6 /* General PCI functions. This is implemented by pci-linux.c and pci-raw.c; the
7 * former uses Linux's /proc/bus/pci interface for access from userspace, while
8 * the latter accesses the PCI hardware directly.
11 void pci_write32(int bus, int slot, int fn, int addr, uint32_t data);
12 void pci_write16(int bus, int slot, int fn, int addr, uint16_t data);
13 void pci_write8(int bus, int slot, int fn, int addr, uint8_t data);
15 uint32_t pci_read32(int bus, int slot, int fn, int addr);
16 uint16_t pci_read16(int bus, int slot, int fn, int addr);
17 uint8_t pci_read8(int bus, int slot, int fn, int addr);
19 /* Hardware-agnostic functions implemented by pci.c */
27 typedef struct pci_bar {
29 unsigned char prefetchable;
33 typedef struct pci_dev {
34 unsigned short vid, did;
39 typedef int (*pci_probe_fn_t)(pci_dev_t *);
42 int pci_probe(pci_probe_fn_t probe);