|
Defines |
#define | L4RM_REGION_FREE 1 |
| Free region.
|
#define | L4RM_REGION_RESERVED 2 |
| Reserved region.
|
#define | L4RM_REGION_DATASPACE 3 |
| Region with dataspace attached to it.
|
#define | L4RM_REGION_PAGER 4 |
| Region with external pager.
|
#define | L4RM_REGION_EXCEPTION 5 |
| Region in which pagefaults are forwared as exceptions.
|
#define | L4RM_REGION_BLOCKED 6 |
| Blocked (unavailable) region.
|
#define | L4RM_REGION_UNKNOWN 7 |
| Unknown region type.
|
#define | L4RM_DEFAULT_REGION_AREA 0 |
| Default region area id.
|
#define | L4RM_REPLY_EMPTY 0 |
| Reply with empty message.
|
#define | L4RM_REPLY_EXCEPTION 1 |
| Forward exception to source thread.
|
#define | L4RM_REPLY_NO_REPLY 2 |
| Send no reply.
|
#define | L4RM_REPLY_SUCCESS 3 |
| Successfully handled request.
|
Typedefs |
typedef L4_CV int(* | l4rm_pf_callback_fn_t )(l4_addr_t addr, l4_addr_t eip, l4_threadid_t src) |
| Pagefault callback function prototype.
|
typedef L4_CV int(* | l4rm_unknown_fault_callback_fn_t )(l4_msgtag_t tag, l4_utcb_t *utcb, l4_threadid_t src) |
| Callback function type for unknown faults.
|
Functions |
L4_CV L4_INLINE int | l4rm_area_setup (l4_size_t size, l4_uint32_t area, int type, l4_uint32_t flags, l4_threadid_t pager, l4_addr_t *addr) |
| Setup VM area.
|
L4_CV L4_INLINE int | l4rm_area_setup_region (l4_addr_t addr, l4_size_t size, l4_uint32_t area, int type, l4_uint32_t flags, l4_threadid_t pager) |
| Setup VM area.
|
L4_CV int | l4rm_area_clear_region (l4_addr_t addr) |
| Clear VM area.
|
L4_CV L4_INLINE int | l4rm_area_reserve (l4_size_t size, l4_uint32_t flags, l4_addr_t *addr, l4_uint32_t *area) |
| Reserve area.
|
L4_CV L4_INLINE int | l4rm_area_reserve_region (l4_addr_t addr, l4_size_t size, l4_uint32_t flags, l4_uint32_t *area) |
| Reserve specified area.
|
L4_CV int | l4rm_area_release (l4_uint32_t area) |
| Release area.
|
L4_CV int | l4rm_area_release_addr (const void *ptr) |
| Release area at given address.
|
L4_CV int | l4rm_set_userptr (const void *addr, void *ptr) |
| Store a user-defined pointer for region.
|
L4_CV void * | l4rm_get_userptr (const void *addr) |
| Read user-defined pointer for region.
|
L4_CV int | l4rm_lookup (const void *addr, l4_addr_t *map_addr, l4_size_t *map_size, l4dm_dataspace_t *ds, l4_offs_t *offset, l4_threadid_t *pager) |
| Lookup address.
|
L4_CV int | l4rm_lookup_region (const void *addr, l4_addr_t *map_addr, l4_size_t *map_size, l4dm_dataspace_t *ds, l4_offs_t *offset, l4_threadid_t *pager) |
| Lookup address, return size and type of region.
|
L4_CV void | l4rm_set_unkown_pagefault_callback (l4rm_pf_callback_fn_t callback) |
| Set callback function for unkown pagefaults.
|
L4_CV void | l4rm_set_unkown_fault_callback (l4rm_unknown_fault_callback_fn_t callback) |
| Set callback function for unkown faults.
|
L4_CV void | l4rm_enable_pagefault_exceptions (void) |
| Enable exception forward for unkown pagefaults.
|
L4_CV void | l4rm_disable_pagefault_exceptions (void) |
| Disable exception forward for unkown pagefaults.
|
L4_CV int l4rm_lookup |
( |
const void * |
addr, |
|
|
l4_addr_t * |
map_addr, |
|
|
l4_size_t * |
map_size, |
|
|
l4dm_dataspace_t * |
ds, |
|
|
l4_offs_t * |
offset, |
|
|
l4_threadid_t * |
pager | |
|
) |
| | |
Lookup address.
- Parameters:
-
- Return values:
-
| map_addr | Map area start address |
| map_size | Map area size |
| ds | Dataspace |
| offset | Offset of ptr in dataspace |
| pager | External pager |
- Returns:
- Region type on success (> 0):
Return the region type of the region at address
addr.
l4rm_lookup() only returns successfully if the region at
addr is really used (i.e. a dataspace was attached with l4rm_attach* or the region was set up with l4rm_area_setup*). If the region is not used (either really not used or only reserved using l4rm_reserve*),
l4rm_lookup() returns -L4_ENOTFOUND. To get also a result for free / reserved regions, use
l4rm_lookup_region() instead of
l4rm_lookup().
Note that l4rm_lookup_region() is slower than l4rm_lookup(), you should prefer l4rm_lookup() as long as you do not need to distinguish between free and reserved regions.