|
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) | |
| FILE_SECBOOT (PERMITTED) | |
| int | pcibios_read (struct pci_device *pci, uint32_t command, uint32_t *value) |
| Read configuration space via PCI BIOS. | |
| int | pcibios_write (struct pci_device *pci, uint32_t command, uint32_t value) |
| Write configuration space via PCI BIOS. | |
| static __always_inline int | PCIAPI_INLINE (pcbios, pci_can_probe)(struct pci_device *pci __unused) |
| Check if PCI bus probing is allowed. | |
| static __always_inline int | PCIAPI_INLINE (pcbios, pci_read_config_byte)(struct pci_device *pci |
| Read byte from PCI configuration space via PCI BIOS. | |
| static __always_inline int | PCIAPI_INLINE (pcbios, pci_read_config_word)(struct pci_device *pci |
| Read word from PCI configuration space via PCI BIOS. | |
| static __always_inline int | PCIAPI_INLINE (pcbios, pci_read_config_dword)(struct pci_device *pci |
| Read dword from PCI configuration space via PCI BIOS. | |
| static __always_inline int | PCIAPI_INLINE (pcbios, pci_write_config_byte)(struct pci_device *pci |
| Write byte to PCI configuration space via PCI BIOS. | |
| static __always_inline int | PCIAPI_INLINE (pcbios, pci_write_config_word)(struct pci_device *pci |
| Write word to PCI configuration space via PCI BIOS. | |
| static __always_inline int | PCIAPI_INLINE (pcbios, pci_write_config_dword)(struct pci_device *pci |
| Write dword to PCI configuration space via PCI BIOS. | |
| static __always_inline void * | PCIAPI_INLINE (pcbios, pci_ioremap)(struct pci_device *pci __unused |
| Map PCI bus address as an I/O address. | |
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 |
PCI configuration space access via PCI BIOS.
Definition in file pcibios.h.
| #define PCIBIOS_INSTALLATION_CHECK 0xb1010000 |
Definition at line 23 of file pcibios.h.
Referenced by pcibios_discover().
| #define PCIBIOS_READ_CONFIG_WORD 0xb1090000 |
Definition at line 25 of file pcibios.h.
Referenced by PCIAPI_INLINE().
| #define PCIBIOS_READ_CONFIG_DWORD 0xb10a0000 |
Definition at line 26 of file pcibios.h.
Referenced by PCIAPI_INLINE().
| #define PCIBIOS_WRITE_CONFIG_BYTE 0xb10b0000 |
Definition at line 27 of file pcibios.h.
Referenced by PCIAPI_INLINE().
| #define PCIBIOS_WRITE_CONFIG_WORD 0xb10c0000 |
Definition at line 28 of file pcibios.h.
Referenced by PCIAPI_INLINE().
| #define PCIBIOS_WRITE_CONFIG_DWORD 0xb10d0000 |
Definition at line 29 of file pcibios.h.
Referenced by PCIAPI_INLINE().
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
|
extern |
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.
Referenced by PCIAPI_INLINE(), and PCIAPI_INLINE().
|
extern |
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.
Referenced by PCIAPI_INLINE(), PCIAPI_INLINE(), and PCIAPI_INLINE().
|
inlinestatic |
Check if PCI bus probing is allowed.
| pci | PCI device |
| ok | Bus probing is allowed |
Definition at line 43 of file pcibios.h.
References __unused, and pci_can_probe().
|
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 |
References pci_read_config_byte().
|
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 |
References pci_read_config_word(), pcibios_read(), PCIBIOS_READ_CONFIG_WORD, rc, tmp, value, and where.
|
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 |
References pci_read_config_dword(), pcibios_read(), PCIBIOS_READ_CONFIG_DWORD, value, and where.
|
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 |
References pci_write_config_byte(), pcibios_write(), PCIBIOS_WRITE_CONFIG_BYTE, value, and where.
|
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 |
References pci_write_config_word(), pcibios_write(), PCIBIOS_WRITE_CONFIG_WORD, value, and where.
|
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 |
References pci_write_config_dword(), pcibios_write(), PCIBIOS_WRITE_CONFIG_DWORD, value, and where.
|
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 |
References __unused, and pci_ioremap().
| __always_inline int unsigned int where |
Definition at line 57 of file pcibios.h.
Referenced by ecam_read(), ecam_write(), efipci_read(), efipci_read(), efipci_read(), linux_pci_read(), linux_pci_write(), outb(), outw(), pci_read_config_byte(), pci_read_config_dword(), pci_read_config_word(), pci_write_config_byte(), pci_write_config_dword(), pci_write_config_word(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), PCIAPI_INLINE(), 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 156 of file pcibios.h.
Referenced by bus_to_phys(), bus_to_virt(), efipci_ioremap(), IOAPI_INLINE(), ioremap(), ioremap_pages(), pci_ioremap(), PCIAPI_INLINE(), and pcicloud_ioremap().
| __always_inline void unsigned long size_t len |