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 * This file is part of TUD:OS and distributed under the terms of the
11 * GNU General Public License 2.
12 * Please see the COPYING-GPL-2 file for details.
13 *
14 * As a special exception, you may use this file as part of a free software
15 * library without restriction. Specifically, if other files instantiate
16 * templates or use macros or inline functions from this file, or you compile
17 * this file and link it with other files to produce an executable, this
18 * file does not by itself cause the resulting executable to be covered by
19 * the GNU General Public License. This exception does not however
20 * invalidate any other reasons why the executable file might be covered by
21 * the GNU General Public License.
22 */
23#pragma once
24
31#include <l4/sys/types.h>
32
34
40typedef l4_uint64_t l4re_ds_size_t;
41typedef l4_uint64_t l4re_ds_offset_t;
42typedef l4_uint64_t l4re_ds_map_addr_t;
43typedef unsigned long l4re_ds_flags_t;
44
49typedef struct {
50 l4re_ds_size_t size;
51 l4re_ds_flags_t flags;
53
59 L4RE_DS_F_R = L4_FPAGE_RO,
60 L4RE_DS_F_W = L4_FPAGE_W,
61 L4RE_DS_F_X = L4_FPAGE_X,
62 L4RE_DS_F_RW = L4_FPAGE_RW,
63 L4RE_DS_F_RX = L4_FPAGE_RX,
64 L4RE_DS_F_RWX = L4_FPAGE_RWX,
65
66 L4RE_DS_F_RIGHTS_MASK = 0x0f,
67
74};
75
81L4_CV int
82l4re_ds_map(l4re_ds_t ds,
83 l4re_ds_offset_t offset,
84 l4re_ds_flags_t flags,
85 l4re_ds_map_addr_t local_addr,
86 l4re_ds_map_addr_t min_addr,
87 l4re_ds_map_addr_t max_addr) L4_NOTHROW;
88
94L4_CV int
95l4re_ds_map_region(l4re_ds_t ds,
96 l4re_ds_offset_t offset,
97 l4re_ds_flags_t flags,
98 l4re_ds_map_addr_t min_addr,
99 l4re_ds_map_addr_t max_addr) L4_NOTHROW;
100
107L4_CV long
108l4re_ds_clear(l4re_ds_t ds, l4re_ds_offset_t offset,
109 l4re_ds_size_t size) L4_NOTHROW;
110
117L4_CV long
119 l4re_ds_offset_t offset,
120 l4re_ds_size_t size) L4_NOTHROW;
121
128L4_CV int
129l4re_ds_copy_in(l4re_ds_t ds, l4re_ds_offset_t dst_offs,
130 l4re_ds_t src, l4re_ds_offset_t src_offs,
131 l4re_ds_size_t size) L4_NOTHROW;
132
139L4_CV l4re_ds_size_t
141
148L4_CV l4re_ds_flags_t
150
157L4_CV int
159
166L4_CV int
168 l4_addr_t *start_addr, l4_addr_t *end_addr) L4_NOTHROW;
169
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:39
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:58
@ L4RE_DS_F_BUFFERABLE
request bufferable (write buffered) mappings
Definition dataspace.h:70
@ L4RE_DS_F_NORMAL
request normal memory mapping
Definition dataspace.h:68
@ L4RE_DS_F_CACHING_SHIFT
shift value for caching flags
Definition dataspace.h:73
@ L4RE_DS_F_CACHING_MASK
mask for caching flags
Definition dataspace.h:72
@ L4RE_DS_F_CACHEABLE
request normal memory mapping
Definition dataspace.h:69
@ L4RE_DS_F_UNCACHEABLE
request uncacheable memory mappings
Definition dataspace.h:71
unsigned long l4_addr_t
Address type.
Definition l4int.h:45
unsigned long long l4_uint64_t
Unsigned 64bit value.
Definition l4int.h:42
unsigned long l4_cap_idx_t
Capability selector type.
Definition types.h:359
@ L4_FPAGE_X
Executable flex page.
Definition __l4_fpage.h:126
@ L4_FPAGE_RWX
Read-write-execute flex page.
Definition __l4_fpage.h:131
@ L4_FPAGE_RX
Read-execute flex page.
Definition __l4_fpage.h:130
@ L4_FPAGE_RO
Read-only flex page
Definition __l4_fpage.h:128
@ L4_FPAGE_RW
Read-write flex page.
Definition __l4_fpage.h:129
@ L4_FPAGE_W
Writable flex page.
Definition __l4_fpage.h:127
#define L4_CV
Define calling convention.
Definition linkage.h:44
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
Definition compiler.h:188
#define EXTERN_C_BEGIN
Start section with C types and functions.
Definition compiler.h:192
#define EXTERN_C_END
End section with C types and functions.
Definition compiler.h:193
Common L4 ABI Data Types.
Information about the data space.
Definition dataspace.h:49
l4re_ds_flags_t flags
flags
Definition dataspace.h:51
l4re_ds_size_t size
size
Definition dataspace.h:50