Home
last modified time | relevance | path

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

123

/xen/tools/firmware/hvmloader/
A Dpci.c96 uint32_t devfn; in pci_setup() member
155 for ( devfn = 0; devfn < 256; devfn++ ) in pci_setup()
172 vga_devfn = devfn; in pci_setup()
177 vga_devfn = devfn; in pci_setup()
182 vga_devfn = devfn; in pci_setup()
285 bars[i].devfn = devfn; in pci_setup()
310 devfn>>3, devfn&7, 'A'+pin-1, isa_irq); in pci_setup()
427 devfn = bars[i].devfn; in pci_setup()
504 "resource!\n", devfn>>3, devfn&7, bar_reg, in pci_setup()
515 devfn>>3, devfn&7, bar_reg, in pci_setup()
[all …]
A Doptionroms.c35 uint8_t devfn, uint16_t vendor_id, uint16_t device_id, in scan_option_rom() argument
111 *(uint8_t *)(dest + rom->rom_size * 512) = devfn; in scan_option_rom()
124 uint16_t class, vendor_id, device_id, devfn; in scan_etherboot_nic() local
127 for ( devfn = 0; (devfn < 256) && !rom_size; devfn++ ) in scan_etherboot_nic()
130 vendor_id = pci_readw(devfn, PCI_VENDOR_ID); in scan_etherboot_nic()
131 device_id = pci_readw(devfn, PCI_DEVICE_ID); in scan_etherboot_nic()
153 uint16_t vendor_id, device_id, devfn, class; in pci_load_option_roms() local
155 for ( devfn = 0; devfn < 256; devfn++ ) in pci_load_option_roms()
158 vendor_id = pci_readw(devfn, PCI_VENDOR_ID); in pci_load_option_roms()
159 device_id = pci_readw(devfn, PCI_DEVICE_ID); in pci_load_option_roms()
[all …]
A Dutil.h94 uint32_t pci_read(uint32_t devfn, uint32_t reg, uint32_t len);
95 #define pci_readb(devfn, reg) ((uint8_t) pci_read(devfn, reg, 1)) argument
96 #define pci_readw(devfn, reg) ((uint16_t)pci_read(devfn, reg, 2)) argument
97 #define pci_readl(devfn, reg) ((uint32_t)pci_read(devfn, reg, 4)) argument
98 void pci_write(uint32_t devfn, uint32_t reg, uint32_t len, uint32_t val);
99 #define pci_writeb(devfn, reg, val) pci_write(devfn, reg, 1, (uint8_t) (val)) argument
100 #define pci_writew(devfn, reg, val) pci_write(devfn, reg, 2, (uint16_t)(val)) argument
101 #define pci_writel(devfn, reg, val) pci_write(devfn, reg, 4, (uint32_t)(val)) argument
/xen/xen/drivers/passthrough/
A Dpci.c340 *((u8*) &pdev->devfn) = devfn; in alloc_pdev()
546 (pdev->devfn == devfn || devfn == -1) ) in pci_get_pdev()
595 (pdev->devfn == devfn || devfn == -1) && in pci_get_pdev_by_domain()
958 devfn = pdev->devfn; in deassign_device()
993 devfn = pdev->devfn; in pci_release_devices()
1062 *devfn = pseg->bus2bridge[*bus].devfn; in find_upstream_bridge()
1176 u8 devfn = pdev->devfn; in setup_one_hwdom_device() local
1186 if ( devfn == pdev->devfn ) in setup_one_hwdom_device()
1190 } while ( devfn != pdev->devfn && in setup_one_hwdom_device()
1206 for ( devfn = 0; devfn < 256; devfn++ ) in _setup_hwdom_pci_devices()
[all …]
A Dats.h30 static inline int pci_ats_enabled(int seg, int bus, int devfn) in pci_ats_enabled() argument
35 pos = pci_find_ext_capability(seg, bus, devfn, PCI_EXT_CAP_ID_ATS); in pci_ats_enabled()
38 value = pci_conf_read16(PCI_SBDF3(seg, bus, devfn), pos + ATS_REG_CTL); in pci_ats_enabled()
43 static inline int pci_ats_device(int seg, int bus, int devfn) in pci_ats_device() argument
48 return pci_find_ext_capability(seg, bus, devfn, PCI_EXT_CAP_ID_ATS); in pci_ats_device()
/xen/xen/include/xen/
A Dpci.h55 uint8_t devfn, member
74 u8 devfn; member
90 uint8_t devfn; member
156 enum pdev_type pdev_type(u16 seg, u8 bus, u8 devfn);
158 struct pci_dev *pci_lock_pdev(int seg, int bus, int devfn);
160 struct domain *, int seg, int bus, int devfn);
168 int pci_add_device(u16 seg, u8 bus, u8 devfn,
170 int pci_remove_device(u16 seg, u8 bus, u8 devfn);
171 int pci_ro_device(int seg, int bus, int devfn);
173 struct pci_dev *pci_get_pdev(int seg, int bus, int devfn);
[all …]
/xen/xen/drivers/passthrough/amd/
A Dpci_amd_iommu.c87 uint8_t devfn, struct pci_dev *pdev) in amd_iommu_setup_domain_device() argument
149 if ( devfn == pdev->devfn ) in amd_iommu_setup_domain_device()
318 if ( devfn == pdev->devfn && in amd_iommu_disable_domain_device()
337 pdev->seg, pdev->bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in reassign_device()
344 if ( devfn == pdev->devfn ) in reassign_device()
356 pdev->seg, pdev->bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in reassign_device()
472 pdev->seg, pdev->bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in amd_iommu_add_device()
478 bdf = PCI_BDF2(pdev->bus, devfn); in amd_iommu_add_device()
530 pdev->seg, pdev->bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in amd_iommu_remove_device()
538 bdf = PCI_BDF2(pdev->bus, devfn); in amd_iommu_remove_device()
[all …]
A Diommu_cmd.c275 void amd_iommu_flush_iotlb(u8 devfn, const struct pci_dev *pdev, in amd_iommu_flush_iotlb() argument
285 if ( !pci_ats_enabled(pdev->seg, pdev->bus, pdev->devfn) ) in amd_iommu_flush_iotlb()
288 iommu = find_iommu_for_device(pdev->seg, PCI_BDF2(pdev->bus, pdev->devfn)); in amd_iommu_flush_iotlb()
294 PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); in amd_iommu_flush_iotlb()
301 req_id = get_dma_requestor_id(iommu->seg, PCI_BDF2(pdev->bus, devfn)); in amd_iommu_flush_iotlb()
322 u8 devfn = pdev->devfn; in amd_iommu_flush_all_iotlbs() local
325 amd_iommu_flush_iotlb(devfn, pdev, daddr, order); in amd_iommu_flush_all_iotlbs()
326 devfn += pdev->phantom_stride; in amd_iommu_flush_all_iotlbs()
327 } while ( devfn != pdev->devfn && in amd_iommu_flush_all_iotlbs()
328 PCI_SLOT(devfn) == PCI_SLOT(pdev->devfn) ); in amd_iommu_flush_all_iotlbs()
/xen/xen/drivers/passthrough/x86/
A Dats.c28 u8 bus = pdev->bus, devfn = pdev->devfn; in enable_ats_device() local
31 pos = pci_find_ext_capability(seg, bus, devfn, PCI_EXT_CAP_ID_ATS); in enable_ats_device()
36 seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); in enable_ats_device()
68 seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in enable_ats_device()
78 u8 bus = pdev->bus, devfn = pdev->devfn; in disable_ats_device() local
90 seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); in disable_ats_device()
/xen/xen/drivers/video/
A Dvga.c112 int bus, devfn; in video_endboot() local
115 for ( devfn = 0; devfn < 256; ++devfn ) in video_endboot()
118 u8 b = bus, df = devfn, sb; in video_endboot()
121 pdev = pci_get_pdev(0, bus, devfn); in video_endboot()
125 pci_conf_read16(PCI_SBDF3(0, bus, devfn), in video_endboot()
127 !(pci_conf_read16(PCI_SBDF3(0, bus, devfn), PCI_COMMAND) & in video_endboot()
157 bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); in video_endboot()
158 pci_hide_device(0, bus, devfn); in video_endboot()
/xen/xen/drivers/passthrough/vtd/
A Diommu.c1495 PCI_SLOT(devfn), PCI_FUNC(devfn)); in domain_context_mapping()
1509 PCI_SLOT(devfn), PCI_FUNC(devfn)); in domain_context_mapping()
1521 PCI_SLOT(devfn), PCI_FUNC(devfn)); in domain_context_mapping()
1559 seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); in domain_context_mapping()
1564 if ( !ret && devfn == pdev->devfn ) in domain_context_mapping()
1656 PCI_SLOT(devfn), PCI_FUNC(devfn)); in domain_context_unmap()
1670 PCI_SLOT(devfn), PCI_FUNC(devfn)); in domain_context_unmap()
1707 seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); in domain_context_unmap()
2400 if ( devfn == pdev->devfn && pdev->domain != dom_io ) in reassign_device_ownership()
2421 if ( devfn == pdev->devfn && pdev->domain != target ) in reassign_device_ownership()
[all …]
A Dutils.c90 void print_vtd_entries(struct vtd_iommu *iommu, int bus, int devfn, u64 gmfn) in print_vtd_entries() argument
100 PCI_SLOT(devfn), PCI_FUNC(devfn), gmfn); in print_vtd_entries()
132 val = ctxt_entry[devfn].lo; in print_vtd_entries()
134 devfn, ctxt_entry[devfn].hi, val); in print_vtd_entries()
135 if ( !context_present(ctxt_entry[devfn]) ) in print_vtd_entries()
138 printk(" ctxt_entry[%02x] not present\n", devfn); in print_vtd_entries()
142 level = agaw_to_level(context_address_width(ctxt_entry[devfn])); in print_vtd_entries()
A Dextern.h34 void print_vtd_entries(struct vtd_iommu *iommu, int bus, int devfn, u64 gmfn);
78 u8 bus, u8 devfn, const struct pci_dev *);
80 u8 bus, u8 devfn);
99 u8 bus, u8 devfn, int map);
A Dquirks.c352 int me_wifi_quirk(struct domain *domain, u8 bus, u8 devfn, int map) in me_wifi_quirk() argument
365 id = pci_conf_read32(PCI_SBDF3(0, bus, devfn), 0); in me_wifi_quirk()
389 id = pci_conf_read32(PCI_SBDF3(0, bus, devfn), 0); in me_wifi_quirk()
416 int dev = PCI_SLOT(pdev->devfn); in pci_vtd_quirk()
417 int func = PCI_FUNC(pdev->devfn); in pci_vtd_quirk()
454 pos = pci_find_ext_capability(seg, bus, pdev->devfn, in pci_vtd_quirk()
458 pos = pci_find_ext_capability(seg, bus, pdev->devfn, in pci_vtd_quirk()
468 pos = pci_find_next_ext_capability(seg, bus, pdev->devfn, pos, in pci_vtd_quirk()
/xen/xen/drivers/pci/
A Dpci.c42 int pci_find_next_cap(u16 seg, u8 bus, unsigned int devfn, u8 pos, int cap) in pci_find_next_cap() argument
49 pos = pci_conf_read8(PCI_SBDF3(seg, bus, devfn), pos); in pci_find_next_cap()
54 id = pci_conf_read8(PCI_SBDF3(seg, bus, devfn), pos + PCI_CAP_LIST_ID); in pci_find_next_cap()
75 int pci_find_ext_capability(int seg, int bus, int devfn, int cap) in pci_find_ext_capability() argument
77 return pci_find_next_ext_capability(seg, bus, devfn, 0, cap); in pci_find_ext_capability()
90 int pci_find_next_ext_capability(int seg, int bus, int devfn, int start, int cap) in pci_find_next_ext_capability() argument
96 header = pci_conf_read32(PCI_SBDF3(seg, bus, devfn), pos); in pci_find_next_ext_capability()
112 header = pci_conf_read32(PCI_SBDF3(seg, bus, devfn), pos); in pci_find_next_ext_capability()
/xen/xen/arch/x86/x86_64/
A Dpci.c20 pci_mmcfg_read(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 1, &value); in pci_conf_read8()
33 pci_mmcfg_read(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 2, &value); in pci_conf_read16()
46 pci_mmcfg_read(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 4, &value); in pci_conf_read32()
56 pci_mmcfg_write(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 1, data); in pci_conf_write8()
64 pci_mmcfg_write(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 2, data); in pci_conf_write16()
72 pci_mmcfg_write(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 4, data); in pci_conf_write32()
A Dmmconfig_64.c48 static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn) in pci_dev_base() argument
55 return addr + ((bus << 20) | (devfn << 12)); in pci_dev_base()
59 unsigned int devfn, int reg, int len, u32 *value) in pci_mmcfg_read() argument
64 if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) { in pci_mmcfg_read()
69 addr = pci_dev_base(seg, bus, devfn); in pci_mmcfg_read()
89 unsigned int devfn, int reg, int len, u32 value) in pci_mmcfg_write() argument
94 if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) in pci_mmcfg_write()
97 addr = pci_dev_base(seg, bus, devfn); in pci_mmcfg_write()
/xen/xen/include/public/
A Dphysdev.h170 int devfn; member
194 uint8_t devfn; member
204 uint8_t devfn; member
213 uint8_t devfn; member
218 uint8_t devfn; member
292 uint8_t devfn; member
296 uint8_t devfn; member
320 uint8_t devfn; member
/xen/xen/arch/x86/
A Dphysdev.c329 msi.devfn = map.devfn; in do_physdev_op()
446 ret = pci_add_device(0, manage_pci.bus, manage_pci.devfn, in do_physdev_op()
457 ret = pci_remove_device(0, manage_pci.bus, manage_pci.devfn); in do_physdev_op()
476 pdev_info.physfn.devfn = manage_pci_ext.physfn.devfn; in do_physdev_op()
478 manage_pci_ext.devfn, in do_physdev_op()
497 pdev_info.physfn.devfn = add.physfn.devfn; in do_physdev_op()
527 ret = pci_remove_device(dev.seg, dev.bus, dev.devfn); in do_physdev_op()
540 dev.devfn) ?: in do_physdev_op()
541 pci_prepare_msix(dev.seg, dev.bus, dev.devfn, in do_physdev_op()
582 pdev = pci_get_pdev(0, restore_msi.bus, restore_msi.devfn); in do_physdev_op()
[all …]
A Dmsi.c134 sbdf.devfn = dev->info.physfn.devfn; in memory_decoded()
286 u8 slot = PCI_SLOT(dev->devfn); in msi_set_enable()
287 u8 func = PCI_FUNC(dev->devfn); in msi_set_enable()
299 u8 slot = PCI_SLOT(dev->devfn); in msix_set_enable()
300 u8 func = PCI_FUNC(dev->devfn); in msix_set_enable()
333 slot = PCI_SLOT(pdev->devfn); in msi_set_mask_bit()
334 func = PCI_FUNC(pdev->devfn); in msi_set_mask_bit()
616 u8 slot = PCI_SLOT(dev->devfn); in msi_capability_init()
1015 PCI_SLOT(msi->devfn), PCI_FUNC(msi->devfn)); in __pci_enable_msi()
1024 PCI_SLOT(msi->devfn), PCI_FUNC(msi->devfn)); in __pci_enable_msi()
[all …]
/xen/xen/drivers/vpci/
A Dmsix.c45 uint8_t slot = PCI_SLOT(pdev->devfn), func = PCI_FUNC(pdev->devfn); in update_entry()
75 uint8_t slot = PCI_SLOT(pdev->devfn), func = PCI_FUNC(pdev->devfn); in control_write()
184 pdev->seg, pdev->bus, PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); in access_allowed()
436 pdev->seg, pdev->bus, PCI_SLOT(pdev->devfn), in vpci_make_msix_hole()
437 PCI_FUNC(pdev->devfn), mfn_x(mfn), t, start); in vpci_make_msix_hole()
450 uint8_t slot = PCI_SLOT(pdev->devfn), func = PCI_FUNC(pdev->devfn); in init_msix()
A Dmsi.c188 uint8_t slot = PCI_SLOT(pdev->devfn), func = PCI_FUNC(pdev->devfn); in init_msi()
293 PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); in vpci_dump_msi()
311 PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); in vpci_dump_msi()
/xen/tools/libxc/
A Dxc_physdev.c67 int devfn, in xc_physdev_map_pirq_msi() argument
86 map.devfn = devfn; in xc_physdev_map_pirq_msi()
/xen/xen/include/public/io/
A Dpciif.h80 uint32_t devfn; member
106 uint32_t devfn; member
/xen/xen/drivers/passthrough/vtd/x86/
A Dats.c60 pos = pci_find_ext_capability(pdev->seg, pdev->bus, pdev->devfn, in ats_device()
93 if ( context_domain_id(ctxt_entry[pdev->devfn]) != did ) in device_in_domain()
96 tt = context_translation_type(ctxt_entry[pdev->devfn]); in device_in_domain()

Completed in 39 milliseconds

123