int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn, int reg, int len, u32 *value) { l4_uint32_t df = (PCI_SLOT(devfn) << 16) | PCI_FUNC(devfn); return L4XV_FN_i(l4vbus_pci_cfg_read(vbus, root_bridge, bus, df, reg, value, len * 8)); }
u16 read_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset) { u32 val; if (L4XV_FN_i(l4vbus_pci_cfg_read(vbus, root_bridge, bus, (slot << 16) | func, offset, &val, 16))) return 0; return val; }
static int pci_conf1_read(unsigned int seg, unsigned int bus, unsigned int devfn, int reg, int len, u32 *value) { l4_uint32_t df = (PCI_SLOT(devfn) << 16) | PCI_FUNC(devfn); int r; L4XV_V(f); L4XV_L(f); r = l4vbus_pci_cfg_read(vbus, root_bridge, bus, df, reg, value, len * 8); L4XV_U(f); return r; }