Loading...
Searching...
No Matches
io.h File Reference
`#include <l4/sys/compiler.h>`
`#include <l4/sys/types.h>`
`#include <l4/sys/linkage.h>`
`#include <l4/io/types.h>`
Include dependency graph for io.h:

Go to the source code of this file.

## Functions

l4_cap_idx_t | l4io_request_icu (void)
| Request the ICU object of the client.
long | l4io_request_iomem (l4_addr_t phys, unsigned long size, int flags, l4_addr_t *virt)
| Request an IO memory region.
long | l4io_request_iomem_region (l4_addr_t phys, l4_addr_t virt, unsigned long size, int flags)
| Request an IO memory region and map it to a specified region.
long | l4io_release_iomem (l4_addr_t virt, unsigned long size)
| Release an IO memory region.
long | l4io_request_ioport (unsigned portnum, unsigned len)
| Request an IO port region.
long | l4io_release_ioport (unsigned portnum, unsigned len)
| Release an IO port region.
l4io_device_handle_t | l4io_get_root_device (void)
| Get root device handle of the device bus.
int | l4io_iterate_devices (l4io_device_handle_t *devhandle, l4io_device_t *dev, l4io_resource_handle_t *reshandle)
| Iterate over the device bus.
int | l4io_lookup_device (const char *devname, l4io_device_handle_t *dev_handle, l4io_device_t *dev, l4io_resource_handle_t *res_handle)
| Find a device by name.
int | l4io_lookup_resource (l4io_device_handle_t devhandle, enum l4io_resource_types_t type, l4io_resource_handle_t *reshandle, l4io_resource_t *res)
| Request a specific resource from a device description.
l4_addr_t | l4io_request_resource_iomem (l4io_device_handle_t devhandle, l4io_resource_handle_t *reshandle)
| Request IO memory.
void | l4io_request_all_ioports (void(*res_cb)(l4vbus_resource_t const *res))
| Request all available IO-port resources.
int | l4io_has_resource (enum l4io_resource_types_t type, l4vbus_paddr_t start, l4vbus_paddr_t end)
| Check if a resource is available.

## Function Documentation

## l4io_get_root_device()

l4io_device_handle_t l4io_get_root_device | ( | void |  | ) |

inline

Get root device handle of the device bus.

Returns
  root device handle

Definition at line 257 of file io.h.

## l4io_iterate_devices()

int l4io_iterate_devices | ( | l4io_device_handle_t * | devhandle,
|  | l4io_device_t * | dev,
|  | l4io_resource_handle_t * | reshandle )

Iterate over the device bus.

Parameters

  [in,out] | devhandle | Device handle to start iterating at. The next device handle is returned here.
  [out] | dev | Device information, may be NULL.
  [out] | reshandle | Resource handle.

Returns
  0 on success, error code otherwise

References L4_CV, and L4_EXPORT.

## l4io_request_all_ioports()

void l4io_request_all_ioports | ( | void(* | res_cb )(l4vbus_resource_t const *res) | ) |

Request all available IO-port resources.

Parameters

  res_cb | Callback function called for every port resource found, give NULL for no callback.

References L4_CV, and L4_EXPORT.

## l4io_request_icu()

l4_cap_idx_t l4io_request_icu | ( | void |  | ) |

Request the ICU object of the client.

Returns
  Client ICU object, an invalid capability selector is returned if no ICU is available.

References L4_CV, and L4_EXPORT.