1
/*
2
* \brief Dataspace interface
3
* \author Norman Feske
4
* \date 2006-07-05
5
*/
6
7
/*
8
* Copyright (C) 2006-2013 Genode Labs GmbH
9
*
10
* This file is part of the Genode OS framework, which is distributed
11
* under the terms of the GNU General Public License version 2.
12
*/
13
14
#
ifndef _INCLUDE__DATASPACE__DATASPACE_H_
15
#
define _INCLUDE__DATASPACE__DATASPACE_H_
16
17
#
include <base/stdint.h>
18
#
include <base/rpc.h>
19
20
namespace
Genode {
struct
Dataspace;
}
21
22
23
struct
Genode::
Dataspace
24
{
25
virtual
~
Dataspace(
)
{
}
26
27
/**
28
* Request size of dataspace
29
*/
30
virtual
size_t
size(
)
=
0
;
31
32
/**
33
* Request base address in physical address space
34
*/
35
virtual
addr_t
phys_addr(
)
=
0
;
36
37
/**
38
* Return true if dataspace is writable
39
*/
40
virtual
bool
writable(
)
=
0
;
41
42
43
/*********************
44
** RPC declaration **
45
*********************/
46
47
GENODE_RPC
(
Rpc_size,
size_t,
size)
;
48
GENODE_RPC
(
Rpc_phys_addr,
addr_t,
phys_addr)
;
49
GENODE_RPC
(
Rpc_writable,
bool,
writable)
;
50
51
GENODE_RPC_INTERFACE
(
Rpc_size,
Rpc_phys_addr,
Rpc_writable)
;
52
}
;
53
54
#
endif /* _INCLUDE__DATASPACE__DATASPACE_H_ */