Home
last modified time | relevance | path

Searched refs:devfn (Results 1 – 25 of 154) sorted by relevance

1234567

/openbmc/u-boot/drivers/pci/
H A Dpci_sandbox.c24 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 Dpcie_port.c130 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 Dpci.c79 DEFINE_PROP_PCI_DEVFN("addr", PCIDevice, devfn, -1),
507 PCI_SLOT(d->devfn), PCI_FUNC(d->devfn), in pci_pm_update()
512 trace_pci_pm_transition(d->name, pci_dev_bus_num(d), PCI_SLOT(d->devfn), in pci_pm_update()
513 PCI_FUNC(d->devfn), old, new); in pci_pm_update()
1112 uint8_t slot = PCI_SLOT(dev->devfn); in pci_init_multifunction()
1137 if (PCI_FUNC(dev->devfn)) { in pci_init_multifunction()
1142 "in function %x.%x", slot, PCI_FUNC(dev->devfn)); in pci_init_multifunction()
1185 pci_get_bus(pci_dev)->devices[pci_dev->devfn] = NULL; in do_pci_unregister_device()
1273 static bool pci_bus_devfn_available(PCIBus *bus, int devfn) in pci_bus_devfn_available() argument
1275 return !(bus->devices[devfn]); in pci_bus_devfn_available()
[all …]
H A Dpcie_sriov.c44 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, vfname); in pcie_sriov_pf_init()
190 devfn += vf_stride; in pcie_sriov_pf_init()
251 return (*(PCIDevice **)a)->devfn - (*(PCIDevice **)b)->devfn; in compare_vf_devfns()
[all …]
H A Dpci-qmp-cmds.c116 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 Dpci_host.c52 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 Dpcihp.c200 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 …]
/openbmc/qemu/tests/qtest/libqos/
H A Dpci-pc.c77 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 Dpci.h40 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 Dgeneric-pcihost.c109 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 Dpci-spapr.c87 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 Dpci.c23 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 Dusb.c19 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 Di440fx_fuzz.c103 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 Dphysdev.h153 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/qemu/include/hw/pci/
H A Dpci.h17 #define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f) argument
18 #define PCI_FUNC(devfn) ((devfn) & 0x07) argument
19 #define PCI_BUILD_BDF(bus, devfn) (((bus) << 8) | (devfn)) argument
383 PCIDevice *pci_find_device(PCIBus *bus, int bus_num, uint8_t devfn);
432 AddressSpace * (*get_address_space)(PCIBus *bus, void *opaque, int devfn);
451 bool (*set_iommu_device)(PCIBus *bus, void *opaque, int devfn,
464 void (*unset_iommu_device)(PCIBus *bus, void *opaque, int devfn);
495 void (*init_iotlb_notifier)(PCIBus *bus, void *opaque, int devfn,
513 void (*register_iotlb_notifier)(PCIBus *bus, void *opaque, int devfn,
530 void (*unregister_iotlb_notifier)(PCIBus *bus, void *opaque, int devfn,
[all …]
/openbmc/qemu/include/hw/i386/
H A Dintel_iommu.h40 #define VTD_PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f) argument
41 #define VTD_PCI_FUNC(devfn) ((devfn) & 0x07) argument
100 uint8_t devfn; member
327 int devfn, unsigned int pasid);
/openbmc/u-boot/arch/x86/lib/
H A Dbios_interrupts.c106 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 Dpirq_routing.c65 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/i386/
H A Dintel_iommu.c63 uint8_t devfn; member
70 uint8_t devfn; member
250 return (key1->bus == key2->bus) && (key1->devfn == key2->devfn) && in vtd_as_equal()
264 return (guint)(value << 8 | key->devfn); in vtd_as_hash()
278 return (key1->bus == key2->bus) && (key1->devfn == key2->devfn); in vtd_hiod_equal()
688 uint8_t devfn) in vtd_root_entry_present() argument
690 if (s->root_scalable && devfn > UINT8_MAX / 2) { in vtd_root_entry_present()
1530 uint8_t devfn, VTDContextEntry *ce) in vtd_dev_to_context_entry() argument
1541 if (!vtd_root_entry_present(s, &re, devfn)) { in vtd_dev_to_context_entry()
1552 ret_fr = vtd_get_context_entry_from_root(s, &re, devfn, ce); in vtd_dev_to_context_entry()
[all …]
/openbmc/qemu/hw/remote/
H A Diommu.c40 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 Dvirtio-iommu.c74 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 Driscv-iommu-pci.c96 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 Dutil.c44 PCI_SLOT(pci->devfn), PCI_FUNC(pci->devfn)); in append_pci_address()
/openbmc/u-boot/board/armltd/vexpress/
H A Dvexpress_common.c152 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()

1234567