Home
last modified time | relevance | path

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

123

/xen-4.10.0-shim-comet/xen/drivers/passthrough/
A Dpci.c314 *((u8*) &pdev->devfn) = devfn; in alloc_pdev()
506 (pdev->devfn == devfn || devfn == -1) ) in pci_get_pdev()
555 (pdev->devfn == devfn || devfn == -1) && in pci_get_pdev_by_domain()
867 devfn = pdev->devfn; in pci_release_devices()
988 devfn = pdev->devfn; in pci_check_disable_device()
1054 u8 devfn = pdev->devfn; in setup_one_hwdom_device() local
1064 if ( devfn == pdev->devfn ) in setup_one_hwdom_device()
1068 } while ( devfn != pdev->devfn && in setup_one_hwdom_device()
1079 for ( devfn = 0; devfn < 256; devfn++ ) in _setup_hwdom_pci_devices()
1302 for ( devfn = pdev->devfn ; ; ) in iommu_add_device()
[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(seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), 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-4.10.0-shim-comet/xen/drivers/passthrough/x86/
A Dats.c27 u8 bus = pdev->bus, devfn = pdev->devfn; in enable_ats_device() local
35 seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); in enable_ats_device()
37 value = pci_conf_read16(seg, bus, PCI_SLOT(devfn), in enable_ats_device()
38 PCI_FUNC(devfn), pos + ATS_REG_CTL); in enable_ats_device()
54 pci_conf_write16(seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in enable_ats_device()
61 value = pci_conf_read16(seg, bus, PCI_SLOT(devfn), in enable_ats_device()
70 seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in enable_ats_device()
80 u8 bus = pdev->bus, devfn = pdev->devfn; in disable_ats_device() local
84 value = pci_conf_read16(seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in disable_ats_device()
87 pci_conf_write16(seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in disable_ats_device()
[all …]
/xen-4.10.0-shim-comet/tools/firmware/hvmloader/
A Dpci.c96 uint32_t devfn; in pci_setup() member
148 for ( devfn = 0; devfn < 256; devfn++ ) in pci_setup()
156 ASSERT((devfn != PCI_ISA_DEVFN) || in pci_setup()
165 vga_devfn = devfn; in pci_setup()
170 vga_devfn = devfn; in pci_setup()
175 vga_devfn = devfn; in pci_setup()
264 bars[i].devfn = devfn; in pci_setup()
289 devfn>>3, devfn&7, 'A'+pin-1, isa_irq); in pci_setup()
408 devfn = bars[i].devfn; in pci_setup()
485 "resource!\n", 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-4.10.0-shim-comet/xen/drivers/passthrough/amd/
A Dpci_amd_iommu.c112 u8 devfn, struct pci_dev *pdev) in amd_iommu_setup_domain_device() argument
164 if ( devfn == pdev->devfn ) in amd_iommu_setup_domain_device()
332 if ( devfn == pdev->devfn && in amd_iommu_disable_domain_device()
345 bdf = PCI_BDF2(pdev->bus, pdev->devfn); in reassign_device()
351 pdev->seg, pdev->bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in reassign_device()
358 if ( devfn == pdev->devfn ) in reassign_device()
370 pdev->seg, pdev->bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in reassign_device()
381 int bdf = PCI_BDF2(pdev->bus, devfn); in amd_iommu_assign_device()
487 pdev->seg, pdev->bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in amd_iommu_add_device()
509 pdev->seg, pdev->bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in amd_iommu_remove_device()
[all …]
A Diommu_cmd.c286 void amd_iommu_flush_iotlb(u8 devfn, const struct pci_dev *pdev, in amd_iommu_flush_iotlb() argument
296 if ( !pci_ats_enabled(pdev->seg, pdev->bus, pdev->devfn) ) in amd_iommu_flush_iotlb()
299 iommu = find_iommu_for_device(pdev->seg, PCI_BDF2(pdev->bus, pdev->devfn)); in amd_iommu_flush_iotlb()
305 PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); in amd_iommu_flush_iotlb()
312 req_id = get_dma_requestor_id(iommu->seg, PCI_BDF2(pdev->bus, devfn)); in amd_iommu_flush_iotlb()
333 u8 devfn = pdev->devfn; in amd_iommu_flush_all_iotlbs() local
336 amd_iommu_flush_iotlb(devfn, pdev, gaddr, order); in amd_iommu_flush_all_iotlbs()
337 devfn += pdev->phantom_stride; in amd_iommu_flush_all_iotlbs()
338 } while ( devfn != pdev->devfn && in amd_iommu_flush_all_iotlbs()
339 PCI_SLOT(devfn) == PCI_SLOT(pdev->devfn) ); in amd_iommu_flush_all_iotlbs()
/xen-4.10.0-shim-comet/xen/include/xen/
A Dpci.h50 u8 devfn; member
65 const u8 devfn; member
114 enum pdev_type pdev_type(u16 seg, u8 bus, u8 devfn);
116 struct pci_dev *pci_lock_pdev(int seg, int bus, int devfn);
118 struct domain *, int seg, int bus, int devfn);
125 int pci_add_device(u16 seg, u8 bus, u8 devfn,
127 int pci_remove_device(u16 seg, u8 bus, u8 devfn);
128 int pci_ro_device(int seg, int bus, int devfn);
129 int pci_hide_device(int bus, int devfn);
130 struct pci_dev *pci_get_pdev(int seg, int bus, int devfn);
[all …]
A Diommu.h46 int deassign_device(struct domain *d, u16 seg, u8 bus, u8 devfn);
142 int (*add_device)(u8 devfn, device_t *dev);
144 int (*remove_device)(u8 devfn, device_t *dev);
145 int (*assign_device)(struct domain *, u8 devfn, device_t *dev, u32 flag);
147 u8 devfn, device_t *dev);
149 int (*get_device_group_id)(u16 seg, u8 bus, u8 devfn);
/xen-4.10.0-shim-comet/xen/drivers/video/
A Dvga.c111 int bus, devfn; in video_endboot() local
114 for ( devfn = 0; devfn < 256; ++devfn ) in video_endboot()
117 u8 b = bus, df = devfn, sb; in video_endboot()
120 pdev = pci_get_pdev(0, bus, devfn); in video_endboot()
124 pci_conf_read16(0, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in video_endboot()
126 !(pci_conf_read16(0, bus, PCI_SLOT(devfn), in video_endboot()
127 PCI_FUNC(devfn), PCI_COMMAND) & in video_endboot()
159 bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); in video_endboot()
160 pci_hide_device(bus, devfn); in video_endboot()
/xen-4.10.0-shim-comet/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(seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), pos); in pci_find_next_cap()
54 id = pci_conf_read8(seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in pci_find_next_cap()
76 int pci_find_ext_capability(int seg, int bus, int devfn, int cap) in pci_find_ext_capability() argument
78 return pci_find_next_ext_capability(seg, bus, devfn, 0, cap); in pci_find_ext_capability()
91 int pci_find_next_ext_capability(int seg, int bus, int devfn, int start, int cap) in pci_find_next_ext_capability() argument
97 header = pci_conf_read32(seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), pos); in pci_find_next_ext_capability()
113 header = pci_conf_read32(seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), pos); in pci_find_next_ext_capability()
/xen-4.10.0-shim-comet/xen/arch/x86/
A Dmsi.c131 slot = PCI_SLOT(dev->devfn); in memory_decoded()
399 slot = PCI_SLOT(pdev->devfn); in msi_set_mask_bit()
400 func = PCI_FUNC(pdev->devfn); in msi_set_mask_bit()
450 PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); in msi_set_mask_bit()
1054 PCI_SLOT(msi->devfn), PCI_FUNC(msi->devfn)); in __pci_enable_msi()
1063 PCI_SLOT(msi->devfn), PCI_FUNC(msi->devfn)); in __pci_enable_msi()
1121 PCI_SLOT(msi->devfn), PCI_FUNC(msi->devfn)); in __pci_enable_msix()
1130 PCI_SLOT(msi->devfn), PCI_FUNC(msi->devfn)); in __pci_enable_msix()
1180 PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); in __pci_disable_msix()
1195 u8 slot = PCI_SLOT(devfn), func = PCI_FUNC(devfn); in pci_prepare_msix()
[all …]
A Dphysdev.c332 msi.devfn = map.devfn; in do_physdev_op()
450 ret = pci_add_device(0, manage_pci.bus, manage_pci.devfn, in do_physdev_op()
461 ret = pci_remove_device(0, manage_pci.bus, manage_pci.devfn); in do_physdev_op()
480 pdev_info.physfn.devfn = manage_pci_ext.physfn.devfn; in do_physdev_op()
482 manage_pci_ext.devfn, in do_physdev_op()
501 pdev_info.physfn.devfn = add.physfn.devfn; in do_physdev_op()
531 ret = pci_remove_device(dev.seg, dev.bus, dev.devfn); in do_physdev_op()
544 dev.devfn) ?: in do_physdev_op()
545 pci_prepare_msix(dev.seg, dev.bus, dev.devfn, in do_physdev_op()
575 pdev = pci_get_pdev(0, restore_msi.bus, restore_msi.devfn); in do_physdev_op()
[all …]
/xen-4.10.0-shim-comet/xen/drivers/passthrough/vtd/
A Diommu.c1354 seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), in domain_context_mapping_one()
1495 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()
1549 seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); in domain_context_mapping()
1554 if ( !ret && devfn == pdev->devfn ) in domain_context_mapping()
1646 PCI_SLOT(devfn), PCI_FUNC(devfn)); in domain_context_unmap()
1660 PCI_SLOT(devfn), PCI_FUNC(devfn)); in domain_context_unmap()
1697 seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); in domain_context_unmap()
2391 if ( devfn == pdev->devfn ) in reassign_device_ownership()
[all …]
A Dquirks.c354 int me_wifi_quirk(struct domain *domain, u8 bus, u8 devfn, int map) in me_wifi_quirk() argument
367 id = pci_conf_read32(0, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), 0); in me_wifi_quirk()
391 id = pci_conf_read32(0, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), 0); in me_wifi_quirk()
418 int dev = PCI_SLOT(pdev->devfn); in pci_vtd_quirk()
419 int func = PCI_FUNC(pdev->devfn); in pci_vtd_quirk()
457 pos = pci_find_ext_capability(seg, bus, pdev->devfn, in pci_vtd_quirk()
461 pos = pci_find_ext_capability(seg, bus, pdev->devfn, in pci_vtd_quirk()
471 pos = pci_find_next_ext_capability(seg, bus, pdev->devfn, pos, in pci_vtd_quirk()
A Dutils.c90 void print_vtd_entries(struct 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.h32 void print_vtd_entries(struct iommu *iommu, int bus, int devfn, u64 gmfn);
76 u8 bus, u8 devfn, const struct pci_dev *);
78 u8 bus, u8 devfn);
97 u8 bus, u8 devfn, int map);
A Dintremap.c475 u8 bus, devfn, secbus; in set_msi_source_id() local
483 devfn = pdev->devfn; in set_msi_source_id()
499 set_ire_sid(ire, SVT_VERIFY_SID_SQ, sq, PCI_BDF2(bus, devfn)); in set_msi_source_id()
505 ret = find_upstream_bridge(seg, &bus, &devfn, &secbus); in set_msi_source_id()
509 PCI_BDF2(bus, devfn)); in set_msi_source_id()
513 if ( pdev_type(seg, bus, devfn) == DEV_TYPE_PCIe2PCI_BRIDGE ) in set_msi_source_id()
518 PCI_BDF2(bus, devfn)); in set_msi_source_id()
524 seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); in set_msi_source_id()
531 seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); in set_msi_source_id()
/xen-4.10.0-shim-comet/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
324 uint8_t devfn; member
/xen-4.10.0-shim-comet/xen/arch/x86/x86_64/
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()
A Dmmconfig-shared.c281 u32 devfn; member
303 u32 bus, devfn; in pci_mmcfg_check_hostbridge() local
314 devfn = pci_mmcfg_probes[i].devfn; in pci_mmcfg_check_hostbridge()
315 l = pci_conf_read32(0, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), 0); in pci_mmcfg_check_hostbridge()
/xen-4.10.0-shim-comet/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-4.10.0-shim-comet/xen/include/public/io/
A Dpciif.h80 uint32_t devfn; member
106 uint32_t devfn; member
/xen-4.10.0-shim-comet/xen/drivers/passthrough/vtd/x86/
A Dats.c60 pos = pci_find_ext_capability(pdev->seg, pdev->bus, pdev->devfn, in ats_device()
91 if ( context_domain_id(ctxt_entry[pdev->devfn]) != did ) in device_in_domain()
94 tt = context_translation_type(ctxt_entry[pdev->devfn]); in device_in_domain()

Completed in 38 milliseconds

123