L4Re Operating System Framework
Interface and Usage Documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
dataspace.h
Go to the documentation of this file.
1
5/*
6 * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
7 * Alexander Warg <warg@os.inf.tu-dresden.de>
8 * economic rights: Technische Universität Dresden (Germany)
9 *
10 * License: see LICENSE.spdx (in this directory or the directories above)
11 */
12#pragma once
13
20#include <l4/sys/types.h>
21
23
29typedef l4_uint64_t l4re_ds_size_t;
30typedef l4_uint64_t l4re_ds_offset_t;
31typedef l4_uint64_t l4re_ds_map_addr_t;
32typedef unsigned long l4re_ds_flags_t;
33
38typedef struct {
39 l4re_ds_size_t size;
40 l4re_ds_flags_t flags;
42
48 L4RE_DS_F_R = L4_FPAGE_RO,
49 L4RE_DS_F_W = L4_FPAGE_W,
50 L4RE_DS_F_X = L4_FPAGE_X,
51 L4RE_DS_F_RW = L4_FPAGE_RW,
52 L4RE_DS_F_RX = L4_FPAGE_RX,
53 L4RE_DS_F_RWX = L4_FPAGE_RWX,
54
55 L4RE_DS_F_RIGHTS_MASK = 0x0f,
56
63};
64
70L4_CV int
71l4re_ds_map(l4re_ds_t ds,
72 l4re_ds_offset_t offset,
73 l4re_ds_flags_t flags,
74 l4re_ds_map_addr_t local_addr,
75 l4re_ds_map_addr_t min_addr,
76 l4re_ds_map_addr_t max_addr) L4_NOTHROW;
77
83L4_CV int
84l4re_ds_map_region(l4re_ds_t ds,
85 l4re_ds_offset_t offset,
86 l4re_ds_flags_t flags,
87 l4re_ds_map_addr_t min_addr,
88 l4re_ds_map_addr_t max_addr) L4_NOTHROW;
89
96L4_CV long
97l4re_ds_clear(l4re_ds_t ds, l4re_ds_offset_t offset,
98 l4re_ds_size_t size) L4_NOTHROW;
99
106L4_CV long
108 l4re_ds_offset_t offset,
109 l4re_ds_size_t size) L4_NOTHROW;
110
117L4_CV int
118l4re_ds_copy_in(l4re_ds_t ds, l4re_ds_offset_t dst_offs,
119 l4re_ds_t src, l4re_ds_offset_t src_offs,
120 l4re_ds_size_t size) L4_NOTHROW;
121
128L4_CV l4re_ds_size_t
130
137L4_CV l4re_ds_flags_t
139
146L4_CV int
148
155L4_CV int
157 l4_addr_t *start_addr, l4_addr_t *end_addr) L4_NOTHROW;
158
int l4re_ds_info(l4re_ds_t ds, l4re_ds_stats_t *stats) L4_NOTHROW
Get information on the dataspace.
l4_cap_idx_t l4re_ds_t
Dataspace type.
Definition dataspace.h:28
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_flags_t l4re_ds_flags(l4re_ds_t ds) L4_NOTHROW
Get flags of the dataspace.
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.
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.
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_t l4re_ds_size(l4re_ds_t ds) L4_NOTHROW
Get size of a dataspace.
l4re_ds_map_flags
Flags to specify the memory mapping type of a request.
Definition dataspace.h:47
@ L4RE_DS_F_BUFFERABLE
request bufferable (write buffered) mappings
Definition dataspace.h:59
@ L4RE_DS_F_NORMAL
request normal memory mapping
Definition dataspace.h:57
@ L4RE_DS_F_CACHING_SHIFT
shift value for caching flags
Definition dataspace.h:62
@ L4RE_DS_F_CACHING_MASK
mask for caching flags
Definition dataspace.h:61
@ L4RE_DS_F_CACHEABLE
request normal memory mapping
Definition dataspace.h:58
@ L4RE_DS_F_UNCACHEABLE
request uncacheable memory mappings
Definition dataspace.h:60
unsigned long l4_addr_t
Address type.
Definition l4int.h:34
unsigned long long l4_uint64_t
Unsigned 64bit value.
Definition l4int.h:31
unsigned long l4_cap_idx_t
Capability selector type.
Definition types.h:335
@ L4_FPAGE_X
Executable flexpage.
Definition __l4_fpage.h:120
@ L4_FPAGE_RWX
Read-write-execute flexpage.
Definition __l4_fpage.h:125
@ L4_FPAGE_RX
Read-execute flexpage.
Definition __l4_fpage.h:124
@ L4_FPAGE_RO
Read-only flexpage
Definition __l4_fpage.h:122
@ L4_FPAGE_RW
Read-write flexpage.
Definition __l4_fpage.h:123
@ L4_FPAGE_W
Writable flexpage.
Definition __l4_fpage.h:121
#define __END_DECLS
End section with C types and functions.
Definition compiler.h:167
#define L4_CV
Define calling convention.
Definition linkage.h:33
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
Definition compiler.h:159
#define __BEGIN_DECLS
Start section with C types and functions.
Definition compiler.h:164
Common L4 ABI Data Types.
Information about the data space.
Definition dataspace.h:38
l4re_ds_flags_t flags
flags
Definition dataspace.h:40
l4re_ds_size_t size
size
Definition dataspace.h:39