1 #ifndef _IPXE_EFI_PCI_API_H 2 #define _IPXE_EFI_PCI_API_H 13 #define PCIAPI_PREFIX_efi 15 #define PCIAPI_PREFIX_efi __efi_ 19 #define EFIPCI_WIDTH_BYTE 0 20 #define EFIPCI_WIDTH_WORD 1 21 #define EFIPCI_WIDTH_DWORD 2 23 #define EFIPCI_LOCATION( _offset, _width ) \ 24 ( (_offset) | ( (_width) << 16 ) ) 25 #define EFIPCI_OFFSET( _location ) ( (_location) & 0xffff ) 26 #define EFIPCI_WIDTH( _location ) ( (_location) >> 16 ) 33 unsigned long value );
93 *
value = 0xffffffffUL;
int pci_write_config_word(struct pci_device *pci, unsigned int where, uint16_t value)
Write 16-bit word to PCI configuration space.
int pci_can_probe(void)
Check if PCI bus probing is allowed.
int pci_read_config_word(struct pci_device *pci, unsigned int where, uint16_t *value)
Read 16-bit word from PCI configuration space.
#define EFIPCI_WIDTH_BYTE
int efipci_read(struct pci_device *pci, unsigned long location, void *value)
Read from PCI configuration space.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
int pci_read_config_dword(struct pci_device *pci, unsigned int where, uint32_t *value)
Read 32-bit dword from PCI configuration space.
static __always_inline int PCIAPI_INLINE(efi, pci_can_probe)(void)
Check if PCI bus probing is allowed.
#define EFIPCI_WIDTH_DWORD
int pci_write_config_byte(struct pci_device *pci, unsigned int where, uint8_t value)
Write byte to PCI configuration space.
#define __always_inline
Declare a function to be always inline.
static __always_inline int unsigned int where
int pci_write_config_dword(struct pci_device *pci, unsigned int where, uint32_t value)
Write 32-bit dword to PCI configuration space.
#define EFIPCI_LOCATION(_offset, _width)
#define EFIPCI_WIDTH_WORD
static __always_inline int unsigned int uint8_t * value
int efipci_write(struct pci_device *pci, unsigned long location, unsigned long value)
Write to PCI configuration space.
int pci_read_config_byte(struct pci_device *pci, unsigned int where, uint8_t *value)
Read byte from PCI configuration space.