| /openbmc/u-boot/drivers/pci/ |
| H A D | pci_sandbox.c | 24 static int sandbox_pci_write_config(struct udevice *bus, pci_dev_t devfn, in sandbox_pci_write_config() argument 32 ret = sandbox_pci_get_emul(bus, devfn, &container, &emul); in sandbox_pci_write_config() 42 static int sandbox_pci_read_config(struct udevice *bus, pci_dev_t devfn, in sandbox_pci_read_config() argument 53 ret = sandbox_pci_get_emul(bus, devfn, &container, &emul); in sandbox_pci_read_config() 58 devfn = SANDBOX_PCI_DEVFN(PCI_DEV(devfn), in sandbox_pci_read_config() 59 PCI_FUNC(devfn)); in sandbox_pci_read_config() 60 vendor = priv->vendev[devfn].vendor; in sandbox_pci_read_config() 61 device = priv->vendev[devfn].device; in sandbox_pci_read_config() 83 u8 pdev, pfn, devfn; in sandbox_pci_probe() local 103 devfn = SANDBOX_PCI_DEVFN(pdev, pfn); in sandbox_pci_probe() [all …]
|
| /openbmc/qemu/hw/pci/ |
| H A D | pcie_port.c | 130 int devfn; in pcie_find_port_by_pn() local 132 for (devfn = 0; devfn < ARRAY_SIZE(bus->devices); devfn++) { in pcie_find_port_by_pn() 133 PCIDevice *d = bus->devices[devfn]; in pcie_find_port_by_pn() 156 int devfn; in pcie_find_port_first() local 158 for (devfn = 0; devfn < ARRAY_SIZE(bus->devices); devfn++) { in pcie_find_port_first() 159 PCIDevice *d = bus->devices[devfn]; in pcie_find_port_first() 176 int devfn; in pcie_count_ds_ports() local 178 for (devfn = 0; devfn < ARRAY_SIZE(bus->devices); devfn++) { in pcie_count_ds_ports() 179 PCIDevice *d = bus->devices[devfn]; in pcie_count_ds_ports()
|
| H A D | pcie_sriov.c | 44 trace_sriov_register_vfs(dev->name, PCI_SLOT(dev->devfn), in register_vfs() 45 PCI_FUNC(dev->devfn), num_vfs); in register_vfs() 58 trace_sriov_unregister_vfs(dev->name, PCI_SLOT(dev->devfn), in unregister_vfs() 59 PCI_FUNC(dev->devfn)); in unregister_vfs() 93 int32_t devfn = dev->devfn + vf_offset; in pcie_sriov_pf_init_common() local 108 (uint32_t)devfn + (uint32_t)(total_vfs - 1) * vf_stride >= PCI_DEVFN_MAX) { in pcie_sriov_pf_init_common() 159 int32_t devfn = dev->devfn + vf_offset; in pcie_sriov_pf_init() local 174 PCIDevice *vf = pci_new(devfn, vfnam in pcie_sriov_pf_init() [all...] |
| H A D | pci-qmp-cmds.c | 116 info->slot = PCI_SLOT(dev->devfn); in qmp_query_pci_device() 117 info->function = PCI_FUNC(dev->devfn); in qmp_query_pci_device() 161 int devfn; in qmp_query_pci_devices() local 163 for (devfn = 0; devfn < ARRAY_SIZE(bus->devices); devfn++) { in qmp_query_pci_devices() 164 dev = bus->devices[devfn]; in qmp_query_pci_devices()
|
| H A D | pci_host.c | 52 uint8_t devfn = addr >> 8; in pci_dev_find_by_addr() local 54 return pci_find_device(bus, bus_num, devfn); in pci_dev_find_by_addr() 94 PCI_SLOT(pci_dev->devfn), in pci_host_config_write_common() 95 PCI_FUNC(pci_dev->devfn), addr, val); in pci_host_config_write_common() 120 PCI_SLOT(pci_dev->devfn), in pci_host_config_read_common() 121 PCI_FUNC(pci_dev->devfn), addr, ret); in pci_host_config_read_common()
|
| /openbmc/qemu/hw/acpi/ |
| H A D | pcihp.c | 200 if (PCI_SLOT(dev->devfn) == slot) { in acpi_pcihp_eject_slot() 246 int slot = PCI_SLOT(pdev->devfn); in acpi_pcihp_update_hotplug_bus() 287 int slot = PCI_SLOT(pdev->devfn); in acpi_pcihp_device_plug_cb() 330 trace_acpi_pci_unplug(PCI_SLOT(pdev->devfn), in acpi_pcihp_device_unplug_cb() 341 int slot = PCI_SLOT(pdev->devfn); in acpi_pcihp_device_unplug_request_cb() 463 if (PCI_SLOT(dev->devfn) == slot) { in pci_write() 713 Aml *br_scope = aml_scope("S%.02X", sec->parent_dev->devfn); in build_append_notification_callback() 752 aml_append(method, aml_name("^S%.02X.PCNT", sec->parent_dev->devfn)); in build_append_notification_callback() 806 int32_t devfn = PCI_DEVFN(slot, 0); in build_append_pcihp_notify_entry() local 809 aml_append(if_ctx, aml_notify(aml_name("S%.02X", devfn), aml_arg(1))); in build_append_pcihp_notify_entry() [all …]
|
| H A D | pci.c | 153 int32_t devfn; in build_acpi_generic_initiator() local 176 devfn = object_property_get_uint(o, "addr", &error_fatal); in build_acpi_generic_initiator() 178 assert(devfn >= 0 && devfn < PCI_DEVFN_MAX); in build_acpi_generic_initiator() 180 build_srat_pci_generic_initiator(table_data, gi->node, 0, bus, devfn); in build_acpi_generic_initiator()
|
| /openbmc/qemu/tests/qtest/libqos/ |
| H A D | pci-pc.c | 77 static uint8_t qpci_pc_config_readb(QPCIBus *bus, int devfn, uint8_t offset) in qpci_pc_config_readb() argument 79 qtest_outl(bus->qts, 0xcf8, (1U << 31) | (devfn << 8) | offset); in qpci_pc_config_readb() 83 static uint16_t qpci_pc_config_readw(QPCIBus *bus, int devfn, uint8_t offset) in qpci_pc_config_readw() argument 85 qtest_outl(bus->qts, 0xcf8, (1U << 31) | (devfn << 8) | offset); in qpci_pc_config_readw() 89 static uint32_t qpci_pc_config_readl(QPCIBus *bus, int devfn, uint8_t offset) in qpci_pc_config_readl() argument 91 qtest_outl(bus->qts, 0xcf8, (1U << 31) | (devfn << 8) | offset); in qpci_pc_config_readl() 95 static void qpci_pc_config_writeb(QPCIBus *bus, int devfn, uint8_t offset, uint8_t value) in qpci_pc_config_writeb() argument 97 qtest_outl(bus->qts, 0xcf8, (1U << 31) | (devfn << 8) | offset); in qpci_pc_config_writeb() 101 static void qpci_pc_config_writew(QPCIBus *bus, int devfn, uint8_t offset, uint16_t value) in qpci_pc_config_writew() argument 103 qtest_outl(bus->qts, 0xcf8, (1U << 31) | (devfn << 8) | offset); in qpci_pc_config_writew() [all …]
|
| H A D | pci.h | 40 uint8_t (*config_readb)(QPCIBus *bus, int devfn, uint8_t offset); 41 uint16_t (*config_readw)(QPCIBus *bus, int devfn, uint8_t offset); 42 uint32_t (*config_readl)(QPCIBus *bus, int devfn, uint8_t offset); 44 void (*config_writeb)(QPCIBus *bus, int devfn, 46 void (*config_writew)(QPCIBus *bus, int devfn, 48 void (*config_writel)(QPCIBus *bus, int devfn, 67 int devfn; member 74 uint32_t devfn; member 80 void (*func)(QPCIDevice *dev, int devfn, void *data), 82 QPCIDevice *qpci_device_find(QPCIBus *bus, int devfn);
|
| H A D | generic-pcihost.c | 109 static uint8_t qpci_generic_config_readb(QPCIBus *bus, int devfn, uint8_t offset) in qpci_generic_config_readb() argument 112 uint64_t addr = gbus->ecam_alloc_ptr + ((0 << 20) | (devfn << 12) | offset); in qpci_generic_config_readb() 119 static uint16_t qpci_generic_config_readw(QPCIBus *bus, int devfn, uint8_t offset) in qpci_generic_config_readw() argument 122 uint64_t addr = gbus->ecam_alloc_ptr + ((0 << 20) | (devfn << 12) | offset); in qpci_generic_config_readw() 129 static uint32_t qpci_generic_config_readl(QPCIBus *bus, int devfn, uint8_t offset) in qpci_generic_config_readl() argument 132 uint64_t addr = gbus->ecam_alloc_ptr + ((0 << 20) | (devfn << 12) | offset); in qpci_generic_config_readl() 140 qpci_generic_config_writeb(QPCIBus *bus, int devfn, uint8_t offset, uint8_t value) in qpci_generic_config_writeb() argument 143 uint64_t addr = gbus->ecam_alloc_ptr + ((0 << 20) | (devfn << 12) | offset); in qpci_generic_config_writeb() 149 qpci_generic_config_writew(QPCIBus *bus, int devfn, uint8_t offset, uint16_t value) in qpci_generic_config_writew() argument 152 uint64_t addr = gbus->ecam_alloc_ptr + ((0 << 20) | (devfn << 12) | offset); in qpci_generic_config_writew() [all …]
|
| H A D | pci-spapr.c | 87 static uint8_t qpci_spapr_config_readb(QPCIBus *bus, int devfn, uint8_t offset) in qpci_spapr_config_readb() argument 90 uint32_t config_addr = (devfn << 8) | offset; in qpci_spapr_config_readb() 95 static uint16_t qpci_spapr_config_readw(QPCIBus *bus, int devfn, uint8_t offset) in qpci_spapr_config_readw() argument 98 uint32_t config_addr = (devfn << 8) | offset; in qpci_spapr_config_readw() 103 static uint32_t qpci_spapr_config_readl(QPCIBus *bus, int devfn, uint8_t offset) in qpci_spapr_config_readl() argument 106 uint32_t config_addr = (devfn << 8) | offset; in qpci_spapr_config_readl() 111 static void qpci_spapr_config_writeb(QPCIBus *bus, int devfn, uint8_t offset, in qpci_spapr_config_writeb() argument 115 uint32_t config_addr = (devfn << 8) | offset; in qpci_spapr_config_writeb() 120 static void qpci_spapr_config_writew(QPCIBus *bus, int devfn, uint8_t offset, in qpci_spapr_config_writew() argument 124 uint32_t config_addr = (devfn << 8) | offset; in qpci_spapr_config_writew() [all …]
|
| H A D | pci.c | 23 void (*func)(QPCIDevice *dev, int devfn, void *data), in qpci_device_foreach() argument 70 static void qpci_device_set(QPCIDevice *dev, QPCIBus *bus, int devfn) in qpci_device_set() argument 75 dev->devfn = devfn; in qpci_device_set() 78 QPCIDevice *qpci_device_find(QPCIBus *bus, int devfn) in qpci_device_find() argument 83 qpci_device_set(dev, bus, devfn); in qpci_device_find() 97 qpci_device_set(dev, bus, addr->devfn); in qpci_device_init() 368 return dev->bus->config_readb(dev->bus, dev->devfn, offset); in qpci_config_readb() 373 return dev->bus->config_readw(dev->bus, dev->devfn, offset); in qpci_config_readw() 378 return dev->bus->config_readl(dev->bus, dev->devfn, offset); in qpci_config_readl() 384 dev->bus->config_writeb(dev->bus, dev->devfn, offset, value); in qpci_config_writeb() [all …]
|
| H A D | usb.c | 19 void qusb_pci_init_one(QPCIBus *pcibus, struct qhc *hc, uint32_t devfn, int bar) in qusb_pci_init_one() argument 21 hc->dev = qpci_device_find(pcibus, devfn); in qusb_pci_init_one()
|
| /openbmc/qemu/tests/qtest/fuzz/ |
| H A D | i440fx_fuzz.c | 103 int devfn; in pciconfig_fuzz_qos() member 111 bus->config_writeb(bus, a.devfn, a.offset, (uint8_t)a.value); in pciconfig_fuzz_qos() 114 bus->config_writew(bus, a.devfn, a.offset, (uint16_t)a.value); in pciconfig_fuzz_qos() 117 bus->config_writel(bus, a.devfn, a.offset, (uint32_t)a.value); in pciconfig_fuzz_qos() 120 bus->config_readb(bus, a.devfn, a.offset); in pciconfig_fuzz_qos() 123 bus->config_readw(bus, a.devfn, a.offset); in pciconfig_fuzz_qos() 126 bus->config_readl(bus, a.devfn, a.offset); in pciconfig_fuzz_qos()
|
| /openbmc/qemu/include/hw/xen/interface/ |
| H A D | physdev.h | 153 int devfn; member 177 uint8_t devfn; member 187 uint8_t devfn; member 196 uint8_t devfn; member 201 uint8_t devfn; member 275 uint8_t devfn; member 279 uint8_t devfn; member 303 uint8_t devfn; member
|
| /openbmc/u-boot/arch/x86/lib/ |
| H A D | bios_interrupts.c | 106 unsigned short devid, vendorid, devfn; in int1a_handler() local 164 devfn = M.x86.R_EBX & 0xff; in int1a_handler() 167 bdf = PCI_BDF(bus, devfn >> 3, devfn & 7); in int1a_handler() 203 bus, devfn, reg, M.x86.R_ECX); in int1a_handler()
|
| H A D | pirq_routing.c | 65 irq->bus, irq->devfn >> 3, irq->devfn & 7); in pirq_route_irqs() 101 pci_assign_irqs(irq->bus, irq->devfn >> 3, irq_slot); in pirq_route_irqs()
|
| /openbmc/qemu/hw/remote/ |
| H A D | iommu.c | 40 void *opaque, int devfn) in remote_iommu_find_add_as() argument 47 elem = g_hash_table_lookup(iommu->elem_by_devfn, INT2VOIDP(devfn)); in remote_iommu_find_add_as() 51 g_hash_table_insert(iommu->elem_by_devfn, INT2VOIDP(devfn), elem); in remote_iommu_find_add_as()
|
| /openbmc/qemu/hw/virtio/ |
| H A D | virtio-iommu.c | 74 uint8_t devfn; member 79 return PCI_BUILD_BDF(pci_bus_num(dev->bus), dev->devfn); in virtio_iommu_get_bdf() 120 PCI_SLOT(sdev->devfn), in virtio_iommu_switch_address_space() 121 PCI_FUNC(sdev->devfn), in virtio_iommu_switch_address_space() 180 uint8_t bus_n, devfn; in virtio_iommu_mr() local 187 devfn = sid & (PCI_DEVFN_MAX - 1); in virtio_iommu_mr() 188 dev = iommu_pci_bus->pbdev[devfn]; in virtio_iommu_mr() 405 int devfn) in virtio_iommu_find_add_as() argument 419 sdev = sbus->pbdev[devfn]; in virtio_iommu_find_add_as() 423 mr_index++, devfn); in virtio_iommu_find_add_as() [all …]
|
| /openbmc/qemu/hw/riscv/ |
| H A D | riscv-iommu-pci.c | 96 pci_dev_bus_num(dev), PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); in riscv_iommu_pci_realize() 133 pci_bus_num(pci_get_bus(dev)), PCI_SLOT(dev->devfn), in riscv_iommu_pci_realize() 134 PCI_FUNC(dev->devfn)); in riscv_iommu_pci_realize()
|
| /openbmc/qemu/ui/ |
| H A D | util.c | 44 PCI_SLOT(pci->devfn), PCI_FUNC(pci->devfn)); in append_pci_address()
|
| /openbmc/u-boot/board/armltd/vexpress/ |
| H A D | vexpress_common.c | 152 int v2m_cfg_write(u32 devfn, u32 data) in v2m_cfg_write() argument 157 devfn |= SYS_CFG_START | SYS_CFG_WRITE; in v2m_cfg_write() 163 writel(devfn, V2M_SYS_CFGCTRL); in v2m_cfg_write()
|
| /openbmc/qemu/include/hw/xen/ |
| H A D | xen_native.h | 443 PCI_SLOT(pci_dev->devfn), PCI_FUNC(pci_dev->devfn)); in xen_map_pcidev() 446 PCI_SLOT(pci_dev->devfn), in xen_map_pcidev() 447 PCI_FUNC(pci_dev->devfn)); in xen_map_pcidev() 459 PCI_SLOT(pci_dev->devfn), PCI_FUNC(pci_dev->devfn)); in xen_unmap_pcidev() 462 PCI_SLOT(pci_dev->devfn), in xen_unmap_pcidev() 463 PCI_FUNC(pci_dev->devfn)); in xen_unmap_pcidev()
|
| /openbmc/qemu/hw/pci-host/ |
| H A D | trace-events | 10 …32_t id, const char *dir, uint8_t bus, uint8_t devfn, uint64_t addr, uint64_t data) "%d: %s bus:0x… 52 ppc4xx_pci_map_irq(int32_t devfn, int irq_num, int slot) "devfn 0x%x irq %d -> %d" 56 ppc440_pcix_map_irq(int32_t devfn, int irq_num, int slot) "devfn 0x%x irq %d -> %d"
|
| H A D | pnv_phb3.c | 34 uint8_t bus, devfn; in pnv_phb3_find_cfg_dev() local 40 devfn = (addr >> 44) & 0xff; in pnv_phb3_find_cfg_dev() 42 return pci_find_device(pci->bus, bus, devfn); in pnv_phb3_find_cfg_dev() 720 addr += 2 * ((bus_num << 8) | ds->devfn); in pnv_phb3_resolve_pe() 731 phb3_error(ds->phb, "RTE for RID 0x%x invalid (%04x", ds->devfn, rte); in pnv_phb3_resolve_pe() 859 ds->bus, pci_bus_num(ds->bus), ds->devfn); in pnv_phb3_translate_iommu() 917 ds->bus, pci_bus_num(ds->bus), ds->devfn); in pnv_phb3_msi_write() 939 static AddressSpace *pnv_phb3_dma_iommu(PCIBus *bus, void *opaque, int devfn) in pnv_phb3_dma_iommu() argument 945 if (ds->bus == bus && ds->devfn == devfn) { in pnv_phb3_dma_iommu() 953 ds->devfn = devfn; in pnv_phb3_dma_iommu()
|