FreeBSD kernel amd64 PCI device code
|
Go to the source code of this file.
Data Structures | |
struct | pci_softc |
Functions | |
DECLARE_CLASS (pci_driver) | |
void | pci_add_children (device_t dev, int domain, int busno) |
void | pci_add_child (device_t bus, struct pci_devinfo *dinfo) |
device_t | pci_add_iov_child (device_t bus, device_t pf, uint16_t rid, uint16_t vid, uint16_t did) |
void | pci_add_resources (device_t bus, device_t dev, int force, uint32_t prefetchmask) |
void | pci_add_resources_ea (device_t bus, device_t dev, int alloc_iov) |
struct pci_devinfo * | pci_alloc_devinfo_method (device_t dev) |
int | pci_attach (device_t dev) |
int | pci_attach_common (device_t dev) |
int | pci_detach (device_t dev) |
int | pci_rescan_method (device_t dev) |
void | pci_driver_added (device_t dev, driver_t *driver) |
int | pci_ea_is_enabled (device_t dev, int rid) |
int | pci_print_child (device_t dev, device_t child) |
void | pci_probe_nomatch (device_t dev, device_t child) |
int | pci_read_ivar (device_t dev, device_t child, int which, uintptr_t *result) |
int | pci_write_ivar (device_t dev, device_t child, int which, uintptr_t value) |
int | pci_setup_intr (device_t dev, device_t child, struct resource *irq, int flags, driver_filter_t *filter, driver_intr_t *intr, void *arg, void **cookiep) |
int | pci_teardown_intr (device_t dev, device_t child, struct resource *irq, void *cookie) |
int | pci_get_vpd_ident_method (device_t dev, device_t child, const char **identptr) |
int | pci_get_vpd_readonly_method (device_t dev, device_t child, const char *kw, const char **vptr) |
int | pci_set_powerstate_method (device_t dev, device_t child, int state) |
int | pci_get_powerstate_method (device_t dev, device_t child) |
uint32_t | pci_read_config_method (device_t dev, device_t child, int reg, int width) |
void | pci_write_config_method (device_t dev, device_t child, int reg, uint32_t val, int width) |
int | pci_enable_busmaster_method (device_t dev, device_t child) |
int | pci_disable_busmaster_method (device_t dev, device_t child) |
int | pci_enable_io_method (device_t dev, device_t child, int space) |
int | pci_disable_io_method (device_t dev, device_t child, int space) |
int | pci_find_cap_method (device_t dev, device_t child, int capability, int *capreg) |
int | pci_find_next_cap_method (device_t dev, device_t child, int capability, int start, int *capreg) |
int | pci_find_extcap_method (device_t dev, device_t child, int capability, int *capreg) |
int | pci_find_next_extcap_method (device_t dev, device_t child, int capability, int start, int *capreg) |
int | pci_find_htcap_method (device_t dev, device_t child, int capability, int *capreg) |
int | pci_find_next_htcap_method (device_t dev, device_t child, int capability, int start, int *capreg) |
int | pci_alloc_msi_method (device_t dev, device_t child, int *count) |
int | pci_alloc_msix_method (device_t dev, device_t child, int *count) |
void | pci_enable_msi_method (device_t dev, device_t child, uint64_t address, uint16_t data) |
void | pci_enable_msix_method (device_t dev, device_t child, u_int index, uint64_t address, uint32_t data) |
void | pci_disable_msi_method (device_t dev, device_t child) |
int | pci_remap_msix_method (device_t dev, device_t child, int count, const u_int *vectors) |
int | pci_release_msi_method (device_t dev, device_t child) |
int | pci_msi_count_method (device_t dev, device_t child) |
int | pci_msix_count_method (device_t dev, device_t child) |
int | pci_msix_pba_bar_method (device_t dev, device_t child) |
int | pci_msix_table_bar_method (device_t dev, device_t child) |
struct resource * | pci_alloc_resource (device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) |
int | pci_release_resource (device_t dev, device_t child, int type, int rid, struct resource *r) |
int | pci_activate_resource (device_t dev, device_t child, int type, int rid, struct resource *r) |
int | pci_deactivate_resource (device_t dev, device_t child, int type, int rid, struct resource *r) |
void | pci_delete_resource (device_t dev, device_t child, int type, int rid) |
struct resource_list * | pci_get_resource_list (device_t dev, device_t child) |
struct pci_devinfo * | pci_read_device (device_t pcib, device_t bus, int d, int b, int s, int f) |
void | pci_print_verbose (struct pci_devinfo *dinfo) |
int | pci_freecfg (struct pci_devinfo *dinfo) |
void | pci_child_deleted (device_t dev, device_t child) |
void | pci_child_detached (device_t dev, device_t child) |
int | pci_child_location_method (device_t cbdev, device_t child, struct sbuf *sb) |
int | pci_child_pnpinfo_method (device_t cbdev, device_t child, struct sbuf *sb) |
int | pci_get_device_path_method (device_t dev, device_t child, const char *locator, struct sbuf *sb) |
int | pci_assign_interrupt_method (device_t dev, device_t child) |
int | pci_resume (device_t dev) |
int | pci_resume_child (device_t dev, device_t child) |
int | pci_suspend_child (device_t dev, device_t child) |
bus_dma_tag_t | pci_get_dma_tag (device_t bus, device_t dev) |
void | pci_child_added_method (device_t dev, device_t child) |
void | pci_cfg_restore (device_t, struct pci_devinfo *) |
void | pci_cfg_save (device_t, struct pci_devinfo *, int) |
int | pci_mapsize (uint64_t testval) |
void | pci_read_bar (device_t dev, int reg, pci_addr_t *mapp, pci_addr_t *testvalp, int *bar64) |
struct pci_map * | pci_add_bar (device_t dev, int reg, pci_addr_t value, pci_addr_t size) |
struct resource * | pci_reserve_map (device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int num, u_int flags) |
struct resource * | pci_alloc_multi_resource (device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_long num, u_int flags) |
int | pci_iov_attach_method (device_t bus, device_t dev, struct nvlist *pf_schema, struct nvlist *vf_schema, const char *name) |
int | pci_iov_detach_method (device_t bus, device_t dev) |
device_t | pci_create_iov_child_method (device_t bus, device_t pf, uint16_t rid, uint16_t vid, uint16_t did) |
struct resource * | pci_vf_alloc_mem_resource (device_t dev, device_t child, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) |
int | pci_vf_release_mem_resource (device_t dev, device_t child, int rid, struct resource *r) |
Variables | |
int | pci_do_power_resume |
int | pci_do_power_suspend |
DECLARE_CLASS | ( | pci_driver | ) |
int pci_activate_resource | ( | device_t | dev, |
device_t | child, | ||
int | type, | ||
int | rid, | ||
struct resource * | r | ||
) |
Definition at line 5694 of file pci.c.
References child, dev, pci_find_bar(), pci_write_bar(), PCIM_BIOS_ENABLE, PCIR_IS_BIOS, rid, and type.
struct pci_map * pci_add_bar | ( | device_t | dev, |
int | reg, | ||
pci_addr_t | value, | ||
pci_addr_t | size | ||
) |
Definition at line 3203 of file pci.c.
References dev, pci_map::pm_reg, pci_map::pm_size, pci_map::pm_value, reg, and value.
Referenced by pci_add_map(), pci_iov_add_bars(), and pci_reserve_map().
void pci_add_child | ( | device_t | bus, |
struct pci_devinfo * | dinfo | ||
) |
Definition at line 4431 of file pci.c.
References bus, dev, pci_add_child_clear_aer(), pci_add_resources(), pci_cfg_restore(), pci_cfg_save(), pci_clear_aer_on_attach, pci_print_verbose(), and pcie_setup_mps().
Referenced by pci_identify_function().
void pci_add_children | ( | device_t | dev, |
int | domain, | ||
int | busno | ||
) |
Definition at line 4144 of file pci.c.
References dev, maxslots, pci_enable_ari, pci_identify_function(), PCI_MAXHDRTYPE, pcib, PCIM_HDRTYPE, PCIM_MFDEV, PCIR_HDRTYPE, PCIR_VENDOR, PCIV_INVALID, and REG.
Referenced by pci_attach().
device_t pci_add_iov_child | ( | device_t | bus, |
device_t | pf, | ||
uint16_t | rid, | ||
uint16_t | vid, | ||
uint16_t | did | ||
) |
void pci_add_resources | ( | device_t | bus, |
device_t | dev, | ||
int | force, | ||
uint32_t | prefetchmask | ||
) |
Definition at line 4038 of file pci.c.
References pci_quirk::arg1, bus, dev, pcicfg::device, pci_quirk::devid, ehci_early_takeover(), pcicfg::intline, pcicfg::intpin, pcicfg::nummaps, ohci_early_takeover(), pci_add_map(), pci_add_resources_ea(), pci_assign_interrupt(), pci_ata_maps(), pci_ea_is_enabled(), PCI_QUIRK_MAP_REG, PCI_QUIRK_UNMAP_REG, pci_quirks, pci_usb_takeover, PCIC_SERIALBUS, PCIC_STORAGE, PCIP_SERIALBUS_USB_EHCI, PCIP_SERIALBUS_USB_OHCI, PCIP_SERIALBUS_USB_UHCI, PCIP_SERIALBUS_USB_XHCI, PCIP_STORAGE_IDE_MASTERDEV, PCIR_BAR, PCIS_SERIALBUS_USB, PCIS_STORAGE_IDE, pci_quirk::type, uhci_early_takeover(), pcicfg::vendor, and xhci_early_takeover().
Referenced by pci_add_child().
void pci_add_resources_ea | ( | device_t | bus, |
device_t | dev, | ||
int | alloc_iov | ||
) |
Definition at line 3920 of file pci.c.
References bus, count, dev, pci_ea_entry::eae_base, pci_ea_entry::eae_bei, pci_ea_entry::eae_cfg_offset, pci_ea_entry::eae_flags, pci_ea_entry::eae_max_offset, pcicfg_iov::iov_num_vfs, pci_ea_bei_to_rid(), PCIM_EA_BEI_BAR_0, PCIM_EA_BEI_BAR_5, PCIM_EA_BEI_ROM, PCIM_EA_BEI_VF_BAR_0, PCIM_EA_BEI_VF_BAR_5, PCIM_EA_ENABLE, PCIM_EA_P_IO, PCIM_EA_P_MEM, PCIM_EA_P_MEM_PREFETCH, PCIM_EA_P_VF_MEM, PCIM_EA_P_VF_MEM_PREFETCH, PCIM_EA_PP, PCIM_EA_PP_OFFSET, rid, start, and type.
Referenced by pci_add_resources(), and pci_iov_setup_bars().
int pci_alloc_msi_method | ( | device_t | dev, |
device_t | child, | ||
int * | count | ||
) |
Definition at line 2587 of file pci.c.
References child, count, dev, irqs, pcicfg::msi, pcicfg_msi::msi_alloc, pcicfg_msi::msi_ctrl, pcicfg_msi::msi_handlers, pcicfg_msi::msi_location, pcicfg_msi::msi_msgnum, pcicfg::msix, pcicfg_msix::msix_alloc, pci_do_msi, pci_msi_blacklisted(), and PCIR_MSI_CTRL.
int pci_alloc_msix_method | ( | device_t | dev, |
device_t | child, | ||
int * | count | ||
) |
Definition at line 1808 of file pci.c.
References child, count, dev, irq, pcicfg::msi, pcicfg_msi::msi_alloc, pcicfg::msix, pcicfg_msix::msix_alloc, pcicfg_msix::msix_ctrl, pcicfg_msix::msix_location, pcicfg_msix::msix_msgnum, pcicfg_msix::msix_pba_bar, pcicfg_msix::msix_pba_res, pcicfg_msix::msix_table, pcicfg_msix::msix_table_bar, pcicfg_msix::msix_table_len, pcicfg_msix::msix_table_res, pcicfg_msix::msix_vectors, msix_table_entry::mte_vector, msix_vector::mv_irq, pci_do_msix, pci_mask_msix(), pci_msix_blacklisted(), PCIM_MSIXCTRL_MSIX_ENABLE, and PCIR_MSIX_CTRL.
struct resource * pci_alloc_multi_resource | ( | device_t | dev, |
device_t | child, | ||
int | type, | ||
int * | rid, | ||
rman_res_t | start, | ||
rman_res_t | end, | ||
rman_res_t | count, | ||
u_long | num, | ||
u_int | flags | ||
) |
Definition at line 5535 of file pci.c.
References child, count, dev, pcicfg::hdrtype, pcicfg::intline, pcicfg::intpin, pcicfg::msi, pcicfg_msi::msi_alloc, pcicfg::msix, pcicfg_msix::msix_alloc, pci_assign_interrupt(), pci_reserve_map(), PCIM_HDRTYPE_BRIDGE, PCIR_IOBASEL_1, PCIR_MEMBASE_1, PCIR_PMBASEL_1, rid, start, and type.
Referenced by pci_alloc_resource(), and pci_iov_alloc_bar().
struct resource * pci_alloc_resource | ( | device_t | dev, |
device_t | child, | ||
int | type, | ||
int * | rid, | ||
rman_res_t | start, | ||
rman_res_t | end, | ||
rman_res_t | count, | ||
u_int | flags | ||
) |
int pci_assign_interrupt_method | ( | device_t | dev, |
device_t | child | ||
) |
Definition at line 5946 of file pci.c.
References child, dev, and pcicfg::intpin.
int pci_attach | ( | device_t | dev | ) |
Definition at line 4496 of file pci.c.
References dev, pci_add_children(), and pci_attach_common().
int pci_attach_common | ( | device_t | dev | ) |
Definition at line 4468 of file pci.c.
References dev, rid, and pci_softc::sc_dma_tag.
Referenced by pci_attach().
void pci_cfg_restore | ( | device_t | dev, |
struct pci_devinfo * | dinfo | ||
) |
Restore the config register state. The state must be previously saved with pci_cfg_save. However, the pci bus driver takes care of that. This function will also return the device to PCI_POWERSTATE_D0 if it is currently in a lower power mode.
Definition at line 6075 of file pci.c.
References dev, pci_cfg_restore_pcie(), pci_cfg_restore_pcix(), pci_iov_cfg_restore(), pci_restore_bars(), pci_resume_msi(), pci_resume_msix(), PCIM_HDRTYPE, PCIM_HDRTYPE_BRIDGE, PCIM_HDRTYPE_CARDBUS, PCIM_HDRTYPE_NORMAL, PCIR_BRIDGECTL_1, PCIR_BRIDGECTL_2, PCIR_CACHELNSZ, PCIR_COMMAND, PCIR_INTLINE, PCIR_INTPIN, PCIR_LATTIMER, PCIR_MAXLAT, PCIR_MINGNT, PCIR_PRIBUS_1, PCIR_PRIBUS_2, PCIR_PROGIF, PCIR_REVID, PCIR_SECBUS_1, PCIR_SECBUS_2, PCIR_SECLAT_1, PCIR_SECLAT_2, PCIR_SUBBUS_1, and PCIR_SUBBUS_2.
Referenced by pci_add_child(), pci_driver_added(), pci_restore_state(), and pci_resume_child().
void pci_cfg_save | ( | device_t | dev, |
struct pci_devinfo * | dinfo, | ||
int | setstate | ||
) |
Save the config register state. Optionally set the power state to D3 if the third argument is non-zero.
Definition at line 6195 of file pci.c.
References dev, pci_cfg_save_pcie(), pci_cfg_save_pcix(), pci_do_power_nodriver, pci_iov_cfg_save(), PCIC_BASEPERIPH, PCIC_DISPLAY, PCIC_MEMORY, PCIC_STORAGE, PCIM_HDRTYPE, PCIM_HDRTYPE_BRIDGE, PCIM_HDRTYPE_CARDBUS, PCIM_HDRTYPE_NORMAL, PCIR_BRIDGECTL_1, PCIR_BRIDGECTL_2, PCIR_CACHELNSZ, PCIR_CLASS, PCIR_COMMAND, PCIR_DEVICE, PCIR_INTLINE, PCIR_INTPIN, PCIR_LATTIMER, PCIR_MAXLAT, PCIR_MINGNT, PCIR_PRIBUS_1, PCIR_PRIBUS_2, PCIR_PROGIF, PCIR_REVID, PCIR_SECBUS_1, PCIR_SECBUS_2, PCIR_SECLAT_1, PCIR_SECLAT_2, PCIR_SUBBUS_1, PCIR_SUBBUS_2, PCIR_SUBCLASS, PCIR_SUBDEV_0, PCIR_SUBDEV_2, PCIR_SUBVEND_0, PCIR_SUBVEND_2, and PCIR_VENDOR.
Referenced by pci_add_child(), pci_child_detached(), pci_probe_nomatch(), pci_resume_child(), pci_save_state(), and pci_suspend_child().
void pci_child_deleted | ( | device_t | dev, |
device_t | child | ||
) |
Definition at line 5743 of file pci.c.
References child, dev, pci_freecfg(), pci_printf(), PCIM_CMD_MEMEN, PCIM_CMD_PORTEN, and PCIR_COMMAND.
void pci_child_detached | ( | device_t | dev, |
device_t | child | ||
) |
Definition at line 5084 of file pci.c.
References child, dev, pci_cfg_save(), and pci_printf().
Referenced by pci_driver_added().
int pci_child_location_method | ( | device_t | cbdev, |
device_t | child, | ||
struct sbuf * | sb | ||
) |
int pci_child_pnpinfo_method | ( | device_t | cbdev, |
device_t | child, | ||
struct sbuf * | sb | ||
) |
Definition at line 5913 of file pci.c.
References pcicfg::baseclass, child, pcicfg::device, pcicfg::progif, pcicfg::subclass, pcicfg::subdevice, pcicfg::subvendor, and pcicfg::vendor.
device_t pci_create_iov_child_method | ( | device_t | bus, |
device_t | pf, | ||
uint16_t | rid, | ||
uint16_t | vid, | ||
uint16_t | did | ||
) |
int pci_deactivate_resource | ( | device_t | dev, |
device_t | child, | ||
int | type, | ||
int | rid, | ||
struct resource * | r | ||
) |
Definition at line 5722 of file pci.c.
References child, dev, pci_find_bar(), pci_write_bar(), PCIR_IS_BIOS, rid, and type.
void pci_delete_resource | ( | device_t | dev, |
device_t | child, | ||
int | type, | ||
int | rid | ||
) |
Definition at line 5785 of file pci.c.
References child, dev, rid, and type.
Referenced by pci_iov_config(), and pci_iov_delete_iov_children().
int pci_disable_busmaster_method | ( | device_t | dev, |
device_t | child | ||
) |
Definition at line 2945 of file pci.c.
References child, dev, pci_clear_command_bit(), and PCIM_CMD_BUSMASTEREN.
int pci_disable_io_method | ( | device_t | dev, |
device_t | child, | ||
int | space | ||
) |
Definition at line 2971 of file pci.c.
References child, dev, pci_clear_command_bit(), PCIM_CMD_MEMEN, PCIM_CMD_PORTEN, and space.
void pci_disable_msi_method | ( | device_t | dev, |
device_t | child | ||
) |
Definition at line 2375 of file pci.c.
References child, pcicfg_msi::msi_ctrl, pcicfg_msi::msi_location, pci_ht_map_msi(), and PCIR_MSI_CTRL.
void pci_driver_added | ( | device_t | dev, |
driver_t * | driver | ||
) |
Definition at line 4716 of file pci.c.
References child, dev, pci_cfg_restore(), pci_child_detached(), pci_print_verbose(), and pci_printf().
int pci_ea_is_enabled | ( | device_t | dev, |
int | rid | ||
) |
Definition at line 3904 of file pci.c.
References dev, pci_ea_entry::eae_bei, pci_ea_entry::eae_flags, pci_ea_bei_to_rid(), PCIM_EA_ENABLE, and rid.
Referenced by pci_add_resources(), pci_iov_setup_bars(), and pci_reserve_map().
int pci_enable_busmaster_method | ( | device_t | dev, |
device_t | child | ||
) |
Definition at line 2938 of file pci.c.
References child, dev, pci_set_command_bit(), and PCIM_CMD_BUSMASTEREN.
int pci_enable_io_method | ( | device_t | dev, |
device_t | child, | ||
int | space | ||
) |
Definition at line 2952 of file pci.c.
References child, dev, pci_set_command_bit(), PCIM_CMD_MEMEN, PCIM_CMD_PORTEN, and space.
void pci_enable_msi_method | ( | device_t | dev, |
device_t | child, | ||
uint64_t | address, | ||
uint16_t | data | ||
) |
Definition at line 2347 of file pci.c.
References address, child, data, pcicfg_msi::msi_ctrl, pcicfg_msi::msi_location, pci_ht_map_msi(), PCIM_MSICTRL_64BIT, PCIM_MSICTRL_MSI_ENABLE, PCIR_MSI_ADDR, PCIR_MSI_ADDR_HIGH, PCIR_MSI_CTRL, PCIR_MSI_DATA, and PCIR_MSI_DATA_64BIT.
void pci_enable_msix_method | ( | device_t | dev, |
device_t | child, | ||
u_int | index, | ||
uint64_t | address, | ||
uint32_t | data | ||
) |
Definition at line 1690 of file pci.c.
References address, child, data, index, pcicfg_msix::msix_ctrl, pcicfg_msix::msix_location, pci_ht_map_msi(), pci_msix_rewrite_table, pci_resume_msix(), pci_write_msix_entry(), PCIM_MSIXCTRL_MSIX_ENABLE, and PCIR_MSIX_CTRL.
int pci_find_cap_method | ( | device_t | dev, |
device_t | child, | ||
int | capability, | ||
int * | capreg | ||
) |
Definition at line 1526 of file pci.c.
References capability, capreg, child, pcicfg::hdrtype, PCICAP_ID, PCICAP_NEXTPTR, PCIM_HDRTYPE, PCIM_HDRTYPE_BRIDGE, PCIM_HDRTYPE_CARDBUS, PCIM_HDRTYPE_NORMAL, PCIM_STATUS_CAPPRESENT, PCIR_CAP_PTR, PCIR_CAP_PTR_2, PCIR_STATUS, and status.
int pci_find_extcap_method | ( | device_t | dev, |
device_t | child, | ||
int | capability, | ||
int * | capreg | ||
) |
Definition at line 1606 of file pci.c.
References capability, capreg, child, PCI_EXTCAP_ID, PCI_EXTCAP_NEXTPTR, pcicfg::pcie, pcicfg_pcie::pcie_location, and PCIR_EXTCAP.
int pci_find_htcap_method | ( | device_t | dev, |
device_t | child, | ||
int | capability, | ||
int * | capreg | ||
) |
Definition at line 1445 of file pci.c.
References capability, capreg, child, PCIM_HTCAP_HOST, PCIM_HTCAP_SLAVE, PCIM_HTCMD_CAP_MASK, PCIR_HT_COMMAND, PCIY_HT, and val.
int pci_find_next_cap_method | ( | device_t | dev, |
device_t | child, | ||
int | capability, | ||
int | start, | ||
int * | capreg | ||
) |
Definition at line 1579 of file pci.c.
References capability, capreg, child, PCICAP_ID, PCICAP_NEXTPTR, and start.
int pci_find_next_extcap_method | ( | device_t | dev, |
device_t | child, | ||
int | capability, | ||
int | start, | ||
int * | capreg | ||
) |
Definition at line 1643 of file pci.c.
References capability, capreg, child, PCI_EXTCAP_ID, PCI_EXTCAP_NEXTPTR, pcicfg::pcie, pcicfg_pcie::pcie_location, and start.
int pci_find_next_htcap_method | ( | device_t | dev, |
device_t | child, | ||
int | capability, | ||
int | start, | ||
int * | capreg | ||
) |
Definition at line 1485 of file pci.c.
References capability, capreg, child, PCICAP_ID, PCIM_HTCAP_HOST, PCIM_HTCAP_SLAVE, PCIM_HTCMD_CAP_MASK, PCIR_HT_COMMAND, PCIY_HT, start, and val.
int pci_freecfg | ( | struct pci_devinfo * | dinfo | ) |
Definition at line 2773 of file pci.c.
References pci_devq, pci_generation, and pci_numdevs.
Referenced by pci_child_deleted().
int pci_get_device_path_method | ( | device_t | dev, |
device_t | child, | ||
const char * | locator, | ||
struct sbuf * | sb | ||
) |
bus_dma_tag_t pci_get_dma_tag | ( | device_t | bus, |
device_t | dev | ||
) |
Definition at line 5842 of file pci.c.
References bus, and pci_softc::sc_dma_tag.
int pci_get_powerstate_method | ( | device_t | dev, |
device_t | child | ||
) |
Definition at line 2880 of file pci.c.
References child, dev, PCIM_PSTAT_D0, PCIM_PSTAT_D1, PCIM_PSTAT_D2, PCIM_PSTAT_D3, PCIM_PSTAT_DMASK, pcicfg::pp, pcicfg_pp::pp_cap, pcicfg_pp::pp_status, and status.
struct resource_list * pci_get_resource_list | ( | device_t | dev, |
device_t | child | ||
) |
int pci_get_vpd_ident_method | ( | device_t | dev, |
device_t | child, | ||
const char ** | identptr | ||
) |
Definition at line 1390 of file pci.c.
References child, dev, identptr, pci_read_vpd(), pcicfg::vpd, pcicfg_vpd::vpd_cached, pcicfg_vpd::vpd_ident, and pcicfg_vpd::vpd_reg.
int pci_get_vpd_readonly_method | ( | device_t | dev, |
device_t | child, | ||
const char * | kw, | ||
const char ** | vptr | ||
) |
Definition at line 1407 of file pci.c.
References child, dev, vpd_readonly::keyword, kw, pci_read_vpd(), vpd_readonly::value, pcicfg::vpd, pcicfg_vpd::vpd_cached, pcicfg_vpd::vpd_reg, pcicfg_vpd::vpd_rocnt, pcicfg_vpd::vpd_ros, and vptr.
int pci_iov_attach_method | ( | device_t | bus, |
device_t | dev, | ||
struct nvlist * | pf_schema, | ||
struct nvlist * | vf_schema, | ||
const char * | name | ||
) |
int pci_iov_detach_method | ( | device_t | bus, |
device_t | dev | ||
) |
Definition at line 190 of file pci_iov.c.
References dev, IOV_BUSY, pcicfg_iov::iov_cdev, pcicfg_iov::iov_flags, pcicfg_iov::iov_schema, and pci_iov_delete_iov_children().
int pci_mapsize | ( | uint64_t | testval | ) |
Definition at line 561 of file pci.c.
References pci_mapbase().
Referenced by pci_add_map(), pci_iov_alloc_bar_ea(), pci_iov_setup_bars(), and pci_reserve_map().
int pci_msi_count_method | ( | device_t | dev, |
device_t | child | ||
) |
Definition at line 2760 of file pci.c.
References child, pcicfg_msi::msi_location, pcicfg_msi::msi_msgnum, and pci_do_msi.
int pci_msix_count_method | ( | device_t | dev, |
device_t | child | ||
) |
Definition at line 2157 of file pci.c.
References child, pcicfg_msix::msix_location, pcicfg_msix::msix_msgnum, and pci_do_msix.
int pci_msix_pba_bar_method | ( | device_t | dev, |
device_t | child | ||
) |
Definition at line 2168 of file pci.c.
References child, pcicfg_msix::msix_location, pcicfg_msix::msix_pba_bar, and pci_do_msix.
int pci_msix_table_bar_method | ( | device_t | dev, |
device_t | child | ||
) |
Definition at line 2179 of file pci.c.
References child, pcicfg_msix::msix_location, pcicfg_msix::msix_table_bar, and pci_do_msix.
int pci_print_child | ( | device_t | dev, |
device_t | child | ||
) |
void pci_print_verbose | ( | struct pci_devinfo * | dinfo | ) |
Definition at line 2995 of file pci.c.
References pcicfg::baseclass, pcicfg::bus, pcicfg::cachelnsz, pcicfg::cmdreg, pcicfg::dev, pcicfg::device, pcicfg::domain, pcicfg::func, pcicfg::hdrtype, pcicfg::intline, pcicfg::intpin, pcicfg::lattimer, pcicfg::maxlat, pcicfg::mfdev, pcicfg::mingnt, pcicfg::msi, pcicfg_msi::msi_ctrl, pcicfg_msi::msi_location, pcicfg_msi::msi_msgnum, pcicfg::msix, pcicfg_msix::msix_location, pcicfg_msix::msix_msgnum, pcicfg_msix::msix_pba_bar, pcicfg_msix::msix_table_bar, PCIM_MSICTRL_64BIT, PCIM_MSICTRL_VECTOR, PCIM_PCAP_D1SUPP, PCIM_PCAP_D2SUPP, PCIM_PCAP_SPEC, PCIM_PSTAT_DMASK, pcicfg::pp, pcicfg_pp::pp_cap, pcicfg_pp::pp_status, pcicfg::progif, pcicfg::revid, pcicfg::slot, pcicfg::statreg, status, pcicfg::subclass, and pcicfg::vendor.
Referenced by pci_add_child(), and pci_driver_added().
void pci_probe_nomatch | ( | device_t | dev, |
device_t | child | ||
) |
Definition at line 5037 of file pci.c.
References child, dev, pci_cfg_save(), pci_describe_device(), pci_nomatch_tab, report, and subclass.
void pci_read_bar | ( | device_t | dev, |
int | reg, | ||
pci_addr_t * | mapp, | ||
pci_addr_t * | testvalp, | ||
int * | bar64 | ||
) |
Definition at line 3064 of file pci.c.
References dev, PCI_BAR_MEM, pci_maprange(), PCIM_CMD_MEMEN, PCIM_CMD_PORTEN, PCIR_COMMAND, PCIR_IS_BIOS, and reg.
Referenced by pci_add_map(), pci_iov_setup_bars(), and pci_reserve_map().
uint32_t pci_read_config_method | ( | device_t | dev, |
device_t | child, | ||
int | reg, | ||
int | width | ||
) |
Definition at line 5851 of file pci.c.
References pcicfg::bus, child, dev, pcicfg::device, pcicfg::flags, pcicfg::func, PCICFG_VF, PCIR_DEVICE, PCIR_VENDOR, reg, pcicfg::slot, pcicfg::vendor, and width.
struct pci_devinfo * pci_read_device | ( | device_t | pcib, |
device_t | bus, | ||
int | d, | ||
int | b, | ||
int | s, | ||
int | f | ||
) |
Definition at line 680 of file pci.c.
References bus, did, pci_fill_devinfo(), pcib, PCIR_DEVICE, PCIR_VENDOR, PCIV_INVALID, REG, and vid.
Referenced by pci_identify_function().
int pci_read_ivar | ( | device_t | dev, |
device_t | child, | ||
int | which, | ||
uintptr_t * | result | ||
) |
Definition at line 5248 of file pci.c.
References pcicfg::baseclass, pcicfg::bus, pcicfg::cachelnsz, child, pcicfg::cmdreg, pcicfg::device, pcicfg::domain, pcicfg::func, pcicfg::hdrtype, pcicfg::intline, pcicfg::intpin, pcicfg::lattimer, pcicfg::maxlat, pcicfg::mingnt, PCIM_HDRTYPE_NORMAL, pcicfg::progif, pcicfg::revid, pcicfg::slot, pcicfg::subclass, pcicfg::subdevice, pcicfg::subvendor, and pcicfg::vendor.
int pci_release_msi_method | ( | device_t | dev, |
device_t | child | ||
) |
Definition at line 2706 of file pci.c.
References child, dev, irqs, pcicfg_msi::msi_addr, pcicfg_msi::msi_alloc, pcicfg_msi::msi_ctrl, pcicfg_msi::msi_data, pcicfg_msi::msi_handlers, pcicfg_msi::msi_location, pci_release_msix(), PCIM_MSICTRL_MSI_ENABLE, and PCIR_MSI_CTRL.
int pci_release_resource | ( | device_t | dev, |
device_t | child, | ||
int | type, | ||
int | rid, | ||
struct resource * | r | ||
) |
Definition at line 5643 of file pci.c.
References child, dev, pcicfg::hdrtype, pci_vf_release_mem_resource(), PCICFG_VF, PCIM_HDRTYPE_BRIDGE, PCIR_IOBASEL_1, PCIR_MEMBASE_1, PCIR_PMBASEL_1, rid, and type.
Referenced by pci_iov_config(), and pci_iov_delete_iov_children().
int pci_remap_msix_method | ( | device_t | dev, |
device_t | child, | ||
int | count, | ||
const u_int * | vectors | ||
) |
Definition at line 1982 of file pci.c.
References child, count, dev, irq, pcicfg_msix::msix_alloc, pcicfg_msix::msix_msgnum, pcicfg_msix::msix_table, pcicfg_msix::msix_table_len, pcicfg_msix::msix_vectors, msix_table_entry::mte_handlers, msix_table_entry::mte_vector, msix_vector::mv_irq, and vectors.
int pci_rescan_method | ( | device_t | dev | ) |
Definition at line 4191 of file pci.c.
References child, dev, maxslots, pci_identify_function(), PCI_MAXHDRTYPE, pcib, PCIM_HDRTYPE, PCIM_MFDEV, PCIR_HDRTYPE, PCIR_VENDOR, PCIV_INVALID, and REG.
struct resource * pci_reserve_map | ( | device_t | dev, |
device_t | child, | ||
int | type, | ||
int * | rid, | ||
rman_res_t | start, | ||
rman_res_t | end, | ||
rman_res_t | count, | ||
u_int | num, | ||
u_int | flags | ||
) |
Definition at line 5421 of file pci.c.
References child, count, dev, pci_add_bar(), PCI_BAR_MEM, pci_ea_is_enabled(), pci_find_bar(), pci_mapsize(), pci_read_bar(), pci_romsize(), pci_write_bar(), PCIM_BAR_MEM_PREFETCH, PCIM_CMD_MEMEN, PCIM_CMD_PORTEN, PCIR_COMMAND, PCIR_IS_BIOS, pci_map::pm_size, pci_map::pm_value, rid, start, and type.
Referenced by pci_alloc_multi_resource().
int pci_resume | ( | device_t | dev | ) |
Definition at line 4657 of file pci.c.
References child, dev, PCIC_BASEPERIPH, PCIC_BRIDGE, PCIC_DISPLAY, and PCIC_MEMORY.
int pci_resume_child | ( | device_t | dev, |
device_t | child | ||
) |
Definition at line 4628 of file pci.c.
References child, dev, pci_cfg_restore(), pci_cfg_save(), pci_do_power_resume, pci_do_power_suspend, and pci_set_power_child().
int pci_set_powerstate_method | ( | device_t | dev, |
device_t | child, | ||
int | state | ||
) |
Definition at line 2808 of file pci.c.
References child, dev, pci_printf(), PCIM_PCAP_D1SUPP, PCIM_PCAP_D2SUPP, PCIM_PSTAT_D0, PCIM_PSTAT_D1, PCIM_PSTAT_D2, PCIM_PSTAT_D3, pcicfg::pp, pcicfg_pp::pp_cap, pcicfg_pp::pp_status, state, and status.
int pci_setup_intr | ( | device_t | dev, |
device_t | child, | ||
struct resource * | irq, | ||
int | flags, | ||
driver_filter_t * | filter, | ||
driver_intr_t * | intr, | ||
void * | arg, | ||
void ** | cookiep | ||
) |
Definition at line 4745 of file pci.c.
References addr, child, data, dev, irq, pcicfg::msix, pcicfg_msix::msix_table_len, msix_table_entry::mte_handlers, msix_table_entry::mte_vector, msix_vector::mv_address, msix_vector::mv_data, msix_vector::mv_irq, pci_clear_command_bit(), pci_has_quirk(), PCI_QUIRK_MSI_INTX_BUG, pci_set_command_bit(), pci_unmask_msix(), PCIM_CMD_INTxDIS, and rid.
int pci_suspend_child | ( | device_t | dev, |
device_t | child | ||
) |
Definition at line 4589 of file pci.c.
References child, dev, pci_cfg_save(), pci_do_power_suspend, and pci_set_power_child().
int pci_teardown_intr | ( | device_t | dev, |
device_t | child, | ||
struct resource * | irq, | ||
void * | cookie | ||
) |
Definition at line 4853 of file pci.c.
References child, dev, irq, pcicfg::msi, pcicfg_msi::msi_alloc, pcicfg::msix, pcicfg_msix::msix_table_len, msix_table_entry::mte_handlers, pci_mask_msix(), pci_set_command_bit(), PCIM_CMD_INTxDIS, and rid.
struct resource * pci_vf_alloc_mem_resource | ( | device_t | dev, |
device_t | child, | ||
int * | rid, | ||
rman_res_t | start, | ||
rman_res_t | end, | ||
rman_res_t | count, | ||
u_int | flags | ||
) |
Definition at line 998 of file pci_iov.c.
References child, count, pci_find_bar(), pci_map::pm_size, pci_map::pm_value, rid, pcicfg_iov::rman, and start.
Referenced by pci_alloc_resource().
int pci_vf_release_mem_resource | ( | device_t | dev, |
device_t | child, | ||
int | rid, | ||
struct resource * | r | ||
) |
Definition at line 1061 of file pci_iov.c.
Referenced by pci_release_resource().
void pci_write_config_method | ( | device_t | dev, |
device_t | child, | ||
int | reg, | ||
uint32_t | val, | ||
int | width | ||
) |
Definition at line 5892 of file pci.c.
References pcicfg::bus, child, dev, pcicfg::func, reg, pcicfg::slot, val, and width.
int pci_write_ivar | ( | device_t | dev, |
device_t | child, | ||
int | which, | ||
uintptr_t | value | ||
) |
|
extern |
Definition at line 364 of file pci.c.
Referenced by pci_resume_child().
|
extern |
Definition at line 369 of file pci.c.
Referenced by pci_resume_child(), and pci_suspend_child().