L4Re - L4 Runtime Environment
|
Region map C interface. More...
Enumerations | |
enum | l4re_rm_flags_t { L4RE_RM_READ_ONLY = 0x01, L4RE_RM_NO_ALIAS = 0x02, L4RE_RM_PAGER = 0x04, L4RE_RM_RESERVED = 0x08, L4RE_RM_CACHING_SHIFT = 8, L4RE_RM_CACHING_DS_SHIFT = L4RE_RM_CACHING_SHIFT - L4RE_DS_MAP_CACHING_SHIFT, L4RE_RM_CACHING = L4RE_DS_MAP_CACHING_MASK << L4RE_RM_CACHING_DS_SHIFT, L4RE_RM_REGION_FLAGS = L4RE_RM_CACHING | 0x0f, L4RE_RM_CACHE_NORMAL = L4RE_DS_MAP_NORMAL << L4RE_RM_CACHING_DS_SHIFT, L4RE_RM_CACHE_BUFFERED = L4RE_DS_MAP_BUFFERABLE << L4RE_RM_CACHING_DS_SHIFT, L4RE_RM_CACHE_UNCACHED = L4RE_DS_MAP_UNCACHEABLE << L4RE_RM_CACHING_DS_SHIFT, L4RE_RM_OVERMAP = 0x10, L4RE_RM_SEARCH_ADDR = 0x20, L4RE_RM_IN_AREA = 0x40, L4RE_RM_EAGER_MAP = 0x80, L4RE_RM_ATTACH_FLAGS = 0xf0 } |
Flags for region operations. More... | |
Functions | |
int | l4re_rm_reserve_area (l4_addr_t *start, unsigned long size, unsigned flags, unsigned char align) L4_NOTHROW |
int | l4re_rm_free_area (l4_addr_t addr) L4_NOTHROW |
int | l4re_rm_attach (void **start, unsigned long size, unsigned long flags, l4re_ds_t const mem, l4_addr_t offs, unsigned char align) L4_NOTHROW |
int | l4re_rm_detach (void *addr) L4_NOTHROW |
Detach and unmap in current task. More... | |
int | l4re_rm_detach_ds (void *addr, l4re_ds_t *ds) L4_NOTHROW |
Detach, unmap and return affected dataspace in current task. More... | |
int | l4re_rm_detach_unmap (l4_addr_t addr, l4_cap_idx_t task) L4_NOTHROW |
Detach and unmap in specified task. More... | |
int | l4re_rm_detach_ds_unmap (void *addr, l4re_ds_t *ds, l4_cap_idx_t task) L4_NOTHROW |
Detach and unmap in specified task. More... | |
int | l4re_rm_find (l4_addr_t *addr, unsigned long *size, l4_addr_t *offset, unsigned *flags, l4re_ds_t *m) L4_NOTHROW |
void | l4re_rm_show_lists (void) L4_NOTHROW |
Dump region map internal data structures. More... | |
int | l4re_rm_reserve_area_srv (l4_cap_idx_t rm, l4_addr_t *start, unsigned long size, unsigned flags, unsigned char align) L4_NOTHROW |
int | l4re_rm_free_area_srv (l4_cap_idx_t rm, l4_addr_t addr) L4_NOTHROW |
int | l4re_rm_attach_srv (l4_cap_idx_t rm, void **start, unsigned long size, unsigned long flags, l4re_ds_t const mem, l4_addr_t offs, unsigned char align) L4_NOTHROW |
int | l4re_rm_detach_srv (l4_cap_idx_t rm, l4_addr_t addr, l4re_ds_t *ds, l4_cap_idx_t task) L4_NOTHROW |
int | l4re_rm_find_srv (l4_cap_idx_t rm, l4_addr_t *addr, unsigned long *size, l4_addr_t *offset, unsigned *flags, l4re_ds_t *m) L4_NOTHROW |
void | l4re_rm_show_lists_srv (l4_cap_idx_t rm) L4_NOTHROW |
Dump region map internal data structures. | |
Region map C interface.
enum l4re_rm_flags_t |
Flags for region operations.
|
inline |
[in,out] | start | Virtual start address where the region manager shall attach the data space. If L4Re::Rm::Search_addr is given this value is used as the start address to search for a free virtual memory region and the resulting address is returned here. If L4Re::Rm::In_area is given the value is used as a selector for the area (see L4Re::Rm::reserve_area) to attach the data space to. |
size | Size of the data space to attach (in bytes) | |
flags | Flags, see L4Re::Rm::Attach_flags and L4Re::Rm::Region_flags. If the Eager_map flag is set this function may also return L4Re::Dataspace::map error codes if the mapping fails. | |
mem | Data space | |
offs | Offset into the data space to use | |
align | Alignment of the virtual region, log2-size, default: a page (L4_PAGESHIFT). This is only meaningful if the L4Re::Rm::Search_addr flag is used. |
0 | Success |
-L4_ENOENT | No area could be found (see L4Re::Rm::In_area) |
-L4_EPERM | Operation not allowed. |
-L4_EINVAL | |
-L4_EADDRNOTAVAIL | The given address is not available. |
<0 | IPC errors |
Makes the whole or parts of a data space visible in the virtual memory of the corresponding task. The corresponding region in the virtual address space is backed with the contents of the dataspace.
This function is using the L4::Env::env()->rm() service.
Definition at line 261 of file rm.h.
References l4re_rm_attach_srv().
int l4re_rm_attach_srv | ( | l4_cap_idx_t | rm, |
void ** | start, | ||
unsigned long | size, | ||
unsigned long | flags, | ||
l4re_ds_t const | mem, | ||
l4_addr_t | offs, | ||
unsigned char | align | ||
) |
Referenced by l4re_rm_attach().
|
inline |
Detach and unmap in current task.
addr | Address of the region to detach. |
Also
This function is using the L4::Env::env()->rm() service.
Definition at line 271 of file rm.h.
References l4re_rm_detach_srv().
|
inline |
Detach, unmap and return affected dataspace in current task.
addr | Address of the region to detach. |
ds | Returns dataspace that is affected. |
Also
This function is using the L4::Env::env()->rm() service.
Definition at line 284 of file rm.h.
References l4re_rm_detach_srv().
|
inline |
Detach and unmap in specified task.
addr | Address of the region to detach. |
ds | Returns dataspace that is affected. |
task | Task to unmap pages from, specify L4_INVALID_CAP to not unmap |
Also
This function is using the L4::Env::env()->rm() service.
Definition at line 291 of file rm.h.
References l4re_rm_detach_srv().
int l4re_rm_detach_srv | ( | l4_cap_idx_t | rm, |
l4_addr_t | addr, | ||
l4re_ds_t * | ds, | ||
l4_cap_idx_t | task | ||
) |
Referenced by l4re_rm_detach(), l4re_rm_detach_ds(), l4re_rm_detach_ds_unmap(), and l4re_rm_detach_unmap().
|
inline |
Detach and unmap in specified task.
addr | Address of the region to detach. |
task | Task to unmap pages from, specify L4_INVALID_CAP to not unmap |
Also
This function is using the L4::Env::env()->rm() service.
Definition at line 278 of file rm.h.
References l4re_rm_detach_srv().
|
inline |
Definition at line 298 of file rm.h.
References l4re_rm_find_srv().
int l4re_rm_find_srv | ( | l4_cap_idx_t | rm, |
l4_addr_t * | addr, | ||
unsigned long * | size, | ||
l4_addr_t * | offset, | ||
unsigned * | flags, | ||
l4re_ds_t * | m | ||
) |
|
inline |
This function is using the L4::Env::env()->rm() service.
Definition at line 255 of file rm.h.
References l4re_rm_free_area_srv().
int l4re_rm_free_area_srv | ( | l4_cap_idx_t | rm, |
l4_addr_t | addr | ||
) |
Referenced by l4re_rm_free_area().
|
inline |
This function is using the L4::Env::env()->rm() service.
Definition at line 247 of file rm.h.
References l4re_rm_reserve_area_srv().
int l4re_rm_reserve_area_srv | ( | l4_cap_idx_t | rm, |
l4_addr_t * | start, | ||
unsigned long | size, | ||
unsigned | flags, | ||
unsigned char | align | ||
) |
Referenced by l4re_rm_reserve_area().
|
inline |
Dump region map internal data structures.
This function is using the L4::Env::env()->rm() service.
Definition at line 305 of file rm.h.
References l4re_rm_show_lists_srv().