iPXE
|
PCI configuration space access via PCI BIOS. More...
#include <stdint.h>
Go to the source code of this file.
Macros | |
#define | PCIAPI_PREFIX_pcbios __pcbios_ |
#define | PCIBIOS_INSTALLATION_CHECK 0xb1010000 |
#define | PCIBIOS_READ_CONFIG_BYTE 0xb1080000 |
#define | PCIBIOS_READ_CONFIG_WORD 0xb1090000 |
#define | PCIBIOS_READ_CONFIG_DWORD 0xb10a0000 |
#define | PCIBIOS_WRITE_CONFIG_BYTE 0xb10b0000 |
#define | PCIBIOS_WRITE_CONFIG_WORD 0xb10c0000 |
#define | PCIBIOS_WRITE_CONFIG_DWORD 0xb10d0000 |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
int | pcibios_read (struct pci_device *pci, uint32_t command, uint32_t *value) |
Read configuration space via PCI BIOS. More... | |
int | pcibios_write (struct pci_device *pci, uint32_t command, uint32_t value) |
Write configuration space via PCI BIOS. More... | |
static __always_inline int | PCIAPI_INLINE (pcbios, pci_can_probe)(void) |
Check if PCI bus probing is allowed. More... | |
static __always_inline int | PCIAPI_INLINE (pcbios, pci_read_config_byte)(struct pci_device *pci |
Read byte from PCI configuration space via PCI BIOS. More... | |
static __always_inline int | PCIAPI_INLINE (pcbios, pci_read_config_word)(struct pci_device *pci |
Read word from PCI configuration space via PCI BIOS. More... | |
static __always_inline int | PCIAPI_INLINE (pcbios, pci_read_config_dword)(struct pci_device *pci |
Read dword from PCI configuration space via PCI BIOS. More... | |
static __always_inline int | PCIAPI_INLINE (pcbios, pci_write_config_byte)(struct pci_device *pci |
Write byte to PCI configuration space via PCI BIOS. More... | |
static __always_inline int | PCIAPI_INLINE (pcbios, pci_write_config_word)(struct pci_device *pci |
Write word to PCI configuration space via PCI BIOS. More... | |
static __always_inline int | PCIAPI_INLINE (pcbios, pci_write_config_dword)(struct pci_device *pci |
Write dword to PCI configuration space via PCI BIOS. More... | |
static __always_inline void * | PCIAPI_INLINE (pcbios, pci_ioremap)(struct pci_device *pci __unused |
Map PCI bus address as an I/O address. More... | |
Variables | |
static __always_inline int unsigned int | where |
static __always_inline int unsigned int uint8_t * | value |
int | rc = pcibios_read ( pci, PCIBIOS_READ_CONFIG_BYTE | where, &tmp ) |
static __always_inline void unsigned long | bus_addr |
static __always_inline void unsigned long size_t | len |
struct pci_api | pcibios_api |
PCI configuration space access via PCI BIOS.
Definition in file pcibios.h.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
int pcibios_read | ( | struct pci_device * | pci, |
uint32_t | command, | ||
uint32_t * | value | ||
) |
Read configuration space via PCI BIOS.
pci | PCI device |
command | PCI BIOS command |
value | Value read |
rc | Return status code |
Definition at line 77 of file pcibios.c.
References __asm__(), __volatile__(), pci_device::busdevfn, discard_D, REAL_CODE, status, and value.
int pcibios_write | ( | struct pci_device * | pci, |
uint32_t | command, | ||
uint32_t | value | ||
) |
Write configuration space via PCI BIOS.
pci | PCI device |
command | PCI BIOS command |
value | Value to be written |
rc | Return status code |
Definition at line 105 of file pcibios.c.
References __asm__(), __volatile__(), pci_device::busdevfn, discard_c, discard_D, REAL_CODE, status, and value.
|
inlinestatic |
|
inlinestatic |
Read byte from PCI configuration space via PCI BIOS.
pci | PCI device |
where | Location within PCI configuration space |
value | Value read |
rc | Return status code |
|
inlinestatic |
Read word from PCI configuration space via PCI BIOS.
pci | PCI device |
where | Location within PCI configuration space |
value | Value read |
rc | Return status code |
|
inlinestatic |
Read dword from PCI configuration space via PCI BIOS.
pci | PCI device |
where | Location within PCI configuration space |
value | Value read |
rc | Return status code |
|
inlinestatic |
Write byte to PCI configuration space via PCI BIOS.
pci | PCI device |
where | Location within PCI configuration space |
value | Value to be written |
rc | Return status code |
|
inlinestatic |
Write word to PCI configuration space via PCI BIOS.
pci | PCI device |
where | Location within PCI configuration space |
value | Value to be written |
rc | Return status code |
|
inlinestatic |
Write dword to PCI configuration space via PCI BIOS.
pci | PCI device |
where | Location within PCI configuration space |
value | Value to be written |
rc | Return status code |
|
inlinestatic |
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 |
static __always_inline int unsigned int where |
Definition at line 55 of file pcibios.h.
Referenced by ecam_read(), ecam_write(), pcicloud_read_config_byte(), pcicloud_read_config_dword(), pcicloud_read_config_word(), pcicloud_write_config_byte(), pcicloud_write_config_dword(), pcicloud_write_config_word(), and pcidirect_prepare().
__always_inline int unsigned int uint32_t value |
return rc = pcibios_read ( pci, PCIBIOS_READ_CONFIG_BYTE | where, &tmp ) |
__always_inline void unsigned long bus_addr |
Definition at line 154 of file pcibios.h.
Referenced by bus_to_virt(), efipci_ioremap(), IOAPI_INLINE(), ioremap_pages(), and pcicloud_ioremap().
__always_inline void unsigned long size_t len |
struct pci_api pcibios_api |
Definition at line 133 of file pcibios.c.
Referenced by pcicloud_init().