iPXE
|
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static int | pci_find_capability_common (struct pci_device *pci, uint8_t pos, int cap) |
int | pci_find_capability (struct pci_device *pci, int cap) |
Look for a PCI capability. More... | |
int | pci_find_next_capability (struct pci_device *pci, int pos, int cap) |
Look for another PCI capability. More... | |
unsigned long | pci_bar_size (struct pci_device *pci, unsigned int reg) |
Find the size of a PCI BAR. More... | |
void | pci_reset (struct pci_device *pci, unsigned int exp) |
Perform PCI Express function-level reset (FLR) More... | |
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Definition at line 8 of file pciextra.c.
References DBG, id, PCI_CAP_ID, PCI_CAP_NEXT, and pci_read_config_byte().
Referenced by pci_find_capability(), and pci_find_next_capability().
int pci_find_capability | ( | struct pci_device * | pci, |
int | cap | ||
) |
Look for a PCI capability.
pci | PCI device to query |
cap | Capability code |
address | Address of capability, or 0 if not found |
Determine whether or not a device supports a given PCI capability. Returns the address of the requested capability structure within the device's PCI configuration space, or 0 if the device does not support it.
Definition at line 38 of file pciextra.c.
References PCI_CAPABILITY_LIST, PCI_CB_CAPABILITY_LIST, pci_find_capability_common(), PCI_HEADER_TYPE, PCI_HEADER_TYPE_BRIDGE, PCI_HEADER_TYPE_CARDBUS, PCI_HEADER_TYPE_MASK, PCI_HEADER_TYPE_NORMAL, pci_read_config_byte(), pci_read_config_word(), PCI_STATUS, PCI_STATUS_CAP_LIST, and status.
Referenced by ath5k_hw_attach(), ath5k_hw_nic_wakeup(), bnx2_init_board(), ice_probe(), intelxl_probe(), intelxlvf_probe(), myri10ge_pci_probe(), pci_msix_enable(), pci_vpd_init(), pciea_offset(), sky2_reset(), sky2_rx_start(), tg3_get_invariants(), and virtio_pci_find_capability().
int pci_find_next_capability | ( | struct pci_device * | pci, |
int | pos, | ||
int | cap | ||
) |
Look for another PCI capability.
pci | PCI device to query |
pos | Address of the current capability |
cap | Capability code |
address | Address of capability, or 0 if not found |
Determine whether or not a device supports a given PCI capability starting the search at a given address within the device's PCI configuration space. Returns the address of the next capability structure within the device's PCI configuration space, or 0 if the device does not support another such capability.
Definition at line 75 of file pciextra.c.
References PCI_CAP_NEXT, pci_find_capability_common(), and pci_read_config_byte().
Referenced by virtio_pci_find_capability().
unsigned long pci_bar_size | ( | struct pci_device * | pci, |
unsigned int | reg | ||
) |
Find the size of a PCI BAR.
pci | PCI device |
reg | PCI register number |
size | BAR size |
It should not be necessary for any Etherboot code to call this function.
Definition at line 92 of file pciextra.c.
References cmd, PCI_BASE_ADDRESS_IO_MASK, PCI_BASE_ADDRESS_MEM_MASK, PCI_BASE_ADDRESS_SPACE_IO, PCI_COMMAND, pci_read_config_dword(), pci_read_config_word(), pci_write_config_dword(), pci_write_config_word(), reg, size, and start.
Referenced by __vxge_hw_device_get_legacy_reg(), amd8111e_probe(), bnxt_pci_base(), efab_probe(), efx_probe(), ehci_probe(), exanic_probe(), forcedeth_map_regs(), gve_probe(), hvm_probe(), igbvf_probe(), phantom_map_crb(), tg3_init_one(), virtio_pci_map_capability(), vxge_probe(), and xhci_probe().
void pci_reset | ( | struct pci_device * | pci, |
unsigned int | exp | ||
) |
Perform PCI Express function-level reset (FLR)
pci | PCI device |
exp | PCI Express Capability address |
Definition at line 124 of file pciextra.c.
References control, mdelay(), NULL, pci_backup(), PCI_CONFIG_BACKUP_STANDARD, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_FLR, PCI_EXP_FLR_DELAY_MS, pci_read_config_word(), pci_restore(), and pci_write_config_word().
Referenced by ice_probe(), ice_remove(), intelxl_probe(), intelxl_remove(), intelxlvf_probe(), and intelxlvf_remove().