L4Re Operating System Framework
Interface and Usage Documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
IA32 Port I/O API
+ Collaboration diagram for IA32 Port I/O API:

Functions

int l4util_ioport_map (l4_cap_idx_t sigma0id, unsigned port_start, unsigned log2size)
 Map a range of I/O ports.
 
l4_uint8_t l4util_in8 (l4_uint16_t port)
 Read byte from I/O port.
 
l4_uint16_t l4util_in16 (l4_uint16_t port)
 Read 16-bit-value from I/O port.
 
l4_uint32_t l4util_in32 (l4_uint16_t port)
 Read 32-bit-value from I/O port.
 
void l4util_ins8 (l4_uint16_t port, l4_umword_t addr, l4_umword_t count)
 Read a block of 8-bit-values from I/O ports.
 
void l4util_ins16 (l4_uint16_t port, l4_umword_t addr, l4_umword_t count)
 Read a block of 16-bit-values from I/O ports.
 
void l4util_ins32 (l4_uint16_t port, l4_umword_t addr, l4_umword_t count)
 Read a block of 32-bit-values from I/O ports.
 
void l4util_out8 (l4_uint8_t value, l4_uint16_t port)
 Write byte to I/O port.
 
void l4util_out16 (l4_uint16_t value, l4_uint16_t port)
 Write 16-bit-value to I/O port.
 
void l4util_out32 (l4_uint32_t value, l4_uint16_t port)
 Write 32-bit-value to I/O port.
 
void l4util_outs8 (l4_uint16_t port, l4_umword_t addr, l4_umword_t count)
 Write a block of bytes to I/O port.
 
void l4util_outs16 (l4_uint16_t port, l4_umword_t addr, l4_umword_t count)
 Write a block of 16-bit-values to I/O port.
 
void l4util_outs32 (l4_uint16_t port, l4_umword_t addr, l4_umword_t count)
 Write block of 32-bit-values to I/O port.
 
void l4util_iodelay (void)
 delay I/O port access by writing to port 0x80
 

Detailed Description

Function Documentation

◆ l4util_in16()

l4_uint16_t l4util_in16 ( l4_uint16_t  port)
inline

Read 16-bit-value from I/O port.

Parameters
portI/O port address
Returns
value

Definition at line 178 of file port_io.h.

◆ l4util_in32()

l4_uint32_t l4util_in32 ( l4_uint16_t  port)
inline

Read 32-bit-value from I/O port.

Parameters
portI/O port address
Returns
value

Definition at line 186 of file port_io.h.

◆ l4util_in8()

l4_uint8_t l4util_in8 ( l4_uint16_t  port)
inline

Read byte from I/O port.

Parameters
portI/O port address
Returns
value

Definition at line 170 of file port_io.h.

Referenced by l4util_irq_acknowledge().

+ Here is the caller graph for this function:

◆ l4util_ins16()

void l4util_ins16 ( l4_uint16_t  port,
l4_umword_t  addr,
l4_umword_t  count 
)
inline

Read a block of 16-bit-values from I/O ports.

Parameters
portI/O port address
addraddress of buffer
countnumber of I/O operations

Definition at line 203 of file port_io.h.

◆ l4util_ins32()

void l4util_ins32 ( l4_uint16_t  port,
l4_umword_t  addr,
l4_umword_t  count 
)
inline

Read a block of 32-bit-values from I/O ports.

Parameters
portI/O port address
addraddress of buffer
countnumber of I/O operations

Definition at line 212 of file port_io.h.

◆ l4util_ins8()

void l4util_ins8 ( l4_uint16_t  port,
l4_umword_t  addr,
l4_umword_t  count 
)
inline

Read a block of 8-bit-values from I/O ports.

Parameters
portI/O port address
addraddress of buffer
countnumber of I/O operations

Definition at line 194 of file port_io.h.

◆ l4util_ioport_map()

int l4util_ioport_map ( l4_cap_idx_t  sigma0id,
unsigned  port_start,
unsigned  log2size 
)
inline

Map a range of I/O ports.

Parameters
sigma0idI/O port service (sigma0).
port_start(Start) Port to request.
log2sizeLog2size of range to request.
Returns
IPC result: 0 if the range could be successfully mapped on error: IPC failure, or -L4_ENOENT if nothing mapped

Definition at line 54 of file port_io.h.

References l4_buf_regs_t::bdr, l4_buf_regs_t::br, L4_ENOENT, l4_iofpage(), l4_ipc_call(), l4_ipc_error(), L4_IPC_NEVER, L4_ITEM_MAP, l4_msgtag(), l4_msgtag_items(), L4_PROTO_IO_PAGE_FAULT, l4_utcb(), l4_utcb_br(), l4_utcb_mr(), l4_msg_regs_t::mr, and l4_fpage_t::raw.

+ Here is the call graph for this function:

◆ l4util_out16()

void l4util_out16 ( l4_uint16_t  value,
l4_uint16_t  port 
)
inline

Write 16-bit-value to I/O port.

Parameters
portI/O port address
valuevalue to write

Definition at line 227 of file port_io.h.

◆ l4util_out32()

void l4util_out32 ( l4_uint32_t  value,
l4_uint16_t  port 
)
inline

Write 32-bit-value to I/O port.

Parameters
portI/O port address
valuevalue to write

Definition at line 233 of file port_io.h.

◆ l4util_out8()

void l4util_out8 ( l4_uint8_t  value,
l4_uint16_t  port 
)
inline

Write byte to I/O port.

Parameters
portI/O port address
valuevalue to write

Definition at line 221 of file port_io.h.

Referenced by l4util_irq_acknowledge().

+ Here is the caller graph for this function:

◆ l4util_outs16()

void l4util_outs16 ( l4_uint16_t  port,
l4_umword_t  addr,
l4_umword_t  count 
)
inline

Write a block of 16-bit-values to I/O port.

Parameters
portI/O port address
addraddress of buffer
countnumber of I/O operations

Definition at line 248 of file port_io.h.

◆ l4util_outs32()

void l4util_outs32 ( l4_uint16_t  port,
l4_umword_t  addr,
l4_umword_t  count 
)
inline

Write block of 32-bit-values to I/O port.

Parameters
portI/O port address
addraddress of buffer
countnumber of I/O operations

Definition at line 257 of file port_io.h.

◆ l4util_outs8()

void l4util_outs8 ( l4_uint16_t  port,
l4_umword_t  addr,
l4_umword_t  count 
)
inline

Write a block of bytes to I/O port.

Parameters
portI/O port address
addraddress of buffer
countnumber of I/O operations

Definition at line 239 of file port_io.h.