My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
sw_allocator.h
Go to the documentation of this file.
1 /*
2  * OpenVirtualization:
3  * For additional details and support contact developer@sierraware.com.
4  * Additional documentation can be found at www.openvirtualization.org
5  *
6  * Copyright (C) 2010-2014 SierraWare
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21  *
22  */
23 /*
24  * see <http://www.gnu.org/licenses/>.
25  *
26  */
27 
28 #ifndef __SW_ALLOCATOR_H_
29 #define __SW_ALLOCATOR_H_
30 
31 #include <sw_types.h>
32 
42 typedef int (*mem_map_handler) (u32, u32, u32);
43 
50  int region;
55 
60 
65 
70 
77 };
78 
88 
93 
95  u32 code_size;
96 
99 };
100 
101 
107 int sw_allocator_init(struct svisor_allocator_params *params,
108  struct svisor_allocator_info *allocator);
109 
115 void set_allocator(struct svisor_allocator_info *allocator);
116 
123 #endif
mem_map_handler map_fn
Definition: sw_allocator.h:98
u64 vir_memregion_size
Definition: sw_allocator.h:64
u64 vir_memregion_size
Definition: sw_allocator.h:87
u32 phy_addr_start
Definition: sw_allocator.h:90
u32 * vir_addr_start
Definition: sw_allocator.h:62
u32 * vir_mem_bmap
Definition: sw_allocator.h:52
u32 * vir_addr_start
Definition: sw_allocator.h:85
int num_phy_pag_free
Definition: sw_allocator.h:72
u32 phy_addr_start
Definition: sw_allocator.h:67
int region
Definition: sw_allocator.h:50
struct svisor_allocator_info * get_allocator(void)
u32 phy_memregion_size
Definition: sw_allocator.h:69
int(* mem_map_handler)(u32, u32, u32)
Definition: sw_allocator.h:42
This structure has information about the memory regions.
Definition: sw_allocator.h:48
u32 * phy_mem_bmap
Definition: sw_allocator.h:54
size_t vir_mem_bmap_len
Definition: sw_allocator.h:57
int sw_allocator_init(struct svisor_allocator_params *params, struct svisor_allocator_info *allocator)
int num_vir_pag_free
Definition: sw_allocator.h:74
mem_map_handler map_fn
Definition: sw_allocator.h:76
u32 code_size
Definition: sw_allocator.h:95
This structure has information about the memory regions.
Definition: sw_allocator.h:83
void set_allocator(struct svisor_allocator_info *allocator)
u64 phy_memregion_size
Definition: sw_allocator.h:92
size_t phy_mem_bmap_len
Definition: sw_allocator.h:59