iPXE
|
PCI Enhanced Allocation. More...
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static int | pciea_offset (struct pci_device *pci, unsigned int bei) |
Locate PCI Enhanced Allocation BAR equivalent entry. More... | |
static unsigned long | pciea_bar_value (struct pci_device *pci, unsigned int bei, unsigned int low_offset) |
Read PCI Enhanced Allocation BAR equivalent value. More... | |
unsigned long | pciea_bar_start (struct pci_device *pci, unsigned int bei) |
Find the start of a PCI Enhanced Allocation BAR equivalent. More... | |
unsigned long | pciea_bar_size (struct pci_device *pci, unsigned int bei) |
Find the size of a PCI Enhanced Allocation BAR equivalent. More... | |
PCI Enhanced Allocation.
Definition in file pciea.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Locate PCI Enhanced Allocation BAR equivalent entry.
pci | PCI device |
bei | BAR equivalent indicator |
offset | PCI Enhanced Allocation entry offset, or negative error |
Definition at line 44 of file pciea.c.
References ENOENT, offset, PCI_CAP_ID_EA, pci_find_capability(), pci_read_config_byte(), pci_read_config_dword(), PCIEA_DESC_BEI, PCIEA_DESC_ENABLED, PCIEA_DESC_SIZE, PCIEA_ENTRIES, PCIEA_ENTRIES_MASK, and PCIEA_FIRST.
Referenced by pciea_bar_value().
|
static |
Read PCI Enhanced Allocation BAR equivalent value.
pci | PCI device |
bei | BAR equivalent indicator |
low_offset | Offset to low dword of value |
value | BAR equivalent value |
Definition at line 88 of file pciea.c.
References DBGC, high, low, offset, PCI_ARGS, PCI_FMT, pci_read_config_dword(), PCIEA_LOW_ATTR_64BIT, PCIEA_LOW_HIGH, and pciea_offset().
Referenced by pciea_bar_size(), and pciea_bar_start().
unsigned long pciea_bar_start | ( | struct pci_device * | pci, |
unsigned int | bei | ||
) |
Find the start of a PCI Enhanced Allocation BAR equivalent.
pci | PCI device |
bei | BAR equivalent indicator |
start | BAR start address |
If the address exceeds the size of an unsigned long (i.e. if a 64-bit BAR has a non-zero high dword on a 32-bit machine), the return value will be zero.
Definition at line 130 of file pciea.c.
References base, pciea_bar_value(), PCIEA_LOW_ATTR_MASK, and PCIEA_LOW_BASE.
Referenced by txnic_bgx_probe(), and txnic_pf_probe().
unsigned long pciea_bar_size | ( | struct pci_device * | pci, |
unsigned int | bei | ||
) |
Find the size of a PCI Enhanced Allocation BAR equivalent.
pci | PCI device |
bei | BAR equivalent indicator |
size | BAR size |
Definition at line 144 of file pciea.c.
References limit, pciea_bar_value(), PCIEA_LOW_ATTR_MASK, and PCIEA_LOW_LIMIT.
Referenced by txnic_pf_probe().