iPXE
Macros | Functions | Variables
null_pci.h File Reference

Null PCI API. More...

#include <stdint.h>

Go to the source code of this file.

Macros

#define PCIAPI_PREFIX_null   __null_
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
static __always_inline int PCIAPI_INLINE (null, pci_can_probe)(void)
 Check if PCI bus probing is allowed. More...
 
static __always_inline void PCIAPI_INLINE (null, pci_discover)(uint32_t busdevfn __unused
 Find next PCI bus:dev.fn address range in system. More...
 
static __always_inline int PCIAPI_INLINE (null, pci_read_config_byte)(struct pci_device *pci __unused
 Read byte from PCI configuration space via PCI BIOS. More...
 
static __always_inline int PCIAPI_INLINE (null, pci_read_config_word)(struct pci_device *pci __unused
 Read word from PCI configuration space via PCI BIOS. More...
 
static __always_inline int PCIAPI_INLINE (null, pci_read_config_dword)(struct pci_device *pci __unused
 Read dword from PCI configuration space via PCI BIOS. More...
 
static __always_inline int PCIAPI_INLINE (null, pci_write_config_byte)(struct pci_device *pci __unused
 Write byte to PCI configuration space via PCI BIOS. More...
 
static __always_inline int PCIAPI_INLINE (null, pci_write_config_word)(struct pci_device *pci __unused
 Write word to PCI configuration space via PCI BIOS. More...
 
static __always_inline int PCIAPI_INLINE (null, pci_write_config_dword)(struct pci_device *pci __unused
 Write dword to PCI configuration space via PCI BIOS. More...
 
static __always_inline void * PCIAPI_INLINE (null, pci_ioremap)(struct pci_device *pci __unused
 Map PCI bus address as an I/O address. More...
 

Variables

static __always_inline void struct pci_rangerange
 
range count = 0
 
static __always_inline int unsigned int where __unused
 
static __always_inline int unsigned int where uint8_tvalue
 
 return
 

Detailed Description

Null PCI API.

Definition in file null_pci.h.

Macro Definition Documentation

◆ PCIAPI_PREFIX_null

#define PCIAPI_PREFIX_null   __null_

Definition at line 17 of file null_pci.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ PCIAPI_INLINE() [1/9]

static __always_inline int PCIAPI_INLINE ( null  ,
pci_can_probe   
)
inlinestatic

Check if PCI bus probing is allowed.

Return values
okBus probing is allowed

Definition at line 28 of file null_pci.h.

28  {
29  return 0;
30 }

◆ PCIAPI_INLINE() [2/9]

static __always_inline void PCIAPI_INLINE ( null  ,
pci_discover   
)
inlinestatic

Find next PCI bus:dev.fn address range in system.

Parameters
busdevfnStarting PCI bus:dev.fn address
rangePCI bus:dev.fn address range to fill in

◆ PCIAPI_INLINE() [3/9]

static __always_inline int PCIAPI_INLINE ( null  ,
pci_read_config_byte   
)
inlinestatic

Read byte from PCI configuration space via PCI BIOS.

Parameters
pciPCI device
whereLocation within PCI configuration space
valueValue read
Return values
rcReturn status code

◆ PCIAPI_INLINE() [4/9]

static __always_inline int PCIAPI_INLINE ( null  ,
pci_read_config_word   
)
inlinestatic

Read word from PCI configuration space via PCI BIOS.

Parameters
pciPCI device
whereLocation within PCI configuration space
valueValue read
Return values
rcReturn status code

◆ PCIAPI_INLINE() [5/9]

static __always_inline int PCIAPI_INLINE ( null  ,
pci_read_config_dword   
)
inlinestatic

Read dword from PCI configuration space via PCI BIOS.

Parameters
pciPCI device
whereLocation within PCI configuration space
valueValue read
Return values
rcReturn status code

◆ PCIAPI_INLINE() [6/9]

static __always_inline int PCIAPI_INLINE ( null  ,
pci_write_config_byte   
)
inlinestatic

Write byte to PCI configuration space via PCI BIOS.

Parameters
pciPCI device
whereLocation within PCI configuration space
valueValue to be written
Return values
rcReturn status code

◆ PCIAPI_INLINE() [7/9]

static __always_inline int PCIAPI_INLINE ( null  ,
pci_write_config_word   
)
inlinestatic

Write word to PCI configuration space via PCI BIOS.

Parameters
pciPCI device
whereLocation within PCI configuration space
valueValue to be written
Return values
rcReturn status code

◆ PCIAPI_INLINE() [8/9]

static __always_inline int PCIAPI_INLINE ( null  ,
pci_write_config_dword   
)
inlinestatic

Write dword to PCI configuration space via PCI BIOS.

Parameters
pciPCI device
whereLocation within PCI configuration space
valueValue to be written
Return values
rcReturn status code

◆ PCIAPI_INLINE() [9/9]

static __always_inline void* PCIAPI_INLINE ( null  ,
pci_ioremap   
)
inlinestatic

Map PCI bus address as an I/O address.

Parameters
bus_addrPCI bus address
lenLength of region
Return values
io_addrI/O address, or NULL on error

Variable Documentation

◆ range

__always_inline void struct pci_range* range
Initial value:
{
range->start = 0
uint32_t start
Starting bus:dev.fn address.
Definition: pci_io.h:23
static __always_inline void struct pci_range * range
Definition: null_pci.h:40

Definition at line 40 of file null_pci.h.

◆ count

range count = 0

Definition at line 43 of file null_pci.h.

◆ __unused

__always_inline void unsigned long bus_addr size_t len __unused
Initial value:
{
return 0

Definition at line 56 of file null_pci.h.

◆ value

__always_inline int unsigned int where uint32_t* value
Initial value:
{
*value = 0xff
static __always_inline int unsigned int where uint8_t * value
Definition: null_pci.h:57

Definition at line 57 of file null_pci.h.

◆ return

return

Definition at line 59 of file null_pci.h.