iPXE
|
PCI Enhanced Allocation. More...
#include <ipxe/pci.h>
Go to the source code of this file.
Macros | |
#define | PCIEA_ENTRIES 2 |
Number of entries. More... | |
#define | PCIEA_ENTRIES_MASK 0x3f |
#define | PCIEA_FIRST 4 |
First entry. More... | |
#define | PCIEA_DESC 0 |
Entry descriptor. More... | |
#define | PCIEA_DESC_SIZE(desc) ( ( (desc) >> 0 ) & 0x7 ) |
Entry size. More... | |
#define | PCIEA_DESC_BEI(desc) ( ( (desc) >> 4 ) & 0xf ) |
BAR equivalent indicator. More... | |
#define | PCIEA_DESC_ENABLED 0x80000000UL |
Entry is enabled. More... | |
#define | PCIEA_LOW_BASE 4 |
Base address low dword. More... | |
#define | PCIEA_LOW_LIMIT 8 |
Limit low dword. More... | |
#define | PCIEA_LOW_ATTR_64BIT 0x00000002UL |
BAR is 64-bit. More... | |
#define | PCIEA_LOW_ATTR_MASK 0x00000003UL |
Low dword attribute bit mask. More... | |
#define | PCIEA_LOW_HIGH 8 |
Offset to high dwords. More... | |
Enumerations | |
enum | pciea_bei { PCIEA_BEI_BAR_0 = 0, PCIEA_BEI_BAR_1 = 1, PCIEA_BEI_BAR_2 = 2, PCIEA_BEI_BAR_3 = 3, PCIEA_BEI_BAR_4 = 4, PCIEA_BEI_BAR_5 = 5, PCIEA_BEI_ROM = 8, PCIEA_BEI_VF_BAR_0 = 9, PCIEA_BEI_VF_BAR_1 = 10, PCIEA_BEI_VF_BAR_2 = 11, PCIEA_BEI_VF_BAR_3 = 12, PCIEA_BEI_VF_BAR_4 = 13, PCIEA_BEI_VF_BAR_5 = 14 } |
BAR equivalent indicators. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
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.h.
#define PCIEA_LOW_ATTR_MASK 0x00000003UL |
enum pciea_bei |
BAR equivalent indicators.
Definition at line 31 of file pciea.h.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
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().