|
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. | |
| #define | PCIEA_ENTRIES_MASK 0x3f |
| #define | PCIEA_FIRST 4 |
| First entry. | |
| #define | PCIEA_DESC 0 |
| Entry descriptor. | |
| #define | PCIEA_DESC_SIZE(desc) |
| Entry size. | |
| #define | PCIEA_DESC_BEI(desc) |
| BAR equivalent indicator. | |
| #define | PCIEA_DESC_ENABLED 0x80000000UL |
| Entry is enabled. | |
| #define | PCIEA_LOW_BASE 4 |
| Base address low dword. | |
| #define | PCIEA_LOW_LIMIT 8 |
| Limit low dword. | |
| #define | PCIEA_LOW_ATTR_64BIT 0x00000002UL |
| BAR is 64-bit. | |
| #define | PCIEA_LOW_ATTR_MASK 0x00000003UL |
| Low dword attribute bit mask. | |
| #define | PCIEA_LOW_HIGH 8 |
| Offset to high dwords. | |
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. | |
| unsigned long | pciea_bar_size (struct pci_device *pci, unsigned int bei) |
| Find the size of a PCI Enhanced Allocation BAR equivalent. | |
PCI Enhanced Allocation.
Definition in file pciea.h.
| #define PCIEA_ENTRIES 2 |
| #define PCIEA_ENTRIES_MASK 0x3f |
Definition at line 16 of file pciea.h.
Referenced by pciea_offset().
| #define PCIEA_FIRST 4 |
| #define PCIEA_DESC_SIZE | ( | desc | ) |
| #define PCIEA_DESC_BEI | ( | desc | ) |
BAR equivalent indicator.
Definition at line 28 of file pciea.h.
Referenced by pciea_offset().
| #define PCIEA_DESC_ENABLED 0x80000000UL |
| #define PCIEA_LOW_BASE 4 |
| #define PCIEA_LOW_LIMIT 8 |
| #define PCIEA_LOW_ATTR_64BIT 0x00000002UL |
| #define PCIEA_LOW_ATTR_MASK 0x00000003UL |
Low dword attribute bit mask.
Definition at line 60 of file pciea.h.
Referenced by pciea_bar_size(), and pciea_bar_start().
| #define PCIEA_LOW_HIGH 8 |
| enum pciea_bei |
BAR equivalent indicators.
Definition at line 31 of file pciea.h.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
extern |
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().
|
extern |
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().