import "generic_io.idl";
Public Member Functions | |
Miscellaneous Services | |
Client registration and information purposes. | |
long | register_client ([in] l4_io_drv_t type) |
Register new io client. | |
long | unregister_client (l4_threadid_t client) |
Unregister io client. | |
long | map_info ([out] fpage *info) |
Initiate mapping of io info page. | |
Resource Allocation | |
Allocation and release of shared system resources - ports, memory, DMA channels. | |
long | request_region ([in] l4_uint16_t addr,[in] l4_uint16_t len,[out] l4_size_t *num,[out, size_is(num), max_is(l4_io_max_fpages), prealloc_client] fpage regions[]) |
Register for exclusive use of IO port region. | |
long | release_region ([in] l4_uint16_t addr,[in] l4_uint16_t len) |
Release IO port region. | |
long | request_mem_region ([in] unsigned long addr,[in] unsigned long len,[in] unsigned long flags,[out] fpage *region) |
Register for exclusive use of IO memory region. | |
long | search_mem_region ([in] unsigned long addr,[out] unsigned long *start,[out] l4_size_t *len) |
Search IO memory region given an address. | |
long | release_mem_region ([in] unsigned long addr,[in] unsigned long len) |
Release IO memory region. | |
long | request_dma ([in] unsigned long channel) |
Register for exclusive use of ISA DMA channel. | |
long | release_dma ([in] unsigned long channel) |
Release ISA DMA channel. | |
long | release_client ([in] l4_threadid_t client) |
Release all ressources of a client. For internal use by the event thread only. | |
PCI Services | |
Identification of devices and support for configuration space access. | |
long | pci_find_slot ([in] unsigned long bus,[in] unsigned long slot,[out] l4_io_pci_dev_t *pci_dev) |
Locate PCI device from a given PCI slot. | |
long | pci_find_device ([in] unsigned short vendor_id,[in] unsigned short device_id,[in] l4_io_pdev_t start_at,[out] l4_io_pci_dev_t *pci_dev) |
Search for PCI device by vendor/device id. | |
long | pci_find_class ([in] unsigned long class_id,[in] l4_io_pdev_t start_at,[out] l4_io_pci_dev_t *pci_dev) |
Search for PCI device by class. | |
long | pci_enable_device ([in] l4_io_pdev_t pdev) |
Initialize device before it's used by a driver. | |
long | pci_disable_device ([in] l4_io_pdev_t pdev) |
Finalize device after use. | |
long | pci_set_master ([in] l4_io_pdev_t pdev) |
Enable busmastering for PCI device. | |
long | pci_set_power_state ([in] l4_io_pdev_t pdev,[in, out] int *state) |
Set power management state of PCI device. | |
long | pci_read_config_byte ([in] l4_io_pdev_t pdev,[in] long offset,[out] byte *val) |
Read configuration BYTE registers of PCI device. | |
long | pci_read_config_word ([in] l4_io_pdev_t pdev,[in] long offset,[out] l4_uint16_t *val) |
Read configuration WORD registers of PCI device. | |
long | pci_read_config_dword ([in] l4_io_pdev_t pdev,[in] long offset,[out] l4_uint32_t *val) |
Read configuration DWORD registers of PCI device. | |
long | pci_write_config_byte ([in] l4_io_pdev_t pdev,[in] long offset,[in] byte val) |
Write configuration BYTE registers of PCI device. | |
long | pci_write_config_word ([in] l4_io_pdev_t pdev,[in] long offset,[in] unsigned short val) |
Write configuration WORD registers of PCI device. | |
long | pci_write_config_dword ([in] l4_io_pdev_t pdev,[in] long offset,[in] unsigned long val) |
Write configuration DWORD registers of PCI device. |
long l4::io::register_client | ( | [in] l4_io_drv_t | type | ) |
Register new io client.
type | client info |
long l4::io::unregister_client | ( | l4_threadid_t | client | ) |
Unregister io client.
client | the client to unregister, must be equal to the caller if called by a client (this function is also called by the events thread). |
long l4::io::map_info | ( | [out] fpage * | info | ) |
long l4::io::request_region | ( | [in] l4_uint16_t | addr, | |
[in] l4_uint16_t | len, | |||
[out] l4_size_t * | num, | |||
[out, size_is(num), max_is(l4_io_max_fpages), prealloc_client] fpage | regions[] | |||
) |
Register for exclusive use of IO port region.
addr | start of IO port region | |
len | length of IO port region |
regions | I/O flexpages describing the requested region | |
num | number of valid entries in region array |
Note: The number of elements in the region array cannot exceed log2 (2^16) * 2, which is 32.
long l4::io::release_region | ( | [in] l4_uint16_t | addr, | |
[in] l4_uint16_t | len | |||
) |
Release IO port region.
addr | start of IO port region | |
len | length of IO port region |
long l4::io::request_mem_region | ( | [in] unsigned long | addr, | |
[in] unsigned long | len, | |||
[in] unsigned long | flags, | |||
[out] fpage * | region | |||
) |
Register for exclusive use of IO memory region.
addr | start of memory region | |
len | length of memory region | |
flags | bit 0=1: map memory cacheable (otherwise uncacheable) bit 1=1: set MTRR with attribute ``write combining'' to that physical memory range |
region | fpage for memory region |
This is Linux' request_mem_region()+ioremap().
long l4::io::search_mem_region | ( | [in] unsigned long | addr, | |
[out] unsigned long * | start, | |||
[out] l4_size_t * | len | |||
) |
Search IO memory region given an address.
addr | Address to search |
start | Start of region if found | |
len | Length of region if found |
long l4::io::release_mem_region | ( | [in] unsigned long | addr, | |
[in] unsigned long | len | |||
) |
Release IO memory region.
addr | start of memory region | |
len | length of memory region |
This'll be Linux' iounmap()+release_mem_region().
long l4::io::request_dma | ( | [in] unsigned long | channel | ) |
Register for exclusive use of ISA DMA channel.
channel | DMA channel number |
long l4::io::release_dma | ( | [in] unsigned long | channel | ) |
Release ISA DMA channel.
channel | DMA channel number |
long l4::io::release_client | ( | [in] l4_threadid_t | client | ) |
Release all ressources of a client. For internal use by the event thread only.
client | Client |
long l4::io::pci_find_slot | ( | [in] unsigned long | bus, | |
[in] unsigned long | slot, | |||
[out] l4_io_pci_dev_t * | pci_dev | |||
) |
Locate PCI device from a given PCI slot.
bus | number of PCI bus on which desired device resides | |
slot | number of PCI slot in which desired device resides |
pci_dev | data structure for PCI device found |
long l4::io::pci_find_device | ( | [in] unsigned short | vendor_id, | |
[in] unsigned short | device_id, | |||
[in] l4_io_pdev_t | start_at, | |||
[out] l4_io_pci_dev_t * | pci_dev | |||
) |
Search for PCI device by vendor/device id.
vendor_id | PCI vendor id to match (maybe PCI_ANY_ID) | |
device_id | PCI device id to match (maybe PCI_ANY_ID) | |
start_at | previous PCI device found, or 0 for new search |
pci_dev | data structure for PCI device found |
long l4::io::pci_find_class | ( | [in] unsigned long | class_id, | |
[in] l4_io_pdev_t | start_at, | |||
[out] l4_io_pci_dev_t * | pci_dev | |||
) |
Search for PCI device by class.
class_id | class designation | |
start_at | previous PCI device found, or 0 for new search |
pci_dev | data structure for PCI device found |
long l4::io::pci_enable_device | ( | [in] l4_io_pdev_t | pdev | ) |
Initialize device before it's used by a driver.
pdev | handle of PCI device to be initialized |
long l4::io::pci_disable_device | ( | [in] l4_io_pdev_t | pdev | ) |
Finalize device after use.
pdev | handle of PCI device to be initialized |
long l4::io::pci_set_master | ( | [in] l4_io_pdev_t | pdev | ) |
Enable busmastering for PCI device.
pdev | handle of PCI device |
long l4::io::pci_set_power_state | ( | [in] l4_io_pdev_t | pdev, | |
[in, out] int * | state | |||
) |
Set power management state of PCI device.
pdev | handle of PCI device | |
state | new PM state |
state | old PM state |
long l4::io::pci_read_config_byte | ( | [in] l4_io_pdev_t | pdev, | |
[in] long | offset, | |||
[out] byte * | val | |||
) |
Read configuration BYTE registers of PCI device.
pdev | PCI device handle | |
offset | PCI configuration register |
val | register value read |
long l4::io::pci_read_config_word | ( | [in] l4_io_pdev_t | pdev, | |
[in] long | offset, | |||
[out] l4_uint16_t * | val | |||
) |
Read configuration WORD registers of PCI device.
pdev | PCI device | |
offset | PCI configuration register |
val | register value read |
long l4::io::pci_read_config_dword | ( | [in] l4_io_pdev_t | pdev, | |
[in] long | offset, | |||
[out] l4_uint32_t * | val | |||
) |
Read configuration DWORD registers of PCI device.
pdev | PCI device | |
offset | PCI configuration register |
val | register value read |
long l4::io::pci_write_config_byte | ( | [in] l4_io_pdev_t | pdev, | |
[in] long | offset, | |||
[in] byte | val | |||
) |
Write configuration BYTE registers of PCI device.
pdev | PCI device | |
offset | PCI configuration register | |
val | register value to write |
long l4::io::pci_write_config_word | ( | [in] l4_io_pdev_t | pdev, | |
[in] long | offset, | |||
[in] unsigned short | val | |||
) |
Write configuration WORD registers of PCI device.
pdev | PCI device | |
offset | PCI configuration register | |
val | register value to write |
long l4::io::pci_write_config_dword | ( | [in] l4_io_pdev_t | pdev, | |
[in] long | offset, | |||
[in] unsigned long | val | |||
) |
Write configuration DWORD registers of PCI device.
pdev | PCI device | |
offset | PCI configuration register | |
val | register value to write |