/openbmc/qemu/include/hw/pci/ |
H A D | pcie.h | 90 int pcie_cap_init(PCIDevice *dev, uint8_t offset, uint8_t type, 92 int pcie_cap_v1_init(PCIDevice *dev, uint8_t offset, 94 int pcie_endpoint_cap_init(PCIDevice *dev, uint8_t offset); 95 void pcie_cap_exit(PCIDevice *dev); 96 int pcie_endpoint_cap_v1_init(PCIDevice *dev, uint8_t offset); 97 void pcie_cap_v1_exit(PCIDevice *dev); 98 uint8_t pcie_cap_get_type(const PCIDevice *dev); 99 uint8_t pcie_cap_get_version(const PCIDevice *dev); 100 void pcie_cap_flags_set_vector(PCIDevice *dev, uint8_t vector); 101 uint8_t pcie_cap_flags_get_vector(PCIDevice *dev); [all …]
|
H A D | msix.h | 8 void msix_set_message(PCIDevice *dev, int vector, MSIMessage msg); 9 MSIMessage msix_get_message(PCIDevice *dev, unsigned int vector); 10 int msix_init(PCIDevice *dev, unsigned short nentries, 15 int msix_init_exclusive_bar(PCIDevice *dev, unsigned short nentries, 18 void msix_write_config(PCIDevice *dev, uint32_t address, uint32_t val, int len); 20 void msix_uninit(PCIDevice *dev, MemoryRegion *table_bar, 22 void msix_uninit_exclusive_bar(PCIDevice *dev); 24 unsigned int msix_nr_vectors_allocated(const PCIDevice *dev); 26 void msix_save(PCIDevice *dev, QEMUFile *f); 27 void msix_load(PCIDevice *dev, QEMUFile *f); [all …]
|
H A D | pcie_sriov.h | 22 PCIDevice **vf; /* Pointer to an array of num_vfs VF devices */ 26 PCIDevice *pf; /* Pointer back to owner physical function */ 30 void pcie_sriov_pf_init(PCIDevice *dev, uint16_t offset, 34 void pcie_sriov_pf_exit(PCIDevice *dev); 37 void pcie_sriov_pf_init_vf_bar(PCIDevice *dev, int region_num, 41 void pcie_sriov_vf_register_bar(PCIDevice *dev, int region_num, 55 void pcie_sriov_pf_add_sup_pgsize(PCIDevice *dev, uint16_t opt_sup_pgsize); 58 void pcie_sriov_config_write(PCIDevice *dev, uint32_t address, 62 void pcie_sriov_pf_reset(PCIDevice *dev); 65 uint16_t pcie_sriov_vf_number(PCIDevice *dev); [all …]
|
H A D | pci.h | 133 typedef void PCIConfigWriteFunc(PCIDevice *pci_dev, 135 typedef uint32_t PCIConfigReadFunc(PCIDevice *pci_dev, 137 typedef void PCIMapIORegionFunc(PCIDevice *pci_dev, int region_num, 139 typedef void PCIUnregisterFunc(PCIDevice *pci_dev); 141 typedef void MSITriggerFunc(PCIDevice *dev, MSIMessage msg); 142 typedef MSIMessage MSIPrepareMessageFunc(PCIDevice *dev, unsigned vector); 143 typedef MSIMessage MSIxPrepareMessageFunc(PCIDevice *dev, unsigned vector); 230 typedef void (*PCIINTxRoutingNotifier)(PCIDevice *dev); 231 typedef int (*MSIVectorUseNotifier)(PCIDevice *dev, unsigned int vector, 233 typedef void (*MSIVectorReleaseNotifier)(PCIDevice *dev, unsigned int vector); [all …]
|
H A D | msi.h | 33 void msi_set_message(PCIDevice *dev, MSIMessage msg); 34 MSIMessage msi_get_message(PCIDevice *dev, unsigned int vector); 35 bool msi_enabled(const PCIDevice *dev); 36 void msi_set_enabled(PCIDevice *dev); 37 int msi_init(struct PCIDevice *dev, uint8_t offset, 40 void msi_uninit(struct PCIDevice *dev); 41 void msi_reset(PCIDevice *dev); 42 bool msi_is_masked(const PCIDevice *dev, unsigned int vector); 43 void msi_notify(PCIDevice *dev, unsigned int vector); 44 void msi_send_message(PCIDevice *dev, MSIMessage msg); [all …]
|
H A D | pci_device.h | 10 DECLARE_OBJ_CHECKERS(PCIDevice, PCIDeviceClass, 28 void (*realize)(PCIDevice *dev, Error **errp); 52 PCIDevice *dev; 57 struct PCIDevice { struct 179 static inline int pci_intx(PCIDevice *pci_dev) in pci_intx() argument 184 static inline int pci_is_cxl(const PCIDevice *d) in pci_is_cxl() 189 static inline int pci_is_express(const PCIDevice *d) in pci_is_express() 194 static inline int pci_is_express_downstream_port(const PCIDevice *d) in pci_is_express_downstream_port() 207 static inline int pci_is_vf(const PCIDevice *d) in pci_is_vf() 212 static inline uint32_t pci_config_size(const PCIDevice *d) in pci_config_size() [all …]
|
H A D | pci_bridge.h | 60 PCIDevice parent_obj; 94 PCIDevice parent_obj; 123 int pci_bridge_ssvid_init(PCIDevice *dev, uint8_t offset, 127 PCIDevice *pci_bridge_get_device(PCIBus *bus); 130 pcibus_t pci_bridge_get_base(const PCIDevice *bridge, uint8_t type); 131 pcibus_t pci_bridge_get_limit(const PCIDevice *bridge, uint8_t type); 134 void pci_bridge_write_config(PCIDevice *d, 136 void pci_bridge_disable_base_limit(PCIDevice *dev); 139 void pci_bridge_initfn(PCIDevice *pci_dev, const char *typename); 140 void pci_bridge_exitfn(PCIDevice *pci_dev); [all …]
|
H A D | pcie_aer.h | 89 int pcie_aer_init(PCIDevice *dev, uint8_t cap_ver, uint16_t offset, 91 void pcie_aer_exit(PCIDevice *dev); 92 void pcie_aer_write_config(PCIDevice *dev, 96 void pcie_aer_root_set_vector(PCIDevice *dev, unsigned int vector); 97 void pcie_aer_root_init(PCIDevice *dev); 98 void pcie_aer_root_reset(PCIDevice *dev); 99 void pcie_aer_root_write_config(PCIDevice *dev, 103 int pcie_aer_inject_error(PCIDevice *dev, const PCIEAERErr *err);
|
H A D | shpc.h | 39 void shpc_reset(PCIDevice *d); 40 int shpc_bar_size(PCIDevice *dev); 41 int shpc_init(PCIDevice *dev, PCIBus *sec_bus, MemoryRegion *bar, 43 void shpc_cleanup(PCIDevice *dev, MemoryRegion *bar); 44 void shpc_free(PCIDevice *dev); 45 void shpc_cap_write_config(PCIDevice *d, uint32_t addr, uint32_t val, int len); 60 static inline bool shpc_present(const PCIDevice *dev) in shpc_present()
|
H A D | pcie_port.h | 41 void pcie_port_init_reg(PCIDevice *d); 43 PCIDevice *pcie_find_port_by_pn(PCIBus *bus, uint8_t pn); 44 PCIDevice *pcie_find_port_first(PCIBus *bus); 88 uint8_t (*aer_vector)(const PCIDevice *dev); 89 int (*interrupts_init)(PCIDevice *dev, Error **errp); 90 void (*interrupts_uninit)(PCIDevice *dev);
|
/openbmc/qemu/hw/pci/ |
H A D | msix.c | 36 static MSIMessage msix_prepare_message(PCIDevice *dev, unsigned vector) in msix_prepare_message() 46 MSIMessage msix_get_message(PCIDevice *dev, unsigned vector) in msix_get_message() 55 void msix_set_message(PCIDevice *dev, int vector, struct MSIMessage msg) in msix_set_message() 69 static uint8_t *msix_pending_byte(PCIDevice *dev, int vector) in msix_pending_byte() 74 static int msix_is_pending(PCIDevice *dev, int vector) in msix_is_pending() 79 void msix_set_pending(PCIDevice *dev, unsigned int vector) in msix_set_pending() 84 void msix_clr_pending(PCIDevice *dev, int vector) in msix_clr_pending() 89 static bool msix_vector_masked(PCIDevice *dev, unsigned int vector, bool fmask) in msix_vector_masked() 102 bool msix_is_masked(PCIDevice *dev, unsigned int vector) in msix_is_masked() 107 static void msix_fire_vector_notifier(PCIDevice *dev, in msix_fire_vector_notifier() [all …]
|
H A D | pcie.c | 71 pcie_cap_v1_fill(PCIDevice *dev, uint8_t port, uint8_t type, uint8_t version) in pcie_cap_v1_fill() 163 void pcie_cap_fill_link_ep_usp(PCIDevice *dev, PCIExpLinkWidth width, in pcie_cap_fill_link_ep_usp() 181 static void pcie_cap_fill_slot_lnk(PCIDevice *dev) in pcie_cap_fill_slot_lnk() 218 int pcie_cap_init(PCIDevice *dev, uint8_t offset, in pcie_cap_init() 256 int pcie_cap_v1_init(PCIDevice *dev, uint8_t offset, uint8_t type, in pcie_cap_v1_init() 279 pcie_endpoint_cap_common_init(PCIDevice *dev, uint8_t offset, uint8_t cap_size) in pcie_endpoint_cap_common_init() 308 int pcie_endpoint_cap_init(PCIDevice *dev, uint8_t offset) in pcie_endpoint_cap_init() 313 int pcie_endpoint_cap_v1_init(PCIDevice *dev, uint8_t offset) in pcie_endpoint_cap_v1_init() 318 void pcie_cap_exit(PCIDevice *dev) in pcie_cap_exit() 323 void pcie_cap_v1_exit(PCIDevice *dev) in pcie_cap_v1_exit() [all …]
|
H A D | pci-stub.c | 47 MSIMessage pci_get_msi_message(PCIDevice *dev, int vector) in pci_get_msi_message() 52 uint16_t pci_requester_id(PCIDevice *dev) in pci_requester_id() 58 bool msi_enabled(const PCIDevice *dev) in msi_enabled() 63 void msi_notify(PCIDevice *dev, unsigned int vector) in msi_notify() 69 bool msi_is_masked(const PCIDevice *dev, unsigned vector) in msi_is_masked() 74 MSIMessage msi_get_message(PCIDevice *dev, unsigned int vector) in msi_get_message() 79 int msix_enabled(PCIDevice *dev) in msix_enabled() 84 bool msix_is_masked(PCIDevice *dev, unsigned vector) in msix_is_masked() 89 MSIMessage msix_get_message(PCIDevice *dev, unsigned int vector) in msix_get_message()
|
H A D | pcie_sriov.c | 23 static PCIDevice *register_vf(PCIDevice *pf, int devfn, 25 static void unregister_vfs(PCIDevice *dev); 27 void pcie_sriov_pf_init(PCIDevice *dev, uint16_t offset, in pcie_sriov_pf_init() 74 void pcie_sriov_pf_exit(PCIDevice *dev) in pcie_sriov_pf_exit() 81 void pcie_sriov_pf_init_vf_bar(PCIDevice *dev, int region_num, in pcie_sriov_pf_init_vf_bar() 108 void pcie_sriov_vf_register_bar(PCIDevice *dev, int region_num, in pcie_sriov_vf_register_bar() 144 static PCIDevice *register_vf(PCIDevice *pf, int devfn, const char *name, in register_vf() 147 PCIDevice *dev = pci_new(devfn, name); in register_vf() 166 static void register_vfs(PCIDevice *dev) in register_vfs() 183 dev->exp.sriov_pf.vf = g_new(PCIDevice *, num_vfs); in register_vfs() [all …]
|
H A D | pci.c | 68 static bool pcie_has_upstream_port(PCIDevice *dev); 84 DEFINE_PROP_PCI_DEVFN("addr", PCIDevice, devfn, -1), 85 DEFINE_PROP_STRING("romfile", PCIDevice, romfile), 86 DEFINE_PROP_UINT32("romsize", PCIDevice, romsize, UINT32_MAX), 87 DEFINE_PROP_UINT32("rombar", PCIDevice, rom_bar, 1), 88 DEFINE_PROP_BIT("multifunction", PCIDevice, cap_present, 90 DEFINE_PROP_BIT("x-pcie-lnksta-dllla", PCIDevice, cap_present, 92 DEFINE_PROP_BIT("x-pcie-extcap-init", PCIDevice, cap_present, 94 DEFINE_PROP_STRING("failover_pair_id", PCIDevice, 96 DEFINE_PROP_UINT32("acpi-index", PCIDevice, acpi_index, 0), [all …]
|
H A D | msi.c | 93 static inline uint8_t msi_flags_off(const PCIDevice* dev) in msi_flags_off() 98 static inline uint8_t msi_address_lo_off(const PCIDevice* dev) in msi_address_lo_off() 103 static inline uint8_t msi_address_hi_off(const PCIDevice* dev) in msi_address_hi_off() 108 static inline uint8_t msi_data_off(const PCIDevice* dev, bool msi64bit) in msi_data_off() 113 static inline uint8_t msi_mask_off(const PCIDevice* dev, bool msi64bit) in msi_mask_off() 118 static inline uint8_t msi_pending_off(const PCIDevice* dev, bool msi64bit) in msi_pending_off() 127 void msi_set_message(PCIDevice *dev, MSIMessage msg) in msi_set_message() 140 static MSIMessage msi_prepare_message(PCIDevice *dev, unsigned int vector) in msi_prepare_message() 165 MSIMessage msi_get_message(PCIDevice *dev, unsigned int vector) in msi_get_message() 170 bool msi_enabled(const PCIDevice *dev) in msi_enabled() [all …]
|
H A D | pci_bridge.c | 48 int pci_bridge_ssvid_init(PCIDevice *dev, uint8_t offset, in pci_bridge_ssvid_init() 66 PCIDevice *pci_bridge_get_device(PCIBus *bus) in pci_bridge_get_device() 77 static uint32_t pci_config_get_io_base(const PCIDevice *d, in pci_config_get_io_base() 89 static pcibus_t pci_config_get_memory_base(const PCIDevice *d, uint32_t base) in pci_config_get_memory_base() 95 static pcibus_t pci_config_get_pref_base(const PCIDevice *d, in pci_config_get_pref_base() 110 pcibus_t pci_bridge_get_base(const PCIDevice *bridge, uint8_t type) in pci_bridge_get_base() 129 pcibus_t pci_bridge_get_limit(const PCIDevice *bridge, uint8_t type) in pci_bridge_get_limit() 154 PCIDevice *bridge_dev = PCI_DEVICE(bridge); in pci_bridge_init_alias() 168 PCIDevice *pd = PCI_DEVICE(br); in pci_bridge_init_vga_aliases() 190 PCIDevice *pd = PCI_DEVICE(br); in pci_bridge_region_init() [all …]
|
H A D | pcie_aer.c | 97 int pcie_aer_init(PCIDevice *dev, uint8_t cap_ver, uint16_t offset, in pcie_aer_init() 169 void pcie_aer_exit(PCIDevice *dev) in pcie_aer_exit() 174 static void pcie_aer_update_uncor_status(PCIDevice *dev) in pcie_aer_update_uncor_status() 196 pcie_aer_msg_alldev(PCIDevice *dev, const PCIEAERMsg *msg) in pcie_aer_msg_alldev() 243 static bool pcie_aer_msg_vbridge(PCIDevice *dev, const PCIEAERMsg *msg) in pcie_aer_msg_vbridge() 259 void pcie_aer_root_set_vector(PCIDevice *dev, unsigned int vector) in pcie_aer_root_set_vector() 269 static unsigned int pcie_aer_root_get_vector(PCIDevice *dev) in pcie_aer_root_get_vector() 292 static void pcie_aer_root_notify(PCIDevice *dev) in pcie_aer_root_notify() 308 static void pcie_aer_msg_root_port(PCIDevice *dev, const PCIEAERMsg *msg) in pcie_aer_msg_root_port() 384 static void pcie_aer_msg(PCIDevice *dev, const PCIEAERMsg *msg) in pcie_aer_msg() [all …]
|
H A D | shpc.c | 172 static void shpc_interrupt_update(PCIDevice *d) in shpc_interrupt_update() 215 void shpc_reset(PCIDevice *d) in shpc_reset() 280 PCIDevice *affected_dev = shpc->sec_bus->devices[devfn]; in shpc_free_devices_in_slot() 295 static void shpc_slot_command(PCIDevice *d, uint8_t target, in shpc_slot_command() 364 static void shpc_command(PCIDevice *d) in shpc_command() 442 static void shpc_write(PCIDevice *d, unsigned addr, uint64_t val, int l) in shpc_write() 466 static uint64_t shpc_read(PCIDevice *d, unsigned addr, int l) in shpc_read() 485 static uint8_t shpc_cap_dword(PCIDevice *d) in shpc_cap_dword() 491 static void shpc_cap_update_dword(PCIDevice *d) in shpc_cap_update_dword() 499 static int shpc_cap_add_config(PCIDevice *d, Error **errp) in shpc_cap_add_config() [all …]
|
H A D | pcie_port.c | 27 void pcie_port_init_reg(PCIDevice *d) in pcie_port_init_reg() 129 PCIDevice *pcie_find_port_by_pn(PCIBus *bus, uint8_t pn) in pcie_find_port_by_pn() 134 PCIDevice *d = bus->devices[devfn]; in pcie_find_port_by_pn() 155 PCIDevice *pcie_find_port_first(PCIBus *bus) in pcie_find_port_first() 160 PCIDevice *d = bus->devices[devfn]; in pcie_find_port_first() 180 PCIDevice *d = bus->devices[devfn]; in pcie_count_ds_ports()
|
/openbmc/qemu/hw/net/ |
H A D | vmware_utils.h | 29 vmw_shmem_read(PCIDevice *d, hwaddr addr, void *buf, int len) in vmw_shmem_read() 36 vmw_shmem_write(PCIDevice *d, hwaddr addr, void *buf, int len) in vmw_shmem_write() 43 vmw_shmem_rw(PCIDevice *d, hwaddr addr, void *buf, int len, int is_write) in vmw_shmem_rw() 55 vmw_shmem_set(PCIDevice *d, hwaddr addr, uint8_t val, int len) in vmw_shmem_set() 66 vmw_shmem_ld8(PCIDevice *d, hwaddr addr) in vmw_shmem_ld8() 75 vmw_shmem_st8(PCIDevice *d, hwaddr addr, uint8_t value) in vmw_shmem_st8() 82 vmw_shmem_ld16(PCIDevice *d, hwaddr addr) in vmw_shmem_ld16() 92 vmw_shmem_st16(PCIDevice *d, hwaddr addr, uint16_t value) in vmw_shmem_st16() 100 vmw_shmem_ld32(PCIDevice *d, hwaddr addr) in vmw_shmem_ld32() 110 vmw_shmem_st32(PCIDevice *d, hwaddr addr, uint32_t value) in vmw_shmem_st32() [all …]
|
H A D | igbvf.c | 56 PCIDevice parent_obj; 202 static void igbvf_write_config(PCIDevice *dev, uint32_t addr, uint32_t val, in igbvf_write_config() 215 PCIDevice *vf = PCI_DEVICE(opaque); in igbvf_mmio_read() 216 PCIDevice *pf = pcie_sriov_get_pf(vf); in igbvf_mmio_read() 225 PCIDevice *vf = PCI_DEVICE(opaque); in igbvf_mmio_write() 226 PCIDevice *pf = pcie_sriov_get_pf(vf); in igbvf_mmio_write() 244 static void igbvf_pci_realize(PCIDevice *dev, Error **errp) in igbvf_pci_realize() 287 PCIDevice *vf = PCI_DEVICE(obj); in igbvf_qdev_reset_hold() 292 static void igbvf_pci_uninit(PCIDevice *dev) in igbvf_pci_uninit()
|
/openbmc/qemu/hw/ide/ |
H A D | cmd646.c | 55 static void cmd646_update_irq(PCIDevice *pd); 57 static void cmd646_update_dma_interrupts(PCIDevice *pd) in cmd646_update_dma_interrupts() 73 static void cmd646_update_udma_interrupts(PCIDevice *pd) in cmd646_update_udma_interrupts() 93 PCIDevice *pci_dev = PCI_DEVICE(bm->pci_dev); in bmdma_read() 130 PCIDevice *pci_dev = PCI_DEVICE(bm->pci_dev); in bmdma_write() 183 static void cmd646_update_irq(PCIDevice *pd) in cmd646_update_irq() 198 PCIDevice *pd = PCI_DEVICE(d); in cmd646_set_irq() 221 static uint32_t cmd646_pci_config_read(PCIDevice *d, in cmd646_pci_config_read() 227 static void cmd646_pci_config_write(PCIDevice *d, uint32_t addr, uint32_t val, in cmd646_pci_config_write() 250 static void pci_cmd646_ide_realize(PCIDevice *dev, Error **errp) in pci_cmd646_ide_realize() [all …]
|
/openbmc/qemu/hw/pci-bridge/ |
H A D | pci_bridge_dev.c | 56 static void pci_bridge_dev_realize(PCIDevice *dev, Error **errp) in pci_bridge_dev_realize() 128 static void pci_bridge_dev_exitfn(PCIDevice *dev) in pci_bridge_dev_exitfn() 149 static void pci_bridge_dev_write_config(PCIDevice *d, in pci_bridge_dev_write_config() 163 PCIDevice *dev = PCI_DEVICE(qdev); in qdev_pci_bridge_dev_reset() 194 PCIDevice *dev = opaque; in pci_device_shpc_present() 204 SHPC_VMSTATE(shpc, PCIDevice, pci_device_shpc_present), 212 PCIDevice *pci_hotplug_dev = PCI_DEVICE(hotplug_dev); in pci_bridge_dev_plug_cb() 225 PCIDevice *pci_hotplug_dev = PCI_DEVICE(hotplug_dev); in pci_bridge_dev_unplug_cb() 234 PCIDevice *pci_hotplug_dev = PCI_DEVICE(hotplug_dev); in pci_bridge_dev_unplug_request_cb()
|
H A D | pcie_root_port.c | 21 static void rp_aer_vector_update(PCIDevice *d) in rp_aer_vector_update() 30 static void rp_write_config(PCIDevice *d, uint32_t address, in rp_write_config() 48 PCIDevice *d = PCI_DEVICE(obj); in rp_reset_hold() 62 static void rp_realize(PCIDevice *d, Error **errp) in rp_realize() 137 static void rp_exit(PCIDevice *d) in rp_exit() 152 DEFINE_PROP_BIT(COMPAT_PROP_PCP, PCIDevice, cap_present,
|