Loading...
Searching...
No Matches
dataspace.h
Go to the documentation of this file.
/*
* (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
* Alexander Warg <warg@os.inf.tu-dresden.de>
* economic rights: Technische Universität Dresden (Germany)
*
* License: see LICENSE.spdx (in this directory or the directories above)
*/
#pragma once
#include <l4/sys/compiler.h>
#include <l4/sys/types.h>
L4_BEGIN_DECLS
typedef l4_cap_idx_t l4re_ds_t;
typedef l4_uint64_t l4re_ds_size_t;
typedef l4_uint64_t l4re_ds_offset_t;
typedef l4_uint64_t l4re_ds_map_addr_t;
typedef unsigned long l4re_ds_flags_t;
typedef struct {
l4re_ds_size_t size;
l4re_ds_flags_t flags;
} l4re_ds_stats_t;
enum l4re_ds_map_flags {
L4RE_DS_F_R = L4_FPAGE_RO,
L4RE_DS_F_W = L4_FPAGE_W,
L4RE_DS_F_X = L4_FPAGE_X,
L4RE_DS_F_RW = L4_FPAGE_RW,
L4RE_DS_F_RX = L4_FPAGE_RX,
L4RE_DS_F_RWX = L4_FPAGE_RWX,
L4RE_DS_F_RIGHTS_MASK = 0x0f,
L4RE_DS_F_NORMAL = 0x00,
L4RE_DS_F_CACHEABLE = L4RE_DS_F_NORMAL,
L4RE_DS_F_BUFFERABLE = 0x10,
L4RE_DS_F_UNCACHEABLE = 0x20,
L4RE_DS_F_CACHING_MASK = 0x30,
L4RE_DS_F_CACHING_SHIFT = 4,
};
L4_CV int
l4re_ds_map(l4re_ds_t ds,
l4re_ds_offset_t offset,
l4re_ds_flags_t flags,
l4re_ds_map_addr_t local_addr,
l4re_ds_map_addr_t min_addr,
l4re_ds_map_addr_t max_addr) L4_NOTHROW;
L4_CV int
l4re_ds_map_region(l4re_ds_t ds,
l4re_ds_offset_t offset,
l4re_ds_flags_t flags,
l4re_ds_map_addr_t min_addr,
l4re_ds_map_addr_t max_addr) L4_NOTHROW;
L4_CV long
l4re_ds_clear(l4re_ds_t ds, l4re_ds_offset_t offset,
l4re_ds_size_t size) L4_NOTHROW;
L4_CV long
l4re_ds_allocate(l4re_ds_t ds,
l4re_ds_offset_t offset,
l4re_ds_size_t size) L4_NOTHROW;
L4_CV int
l4re_ds_copy_in(l4re_ds_t ds, l4re_ds_offset_t dst_offs,
l4re_ds_t src, l4re_ds_offset_t src_offs,
l4re_ds_size_t size) L4_NOTHROW;
L4_CV l4re_ds_size_t
l4re_ds_size(l4re_ds_t ds) L4_NOTHROW;
L4_CV l4re_ds_flags_t
l4re_ds_flags(l4re_ds_t ds) L4_NOTHROW;
L4_CV int
l4re_ds_info(l4re_ds_t ds, l4re_ds_stats_t *stats) L4_NOTHROW;
L4_CV int
l4re_ds_map_info(l4re_ds_t ds,
l4_addr_t *start_addr, l4_addr_t *end_addr) L4_NOTHROW;
L4_END_DECLS
compiler.h
L4 compiler related defines.
l4re_ds_info
int l4re_ds_info(l4re_ds_t ds, l4re_ds_stats_t *stats) L4_NOTHROW
Get information on the dataspace.
l4re_ds_map_info
int l4re_ds_map_info(l4re_ds_t ds, l4_addr_t *start_addr, l4_addr_t *end_addr) L4_NOTHROW
Get mapping range of dataspace.
l4re_ds_t
L4_BEGIN_DECLS typedef l4_cap_idx_t l4re_ds_t
Dataspace type.
Definition dataspace.h:29
l4re_ds_flags
l4re_ds_flags_t l4re_ds_flags(l4re_ds_t ds) L4_NOTHROW
Get flags of the dataspace.
l4re_ds_allocate
long l4re_ds_allocate(l4re_ds_t ds, l4re_ds_offset_t offset, l4re_ds_size_t size) L4_NOTHROW
Allocate a range in the dataspace.
l4re_ds_clear
long l4re_ds_clear(l4re_ds_t ds, l4re_ds_offset_t offset, l4re_ds_size_t size) L4_NOTHROW
Clear parts of a dataspace.
l4re_ds_copy_in
int l4re_ds_copy_in(l4re_ds_t ds, l4re_ds_offset_t dst_offs, l4re_ds_t src, l4re_ds_offset_t src_offs, l4re_ds_size_t size) L4_NOTHROW
Copy contents from another dataspace.
l4re_ds_size
l4re_ds_size_t l4re_ds_size(l4re_ds_t ds) L4_NOTHROW
Get size of a dataspace.
l4re_ds_map_flags
l4re_ds_map_flags
Flags to specify the memory mapping type of a request.
Definition dataspace.h:48
L4RE_DS_F_BUFFERABLE
@ L4RE_DS_F_BUFFERABLE
request bufferable (write buffered) mappings
Definition dataspace.h:60
L4RE_DS_F_NORMAL
@ L4RE_DS_F_NORMAL
request normal memory mapping
Definition dataspace.h:58
L4RE_DS_F_CACHING_SHIFT
@ L4RE_DS_F_CACHING_SHIFT
shift value for caching flags
Definition dataspace.h:63
L4RE_DS_F_CACHING_MASK
@ L4RE_DS_F_CACHING_MASK
mask for caching flags
Definition dataspace.h:62
L4RE_DS_F_CACHEABLE
@ L4RE_DS_F_CACHEABLE
request normal memory mapping
Definition dataspace.h:59
L4RE_DS_F_UNCACHEABLE
@ L4RE_DS_F_UNCACHEABLE
request uncacheable memory mappings
Definition dataspace.h:61
l4_addr_t
unsigned long l4_addr_t
Address type.
Definition l4int.h:34
l4_uint64_t
unsigned long long l4_uint64_t
Unsigned 64bit value.
Definition l4int.h:31
l4_cap_idx_t
unsigned long l4_cap_idx_t
Capability selector type.
Definition types.h:336
L4_FPAGE_X
@ L4_FPAGE_X
Executable flexpage.
Definition __l4_fpage.h:120
L4_FPAGE_RWX
@ L4_FPAGE_RWX
Read-write-execute flexpage.
Definition __l4_fpage.h:125
L4_FPAGE_RX
@ L4_FPAGE_RX
Read-execute flexpage.
Definition __l4_fpage.h:124
L4_FPAGE_RO
@ L4_FPAGE_RO
Read-only flexpage.
Definition __l4_fpage.h:122
L4_FPAGE_RW
@ L4_FPAGE_RW
Read-write flexpage.
Definition __l4_fpage.h:123
L4_FPAGE_W
@ L4_FPAGE_W
Writable flexpage.
Definition __l4_fpage.h:121
L4_CV
#define L4_CV
Define calling convention.
Definition linkage.h:33
L4_NOTHROW
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
Definition compiler.h:161
L4_BEGIN_DECLS
#define L4_BEGIN_DECLS
Start section with C types and functions.
Definition compiler.h:165
L4_END_DECLS
#define L4_END_DECLS
End section with C types and functions.
Definition compiler.h:166
types.h
Common L4 ABI Data Types.
l4re_ds_stats_t
Information about the data space.
Definition dataspace.h:39
l4re_ds_stats_t::flags
l4re_ds_flags_t flags
flags
Definition dataspace.h:41
l4re_ds_stats_t::size
l4re_ds_size_t size
size
Definition dataspace.h:40