-
Notifications
You must be signed in to change notification settings - Fork 0
/
axiom_mem_manager.h
36 lines (31 loc) · 1.15 KB
/
axiom_mem_manager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*!
* \file axiom_mem_manager.h
*
* \version v1.2
* \date 2016-09-23
*
* Copyright (C) 2016, Evidence Srl.
* Terms of use are as specified in COPYING
*/
#ifndef AXIOM_MEM_MANAGER_H
#define AXIOM_MEM_MANAGER_H
struct mem_config;
#define TAG_NONE (-1)
struct mem_config *mem_manager_create(const char *s, struct resource *app_res,
struct resource *nic_res);
struct mem_config *mem_manager_find_by_name(const char *s);
int mem_manager_destroy(struct mem_config *memory);
void mem_manager_dump(void);
int mem_allocate_space(struct mem_config *memory, int tag,
long vaddr_start, long vaddr_end, unsigned long *offset);
int mem_free_space(struct mem_config *memory, int tag, long vaddr_start,
long vaddr_end);
int mem_setup_user_vaddr(struct mem_config *mem,
unsigned long *base, unsigned long *size);
int mem_get_app_space(struct mem_config *mem, unsigned long *base,
size_t *size);
void mem_dump_list(struct mem_config *mem);
int mem_get_nic_space(struct mem_config *mem, unsigned long *base,
size_t *size);
unsigned long mem_virt_to_phys(struct mem_config *mem, unsigned long virt);
#endif /* AXIOM_MEM_MANAGER_H */