Macros | Functions
iomap.h File Reference

iPXE I/O mapping API More...

#include <stdint.h>
#include <ipxe/api.h>
#include <config/ioapi.h>
#include <ipxe/uaccess.h>
#include <ipxe/iomap_virt.h>
#include <bits/iomap.h>

Go to the source code of this file.


#define IOMAP_INLINE(_subsys, _api_func)   SINGLE_API_INLINE ( IOMAP_PREFIX_ ## _subsys, _api_func )
 Calculate static inline I/O mapping API function name. More...
#define PROVIDE_IOMAP(_subsys, _api_func, _func)   PROVIDE_SINGLE_API ( IOMAP_PREFIX_ ## _subsys, _api_func, _func )
 Provide an I/O mapping API implementation. More...
#define PROVIDE_IOMAP_INLINE(_subsys, _api_func)   PROVIDE_SINGLE_API_INLINE ( IOMAP_PREFIX_ ## _subsys, _api_func )
 Provide a static inline I/O mapping API implementation. More...


void * ioremap (unsigned long bus_addr, size_t len)
 Map bus address as an I/O address. More...
void iounmap (volatile const void *io_addr)
 Unmap I/O address. More...
unsigned long io_to_bus (volatile const void *io_addr)
 Convert I/O address to bus address (for debug only) More...

Detailed Description

iPXE I/O mapping API

The I/O mapping API provides methods for mapping and unmapping I/O devices.

Definition in file iomap.h.

Macro Definition Documentation


#define IOMAP_INLINE (   _subsys,
)    SINGLE_API_INLINE ( IOMAP_PREFIX_ ## _subsys, _api_func )

Calculate static inline I/O mapping API function name.

_prefixSubsystem prefix
_api_funcAPI function
Return values
_subsys_funcSubsystem API function

Definition at line 26 of file iomap.h.


#define PROVIDE_IOMAP (   _subsys,
)    PROVIDE_SINGLE_API ( IOMAP_PREFIX_ ## _subsys, _api_func, _func )

Provide an I/O mapping API implementation.

_prefixSubsystem prefix
_api_funcAPI function
_funcImplementing function

Definition at line 36 of file iomap.h.


#define PROVIDE_IOMAP_INLINE (   _subsys,
)    PROVIDE_SINGLE_API_INLINE ( IOMAP_PREFIX_ ## _subsys, _api_func )

Provide a static inline I/O mapping API implementation.

_prefixSubsystem prefix
_api_funcAPI function

Definition at line 45 of file iomap.h.

Function Documentation



◆ ioremap()

void* ioremap ( unsigned long  bus_addr,
size_t  len 

Map bus address as an I/O address.

bus_addrBus address
lenLength of region
Return values
io_addrI/O address

Referenced by efipci_ioremap().

◆ iounmap()

void iounmap ( volatile const void *  io_addr)

Unmap I/O address.

io_addrI/O address

Referenced by amd8111e_disable(), arbel_probe(), arbel_remove(), ath5k_probe(), ath5k_remove(), ath_pci_probe(), ath_pci_remove(), b44_probe(), b44_remove(), bnx2_disable(), bnxt_down_pci(), efab_probe(), efab_remove(), efx_remove(), ehci_probe(), ehci_remove(), ena_probe(), ena_remove(), exanic_probe(), exanic_remove(), flexboot_nodnic_dealloc_uar(), forcedeth_probe(), forcedeth_remove(), golan_probe_normal(), golan_remove_normal(), hermon_bofm_probe(), hermon_bofm_remove(), hermon_probe(), hermon_remove(), hvm_ioremap(), hvm_iounmap(), hvm_unmap_xenstore(), icplus_probe(), icplus_remove(), igbvf_probe(), igbvf_remove(), intel_probe(), intel_remove(), intelx_probe(), intelx_remove(), intelxl_probe(), intelxl_remove(), intelxlvf_probe(), intelxlvf_remove(), intelxvf_probe(), intelxvf_remove(), jme_probe(), jme_remove(), linda_probe(), linda_remove(), mlx_pci_teardown_priv(), myson_probe(), myson_remove(), natsemi_probe(), natsemi_remove(), pci_msix_disable(), pci_msix_enable(), qib7322_probe(), qib7322_remove(), rdc_probe(), rdc_remove(), realtek_probe(), realtek_remove(), sis190_probe(), sis190_remove(), skeleton_probe(), skeleton_remove(), skge_probe(), skge_remove(), sky2_probe(), sky2_remove(), tg3_init_one(), txnic_alloc(), txnic_bgx_probe(), txnic_bgx_remove(), txnic_free(), txnic_pf_probe(), txnic_pf_remove(), virtio_pci_unmap_capability(), vmxnet3_probe(), vmxnet3_remove(), vxge_probe(), vxge_remove(), xhci_probe(), and xhci_remove().

◆ io_to_bus()

unsigned long io_to_bus ( volatile const void *  io_addr)

Convert I/O address to bus address (for debug only)

io_addrI/O address
Return values
bus_addrBus address