L4Re - L4 Runtime Environment
Dataspace interface

Dataspace C interface. More...

+ Collaboration diagram for Dataspace interface:

Data Structures

struct  l4re_ds_stats_t
 Information about the data space. More...
 

Typedefs

typedef l4_cap_idx_t l4re_ds_t
 Dataspace type.
 
typedef l4_cap_idx_t l4re_namespace_t
 Namespace type.
 

Enumerations

enum  l4re_ds_map_flags { ,
  L4RE_DS_MAP_NORMAL = 0x00, L4RE_DS_MAP_CACHEABLE = L4RE_DS_MAP_NORMAL, L4RE_DS_MAP_BUFFERABLE = 0x10, L4RE_DS_MAP_UNCACHEABLE = 0x20,
  L4RE_DS_MAP_CACHING_MASK = 0x30, L4RE_DS_MAP_CACHING_SHIFT = 4
}
 Flags to specify the memory mapping type of a request. More...
 

Functions

long l4re_ds_clear (const l4re_ds_t ds, l4_addr_t offset, unsigned long size) L4_NOTHROW
 
long l4re_ds_allocate (const l4re_ds_t ds, l4_addr_t offset, l4_size_t size) L4_NOTHROW
 
int l4re_ds_copy_in (const l4re_ds_t ds, l4_addr_t dst_offs, const l4re_ds_t src, l4_addr_t src_offs, unsigned long size) L4_NOTHROW
 
unsigned long l4re_ds_size (const l4re_ds_t ds) L4_NOTHROW
 
long l4re_ds_flags (const l4re_ds_t ds) L4_NOTHROW
 
int l4re_ds_info (const l4re_ds_t ds, l4re_ds_stats_t *stats) L4_NOTHROW
 
int l4re_ds_phys (const l4re_ds_t ds, l4_addr_t offset, l4_addr_t *phys_addr, l4_size_t *phys_size) L4_NOTHROW
 Return physical address. More...
 

Detailed Description

Dataspace C interface.

Enumeration Type Documentation

◆ l4re_ds_map_flags

Flags to specify the memory mapping type of a request.

Enumerator
L4RE_DS_MAP_NORMAL 

request normal memory mapping

L4RE_DS_MAP_CACHEABLE 

request normal memory mapping

L4RE_DS_MAP_BUFFERABLE 

request bufferable (write buffered) mappings

L4RE_DS_MAP_UNCACHEABLE 

request uncacheable memory mappings

L4RE_DS_MAP_CACHING_MASK 

mask for caching flags

L4RE_DS_MAP_CACHING_SHIFT 

shift value for caching flags

Definition at line 54 of file dataspace.h.

Function Documentation

◆ l4re_ds_allocate()

long l4re_ds_allocate ( const l4re_ds_t  ds,
l4_addr_t  offset,
l4_size_t  size 
)
Returns
0 on success, <0 on errors
See also
L4Re::Dataspace::allocate

◆ l4re_ds_clear()

long l4re_ds_clear ( const l4re_ds_t  ds,
l4_addr_t  offset,
unsigned long  size 
)
Returns
0 on success, <0 on errors
See also
L4Re::Dataspace::clear

◆ l4re_ds_copy_in()

int l4re_ds_copy_in ( const l4re_ds_t  ds,
l4_addr_t  dst_offs,
const l4re_ds_t  src,
l4_addr_t  src_offs,
unsigned long  size 
)
Returns
0 on success, <0 on errors
See also
L4Re::Dataspace::copy_in

◆ l4re_ds_flags()

long l4re_ds_flags ( const l4re_ds_t  ds)

◆ l4re_ds_info()

int l4re_ds_info ( const l4re_ds_t  ds,
l4re_ds_stats_t stats 
)

◆ l4re_ds_phys()

int l4re_ds_phys ( const l4re_ds_t  ds,
l4_addr_t  offset,
l4_addr_t phys_addr,
l4_size_t phys_size 
)

Return physical address.

Parameters
dsDataspace
offsetOffset in bytes in dataspace
Return values
phys_addrPhysical address
phys_sizeSize of physically contiguous region starting from phys_addr (in bytes).
Returns
0 for success, <0 on error

The function returns the physical address of an offset in a dataspace. Use multiple calls of the function to get all physical regions in case of physically non-contiguous dataspaces.

See also
L4Re::Dataspace::phys

◆ l4re_ds_size()

unsigned long l4re_ds_size ( const l4re_ds_t  ds)
Returns
Size of the dataspace in bytes.
See also
L4Re::Dataspace::size