iPXE
|
Cloud VM PCI configuration space access. More...
#include <stdint.h>
#include <ipxe/init.h>
#include <ipxe/pci.h>
#include <ipxe/ecam.h>
#include <ipxe/pcibios.h>
#include <ipxe/pcidirect.h>
#include <ipxe/pcicloud.h>
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static void | pcicloud_discover (uint32_t busdevfn, struct pci_range *range) |
Find next PCI bus:dev.fn address range in system. 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_INLINE (cloud, pci_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) | |
static void | pcicloud_init (void) |
Initialise cloud VM PCI configuration space access. More... | |
struct init_fn pcicloud_init_fn | __init_fn (INIT_EARLY) |
Cloud VM PCI configuration space access initialisation function. More... | |
Variables | |
static struct pci_api * | pcicloud = &ecam_api |
Selected PCI configuration space access API. More... | |
Cloud VM PCI configuration space access.
Definition in file pcicloud.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
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 49 of file pcicloud.c.
References busdevfn, pci_api::pci_discover, pcicloud, and range.
|
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 62 of file pcicloud.c.
References pci_api::pci_read_config_byte, pcicloud, value, and where.
|
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 76 of file pcicloud.c.
References pci_api::pci_read_config_word, pcicloud, value, and where.
|
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 90 of file pcicloud.c.
References pci_api::pci_read_config_dword, pcicloud, value, and where.
|
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 104 of file pcicloud.c.
References pci_api::pci_write_config_byte, pcicloud, value, and where.
|
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 118 of file pcicloud.c.
References pci_api::pci_write_config_word, pcicloud, value, and where.
|
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 132 of file pcicloud.c.
References pci_api::pci_write_config_dword, pcicloud, value, and where.
|
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 145 of file pcicloud.c.
References bus_addr, len, pci_api::pci_ioremap, and pcicloud.
PROVIDE_PCIAPI_INLINE | ( | cloud | , |
pci_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 | |||
) |
|
static |
Initialise cloud VM PCI configuration space access.
Definition at line 165 of file pcicloud.c.
References busdevfn, DBGC, ecam_api, pci_api::name, PCI_ARGS, pci_find_next(), PCI_FMT, pcibios_api, pcicloud, pcidirect_api, and rc.
struct init_fn pcicloud_init_fn __init_fn | ( | INIT_EARLY | ) |
Cloud VM PCI configuration space access initialisation function.
Selected PCI configuration space access API.
Definition at line 41 of file pcicloud.c.
Referenced by pcicloud_discover(), pcicloud_init(), 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().