Introduction   User API Reference   DSMlib Reference   IDL Interface   File List   Index  

Map Dataspace Regions
[Dataspace Manager Client API]

Functions to map dataspace pages / regions. More...

Defines

#define L4DM_READ   0x00000001
#define L4DM_WRITE   0x00000002
#define L4DM_RO   (L4DM_READ)
#define L4DM_RW   (L4DM_READ | L4DM_WRITE)
#define L4DM_MAP_PARTIAL   0x00000800
#define L4DM_MAP_MORE   0x00001000

Functions

L4_CV int l4dm_map_pages (const l4dm_dataspace_t *ds, l4_offs_t offs, l4_size_t size, l4_addr_t rcv_addr, int rcv_size2, l4_offs_t rcv_offs, l4_uint32_t flags, l4_addr_t *fpage_addr, l4_size_t *fpage_size)
 Map dataspace region (IDL wrapper).
L4_CV int l4dm_map_ds (const l4dm_dataspace_t *ds, l4_offs_t offs, l4_addr_t addr, l4_size_t size, l4_uint32_t flags)
 Map dataspace region.
L4_CV int l4dm_map (const void *ptr, l4_size_t size, l4_uint32_t flags)
 Map VM area.

Detailed Description

Functions to map dataspace pages / regions.


Define Documentation

#define L4DM_READ   0x00000001

Read access

Definition at line 39 of file dm_generic/include/consts.h.

#define L4DM_WRITE   0x00000002

Write access

Definition at line 42 of file dm_generic/include/consts.h.

#define L4DM_RO   (L4DM_READ)

read-only access

Definition at line 48 of file dm_generic/include/consts.h.

#define L4DM_RW   (L4DM_READ | L4DM_WRITE)

read-write access

Definition at line 51 of file dm_generic/include/consts.h.

#define L4DM_MAP_PARTIAL   0x00000800

Allow partial mappings

Definition at line 73 of file dm_generic/include/consts.h.

#define L4DM_MAP_MORE   0x00001000

Allow larger mappings than requested

Definition at line 76 of file dm_generic/include/consts.h.


Function Documentation

L4_CV int l4dm_map_pages ( const l4dm_dataspace_t ds,
l4_offs_t  offs,
l4_size_t  size,
l4_addr_t  rcv_addr,
int  rcv_size2,
l4_offs_t  rcv_offs,
l4_uint32_t  flags,
l4_addr_t *  fpage_addr,
l4_size_t *  fpage_size 
)

Map dataspace region (IDL wrapper).

Parameters:
ds Dataspace descriptor
offs Offset in dataspace
size Region size
rcv_addr Receive window address
rcv_size2 Receive window size (log2)
rcv_offs Offset in receive window
flags Flags:
Return values:
fpage_addr Map address of receive fpage
fpage_size Size of receive fpage
Returns:
0 on success (got fpage), error code otherwise:
  • -L4_EIPC IPC error calling dataspace manager
  • -L4_EINVAL invalid dataspace id or map / receive window size
  • -L4_EINVAL_OFFS invalid dataspace / receive window offset
  • -L4_EPERM permission denied
Map the specified dataspace region. rcv_addr and rcv_size2 must be a valid L4 flexpage receive window specification. For a detailed description of L4DM_MAP_PARTIAL and L4DM_MAP_MORE see l4dm_map().

L4_CV int l4dm_map_ds ( const l4dm_dataspace_t ds,
l4_offs_t  offs,
l4_addr_t  addr,
l4_size_t  size,
l4_uint32_t  flags 
)

Map dataspace region.

Parameters:
ds Dataspace descriptor
offs Offset in dataspace
addr Map address
size Map size
flags Flags:
Returns:
0 on success (mapped VM area), error code otherwise:
  • -L4_EINVAL Invalid vm region (i.e. no dataspace attached to that region, but external pager etc.)
  • -L4_EIPC IPC error calling regione mapper / dataspace manager
  • -L4_ENOTFOUND No dataspace attached to parts of the VM area
  • -L4_EPERM Permission denied
Map the specified area of the specifed dataspace. This is a better IDL wrapper than l4dm_map_pages since we don't worry about the receive window.

L4_CV int l4dm_map ( const void *  ptr,
l4_size_t  size,
l4_uint32_t  flags 
)

Map VM area.

Parameters:
ptr VM address
size Area size
flags Flags:
Returns:
0 on success (mapped VM area), error code otherwise:
  • -L4_EINVAL Invalid vm region (i.e. no dataspace attached to that region, but external pager etc.)
  • -L4_EIPC IPC error calling regione mapper / dataspace manager
  • -L4_ENOTFOUND No dataspace attached to parts of the VM area
  • -L4_EPERM Permission denied
Map the specified VM area. This will lookup the dataspaces which are attached to the VM area and will call the dataspace managers to map the dataspace pages.

Flags:

  • L4DM_MAP_PARTIAL allow partial mappings of the VM area. If no dataspace is attached to a part of the VM area, just stop mapping and return without an error.
  • L4DM_MAP_MORE if possible, map more than the specified VM region. This allows l4dm_map to map more pages than specified by ptr and size if a dataspace is attached to a larger VM region.


DMphys Reference Manual, written by Lars Reuther  © 2000-2003