/* PCI address bit 16 - 24: bus number bit 8 - 15: devfun number bit 0 - 7: offset in configuration space of a given pci device  */
static PCIDevice* pci_dev_find_by_addr(PCIBus *bus, uint32_t addr)
/* PCI address bit 16 - 24: bus number bit 8 - 15: devfun number bit 0 - 7: offset in configuration space of a given pci device  */
static PCIDevice* pci_dev_find_by_addr(PCIBus *bus, uint32_t addr)
{
    uint8_t bus_num = addr >> 16;
    uint8_t devfn = addr >> 8;
    return pci_find_device(bus, bus_num, devfn);
}