1
/*
2
* \brief Virtual page-table facility
3
* \author Christian Helmuth
4
* \date 2008-08-15
5
*/
6
7
/*
8
* Copyright (C) 2008-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__DDE_KIT__PGTAB_H_
15
#
define _INCLUDE__DDE_KIT__PGTAB_H_
16
17
#
include <dde_kit/types.h>
18
19
/**
20
* Set virtual->physical mapping for VM pages
21
*
22
* \param virt virtual start address for region
23
* \param phys physical start address for region
24
* \param pages number of pages in region
25
*/
26
void
dde_kit_pgtab_set_region(
void *
virt
,
dde_kit_addr_t
phys
,
unsigned
pages
)
;
27
28
/**
29
* Set virtual->physical mapping for VM region
30
*
31
* \param virt virtual start address for region
32
* \param phys physical start address for region
33
* \param size number of bytes in region
34
*/
35
void
dde_kit_pgtab_set_region_with_size(
void *
virt
,
dde_kit_addr_t
phys
,
36
dde_kit_size_t
size
)
;
37
38
/**
39
* Clear virtual->physical mapping for VM region
40
*
41
* \param virt virtual start address for region
42
*/
43
void
dde_kit_pgtab_clear_region(
void *
virt
)
;
44
45
/**
46
* Get physical address for virtual address
47
*
48
* \param virt virtual address
49
*
50
* \return physical address
51
*/
52
dde_kit_addr_t
dde_kit_pgtab_get_physaddr(
void *
virt
)
;
53
54
/**
55
* Get virtual address for physical address
56
*
57
* \param phys physical address
58
*
59
* \return virtual address
60
*/
61
dde_kit_addr_t
dde_kit_pgtab_get_virtaddr(
dde_kit_addr_t
phys
)
;
62
63
/**
64
* Get size of VM region.
65
*
66
* \param virt virtual address
67
*
68
* \return VM region size (in bytes)
69
*/
70
dde_kit_size_t
dde_kit_pgtab_get_size(
void *
virt
)
;
71
72
#
endif /* _INCLUDE__DDE_KIT__PGTAB_H_ */