FreeBSD kernel amd64 PCI device code
pci_private.h File Reference
This graph shows which files directly or indirectly include this file:

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_mappci_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
 

Function Documentation

◆ DECLARE_CLASS()

DECLARE_CLASS ( pci_driver  )

◆ pci_activate_resource()

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.

Here is the call graph for this function:

◆ pci_add_bar()

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().

Here is the caller graph for this function:

◆ pci_add_child()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pci_add_children()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pci_add_iov_child()

device_t pci_add_iov_child ( device_t  bus,
device_t  pf,
uint16_t  rid,
uint16_t  vid,
uint16_t  did 
)

◆ pci_add_resources()

◆ pci_add_resources_ea()

◆ pci_alloc_devinfo_method()

struct pci_devinfo * pci_alloc_devinfo_method ( device_t  dev)

Definition at line 695 of file pci.c.

◆ pci_alloc_msi_method()

int pci_alloc_msi_method ( device_t  dev,
device_t  child,
int *  count 
)

◆ pci_alloc_msix_method()

◆ pci_alloc_multi_resource()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pci_alloc_resource()

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 
)

Definition at line 5611 of file pci.c.

References child, count, dev, pci_alloc_multi_resource(), pci_vf_alloc_mem_resource(), PCICFG_VF, rid, start, and type.

Here is the call graph for this function:

◆ pci_assign_interrupt_method()

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.

◆ pci_attach()

int pci_attach ( device_t  dev)

Definition at line 4496 of file pci.c.

References dev, pci_add_children(), and pci_attach_common().

Here is the call graph for this function:

◆ 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().

Here is the caller graph for this function:

◆ pci_cfg_restore()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pci_cfg_save()

◆ pci_child_added_method()

void pci_child_added_method ( device_t  dev,
device_t  child 
)

Definition at line 4452 of file pci.c.

◆ pci_child_deleted()

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.

Here is the call graph for this function:

◆ pci_child_detached()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pci_child_location_method()

int pci_child_location_method ( device_t  cbdev,
device_t  child,
struct sbuf *  sb 
)

Definition at line 5903 of file pci.c.

References child.

◆ pci_child_pnpinfo_method()

int pci_child_pnpinfo_method ( device_t  cbdev,
device_t  child,
struct sbuf *  sb 
)

◆ pci_create_iov_child_method()

device_t pci_create_iov_child_method ( device_t  bus,
device_t  pf,
uint16_t  rid,
uint16_t  vid,
uint16_t  did 
)

◆ pci_deactivate_resource()

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.

Here is the call graph for this function:

◆ pci_delete_resource()

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().

Here is the caller graph for this function:

◆ pci_detach()

int pci_detach ( device_t  dev)

Definition at line 4517 of file pci.c.

References dev.

◆ pci_disable_busmaster_method()

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.

Here is the call graph for this function:

◆ pci_disable_io_method()

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.

Here is the call graph for this function:

◆ pci_disable_msi_method()

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.

Here is the call graph for this function:

◆ pci_driver_added()

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().

Here is the call graph for this function:

◆ pci_ea_is_enabled()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pci_enable_busmaster_method()

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.

Here is the call graph for this function:

◆ pci_enable_io_method()

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.

Here is the call graph for this function:

◆ pci_enable_msi_method()

void pci_enable_msi_method ( device_t  dev,
device_t  child,
uint64_t  address,
uint16_t  data 
)

◆ pci_enable_msix_method()

void pci_enable_msix_method ( device_t  dev,
device_t  child,
u_int  index,
uint64_t  address,
uint32_t  data 
)

◆ pci_find_cap_method()

int pci_find_cap_method ( device_t  dev,
device_t  child,
int  capability,
int *  capreg 
)

◆ pci_find_extcap_method()

int pci_find_extcap_method ( device_t  dev,
device_t  child,
int  capability,
int *  capreg 
)

◆ pci_find_htcap_method()

int pci_find_htcap_method ( device_t  dev,
device_t  child,
int  capability,
int *  capreg 
)

◆ pci_find_next_cap_method()

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.

◆ pci_find_next_extcap_method()

int pci_find_next_extcap_method ( device_t  dev,
device_t  child,
int  capability,
int  start,
int *  capreg 
)

◆ pci_find_next_htcap_method()

int pci_find_next_htcap_method ( device_t  dev,
device_t  child,
int  capability,
int  start,
int *  capreg 
)

◆ pci_freecfg()

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().

Here is the caller graph for this function:

◆ pci_get_device_path_method()

int pci_get_device_path_method ( device_t  dev,
device_t  child,
const char *  locator,
struct sbuf *  sb 
)

Definition at line 5928 of file pci.c.

References bus, and child.

◆ pci_get_dma_tag()

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.

◆ pci_get_powerstate_method()

int pci_get_powerstate_method ( device_t  dev,
device_t  child 
)

◆ pci_get_resource_list()

struct resource_list * pci_get_resource_list ( device_t  dev,
device_t  child 
)

Definition at line 5815 of file pci.c.

References child.

◆ pci_get_vpd_ident_method()

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.

Here is the call graph for this function:

◆ pci_get_vpd_readonly_method()

int pci_get_vpd_readonly_method ( device_t  dev,
device_t  child,
const char *  kw,
const char **  vptr 
)

◆ pci_iov_attach_method()

int pci_iov_attach_method ( device_t  bus,
device_t  dev,
struct nvlist *  pf_schema,
struct nvlist *  vf_schema,
const char *  name 
)

◆ pci_iov_detach_method()

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().

Here is the call graph for this function:

◆ pci_mapsize()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pci_msi_count_method()

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.

◆ pci_msix_count_method()

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.

◆ pci_msix_pba_bar_method()

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.

◆ pci_msix_table_bar_method()

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.

◆ pci_print_child()

int pci_print_child ( device_t  dev,
device_t  child 
)

Definition at line 4912 of file pci.c.

References child, and dev.

◆ pci_print_verbose()

◆ pci_probe_nomatch()

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.

Here is the call graph for this function:

◆ pci_read_bar()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pci_read_config_method()

uint32_t pci_read_config_method ( device_t  dev,
device_t  child,
int  reg,
int  width 
)

◆ pci_read_device()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pci_read_ivar()

◆ pci_release_msi_method()

int pci_release_msi_method ( device_t  dev,
device_t  child 
)

◆ pci_release_resource()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pci_remap_msix_method()

int pci_remap_msix_method ( device_t  dev,
device_t  child,
int  count,
const u_int *  vectors 
)

◆ pci_rescan_method()

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.

Here is the call graph for this function:

◆ pci_reserve_map()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pci_resume()

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.

◆ pci_resume_child()

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().

Here is the call graph for this function:

◆ pci_set_powerstate_method()

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.

Here is the call graph for this function:

◆ pci_setup_intr()

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 
)

◆ pci_suspend_child()

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().

Here is the call graph for this function:

◆ pci_teardown_intr()

int pci_teardown_intr ( device_t  dev,
device_t  child,
struct resource *  irq,
void *  cookie 
)

◆ pci_vf_alloc_mem_resource()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pci_vf_release_mem_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.

References child, and rid.

Referenced by pci_release_resource().

Here is the caller graph for this function:

◆ pci_write_config_method()

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.

◆ pci_write_ivar()

int pci_write_ivar ( device_t  dev,
device_t  child,
int  which,
uintptr_t  value 
)

Definition at line 5339 of file pci.c.

References child, and value.

Variable Documentation

◆ pci_do_power_resume

int pci_do_power_resume
extern

Definition at line 364 of file pci.c.

Referenced by pci_resume_child().

◆ pci_do_power_suspend

int pci_do_power_suspend
extern

Definition at line 369 of file pci.c.

Referenced by pci_resume_child(), and pci_suspend_child().