4 static void __pci_config(int bus, int slot, int fn, int addr)
6 outl(0xCF8, 0x80000000ULL | (bus << 16) | (slot << 11) | (fn << 8) | addr);
9 void pci_write32(int bus, int slot, int fn, int addr, uint32_t data)
11 __pci_config(bus, slot, fn, addr);
15 void pci_write16(int bus, int slot, int fn, int addr, uint16_t data)
17 __pci_config(bus, slot, fn, addr);
21 void pci_write8(int bus, int slot, int fn, int addr, uint8_t data)
23 __pci_config(bus, slot, fn, addr);
27 uint32_t pci_read32(int bus, int slot, int fn, int addr)
29 __pci_config(bus, slot, fn, addr);
33 uint16_t pci_read16(int bus, int slot, int fn, int addr)
35 __pci_config(bus, slot, fn, addr);
39 uint8_t pci_read8(int bus, int slot, int fn, int addr)
41 __pci_config(bus, slot, fn, addr);