|
iPXE
|
Cloud VM PCI configuration space access. More...
Go to the source code of this file.
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| static struct pci_api * | pcicloud_find (uint32_t busdevfn, struct pci_range *range) |
| Find PCI configuration space access API for address. | |
| static void | pcicloud_discover (uint32_t busdevfn, struct pci_range *range) |
| Find next PCI bus:dev.fn address range in system. | |
| static struct pci_api * | pcicloud_api (struct pci_device *pci) |
| Find configuration space access API for PCI device. | |
| static int | pcicloud_can_probe (struct pci_device *pci) |
| Check if PCI bus probing is allowed. | |
| static int | pcicloud_read_config_byte (struct pci_device *pci, unsigned int where, uint8_t *value) |
| Read byte from PCI configuration space. | |
| static int | pcicloud_read_config_word (struct pci_device *pci, unsigned int where, uint16_t *value) |
| Read 16-bit word from PCI configuration space. | |
| static int | pcicloud_read_config_dword (struct pci_device *pci, unsigned int where, uint32_t *value) |
| Read 32-bit dword from PCI configuration space. | |
| static int | pcicloud_write_config_byte (struct pci_device *pci, unsigned int where, uint8_t value) |
| Write byte to PCI configuration space. | |
| static int | pcicloud_write_config_word (struct pci_device *pci, unsigned int where, uint16_t value) |
| Write 16-bit word to PCI configuration space. | |
| static int | pcicloud_write_config_dword (struct pci_device *pci, unsigned int where, uint32_t value) |
| Write 32-bit dword to PCI configuration space. | |
| static void * | pcicloud_ioremap (struct pci_device *pci, unsigned long bus_addr, size_t len) |
| Map PCI bus address as an I/O address. | |
| PROVIDE_PCIAPI (cloud, pci_can_probe, pcicloud_can_probe) | |
| PROVIDE_PCIAPI (cloud, pci_discover, pcicloud_discover) | |
| PROVIDE_PCIAPI (cloud, pci_read_config_byte, pcicloud_read_config_byte) | |
| PROVIDE_PCIAPI (cloud, pci_read_config_word, pcicloud_read_config_word) | |
| PROVIDE_PCIAPI (cloud, pci_read_config_dword, pcicloud_read_config_dword) | |
| PROVIDE_PCIAPI (cloud, pci_write_config_byte, pcicloud_write_config_byte) | |
| PROVIDE_PCIAPI (cloud, pci_write_config_word, pcicloud_write_config_word) | |
| PROVIDE_PCIAPI (cloud, pci_write_config_dword, pcicloud_write_config_dword) | |
| PROVIDE_PCIAPI (cloud, pci_ioremap, pcicloud_ioremap) | |
Variables | |
| struct { | |
| struct pci_range range | |
| PCI bus:dev.fn address range. More... | |
| struct pci_api * api | |
| API for this bus:dev.fn address. More... | |
| } | pcicloud |
| Cached PCI configuration space access API. | |
Cloud VM PCI configuration space access.
Definition in file pcicloud.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
Find PCI configuration space access API for address.
| busdevfn | Starting PCI bus:dev.fn address |
| range | PCI bus:dev.fn address range to fill in |
| api | Configuration space access API, or NULL |
Definition at line 52 of file pcicloud.c.
References api, busdevfn, pci_range::count, DBGC, first, for_each_table_entry, index, memcpy(), NULL, PCI_APIS, PCI_BUS, PCI_FMT, PCI_FUNC, PCI_SEG, PCI_SLOT, pcicloud, range, and pci_range::start.
Referenced by pcicloud_api(), and pcicloud_discover().
Find next PCI bus:dev.fn address range in system.
| busdevfn | Starting PCI bus:dev.fn address |
| range | PCI bus:dev.fn address range to fill in |
Definition at line 100 of file pcicloud.c.
References busdevfn, pcicloud_find(), and range.
Referenced by PROVIDE_PCIAPI().
|
static |
Find configuration space access API for PCI device.
| pci | PCI device |
| api | Configuration space access API |
Definition at line 112 of file pcicloud.c.
References api, pci_device::busdevfn, DBGC, first, PCI_APIS, PCI_BUS, PCI_FMT, PCI_FUNC, PCI_SEG, PCI_SLOT, pcicloud, pcicloud_find(), range, and table_end.
Referenced by pcicloud_can_probe(), pcicloud_ioremap(), pcicloud_read_config_byte(), pcicloud_read_config_dword(), pcicloud_read_config_word(), pcicloud_write_config_byte(), pcicloud_write_config_dword(), and pcicloud_write_config_word().
|
static |
Check if PCI bus probing is allowed.
| pci | PCI device |
| ok | Bus probing is allowed |
Definition at line 151 of file pcicloud.c.
References api, and pcicloud_api().
Referenced by PROVIDE_PCIAPI().
|
static |
Read byte from PCI configuration space.
| pci | PCI device |
| where | Location within PCI configuration space |
| value | Value read |
| rc | Return status code |
Definition at line 165 of file pcicloud.c.
References api, pcicloud_api(), value, and where.
Referenced by PROVIDE_PCIAPI().
|
static |
Read 16-bit word from PCI configuration space.
| pci | PCI device |
| where | Location within PCI configuration space |
| value | Value read |
| rc | Return status code |
Definition at line 180 of file pcicloud.c.
References api, pcicloud_api(), value, and where.
Referenced by PROVIDE_PCIAPI().
|
static |
Read 32-bit dword from PCI configuration space.
| pci | PCI device |
| where | Location within PCI configuration space |
| value | Value read |
| rc | Return status code |
Definition at line 195 of file pcicloud.c.
References api, pcicloud_api(), value, and where.
Referenced by PROVIDE_PCIAPI().
|
static |
Write byte to PCI configuration space.
| pci | PCI device |
| where | Location within PCI configuration space |
| value | Value to be written |
| rc | Return status code |
Definition at line 210 of file pcicloud.c.
References api, pcicloud_api(), value, and where.
Referenced by PROVIDE_PCIAPI().
|
static |
Write 16-bit word to PCI configuration space.
| pci | PCI device |
| where | Location within PCI configuration space |
| value | Value to be written |
| rc | Return status code |
Definition at line 225 of file pcicloud.c.
References api, pcicloud_api(), value, and where.
Referenced by PROVIDE_PCIAPI().
|
static |
Write 32-bit dword to PCI configuration space.
| pci | PCI device |
| where | Location within PCI configuration space |
| value | Value to be written |
| rc | Return status code |
Definition at line 240 of file pcicloud.c.
References api, pcicloud_api(), value, and where.
Referenced by PROVIDE_PCIAPI().
|
static |
Map PCI bus address as an I/O address.
| bus_addr | PCI bus address |
| len | Length of region |
| io_addr | I/O address, or NULL on error |
Definition at line 254 of file pcicloud.c.
References api, bus_addr, len, and pcicloud_api().
Referenced by PROVIDE_PCIAPI().
| PROVIDE_PCIAPI | ( | cloud | , |
| pci_can_probe | , | ||
| pcicloud_can_probe | ) |
References pci_can_probe(), and pcicloud_can_probe().
| PROVIDE_PCIAPI | ( | cloud | , |
| pci_discover | , | ||
| pcicloud_discover | ) |
References pci_discover(), and pcicloud_discover().
| PROVIDE_PCIAPI | ( | cloud | , |
| pci_read_config_byte | , | ||
| pcicloud_read_config_byte | ) |
References pci_read_config_byte(), and pcicloud_read_config_byte().
| PROVIDE_PCIAPI | ( | cloud | , |
| pci_read_config_word | , | ||
| pcicloud_read_config_word | ) |
References pci_read_config_word(), and pcicloud_read_config_word().
| PROVIDE_PCIAPI | ( | cloud | , |
| pci_read_config_dword | , | ||
| pcicloud_read_config_dword | ) |
References pci_read_config_dword(), and pcicloud_read_config_dword().
| PROVIDE_PCIAPI | ( | cloud | , |
| pci_write_config_byte | , | ||
| pcicloud_write_config_byte | ) |
References pci_write_config_byte(), and pcicloud_write_config_byte().
| PROVIDE_PCIAPI | ( | cloud | , |
| pci_write_config_word | , | ||
| pcicloud_write_config_word | ) |
References pci_write_config_word(), and pcicloud_write_config_word().
| PROVIDE_PCIAPI | ( | cloud | , |
| pci_write_config_dword | , | ||
| pcicloud_write_config_dword | ) |
References pci_write_config_dword(), and pcicloud_write_config_dword().
| PROVIDE_PCIAPI | ( | cloud | , |
| pci_ioremap | , | ||
| pcicloud_ioremap | ) |
References pci_ioremap(), and pcicloud_ioremap().
| struct pci_range range |
PCI bus:dev.fn address range.
Definition at line 40 of file pcicloud.c.
Referenced by ar9003_hw_spur_mitigate_mrc_cck(), ar9003_hw_spur_mitigate_ofdm(), ecam_discover(), ecam_find(), efipci_discover(), efipci_discover_any(), efipci_discover_one(), efipci_root_open(), http_block_read(), http_open(), pci_discover(), pci_find_next(), pcibios_discover(), pcicloud_api(), pcicloud_discover(), pcicloud_find(), peerblk_raw_open(), vmbus_establish_gpadl(), and vmbus_send_data().
| struct pci_api* api |
API for this bus:dev.fn address.
Definition at line 42 of file pcicloud.c.
Referenced by ice_admin_version(), intelxl_admin_version(), intelxlvf_admin_version(), pcicloud_api(), pcicloud_can_probe(), pcicloud_find(), pcicloud_ioremap(), pcicloud_read_config_byte(), pcicloud_read_config_dword(), pcicloud_read_config_word(), pcicloud_write_config_byte(), pcicloud_write_config_dword(), and pcicloud_write_config_word().
| struct { ... } pcicloud |
Cached PCI configuration space access API.
Referenced by pcicloud_api(), and pcicloud_find().