#include <l4/sys/types.h>
#include <l4/env/errno.h>
#include <l4/sys/syscalls.h>
#include <l4/sys/ipc.h>
#include <l4/rmgr/librmgr.h>
#include <l4/l4rm/l4rm.h>
#include <l4/generic_io/generic_io-server.h>
#include <l4/sigma0/sigma0.h>
#include <stdio.h>
#include <stdlib.h>
#include "io.h"
#include "res.h"
#include "__config.h"
#include "__macros.h"
Go to the source code of this file.
Classes | |
| struct | io_res |
| Arbitrated resources (creating an USED SPACE list). More... | |
| struct | io_ares |
| Announced I/O memory resources. More... | |
| struct | io_dma_res |
| DMA resources. More... | |
| struct | device_inclusion_list |
Region Specific Interface Functions (internal callbacks) | |
| Functions for system resource request, release, and announcement.
| |
|
static struct device_inclusion_list * | device_handle_inclusion_list |
|
static struct device_inclusion_list * | device_handle_exclusion_list |
| int | callback_request_region (unsigned long addr, unsigned long len) |
| Request I/O port region. | |
| int | callback_request_mem_region (unsigned long addr, unsigned long len) |
| Request I/O memory region. | |
| void | callback_announce_mem_region (unsigned long addr, unsigned long len) |
| Announce I/O memory region. | |
| int | callback_handle_pci_device (unsigned short vendor, unsigned short device) |
| Check if we should handle this specific PCI device
This is checked against the parameters the user provided on startup. | |
| static int | parse_device_pair (const char *s, unsigned short *vendor, unsigned short *device) |
| parse a 'vendor:device' pair into nums | |
| int | add_device_inclusion (const char *s) |
| add a new inclusion-entry | |
| int | add_device_exclusion (const char *s) |
| add a new inclusion-entry | |
| int | bios_map_area (unsigned long *ret_vaddr) |
| Map the BIOS32 service area. | |
| void * | bios_phys_to_virt (unsigned long paddr) |
| BIOS32 service area-specific address translation. | |
Defines | |
| #define | IO_REQ_PAGESIZE L4_SUPERPAGESIZE |
| #define | IO_REQ_LOG2_PAGESIZE L4_LOG2_SUPERPAGESIZE |
| #define | IO_REQ_PAGEMASK L4_SUPERPAGEMASK |
| #define | io_req_trunc_page(a) l4_trunc_superpage(a) |
| #define | IO_PAGESIZE L4_SUPERPAGESIZE |
| #define | IO_LOG2_PAGESIZE L4_LOG2_SUPERPAGESIZE |
| #define | IO_PAGEMASK L4_SUPERPAGEMASK |
| #define | io_trunc_page(a) l4_trunc_superpage(a) |
Typedefs | |
| typedef struct io_res | io_res_t |
| Arbitrated resources (creating an USED SPACE list). | |
| typedef struct io_ares | io_ares_t |
| Announced I/O memory resources. | |
Functions | |
| int | io_res_init (io_client_t *c) |
| Resource Module Initialization. | |
| static void | list_regions (void) |
| static void | list_mem_regions (void) |
| static void | list_amem_regions (void) |
| static void | list_dma (void) |
| void | list_res (void) |
Generic Resource Manipulation | |
| static io_client_t * | find_client (l4_threadid_t tid) |
| Find client structure. | |
| static int | __request_region (unsigned long start, unsigned long len, unsigned long max, io_res_t **root, io_client_t *c) |
| Generic allocate region. | |
| static int | __search_region (unsigned long addr, io_ares_t *p, unsigned long *start, unsigned long *len) |
| Generic search function. | |
| static int | __release_region (unsigned long start, unsigned long len, io_res_t **root, io_client_t *c) |
| Generic release region. | |
| static int | __release_region_client (io_res_t **root, io_client_t *c) |
| Generic release region for all regions of a specific client. | |
| static void | process_port_region (unsigned start, unsigned length, l4_snd_fpage_t **regions, l4_size_t *num) |
| Split I/O port region into fpages. | |
Request/Release Interface Functions (IPC interface) | |
Functions for system resource request and release. | |
| long | l4_io_request_region_component (CORBA_Object _dice_corba_obj, l4_uint16_t addr, l4_uint16_t len, l4_size_t *num, l4_snd_fpage_t regions[], CORBA_Server_Environment *_dice_corba_env) |
| Request I/O port region. | |
| long | l4_io_release_region_component (CORBA_Object _dice_corba_obj, l4_uint16_t addr, l4_uint16_t len, CORBA_Server_Environment *_dice_corba_env) |
| Release I/O port region. | |
| long | l4_io_request_mem_region_component (CORBA_Object _dice_corba_obj, unsigned long addr, unsigned long len, unsigned long flags, l4_snd_fpage_t *region, CORBA_Server_Environment *_dice_corba_env) |
| Request I/O memory region. | |
| long | l4_io_search_mem_region_component (CORBA_Object _dice_corba_obj, unsigned long addr, unsigned long *start, l4_size_t *len, CORBA_Server_Environment *_dice_corba_env) |
| Search for I/O memory region. | |
| long | l4_io_release_mem_region_component (CORBA_Object _dice_corba_obj, unsigned long addr, unsigned long len, CORBA_Server_Environment *_dice_corba_env) |
| Release I/O memory region. | |
| long | l4_io_request_dma_component (CORBA_Object _dice_corba_obj, unsigned long channel, CORBA_Server_Environment *_dice_corba_env) |
| Request ISA DMA Channel. | |
| long | l4_io_release_dma_component (CORBA_Object _dice_corba_obj, unsigned long channel, CORBA_Server_Environment *_dice_corba_env) |
| Release ISA DMA Channel. | |
| long | l4_io_release_client_component (CORBA_Object _dice_corba_obj, const l4_threadid_t *client, CORBA_Server_Environment *_dice_corba_env) |
| Release all regions of a client. | |
Variables | |
| static io_res_t * | io_port_res = NULL |
| IO ports. | |
| static io_res_t * | io_mem_res = NULL |
| IO memory. | |
| static io_ares_t * | io_mem_ares = NULL |
| announced IO memory | |
| static struct io_dma_res | isa_dma [8] |
| ISA DMA channels. | |
| static io_client_t * | io_self |
| l4io self client structure reference | |
| static const l4_addr_t | bios_paddr = 0xe0000 |
| BIOS32 service area 0xe0000-0xfffff. | |
| static l4_addr_t | bios_vaddr = 0 |
| static const l4_size_t | bios_size = 0x20000 |
Definition in file res.c.
| int add_device_exclusion | ( | const char * | s | ) |
| int add_device_inclusion | ( | const char * | s | ) |
| int bios_map_area | ( | unsigned long * | ret_vaddr | ) |
Map the BIOS32 service area.
| vaddr | virtual address on successfull mapping (undefined on errors!) |
| void* bios_phys_to_virt | ( | unsigned long | paddr | ) |
| static io_client_t* find_client | ( | l4_threadid_t | tid | ) | [static] |
| static int parse_device_pair | ( | const char * | s, | |
| unsigned short * | vendor, | |||
| unsigned short * | device | |||
| ) | [static] |
| static void process_port_region | ( | unsigned | start, | |
| unsigned | length, | |||
| l4_snd_fpage_t ** | regions, | |||
| l4_size_t * | num | |||
| ) | [static] |