|
| | 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. More...
|
| |
| static void | pcicloud_discover (uint32_t busdevfn, struct pci_range *range) |
| | Find next PCI bus:dev.fn address range in system. More...
|
| |
| static struct pci_api * | pcicloud_api (struct pci_device *pci) |
| | Find configuration space access API for PCI device. More...
|
| |
| static int | pcicloud_can_probe (struct pci_device *pci) |
| | Check if PCI bus probing is allowed. More...
|
| |
| static int | pcicloud_read_config_byte (struct pci_device *pci, unsigned int where, uint8_t *value) |
| | Read byte from PCI configuration space. More...
|
| |
| static int | pcicloud_read_config_word (struct pci_device *pci, unsigned int where, uint16_t *value) |
| | Read 16-bit word from PCI configuration space. More...
|
| |
| static int | pcicloud_read_config_dword (struct pci_device *pci, unsigned int where, uint32_t *value) |
| | Read 32-bit dword from PCI configuration space. More...
|
| |
| static int | pcicloud_write_config_byte (struct pci_device *pci, unsigned int where, uint8_t value) |
| | Write byte to PCI configuration space. More...
|
| |
| static int | pcicloud_write_config_word (struct pci_device *pci, unsigned int where, uint16_t value) |
| | Write 16-bit word to PCI configuration space. More...
|
| |
| static int | pcicloud_write_config_dword (struct pci_device *pci, unsigned int where, uint32_t value) |
| | Write 32-bit dword to PCI configuration space. More...
|
| |
| static void * | pcicloud_ioremap (struct pci_device *pci, unsigned long bus_addr, size_t len) |
| | Map PCI bus address as an I/O address. More...
|
| |
| | 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) |
| |
Cloud VM PCI configuration space access.
Definition in file pcicloud.c.
Find PCI configuration space access API for address.
- Parameters
-
| busdevfn | Starting PCI bus:dev.fn address |
| range | PCI bus:dev.fn address range to fill in |
- Return values
-
| api | Configuration space access API, or NULL |
Definition at line 52 of file pcicloud.c.
72 if ( (
index < candidate.count ) || (
index > best ) ) {
78 if (
index < candidate.count ) {
#define PCI_FUNC(busdevfn)
uint32_t start
Starting bus:dev.fn address.
#define PCI_BUS(busdevfn)
typeof() pci_discover * pci_discover
struct pci_range range
PCI bus:dev.fn address range.
uint32_t first
First block in range.
struct pci_api * api
API for this bus:dev.fn address.
#define PCI_APIS
Runtime selectable PCI API table.
uint16_t busdevfn
PCI bus:dev.fn address.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
A PCI bus:dev.fn address range.
#define PCI_FMT
PCI device debug message format.
#define PCI_SLOT(busdevfn)
A runtime selectable PCI I/O API.
#define for_each_table_entry(pointer, table)
Iterate through all entries within a linker table.
unsigned int count
Number of bus:dev.fn addresses within this range.
#define PCI_SEG(busdevfn)
#define NULL
NULL pointer (VOID *)
static struct @8 pcicloud
Cached PCI configuration space access API.
References api, busdevfn, pci_range::count, DBGC, first, for_each_table_entry, index, memcpy(), pci_api::name, NULL, PCI_APIS, PCI_BUS, pci_api::pci_discover, PCI_FMT, PCI_FUNC, PCI_SEG, PCI_SLOT, pcicloud, range, and pci_range::start.
Referenced by pcicloud_api(), and pcicloud_discover().
Find configuration space access API for PCI device.
- Parameters
-
- Return values
-
| api | Configuration space access API |
Definition at line 112 of file pcicloud.c.
#define PCI_FUNC(busdevfn)
uint32_t start
Starting bus:dev.fn address.
#define PCI_BUS(busdevfn)
struct pci_range range
PCI bus:dev.fn address range.
uint32_t first
First block in range.
struct pci_api * api
API for this bus:dev.fn address.
#define PCI_APIS
Runtime selectable PCI API table.
A PCI bus:dev.fn address range.
static struct pci_api * pcicloud_find(uint32_t busdevfn, struct pci_range *range)
Find PCI configuration space access API for address.
#define PCI_FMT
PCI device debug message format.
#define PCI_SLOT(busdevfn)
A runtime selectable PCI I/O API.
unsigned int count
Number of bus:dev.fn addresses within this range.
uint32_t busdevfn
Segment, bus, device, and function (bus:dev.fn) number.
#define table_end(table)
Get end of linker table.
#define PCI_SEG(busdevfn)
static struct @8 pcicloud
Cached PCI configuration space access API.
References api, pci_device::busdevfn, pci_range::count, DBGC, first, pci_api::name, PCI_APIS, PCI_BUS, PCI_FMT, PCI_FUNC, PCI_SEG, PCI_SLOT, pcicloud, pcicloud_find(), range, pci_range::start, 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().