|
iPXE
|
PCI configuration space access via Type 1 accesses. More...
Go to the source code of this file.
Macros | |
| #define | PCIAPI_PREFIX_direct __direct_ |
| #define | PCIDIRECT_CONFIG_ADDRESS 0xcf8 |
| #define | PCIDIRECT_CONFIG_DATA 0xcfc |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| void | pcidirect_prepare (struct pci_device *pci, int where) |
| Prepare for Type 1 PCI configuration space access. More... | |
| static __always_inline int | PCIAPI_INLINE (direct, pci_can_probe)(struct pci_device *pci __unused) |
| Check if PCI bus probing is allowed. More... | |
| static __always_inline void | PCIAPI_INLINE (direct, pci_discover)(uint32_t busdevfn __unused |
| Find next PCI bus:dev.fn address range in system. More... | |
| static __always_inline int | PCIAPI_INLINE (direct, pci_read_config_byte)(struct pci_device *pci |
| Read byte from PCI configuration space via Type 1 access. More... | |
| static __always_inline int | PCIAPI_INLINE (direct, pci_read_config_word)(struct pci_device *pci |
| Read word from PCI configuration space via Type 1 access. More... | |
| static __always_inline int | PCIAPI_INLINE (direct, pci_read_config_dword)(struct pci_device *pci |
| Read dword from PCI configuration space via Type 1 access. More... | |
| static __always_inline int | PCIAPI_INLINE (direct, pci_write_config_byte)(struct pci_device *pci |
| Write byte to PCI configuration space via Type 1 access. More... | |
| outb (value, PCIDIRECT_CONFIG_DATA+(where &3)) | |
| static __always_inline int | PCIAPI_INLINE (direct, pci_write_config_word)(struct pci_device *pci |
| Write word to PCI configuration space via Type 1 access. More... | |
| outw (value, PCIDIRECT_CONFIG_DATA+(where &2)) | |
| static __always_inline int | PCIAPI_INLINE (direct, pci_write_config_dword)(struct pci_device *pci |
| Write dword to PCI configuration space via Type 1 access. More... | |
| outl (value, PCIDIRECT_CONFIG_DATA) | |
| static __always_inline void * | PCIAPI_INLINE (direct, pci_ioremap)(struct pci_device *pci __unused |
| Map PCI bus address as an I/O address. More... | |
Variables | |
| static __always_inline void struct pci_range * | range |
| range | count = PCI_BUSDEVFN ( 0, 1, 0, 0 ) |
| static __always_inline int unsigned int | where |
| static __always_inline int unsigned int uint8_t * | value |
| return | |
| static __always_inline void unsigned long | bus_addr |
| static __always_inline void unsigned long size_t | len |
PCI configuration space access via Type 1 accesses.
Definition in file pcidirect.h.
| #define PCIAPI_PREFIX_direct __direct_ |
Definition at line 12 of file pcidirect.h.
| #define PCIDIRECT_CONFIG_ADDRESS 0xcf8 |
Definition at line 21 of file pcidirect.h.
| #define PCIDIRECT_CONFIG_DATA 0xcfc |
Definition at line 22 of file pcidirect.h.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| void pcidirect_prepare | ( | struct pci_device * | pci, |
| int | where | ||
| ) |
Prepare for Type 1 PCI configuration space access.
| pci | PCI device |
| where | Location within PCI configuration space |
Definition at line 41 of file pcidirect.c.
References busdevfn, pci_device::busdevfn, outl, PCIDIRECT_CONFIG_ADDRESS, and where.
|
inlinestatic |
Check if PCI bus probing is allowed.
| pci | PCI device |
| ok | Bus probing is allowed |
Definition at line 35 of file pcidirect.h.
|
inlinestatic |
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 |
|
inlinestatic |
Read byte from PCI configuration space via Type 1 access.
| pci | PCI device |
| where | Location within PCI configuration space |
| value | Value read |
| rc | Return status code |
|
inlinestatic |
Read word from PCI configuration space via Type 1 access.
| pci | PCI device |
| where | Location within PCI configuration space |
| value | Value read |
| rc | Return status code |
|
inlinestatic |
Read dword from PCI configuration space via Type 1 access.
| pci | PCI device |
| where | Location within PCI configuration space |
| value | Value read |
| rc | Return status code |
|
inlinestatic |
Write byte to PCI configuration space via Type 1 access.
| pci | PCI device |
| where | Location within PCI configuration space |
| value | Value to be written |
| rc | Return status code |
| outb | ( | value | , |
| PCIDIRECT_CONFIG_DATA+ | where &3 | ||
| ) |
|
inlinestatic |
Write word to PCI configuration space via Type 1 access.
| pci | PCI device |
| where | Location within PCI configuration space |
| value | Value to be written |
| rc | Return status code |
| outw | ( | value | , |
| PCIDIRECT_CONFIG_DATA+ | where &2 | ||
| ) |
|
inlinestatic |
Write dword to PCI configuration space via Type 1 access.
| pci | PCI device |
| where | Location within PCI configuration space |
| value | Value to be written |
| rc | Return status code |
| outl | ( | value | , |
| PCIDIRECT_CONFIG_DATA | |||
| ) |
|
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 |
| __always_inline void struct pci_range* range |
Definition at line 47 of file pcidirect.h.
| range count = PCI_BUSDEVFN ( 0, 1, 0, 0 ) |
Definition at line 51 of file pcidirect.h.
| __always_inline int unsigned int where |
Definition at line 64 of file pcidirect.h.
| __always_inline int unsigned int uint32_t value |
Definition at line 65 of file pcidirect.h.
| return |
Definition at line 68 of file pcidirect.h.
| __always_inline void unsigned long bus_addr |
Definition at line 165 of file pcidirect.h.
| __always_inline void unsigned long size_t len |
Definition at line 165 of file pcidirect.h.
1.8.15