Loading...
Searching...
No Matches
IA32 Port I/O API
Utility Functions
Collaboration diagram for IA32 Port I/O API:

## Functions

L4_BEGIN_DECLS 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

  port | I/O port address

Returns
  value

Definition at line 176 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

  port | I/O port address

Returns
  value

Definition at line 184 of file port_io.h.

## l4util_in8()

L4_END_DECLS l4_uint8_t l4util_in8 | ( | l4_uint16_t | port | ) |

inline

Read byte from I/O port.

Parameters

  port | I/O port address

Returns
  value

Definition at line 168 of file port_io.h.

## 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

  port | I/O port address
  addr | address of buffer
  count | number of I/O operations

Definition at line 201 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

  port | I/O port address
  addr | address of buffer
  count | number of I/O operations

Definition at line 210 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

  port | I/O port address
  addr | address of buffer
  count | number of I/O operations

Definition at line 192 of file port_io.h.

## l4util_ioport_map()

L4_END_DECLS int l4util_ioport_map | ( | l4_cap_idx_t | sigma0id,
|  | unsigned | port_start,
|  | unsigned | log2size )

inline

Map a range of I/O ports.

Parameters

  sigma0id | I/O port service (sigma0).
  port_start | (Start) Port to request.
  log2size | Log2size 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

  port | I/O port address
  value | value to write

Definition at line 225 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

  port | I/O port address
  value | value to write

Definition at line 231 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

  port | I/O port address
  value | value to write

Definition at line 219 of file port_io.h.

## 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

  port | I/O port address
  addr | address of buffer
  count | number of I/O operations

Definition at line 246 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

  port | I/O port address
  addr | address of buffer
  count | number of I/O operations

Definition at line 255 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

  port | I/O port address
  addr | address of buffer
  count | number of I/O operations

Definition at line 237 of file port_io.h.