L4Re - L4 Runtime Environment
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 
40 
45 typedef struct {
46  unsigned long size;
47  unsigned long flags;
49 
55  L4RE_DS_MAP_FLAG_RO = 0,
56  L4RE_DS_MAP_FLAG_RW = 1,
57 
64 };
65 
71 L4_CV int
72 l4re_ds_map(const l4re_ds_t ds, l4_addr_t offset, unsigned long flags,
73  l4_addr_t local_addr, l4_addr_t min_addr, l4_addr_t max_addr) L4_NOTHROW;
74 
80 L4_CV int
81 l4re_ds_map_region(const l4re_ds_t ds, l4_addr_t offset, unsigned long flags,
82  l4_addr_t min_addr, l4_addr_t max_addr) L4_NOTHROW;
83 
90 L4_CV long
91 l4re_ds_clear(const l4re_ds_t ds, l4_addr_t offset, unsigned long size) L4_NOTHROW;
92 
98 L4_CV long
100  l4_addr_t offset, l4_size_t size) L4_NOTHROW;
101 
107 L4_CV int
108 l4re_ds_copy_in(const l4re_ds_t ds, l4_addr_t dst_offs, const l4re_ds_t src,
109  l4_addr_t src_offs, unsigned long size) L4_NOTHROW;
110 
116 L4_CV unsigned long
118 
123 L4_CV long
125 
130 L4_CV int
132 
151 L4_CV int
152 l4re_ds_phys(const l4re_ds_t ds, l4_addr_t offset,
153  l4_addr_t *phys_addr, l4_size_t *phys_size) L4_NOTHROW;
154 
155 
unsigned int l4_size_t
Unsigned size type.
Definition: l4int.h:35
shift value for caching flags
Definition: dataspace.h:63
Information about the data space.
Definition: dataspace.h:45
Common L4 ABI Data Types.
#define EXTERN_C_END
End section with C types and functions.
Definition: compiler.h:187
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.
mask for caching flags
Definition: dataspace.h:62
request normal memory mapping
Definition: dataspace.h:59
unsigned long l4_cap_idx_t
L4 Capability selector Type.
Definition: types.h:342
long l4re_ds_flags(const l4re_ds_t ds) L4_NOTHROW
long l4re_ds_allocate(const l4re_ds_t ds, l4_addr_t offset, l4_size_t size) L4_NOTHROW
unsigned long l4re_ds_size(const l4re_ds_t ds) L4_NOTHROW
l4_cap_idx_t l4re_ds_t
Dataspace type.
Definition: dataspace.h:39
#define EXTERN_C_BEGIN
Start section with C types and functions.
Definition: compiler.h:186
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 size
size
Definition: dataspace.h:46
#define L4_CV
Define calling convention.
Definition: linkage.h:44
request normal memory mapping
Definition: dataspace.h:58
request uncacheable memory mappings
Definition: dataspace.h:61
long l4re_ds_clear(const l4re_ds_t ds, l4_addr_t offset, unsigned long size) L4_NOTHROW
request bufferable (write buffered) mappings
Definition: dataspace.h:60
unsigned long l4_addr_t
Address type.
Definition: l4int.h:45
unsigned long flags
flags
Definition: dataspace.h:47
l4re_ds_map_flags
Flags to specify the memory mapping type of a request.
Definition: dataspace.h:54
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
Definition: compiler.h:185
int l4re_ds_info(const l4re_ds_t ds, l4re_ds_stats_t *stats) L4_NOTHROW