L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
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
19
20#include <l4/sys/compiler.h>
21#include <l4/sys/types.h>
22
24
30typedef l4_uint64_t l4re_ds_size_t;
31typedef l4_uint64_t l4re_ds_offset_t;
32typedef l4_uint64_t l4re_ds_map_addr_t;
33typedef unsigned long l4re_ds_flags_t;
34
39typedef struct {
40 l4re_ds_size_t size;
41 l4re_ds_flags_t flags;
43
49 L4RE_DS_F_R = L4_FPAGE_RO,
50 L4RE_DS_F_W = L4_FPAGE_W,
51 L4RE_DS_F_X = L4_FPAGE_X,
52 L4RE_DS_F_RW = L4_FPAGE_RW,
53 L4RE_DS_F_RX = L4_FPAGE_RX,
54 L4RE_DS_F_RWX = L4_FPAGE_RWX,
55
56 L4RE_DS_F_RIGHTS_MASK = 0x0f,
57
64};
65
71L4_CV int
72l4re_ds_map(l4re_ds_t ds,
73 l4re_ds_offset_t offset,
74 l4re_ds_flags_t flags,
75 l4re_ds_map_addr_t local_addr,
76 l4re_ds_map_addr_t min_addr,
77 l4re_ds_map_addr_t max_addr) L4_NOTHROW;
78
84L4_CV int
85l4re_ds_map_region(l4re_ds_t ds,
86 l4re_ds_offset_t offset,
87 l4re_ds_flags_t flags,
88 l4re_ds_map_addr_t min_addr,
89 l4re_ds_map_addr_t max_addr) L4_NOTHROW;
90
97L4_CV long
98l4re_ds_clear(l4re_ds_t ds, l4re_ds_offset_t offset,
99 l4re_ds_size_t size) L4_NOTHROW;
100
107L4_CV long
109 l4re_ds_offset_t offset,
110 l4re_ds_size_t size) L4_NOTHROW;
111
118L4_CV int
119l4re_ds_copy_in(l4re_ds_t ds, l4re_ds_offset_t dst_offs,
120 l4re_ds_t src, l4re_ds_offset_t src_offs,
121 l4re_ds_size_t size) L4_NOTHROW;
122
129L4_CV l4re_ds_size_t
131
138L4_CV l4re_ds_flags_t
140
147L4_CV int
149
156L4_CV int
158 l4_addr_t *start_addr, l4_addr_t *end_addr) L4_NOTHROW;
159
L4 compiler related defines.
int l4re_ds_info(l4re_ds_t ds, l4re_ds_stats_t *stats) L4_NOTHROW
Get information on the dataspace.
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.
L4_BEGIN_DECLS typedef l4_cap_idx_t l4re_ds_t
Dataspace type.
Definition dataspace.h:29
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:48
@ L4RE_DS_F_BUFFERABLE
request bufferable (write buffered) mappings
Definition dataspace.h:60
@ L4RE_DS_F_NORMAL
request normal memory mapping
Definition dataspace.h:58
@ L4RE_DS_F_CACHING_SHIFT
shift value for caching flags
Definition dataspace.h:63
@ L4RE_DS_F_CACHING_MASK
mask for caching flags
Definition dataspace.h:62
@ L4RE_DS_F_CACHEABLE
request normal memory mapping
Definition dataspace.h:59
@ L4RE_DS_F_UNCACHEABLE
request uncacheable memory mappings
Definition dataspace.h:61
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:336
@ 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 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:161
#define L4_BEGIN_DECLS
Start section with C types and functions.
Definition compiler.h:165
#define L4_END_DECLS
End section with C types and functions.
Definition compiler.h:166
Common L4 ABI Data Types.
Information about the data space.
Definition dataspace.h:39
l4re_ds_flags_t flags
flags
Definition dataspace.h:41
l4re_ds_size_t size
size
Definition dataspace.h:40