iPXE
io.h File Reference

iPXE I/O API More...

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

Go to the source code of this file.

Macros

#define PAGE_SIZE   ( 1 << PAGE_SHIFT )
 Page size.
#define PAGE_MASK   ( PAGE_SIZE - 1 )
 Page mask.
#define IOAPI_INLINE(_subsys, _api_func)
 Calculate static inline I/O API function name.
#define PROVIDE_IOAPI(_subsys, _api_func, _func)
 Provide an I/O API implementation.
#define PROVIDE_IOAPI_INLINE(_subsys, _api_func)
 Provide a static inline I/O API implementation.
#define IOAPI_READ(_func, _type, io_addr, _prefix, _ndigits)
 Wrap an I/O read.
#define IOAPI_WRITE(_func, _type, data, io_addr, _prefix, _ndigits)
 Wrap an I/O write.
#define IOAPI_READS(_func, _type, io_addr, data, count, _prefix, _ndigits)
 Wrap an I/O string read.
#define IOAPI_WRITES(_func, _type, io_addr, data, count, _prefix, _ndigits)
 Wrap an I/O string write.
#define readb(io_addr)
#define readw(io_addr)
#define readl(io_addr)
#define readq(io_addr)
#define writeb(data, io_addr)
#define writew(data, io_addr)
#define writel(data, io_addr)
#define writeq(data, io_addr)
#define inb(io_addr)
#define inw(io_addr)
#define inl(io_addr)
#define outb(data, io_addr)
#define outw(data, io_addr)
#define outl(data, io_addr)
#define ioread8(io_addr)
#define ioread16(io_addr)
#define ioread32(io_addr)
#define iowrite8(data, io_addr)
#define iowrite16(data, io_addr)
#define iowrite32(data, io_addr)
#define insb(io_addr, data, count)
#define insw(io_addr, data, count)
#define insl(io_addr, data, count)
#define outsb(io_addr, data, count)
#define outsw(io_addr, data, count)
#define outsl(io_addr, data, count)
#define INX_P(_func, _type, io_addr)
 Read value from I/O-mapped device, slowly.
#define inb_p(io_addr)
 Read byte from I/O-mapped device.
#define inw_p(io_addr)
 Read 16-bit word from I/O-mapped device.
#define inl_p(io_addr)
 Read 32-bit dword from I/O-mapped device.
#define OUTX_P(_func, data, io_addr)
 Write value to I/O-mapped device, slowly.
#define outb_p(data, io_addr)
 Write byte to I/O-mapped device, slowly.
#define outw_p(data, io_addr)
 Write 16-bit word to I/O-mapped device, slowly.
#define outl_p(data, io_addr)
 Write 32-bit dword to I/O-mapped device, slowly.
#define rmb()
#define wmb()

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 FILE_SECBOOT (PERMITTED)
unsigned long phys_to_bus (unsigned long phys_addr)
 Convert physical address to a bus address.
unsigned long bus_to_phys (unsigned long bus_addr)
 Convert bus address to a physical address.
static __always_inline unsigned long virt_to_bus (volatile const void *addr)
 Convert virtual address to a bus address.
static __always_inline void * bus_to_virt (unsigned long bus_addr)
 Convert bus address to a virtual address.
uint8_t readb (volatile uint8_t *io_addr)
 Read byte from memory-mapped device.
uint16_t readw (volatile uint16_t *io_addr)
 Read 16-bit word from memory-mapped device.
uint32_t readl (volatile uint32_t *io_addr)
 Read 32-bit dword from memory-mapped device.
uint64_t readq (volatile uint64_t *io_addr)
 Read 64-bit qword from memory-mapped device.
void writeb (uint8_t data, volatile uint8_t *io_addr)
 Write byte to memory-mapped device.
void writew (uint16_t data, volatile uint16_t *io_addr)
 Write 16-bit word to memory-mapped device.
void writel (uint32_t data, volatile uint32_t *io_addr)
 Write 32-bit dword to memory-mapped device.
void writeq (uint64_t data, volatile uint64_t *io_addr)
 Write 64-bit qword to memory-mapped device.
uint8_t inb (volatile uint8_t *io_addr)
 Read byte from I/O-mapped device.
uint16_t inw (volatile uint16_t *io_addr)
 Read 16-bit word from I/O-mapped device.
uint32_t inl (volatile uint32_t *io_addr)
 Read 32-bit dword from I/O-mapped device.
void outb (uint8_t data, volatile uint8_t *io_addr)
 Write byte to I/O-mapped device.
void outw (uint16_t data, volatile uint16_t *io_addr)
 Write 16-bit word to I/O-mapped device.
void outl (uint32_t data, volatile uint32_t *io_addr)
 Write 32-bit dword to I/O-mapped device.
uint8_t ioread8 (volatile uint8_t *io_addr)
 Read byte from I/O-mapped or memory-mapped device.
uint16_t ioread16 (volatile uint16_t *io_addr)
 Read 16-bit word from I/O-mapped or memory-mapped device.
uint32_t ioread32 (volatile uint32_t *io_addr)
 Read 32-bit dword from I/O-mapped or memory-mapped device.
void iowrite8 (uint8_t data, volatile uint8_t *io_addr)
 Write byte to I/O-mapped or memory-mapped device.
void iowrite16 (uint16_t data, volatile uint16_t *io_addr)
 Write 16-bit word to I/O-mapped or memory-mapped device.
void iowrite32 (uint32_t data, volatile uint32_t *io_addr)
 Write 32-bit dword to I/O-mapped or memory-mapped device.
void insb (volatile uint8_t *io_addr, uint8_t *data, unsigned int count)
 Read bytes from I/O-mapped device.
void insw (volatile uint16_t *io_addr, uint16_t *data, unsigned int count)
 Read 16-bit words from I/O-mapped device.
void insl (volatile uint32_t *io_addr, uint32_t *data, unsigned int count)
 Read 32-bit words from I/O-mapped device.
void outsb (volatile uint8_t *io_addr, const uint8_t *data, unsigned int count)
 Write bytes to I/O-mapped device.
void outsw (volatile uint16_t *io_addr, const uint16_t *data, unsigned int count)
 Write 16-bit words to I/O-mapped device.
void outsl (volatile uint32_t *io_addr, const uint32_t *data, unsigned int count)
 Write 32-bit words to I/O-mapped device.
void iodelay (void)
 Slow down I/O.
void mb (void)
 Memory barrier.

Detailed Description

iPXE I/O API

The I/O API provides methods for reading from and writing to memory-mapped and I/O-mapped devices.

The standard methods (readl()/writel() etc.) do not strictly check the type of the address parameter; this is because traditional usage does not necessarily provide the correct pointer type. For example, code written for ISA devices at fixed I/O addresses (such as the keyboard controller) tend to use plain integer constants for the address parameter.

Definition in file io.h.

Macro Definition Documentation

◆ PAGE_SIZE

◆ PAGE_MASK

#define PAGE_MASK   ( PAGE_SIZE - 1 )

Page mask.

Definition at line 31 of file io.h.

Referenced by vp_alloc_vq(), and vring_init().

◆ IOAPI_INLINE

#define IOAPI_INLINE ( _subsys,
_api_func )
Value:
SINGLE_API_INLINE ( IOAPI_PREFIX_ ## _subsys, _api_func )
#define SINGLE_API_INLINE(_prefix, _api_func)
Calculate static inline function name.
Definition api.h:45

Calculate static inline I/O API function name.

Parameters
_prefixSubsystem prefix
_api_funcAPI function
Return values
_subsys_funcSubsystem API function

Definition at line 40 of file io.h.

40#define IOAPI_INLINE( _subsys, _api_func ) \
41 SINGLE_API_INLINE ( IOAPI_PREFIX_ ## _subsys, _api_func )

◆ PROVIDE_IOAPI

#define PROVIDE_IOAPI ( _subsys,
_api_func,
_func )
Value:
PROVIDE_SINGLE_API ( IOAPI_PREFIX_ ## _subsys, _api_func, _func )
#define PROVIDE_SINGLE_API(_prefix, _api_func, _func)
Provide an API implementation.
Definition api.h:55

Provide an I/O API implementation.

Parameters
_prefixSubsystem prefix
_api_funcAPI function
_funcImplementing function

Definition at line 50 of file io.h.

50#define PROVIDE_IOAPI( _subsys, _api_func, _func ) \
51 PROVIDE_SINGLE_API ( IOAPI_PREFIX_ ## _subsys, _api_func, _func )

◆ PROVIDE_IOAPI_INLINE

#define PROVIDE_IOAPI_INLINE ( _subsys,
_api_func )
Value:
PROVIDE_SINGLE_API_INLINE ( IOAPI_PREFIX_ ## _subsys, _api_func )
#define PROVIDE_SINGLE_API_INLINE(_prefix, _api_func)
Provide a static inline API implementation.
Definition api.h:74

Provide a static inline I/O API implementation.

Parameters
_prefixSubsystem prefix
_api_funcAPI function

Definition at line 59 of file io.h.

59#define PROVIDE_IOAPI_INLINE( _subsys, _api_func ) \
60 PROVIDE_SINGLE_API_INLINE ( IOAPI_PREFIX_ ## _subsys, _api_func )

◆ IOAPI_READ

#define IOAPI_READ ( _func,
_type,
io_addr,
_prefix,
_ndigits )
Value:
( { \
volatile _type *_io_addr = \
( ( volatile _type * ) ( intptr_t ) (io_addr) ); \
_type _data = _func ( _io_addr ); \
DBGIO ( "[" _prefix " %08lx] => %0" #_ndigits "llx\n", \
io_to_bus ( _io_addr ), ( unsigned long long ) _data ); \
_data; } )
unsigned long intptr_t
Definition stdint.h:21
char _prefix[]
Start address of the iPXE image.
unsigned long io_to_bus(volatile const void *io_addr)
Convert I/O address to bus address (for debug only)

Wrap an I/O read.

Parameters
_funcI/O API function
_typeData type
io_addrI/O address
_prefixPrefix for address in debug message
_ndigitsNumber of hex digits for this data type

Definition at line 76 of file io.h.

76#define IOAPI_READ( _func, _type, io_addr, _prefix, _ndigits ) ( { \
77 volatile _type *_io_addr = \
78 ( ( volatile _type * ) ( intptr_t ) (io_addr) ); \
79 _type _data = _func ( _io_addr ); \
80 DBGIO ( "[" _prefix " %08lx] => %0" #_ndigits "llx\n", \
81 io_to_bus ( _io_addr ), ( unsigned long long ) _data ); \
82 _data; } )

◆ IOAPI_WRITE

#define IOAPI_WRITE ( _func,
_type,
data,
io_addr,
_prefix,
_ndigits )
Value:
do { \
volatile _type *_io_addr = \
( ( volatile _type * ) ( intptr_t ) (io_addr) ); \
_type _data = (data); \
DBGIO ( "[" _prefix " %08lx] <= %0" #_ndigits "llx\n", \
io_to_bus ( _io_addr ), ( unsigned long long ) _data ); \
_func ( _data, _io_addr ); \
} while ( 0 )
uint8_t data[48]
Additional event data.
Definition ena.h:11

Wrap an I/O write.

Parameters
_funcI/O API function
_typeData type
dataValue to write
io_addrI/O address
_prefixPrefix for address in debug message
_ndigitsNumber of hex digits for this data type

Definition at line 94 of file io.h.

94#define IOAPI_WRITE( _func, _type, data, io_addr, _prefix, _ndigits ) do { \
95 volatile _type *_io_addr = \
96 ( ( volatile _type * ) ( intptr_t ) (io_addr) ); \
97 _type _data = (data); \
98 DBGIO ( "[" _prefix " %08lx] <= %0" #_ndigits "llx\n", \
99 io_to_bus ( _io_addr ), ( unsigned long long ) _data ); \
100 _func ( _data, _io_addr ); \
101 } while ( 0 )

◆ IOAPI_READS

#define IOAPI_READS ( _func,
_type,
io_addr,
data,
count,
_prefix,
_ndigits )
Value:
do { \
volatile _type *_io_addr = \
( ( volatile _type * ) ( intptr_t ) (io_addr) ); \
void *_data_void = (data); /* Check data is a pointer */ \
_type * _data = ( ( _type * ) _data_void ); \
const _type * _dbg_data = _data; \
unsigned int _count = (count); \
unsigned int _dbg_count = _count; \
_func ( _io_addr, _data, _count ); \
DBGIO ( "[" _prefix " %08lx] =>", io_to_bus ( _io_addr ) ); \
while ( _dbg_count-- ) { \
DBGIO ( " %0" #_ndigits "llx", \
( ( unsigned long long ) *(_dbg_data++) ) ); \
} \
DBGIO ( "\n" ); \
} while ( 0 )
static unsigned int count
Number of entries.
Definition dwmac.h:220

Wrap an I/O string read.

Parameters
_funcI/O API function
_typeData type
io_addrI/O address
dataData buffer
countNumber of elements to read
_prefixPrefix for address in debug message
_ndigitsNumber of hex digits for this data type

Definition at line 114 of file io.h.

114#define IOAPI_READS( _func, _type, io_addr, data, count, _prefix, _ndigits ) \
115 do { \
116 volatile _type *_io_addr = \
117 ( ( volatile _type * ) ( intptr_t ) (io_addr) ); \
118 void *_data_void = (data); /* Check data is a pointer */ \
119 _type * _data = ( ( _type * ) _data_void ); \
120 const _type * _dbg_data = _data; \
121 unsigned int _count = (count); \
122 unsigned int _dbg_count = _count; \
123 _func ( _io_addr, _data, _count ); \
124 DBGIO ( "[" _prefix " %08lx] =>", io_to_bus ( _io_addr ) ); \
125 while ( _dbg_count-- ) { \
126 DBGIO ( " %0" #_ndigits "llx", \
127 ( ( unsigned long long ) *(_dbg_data++) ) ); \
128 } \
129 DBGIO ( "\n" ); \
130 } while ( 0 )

◆ IOAPI_WRITES

#define IOAPI_WRITES ( _func,
_type,
io_addr,
data,
count,
_prefix,
_ndigits )
Value:
do { \
volatile _type *_io_addr = \
( ( volatile _type * ) ( intptr_t ) (io_addr) ); \
const void *_data_void = (data); /* Check data is a pointer */ \
const _type * _data = ( ( const _type * ) _data_void ); \
const _type * _dbg_data = _data; \
unsigned int _count = (count); \
unsigned int _dbg_count = _count; \
DBGIO ( "[" _prefix " %08lx] <=", io_to_bus ( _io_addr ) ); \
while ( _dbg_count-- ) { \
DBGIO ( " %0" #_ndigits "llx", \
( ( unsigned long long ) *(_dbg_data++) ) ); \
} \
DBGIO ( "\n" ); \
_func ( _io_addr, _data, _count ); \
} while ( 0 )

Wrap an I/O string write.

Parameters
_funcI/O API function
_typeData type
io_addrI/O address
dataData buffer
countNumber of elements to write
_prefixPrefix for address in debug message
_ndigitsNumber of hex digits for this data type

Definition at line 143 of file io.h.

143#define IOAPI_WRITES( _func, _type, io_addr, data, count, _prefix, _ndigits ) \
144 do { \
145 volatile _type *_io_addr = \
146 ( ( volatile _type * ) ( intptr_t ) (io_addr) ); \
147 const void *_data_void = (data); /* Check data is a pointer */ \
148 const _type * _data = ( ( const _type * ) _data_void ); \
149 const _type * _dbg_data = _data; \
150 unsigned int _count = (count); \
151 unsigned int _dbg_count = _count; \
152 DBGIO ( "[" _prefix " %08lx] <=", io_to_bus ( _io_addr ) ); \
153 while ( _dbg_count-- ) { \
154 DBGIO ( " %0" #_ndigits "llx", \
155 ( ( unsigned long long ) *(_dbg_data++) ) ); \
156 } \
157 DBGIO ( "\n" ); \
158 _func ( _io_addr, _data, _count ); \
159 } while ( 0 )

◆ readb

#define readb ( io_addr)
Value:
IOAPI_READ ( readb, uint8_t, io_addr, "MEM", 2 )
unsigned char uint8_t
Definition stdint.h:10
#define IOAPI_READ(_func, _type, io_addr, _prefix, _ndigits)
Wrap an I/O read.
Definition io.h:76
#define readb
Definition w89c840.c:155

Definition at line 207 of file io.h.

◆ readw

#define readw ( io_addr)
Value:
IOAPI_READ ( readw, uint16_t, io_addr, "MEM", 4 )
unsigned short uint16_t
Definition stdint.h:11
#define readw
Definition w89c840.c:156

Definition at line 216 of file io.h.

◆ readl

#define readl ( io_addr)
Value:
IOAPI_READ ( readl, uint32_t, io_addr, "MEM", 8 )
unsigned int uint32_t
Definition stdint.h:12
#define readl
Definition w89c840.c:157

Definition at line 225 of file io.h.

◆ readq

◆ writeb

#define writeb ( data,
io_addr )
Value:
IOAPI_WRITE ( writeb, uint8_t, data, io_addr, "MEM", 2 )
#define IOAPI_WRITE(_func, _type, data, io_addr, _prefix, _ndigits)
Wrap an I/O write.
Definition io.h:94
#define writeb
Definition w89c840.c:158

Definition at line 243 of file io.h.

243#define writeb( data, io_addr ) \
244 IOAPI_WRITE ( writeb, uint8_t, data, io_addr, "MEM", 2 )

◆ writew

#define writew ( data,
io_addr )
Value:
IOAPI_WRITE ( writew, uint16_t, data, io_addr, "MEM", 4 )
#define writew
Definition w89c840.c:159

Definition at line 253 of file io.h.

253#define writew( data, io_addr ) \
254 IOAPI_WRITE ( writew, uint16_t, data, io_addr, "MEM", 4 )

◆ writel

#define writel ( data,
io_addr )
Value:
IOAPI_WRITE ( writel, uint32_t, data, io_addr, "MEM", 8 )
#define writel
Definition w89c840.c:160

Definition at line 263 of file io.h.

263#define writel( data, io_addr ) \
264 IOAPI_WRITE ( writel, uint32_t, data, io_addr, "MEM", 8 )

◆ writeq

#define writeq ( data,
io_addr )
Value:
IOAPI_WRITE ( writeq, uint64_t, data, io_addr, "MEM", 16 )
#define writeq(data, io_addr)
Definition io.h:273

Definition at line 273 of file io.h.

273#define writeq( data, io_addr ) \
274 IOAPI_WRITE ( writeq, uint64_t, data, io_addr, "MEM", 16 )

Referenced by __vxge_hw_kdfc_swapper_set(), __vxge_hw_legacy_swapper_set(), __vxge_hw_non_offload_db_post(), __vxge_hw_read_rts_ds(), __vxge_hw_vpath_alarm_process(), __vxge_hw_vpath_initialize(), __vxge_hw_vpath_kdfc_configure(), __vxge_hw_vpath_mac_configure(), __vxge_hw_vpath_pci_read(), __vxge_hw_vpath_prc_configure(), __vxge_hw_vpath_swapper_set(), __vxge_hw_vpath_tim_configure(), dev_p5_db(), dev_p7_db(), ena_transmit(), flexboot_nodnic_arm_cq(), golan_post_send(), if(), linda_writeq(), PROVIDE_IOAPI(), PROVIDE_IOAPI_INLINE(), qib7322_writeq(), shomron_tx_uar_send_db(), txnic_bgx_init(), txnic_bgx_lmac_init(), txnic_bgx_spu_init(), txnic_create_cq(), txnic_create_rq(), txnic_create_sq(), txnic_destroy_cq(), txnic_destroy_rq(), txnic_destroy_sq(), txnic_disable_cq(), txnic_disable_rq(), txnic_disable_sq(), txnic_lmac_close(), txnic_lmac_diag(), txnic_lmac_open(), txnic_lmac_poll_link(), txnic_lmac_remove(), txnic_lmac_reset(), txnic_lmac_update_link(), txnic_pf_probe(), txnic_poll_cq(), txnic_refill_rq(), txnic_send(), vxge_hw_device_clear_tx_rx(), vxge_hw_device_hw_info_get(), vxge_hw_device_intr_disable(), vxge_hw_device_intr_enable(), vxge_hw_set_fw_api(), vxge_hw_vpath_doorbell_rx(), vxge_hw_vpath_intr_disable(), vxge_hw_vpath_intr_enable(), vxge_hw_vpath_mtu_set(), vxge_hw_vpath_rx_doorbell_init(), vxge_hw_vpath_set_zero_rx_frm_len(), X86_WRITEX(), and xhci_writeq().

◆ inb

◆ inw

#define inw ( io_addr)
Value:
IOAPI_READ ( inw, uint16_t, io_addr, "IO", 4 )
#define inw(io_addr)
Definition io.h:292

Definition at line 292 of file io.h.

Referenced by a3c90x_hw_start(), a3c90x_internal_IssueCommand(), a3c90x_internal_ReadEeprom(), a3c90x_internal_WaitForEeprom(), a3c90x_poll(), check_duplex(), corkscrew_probe1(), cs89x0_poll(), cs89x0_probe_addr(), eepro_poll(), eepro_transmit(), eeprom_read(), eisabus_probe(), epic100_probe(), eth_pio_read(), eth_pio_read(), get_e(), get_e(), hfa384x_getreg(), ifec_check_ru_status(), ifec_net_close(), ifec_net_poll(), ifec_net_transmit(), ifec_refill_rx_ring(), ifec_reset(), ifec_spi_read_bit(), ifec_spi_write_bit(), ifec_tx_wake(), init_media(), mii_read(), PCIAPI_INLINE(), pcnet32_wio_check(), pcnet32_wio_read_bcr(), pcnet32_wio_read_csr(), pcnet32_wio_read_rap(), pcnet32_wio_reset(), phy_read(), pnic_command_quiet(), PROVIDE_IOAPI_INLINE(), readreg(), rtl818x_ioread16(), sis635_get_mac_addr(), smc9000_poll(), smc9000_probe(), smc9000_probe_addr(), smc9000_transmit(), smc_read_phy_register(), smc_write_phy_register(), sundance_irq(), sundance_poll(), sundance_probe(), sundance_reset(), t509_id_read_eeprom(), t509_poll(), t509_transmit(), t515_poll(), t515_probe(), t515_reset(), t515_transmit(), t595_poll(), t595_transmit(), t5x9_disable(), t5x9_probe(), TLan_DioRead16(), tlan_poll(), tlan_transmit(), uhci_reset(), uhci_root_disable(), uhci_root_enable(), uhci_root_poll(), uhci_root_speed(), uhci_run(), uhci_stop(), vp_find_vq(), vpm_ioread16(), and vxgetlink().

◆ inl

◆ outb

#define outb ( data,
io_addr )
Value:
IOAPI_WRITE ( outb, uint8_t, data, io_addr, "IO", 2 )
#define outb(data, io_addr)
Definition io.h:310

Definition at line 310 of file io.h.

310#define outb( data, io_addr ) \
311 IOAPI_WRITE ( outb, uint8_t, data, io_addr, "IO", 2 )

Referenced by a3c90x_hw_start(), a3c90x_poll(), cs89x0_reset(), debugcon_putchar(), eepro_disable(), eepro_poll(), eepro_reset(), eepro_transmit(), eisa_device_enabled(), eisabus_probe(), enable_multicast(), enable_multicast(), eth_pio_read(), eth_pio_read(), eth_pio_write(), eth_pio_write(), eth_probe(), eth_rx_overrun(), ifec_scb_cmd(), ifec_tx_wake(), isapnp_write_address(), isapnp_write_data(), ne_poll(), ne_probe(), ne_probe1(), ne_reset(), ne_transmit(), ns8390_poll(), ns8390_reset(), ns8390_transmit(), pit8254_speaker_delay(), PROVIDE_IOAPI_INLINE(), read_eeprom(), rhine_enable_mmio(), rhine_reload_eeprom(), rhine_reset(), rtc_disable_int(), rtc_enable_int(), rtc_readb(), rtl818x_iowrite8(), send_nonspecific_eoi(), send_specific_eoi(), set_rx_mode(), sis190_get_mac_addr_from_apc(), sis630e_get_mac_addr(), sundance_reset(), t509_activate(), t509_deactivate_and_reset_tag(), t509_enable(), t509_find_id_port(), t509_global_reset(), t509_load_eeprom_word(), t509_reset_tag(), t509_select_tag(), t509_send_id_sequence(), t509_set_id_port(), t509_set_tag(), t509_transmit(), t509_wait_for_id_sequence(), t515_reset(), t515_transmit(), t595_reset(), t595_transmit(), TLan_DioWrite8(), TLan_FinishReset(), vp_reset(), vp_set_status(), and vpm_iowrite8().

◆ outw

#define outw ( data,
io_addr )
Value:
IOAPI_WRITE ( outw, uint16_t, data, io_addr, "IO", 4 )
#define outw(data, io_addr)
Definition io.h:320

Definition at line 320 of file io.h.

320#define outw( data, io_addr ) \
321 IOAPI_WRITE ( outw, uint16_t, data, io_addr, "IO", 4 )

Referenced by a3c90x_close(), a3c90x_hw_start(), a3c90x_internal_IssueCommand(), a3c90x_internal_ReadEeprom(), a3c90x_remove(), a3c90x_reset(), acpi_poweroff(), check_duplex(), corkscrew_probe1(), cs89x0_probe(), cs89x0_probe_addr(), cs89x0_reset(), cs89x0_transmit(), dm9132_id_table(), eepro_poll(), eepro_reset(), eepro_transmit(), eeprom_read(), eth_pio_write(), eth_pio_write(), get_e(), get_e(), hfa384x_setreg(), ifec_net_close(), ifec_net_irq(), ifec_net_poll(), ifec_spi_write_bit(), nway_start(), pcnet32_wio_check(), pcnet32_wio_read_bcr(), pcnet32_wio_read_csr(), pcnet32_wio_write_bcr(), pcnet32_wio_write_csr(), pcnet32_wio_write_rap(), phy_write(), pnic_command_quiet(), PROVIDE_IOAPI_INLINE(), readreg(), rtl818x_iowrite16(), send_test_pkt(), set_rx_mode(), set_rx_mode(), smc_phy_configure(), smc_read_phy_register(), smc_write_phy_register(), sundance_disable(), sundance_irq(), sundance_poll(), sundance_probe(), sundance_reset(), sundance_transmit(), t509_enable(), t509_poll(), t509_transmit(), t515_disable(), t515_poll(), t515_probe(), t515_reset(), t515_transmit(), t595_disable(), t595_poll(), t595_probe(), t595_reset(), t595_transmit(), t5x9_disable(), t5x9_probe(), TLan_DioRead16(), TLan_DioRead32(), TLan_DioRead8(), TLan_DioWrite16(), TLan_DioWrite32(), TLan_DioWrite8(), TLan_EeReceiveByte(), TLan_EeSendByte(), TLan_EeSendStart(), TLan_MiiReadReg(), TLan_MiiSendData(), TLan_MiiSync(), TLan_MiiWriteReg(), tlan_poll(), tlan_probe(), TLan_ResetAdapter(), uhci_reset(), uhci_root_disable(), uhci_root_enable(), uhci_root_poll(), uhci_root_speed(), uhci_run(), uhci_stop(), vp_del_vq(), vp_find_vq(), vp_notify(), vpm_iowrite16(), vxsetlink(), and writereg().

◆ outl

#define outl ( data,
io_addr )
Value:
IOAPI_WRITE ( outl, uint32_t, data, io_addr, "IO", 8 )
#define outl(data, io_addr)
Definition io.h:330

Definition at line 330 of file io.h.

330#define outl( data, io_addr ) \
331 IOAPI_WRITE ( outl, uint32_t, data, io_addr, "IO", 8 )

Referenced by a3c90x_hw_start(), a3c90x_open(), a3c90x_transmit(), davicom_disable(), davicom_media_chk(), davicom_probe(), davicom_reset(), davicom_transmit(), dmfe_descriptor_init(), dmfe_disable(), dmfe_init_dm910x(), dmfe_transmit(), epic100_disable(), epic100_open(), epic100_poll(), epic100_probe(), epic100_transmit(), ifec_mdio_read(), ifec_mdio_write(), ifec_reset(), ifec_scb_cmd(), ifec_tx_wake(), init_media(), mdio_read(), mdio_write(), mii_read(), nway_start(), pcidirect_prepare(), pcnet32_dwio_check(), pcnet32_dwio_read_bcr(), pcnet32_dwio_read_csr(), pcnet32_dwio_write_bcr(), pcnet32_dwio_write_csr(), pcnet32_dwio_write_rap(), phy_read_1bit(), phy_read_1bit(), phy_write_1bit(), phy_write_1bit(), pnic_do_nway(), PROVIDE_IOAPI_INLINE(), read_eeprom(), read_eeprom(), read_srom_word(), rtl818x_iowrite32(), select_media(), send_filter_frame(), set_rx_mode(), set_rx_mode(), sis635_get_mac_addr(), sis900_check_mode(), sis900_disable(), sis900_init(), sis900_init_rxd(), sis900_init_rxfilter(), sis900_init_txd(), sis900_irq(), sis900_mdio_idle(), sis900_mdio_read(), sis900_mdio_reset(), sis900_poll(), sis900_probe(), sis900_read_eeprom(), sis900_reset(), sis900_set_rx_mode(), sis900_transmit(), sis96x_get_mac_addr(), start_link(), sundance_reset(), sundance_transmit(), t515_reset(), TLan_DioWrite32(), tlan_disable(), TLan_FinishReset(), tlan_poll(), TLan_ResetAdapter(), tlan_transmit(), tulip_disable(), tulip_probe(), tulip_reset(), tulip_transmit(), uhci_bus_open(), update_cr6(), vp_del_vq(), vp_find_vq(), vp_set_features(), vpm_iowrite32(), and vxsetlink().

◆ ioread8

#define ioread8 ( io_addr)
Value:
IOAPI_READ ( ioread8, uint8_t, io_addr, "IO/MEM", 2 )
#define ioread8(io_addr)
Definition io.h:340

Definition at line 340 of file io.h.

340#define ioread8( io_addr ) \
341 IOAPI_READ ( ioread8, uint8_t, io_addr, "IO/MEM", 2 )

Referenced by PROVIDE_IOAPI(), and X86_IOREADX().

◆ ioread16

#define ioread16 ( io_addr)
Value:
IOAPI_READ ( ioread16, uint16_t, io_addr, "IO/MEM", 4 )
#define ioread16(io_addr)
Definition io.h:350

Definition at line 350 of file io.h.

350#define ioread16( io_addr ) \
351 IOAPI_READ ( ioread16, uint16_t, io_addr, "IO/MEM", 4 )

Referenced by PROVIDE_IOAPI(), and X86_IOREADX().

◆ ioread32

#define ioread32 ( io_addr)
Value:
IOAPI_READ ( ioread32, uint32_t, io_addr, "IO/MEM", 8 )
#define ioread32(io_addr)
Definition io.h:360

Definition at line 360 of file io.h.

360#define ioread32( io_addr ) \
361 IOAPI_READ ( ioread32, uint32_t, io_addr, "IO/MEM", 8 )

Referenced by PROVIDE_IOAPI(), and X86_IOREADX().

◆ iowrite8

#define iowrite8 ( data,
io_addr )
Value:
IOAPI_WRITE ( iowrite8, uint8_t, data, io_addr, "IO/MEM", 2 )
#define iowrite8(data, io_addr)
Definition io.h:370

Definition at line 370 of file io.h.

370#define iowrite8( data, io_addr ) \
371 IOAPI_WRITE ( iowrite8, uint8_t, data, io_addr, "IO/MEM", 2 )

Referenced by PROVIDE_IOAPI(), and X86_IOWRITEX().

◆ iowrite16

#define iowrite16 ( data,
io_addr )
Value:
IOAPI_WRITE ( iowrite16, uint16_t, data, io_addr, "IO/MEM", 4 )
#define iowrite16(data, io_addr)
Definition io.h:380

Definition at line 380 of file io.h.

380#define iowrite16( data, io_addr ) \
381 IOAPI_WRITE ( iowrite16, uint16_t, data, io_addr, "IO/MEM", 4 )

Referenced by PROVIDE_IOAPI(), and X86_IOWRITEX().

◆ iowrite32

#define iowrite32 ( data,
io_addr )
Value:
IOAPI_WRITE ( iowrite32, uint32_t, data, io_addr, "IO/MEM", 8 )
#define iowrite32(data, io_addr)
Definition io.h:390

Definition at line 390 of file io.h.

390#define iowrite32( data, io_addr ) \
391 IOAPI_WRITE ( iowrite32, uint32_t, data, io_addr, "IO/MEM", 8 )

Referenced by PROVIDE_IOAPI(), and X86_IOWRITEX().

◆ insb

#define insb ( io_addr,
data,
count )
Value:
IOAPI_READS ( insb, uint8_t, io_addr, data, count, "IO", 2 )
#define insb(io_addr, data, count)
Definition io.h:401
#define IOAPI_READS(_func, _type, io_addr, data, count, _prefix, _ndigits)
Wrap an I/O string read.
Definition io.h:114

Definition at line 401 of file io.h.

401#define insb( io_addr, data, count ) \
402 IOAPI_READS ( insb, uint8_t, io_addr, data, count, "IO", 2 )

Referenced by pnic_command_quiet(), and PROVIDE_IOAPI_INLINE().

◆ insw

#define insw ( io_addr,
data,
count )
Value:
IOAPI_READS ( insw, uint16_t, io_addr, data, count, "IO", 4 )
#define insw(io_addr, data, count)
Definition io.h:412

Definition at line 412 of file io.h.

412#define insw( io_addr, data, count ) \
413 IOAPI_READS ( insw, uint16_t, io_addr, data, count, "IO", 4 )

Referenced by cs89x0_poll(), eepro_poll(), PROVIDE_IOAPI_INLINE(), smc9000_poll(), t509_poll(), t515_poll(), and t595_poll().

◆ insl

#define insl ( io_addr,
data,
count )
Value:
IOAPI_READS ( insl, uint32_t, io_addr, data, count, "IO", 8 )
#define insl(io_addr, data, count)
Definition io.h:423

Definition at line 423 of file io.h.

423#define insl( io_addr, data, count ) \
424 IOAPI_READS ( insl, uint32_t, io_addr, data, count, "IO", 8 )

Referenced by PROVIDE_IOAPI_INLINE().

◆ outsb

#define outsb ( io_addr,
data,
count )
Value:
IOAPI_WRITES ( outsb, uint8_t, io_addr, data, count, "IO", 2 )
#define outsb(io_addr, data, count)
Definition io.h:435
#define IOAPI_WRITES(_func, _type, io_addr, data, count, _prefix, _ndigits)
Wrap an I/O string write.
Definition io.h:143

Definition at line 435 of file io.h.

435#define outsb( io_addr, data, count ) \
436 IOAPI_WRITES ( outsb, uint8_t, io_addr, data, count, "IO", 2 )

Referenced by pnic_command_quiet(), and PROVIDE_IOAPI_INLINE().

◆ outsw

#define outsw ( io_addr,
data,
count )
Value:
IOAPI_WRITES ( outsw, uint16_t, io_addr, data, count, "IO", 4 )
#define outsw(io_addr, data, count)
Definition io.h:447

Definition at line 447 of file io.h.

447#define outsw( io_addr, data, count ) \
448 IOAPI_WRITES ( outsw, uint16_t, io_addr, data, count, "IO", 4 )

Referenced by cs89x0_transmit(), eepro_transmit(), PROVIDE_IOAPI_INLINE(), send_test_pkt(), smc9000_transmit(), t509_transmit(), t515_transmit(), and t595_transmit().

◆ outsl

#define outsl ( io_addr,
data,
count )
Value:
IOAPI_WRITES ( outsl, uint32_t, io_addr, data, count, "IO", 8 )
#define outsl(io_addr, data, count)
Definition io.h:459

Definition at line 459 of file io.h.

459#define outsl( io_addr, data, count ) \
460 IOAPI_WRITES ( outsl, uint32_t, io_addr, data, count, "IO", 8 )

Referenced by PROVIDE_IOAPI_INLINE().

◆ INX_P

#define INX_P ( _func,
_type,
io_addr )
Value:
( { \
_type _data = _func ( (io_addr) ); \
iodelay(); \
_data; } )

Read value from I/O-mapped device, slowly.

Parameters
_funcFunction to use to read value
dataValue to write
io_addrI/O address

Definition at line 475 of file io.h.

475#define INX_P( _func, _type, io_addr ) ( { \
476 _type _data = _func ( (io_addr) ); \
477 iodelay(); \
478 _data; } )

◆ inb_p

#define inb_p ( io_addr)
Value:
INX_P ( inb, uint8_t, io_addr )
#define INX_P(_func, _type, io_addr)
Read value from I/O-mapped device, slowly.
Definition io.h:475

Read byte from I/O-mapped device.

Parameters
io_addrI/O address
Return values
dataValue read

Definition at line 486 of file io.h.

Referenced by mcabus_probe().

◆ inw_p

#define inw_p ( io_addr)
Value:
INX_P ( inw, uint16_t, io_addr )

Read 16-bit word from I/O-mapped device.

Parameters
io_addrI/O address
Return values
dataValue read

Definition at line 494 of file io.h.

◆ inl_p

#define inl_p ( io_addr)
Value:
INX_P ( inl, uint32_t, io_addr )

Read 32-bit dword from I/O-mapped device.

Parameters
io_addrI/O address
Return values
dataValue read

Definition at line 502 of file io.h.

◆ OUTX_P

#define OUTX_P ( _func,
data,
io_addr )
Value:
do { \
_func ( (data), (io_addr) ); \
iodelay(); \
} while ( 0 )

Write value to I/O-mapped device, slowly.

Parameters
_funcFunction to use to write value
dataValue to write
io_addrI/O address

Definition at line 511 of file io.h.

511#define OUTX_P( _func, data, io_addr ) do { \
512 _func ( (data), (io_addr) ); \
513 iodelay(); \
514 } while ( 0 )

◆ outb_p

#define outb_p ( data,
io_addr )
Value:
OUTX_P ( outb, data, io_addr )
#define OUTX_P(_func, data, io_addr)
Write value to I/O-mapped device, slowly.
Definition io.h:511

Write byte to I/O-mapped device, slowly.

Parameters
dataValue to write
io_addrI/O address

Definition at line 522 of file io.h.

Referenced by mcabus_probe().

◆ outw_p

#define outw_p ( data,
io_addr )
Value:
OUTX_P ( outw, data, io_addr )

Write 16-bit word to I/O-mapped device, slowly.

Parameters
dataValue to write
io_addrI/O address

Definition at line 530 of file io.h.

◆ outl_p

#define outl_p ( data,
io_addr )
Value:
OUTX_P ( outl, data, io_addr )

Write 32-bit dword to I/O-mapped device, slowly.

Parameters
dataValue to write
io_addrI/O address

Definition at line 538 of file io.h.

◆ rmb

◆ wmb

wmb ( )
Value:
mb()

Definition at line 546 of file io.h.

Referenced by __vxge_hw_kdfc_swapper_set(), __vxge_hw_legacy_swapper_set(), __vxge_hw_non_offload_db_post(), __vxge_hw_pio_mem_write64(), __vxge_hw_read_rts_ds(), __vxge_hw_vpath_kdfc_configure(), __vxge_hw_vpath_pci_read(), __vxge_hw_vpath_swapper_set(), amd8111e_init_rx_ring(), amd8111e_poll(), amd8111e_transmit(), atl1e_read_phy_reg(), atl1e_reset_hw(), atl1e_tx_queue(), atl1e_write_phy_reg(), atl_rx_ring_fill(), atl_transmit(), b44_transmit(), bnx2_poll(), bnx2_transmit(), cgem_transmit(), clear_b0_fpga_memories(), dwmac_create_ring(), dwmac_refill_rx(), dwmac_transmit(), ehci_async_schedule(), ehci_endpoint_reset(), ehci_enqueue(), ehci_periodic_schedule(), ena_admin(), ena_destroy_admin(), ena_destroy_async(), ena_refill_rx(), ena_transmit(), exanic_close(), exanic_open(), exanic_transmit(), falcon_read(), falcon_write(), falcon_write_sram(), flexboot_nodnic_arm_cq(), forcedeth_transmit(), golan_cmd_init(), golan_eq_update_ci(), golan_post_recv(), golan_post_send(), gve_admin(), gve_refill_rx(), gve_reset(), gve_transmit(), hunt_mcdi_copyin(), icplus_refill_rx(), icplus_transmit(), intel_refill_rx(), intel_transmit(), intelxl_admin_command(), intelxl_refill_admin(), intelxl_refill_rx(), intelxl_transmit(), is_command_finished(), jme_disable_rx_engine(), jme_disable_tx_engine(), jme_enable_rx_engine(), jme_enable_tx_engine(), jme_fill_tx_desc(), jme_mdio_write(), jme_set_clean_rxdesc(), jme_setup_wakeup_frame(), myri10ge_command(), myri10ge_interrupt_handler(), myri10ge_net_poll(), myri10ge_net_transmit(), myri10ge_post_receive(), myson_refill_rx(), myson_transmit(), natsemi_refill_rx(), natsemi_transmit(), nv_alloc_rx(), pci_push(), pcnet32_refill_rx_ring(), pcnet32_setup_init_block(), pcnet32_transmit(), phantom_poll(), phantom_post_cds(), phantom_post_rds(), rdc_refill_rx(), rdc_transmit(), realtek_refill_rx(), realtek_transmit(), rhine_refill_rx(), rhine_transmit(), send_command(), shomron_tx_uar_send_db(), sis190_give_to_asic(), sis190_make_unusable_by_asic(), sis190_transmit(), skge_poll(), skge_rx_reuse(), skge_rx_setup(), skge_up(), skge_xmit_frame(), sky2_put_idx(), sky2_rx_stop(), txnic_refill_rq(), txnic_send(), uhci_async_schedule(), uhci_describe(), uhci_endpoint_poll(), uhci_enqueue(), uhci_periodic_schedule(), uhci_restart(), velocity_refill_rx(), velocity_transmit(), vmbus_send(), vmxnet3_refill_rx(), vmxnet3_transmit(), vring_add_buf(), vring_detach(), vring_get_buf(), vring_kick(), vring_more_used(), vxge_hw_device_hw_info_get(), vxge_hw_set_fw_api(), vxge_hw_vpath_doorbell_rx(), vxge_open(), xenstore_recv(), xenstore_send(), xhci_doorbell(), and xhci_enqueue().

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED )

◆ phys_to_bus()

unsigned long phys_to_bus ( unsigned long phys_addr)

Convert physical address to a bus address.

Parameters
phys_addrPhysical address
Return values
bus_addrBus address

Referenced by exanic_open(), IOAPI_INLINE(), PROVIDE_IOAPI_INLINE(), and virt_to_bus().

◆ bus_to_phys()

unsigned long bus_to_phys ( unsigned long bus_addr)

Convert bus address to a physical address.

Parameters
bus_addrBus address
Return values
phys_addrPhysical address

References __always_inline, and bus_addr.

Referenced by bus_to_virt(), IOAPI_INLINE(), and PROVIDE_IOAPI_INLINE().

◆ virt_to_bus()

__always_inline unsigned long virt_to_bus ( volatile const void * addr)
inlinestatic

Convert virtual address to a bus address.

Parameters
addrVirtual address
Return values
bus_addrBus address

Definition at line 184 of file io.h.

184 {
185 return phys_to_bus ( virt_to_phys ( addr ) );
186}
uint32_t addr
Buffer address.
Definition dwmac.h:9
unsigned long phys_to_bus(unsigned long phys_addr)
Convert physical address to a bus address.

References addr, and phys_to_bus().

Referenced by __vxge_hw_vpath_prc_configure(), a3c90x_open(), a3c90x_prepare_rx_desc(), a3c90x_process_tx_packets(), a3c90x_setup_rx_ring(), a3c90x_transmit(), amd8111e_init_rx_ring(), amd8111e_poll(), amd8111e_start(), amd8111e_transmit(), arbel_cmd(), arbel_complete(), arbel_create_cq(), arbel_create_qp(), arbel_create_recv_wq(), arbel_create_send_wq(), arbel_fill_mlx_send_wqe(), arbel_fill_rc_send_wqe(), arbel_fill_ud_send_wqe(), arbel_post_recv(), ath5k_desc_alloc(), ath5k_rx_iob_alloc(), ath5k_txbuf_setup(), ath_descdma_setup(), ath_rx_init(), ath_rx_tasklet(), ath_tx_setup_buffer(), atl1e_setup_ring_resources(), atl1e_tx_map(), b44_address_ok(), bnx2_alloc_mem(), bnx2_init_rx_ring(), bnx2_transmit(), davicom_init_chain(), davicom_reset(), dmfe_descriptor_init(), efx_hunt_alloc_special_buffer(), efx_hunt_build_rx_desc(), efx_hunt_build_tx_desc(), ena_create_cq(), ena_create_sq(), ena_refill_rx(), ena_set_base(), ena_set_host_attributes(), ena_transmit(), epic100_init_ring(), exanic_probe(), falcon_alloc_special_buffer(), falcon_build_rx_desc(), falcon_build_tx_desc(), falcon_init_resources(), flexboot_nodnic_post_recv(), forcedeth_transmit(), golan_cmd_init(), hermon_cmd(), hermon_fill_eth_send_wqe(), hermon_fill_mlx_send_wqe(), hermon_fill_rc_send_wqe(), hermon_fill_ud_send_wqe(), hermon_post_recv(), hunt_mcdi_copyin(), icplus_create_ring(), icplus_refill_rx(), icplus_set_base(), icplus_transmit(), ifec_net_open(), ifec_net_transmit(), ifec_refill_rx_ring(), ifec_reprime_ru(), ifec_tx_setup(), ifec_tx_wake(), igbvf_configure_rx(), igbvf_configure_tx(), igbvf_process_tx_packets(), igbvf_refill_rx_ring(), igbvf_setup_rx_resources(), igbvf_setup_tx_resources(), igbvf_transmit(), init_ring(), jme_alloc_rx_resources(), jme_alloc_tx_resources(), jme_fill_tx_desc(), jme_set_clean_rxdesc(), jme_tx_clean(), linda_create_recv_wq(), linda_init_send(), linda_post_recv(), mlx_memory_map_dma_priv(), myri10ge_command(), myri10ge_net_open(), myri10ge_net_transmit(), myri10ge_post_receive(), myson_create_ring(), myson_refill_rx(), myson_transmit(), natsemi_create_ring(), natsemi_refill_rx(), natsemi_transmit(), nv_alloc_rx(), nv_init_rings(), pcnet32_open(), pcnet32_process_rx_packets(), pcnet32_process_tx_packets(), pcnet32_refill_rx_ring(), pcnet32_setup_init_block(), pcnet32_setup_rx_resources(), pcnet32_setup_tx_resources(), pcnet32_transmit(), phantom_create_rx_ctx(), phantom_create_tx_ctx(), phantom_issue_buf_cmd(), phantom_poll(), phantom_post_cds(), phantom_post_rds(), phantom_refill_rx_ring(), phantom_transmit(), qib7322_create_recv_wq(), qib7322_init_send(), qib7322_post_recv(), rhine_create_ring(), rhine_refill_rx(), rhine_transmit(), rtl818x_handle_rx(), rtl818x_init_rx_ring(), rtl818x_init_tx_ring(), rtl818x_tx(), shomron_fill_eth_send_wqe(), sis190_alloc_rx_iob(), sis190_open(), sis190_transmit(), sis900_init_rxd(), sis900_init_txd(), sis900_poll(), sis900_transmit(), skge_rx_setup(), skge_up(), skge_xmit_frame(), sky2_probe(), sky2_rx_map_iob(), sky2_up(), sky2_xmit_frame(), tg3_alloc_consistent(), tg3_alloc_rx_iob(), tg3_test_dma(), tg3_transmit(), TLan_FinishReset(), TLan_ResetLists(), txnic_refill_rq(), txnic_send(), velocity_alloc_rings(), vmxnet3_open(), vmxnet3_refill_rx(), vmxnet3_transmit(), vxge_hw_fifo_txdl_buffer_set(), vxge_hw_fifo_txdl_post(), vxge_hw_ring_replenish(), vxge_hw_ring_rxd_1b_set(), and w89c840_reset().

◆ bus_to_virt()

__always_inline void * bus_to_virt ( unsigned long bus_addr)
inlinestatic

Convert bus address to a virtual address.

Parameters
bus_addrBus address
Return values
addrVirtual address

This operation is not available under all memory models.

Definition at line 196 of file io.h.

196 {
197 return phys_to_virt ( bus_to_phys ( bus_addr ) );
198}
unsigned long bus_to_phys(unsigned long bus_addr)
Convert bus address to a physical address.
static __always_inline void unsigned long bus_addr
Definition pcibios.h:156

References __always_inline, bus_addr, and bus_to_phys().

Referenced by atl1e_probe(), bnx2_poll(), eth_probe(), ne_poll(), ns8390_poll(), ns8390_transmit(), and prism2_find_plx().

◆ readb()

uint8_t readb ( volatile uint8_t * io_addr)

Read byte from memory-mapped device.

Parameters
io_addrI/O address
Return values
dataValue read

◆ readw()

uint16_t readw ( volatile uint16_t * io_addr)

Read 16-bit word from memory-mapped device.

Parameters
io_addrI/O address
Return values
dataValue read

◆ readl()

uint32_t readl ( volatile uint32_t * io_addr)

Read 32-bit dword from memory-mapped device.

Parameters
io_addrI/O address
Return values
dataValue read

◆ readq()

uint64_t readq ( volatile uint64_t * io_addr)

Read 64-bit qword from memory-mapped device.

Parameters
io_addrI/O address
Return values
dataValue read

◆ writeb()

void writeb ( uint8_t data,
volatile uint8_t * io_addr )

Write byte to memory-mapped device.

Parameters
dataValue to write
io_addrI/O address

References data.

◆ writew()

void writew ( uint16_t data,
volatile uint16_t * io_addr )

Write 16-bit word to memory-mapped device.

Parameters
dataValue to write
io_addrI/O address

References data.

◆ writel()

void writel ( uint32_t data,
volatile uint32_t * io_addr )

Write 32-bit dword to memory-mapped device.

Parameters
dataValue to write
io_addrI/O address

References data.

◆ writeq()

void writeq ( uint64_t data,
volatile uint64_t * io_addr )

Write 64-bit qword to memory-mapped device.

Parameters
dataValue to write
io_addrI/O address

References data.

◆ inb()

uint8_t inb ( volatile uint8_t * io_addr)

Read byte from I/O-mapped device.

Parameters
io_addrI/O address
Return values
dataValue read

◆ inw()

uint16_t inw ( volatile uint16_t * io_addr)

Read 16-bit word from I/O-mapped device.

Parameters
io_addrI/O address
Return values
dataValue read

◆ inl()

uint32_t inl ( volatile uint32_t * io_addr)

Read 32-bit dword from I/O-mapped device.

Parameters
io_addrI/O address
Return values
dataValue read

◆ outb()

void outb ( uint8_t data,
volatile uint8_t * io_addr )

Write byte to I/O-mapped device.

Parameters
dataValue to write
io_addrI/O address

References data.

◆ outw()

void outw ( uint16_t data,
volatile uint16_t * io_addr )

Write 16-bit word to I/O-mapped device.

Parameters
dataValue to write
io_addrI/O address

References data.

◆ outl()

void outl ( uint32_t data,
volatile uint32_t * io_addr )

Write 32-bit dword to I/O-mapped device.

Parameters
dataValue to write
io_addrI/O address

References data.

◆ ioread8()

uint8_t ioread8 ( volatile uint8_t * io_addr)

Read byte from I/O-mapped or memory-mapped device.

Parameters
io_addrI/O address
Return values
dataValue read

◆ ioread16()

uint16_t ioread16 ( volatile uint16_t * io_addr)

Read 16-bit word from I/O-mapped or memory-mapped device.

Parameters
io_addrI/O address
Return values
dataValue read

◆ ioread32()

uint32_t ioread32 ( volatile uint32_t * io_addr)

Read 32-bit dword from I/O-mapped or memory-mapped device.

Parameters
io_addrI/O address
Return values
dataValue read

◆ iowrite8()

void iowrite8 ( uint8_t data,
volatile uint8_t * io_addr )

Write byte to I/O-mapped or memory-mapped device.

Parameters
dataValue to write
io_addrI/O address

References data.

◆ iowrite16()

void iowrite16 ( uint16_t data,
volatile uint16_t * io_addr )

Write 16-bit word to I/O-mapped or memory-mapped device.

Parameters
dataValue to write
io_addrI/O address

References data.

◆ iowrite32()

void iowrite32 ( uint32_t data,
volatile uint32_t * io_addr )

Write 32-bit dword to I/O-mapped or memory-mapped device.

Parameters
dataValue to write
io_addrI/O address

References data.

◆ insb()

void insb ( volatile uint8_t * io_addr,
uint8_t * data,
unsigned int count )

Read bytes from I/O-mapped device.

Parameters
io_addrI/O address
dataData buffer
countNumber of bytes to read

References count, and data.

◆ insw()

void insw ( volatile uint16_t * io_addr,
uint16_t * data,
unsigned int count )

Read 16-bit words from I/O-mapped device.

Parameters
io_addrI/O address
dataData buffer
countNumber of words to read

References count, and data.

◆ insl()

void insl ( volatile uint32_t * io_addr,
uint32_t * data,
unsigned int count )

Read 32-bit words from I/O-mapped device.

Parameters
io_addrI/O address
dataData buffer
countNumber of words to read

References count, and data.

◆ outsb()

void outsb ( volatile uint8_t * io_addr,
const uint8_t * data,
unsigned int count )

Write bytes to I/O-mapped device.

Parameters
io_addrI/O address
dataData buffer
countNumber of bytes to write

References count, and data.

◆ outsw()

void outsw ( volatile uint16_t * io_addr,
const uint16_t * data,
unsigned int count )

Write 16-bit words to I/O-mapped device.

Parameters
io_addrI/O address
dataData buffer
countNumber of words to write

References count, and data.

◆ outsl()

void outsl ( volatile uint32_t * io_addr,
const uint32_t * data,
unsigned int count )

Write 32-bit words to I/O-mapped device.

Parameters
io_addrI/O address
dataData buffer
countNumber of words to write

References count, and data.

◆ iodelay()

void iodelay ( void )

Slow down I/O.

Referenced by IOAPI_INLINE(), myson_poll(), and PROVIDE_IOAPI_INLINE().

◆ mb()