aboutsummaryrefslogtreecommitdiff
path: root/kernel/inc/mm.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/inc/mm.h')
-rw-r--r--kernel/inc/mm.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/inc/mm.h b/kernel/inc/mm.h
index 5e30be6..5e49aa7 100644
--- a/kernel/inc/mm.h
+++ b/kernel/inc/mm.h
@@ -5,6 +5,7 @@
#include <boot.h>
#include <def.h>
+#include <errno.h>
#include <interrupts.h>
struct memory_range {
@@ -104,8 +105,6 @@ struct memory_range memory_range_around(u32 base, u32 size);
void *memory_alloc(struct page_dir *dir, u32 size, u32 flags);
void *memory_alloc_identity(struct page_dir *dir, u32 flags);
-u32 memory_shalloc(struct page_dir *dir, u32 size, u32 flags);
-void *memory_shaccess(struct page_dir *dir, u32 shid);
void memory_free(struct page_dir *dir, struct memory_range vrange);
void memory_map_identity(struct page_dir *dir, struct memory_range prange, u32 flags);
void memory_switch_dir(struct page_dir *dir);
@@ -117,6 +116,10 @@ void memory_bypass_disable(void);
u8 memory_is_user(u32 addr);
u8 memory_valid(const void *addr);
+// User interface
+res memory_shalloc(struct page_dir *dir, u32 size, u32 *id, u32 flags);
+res memory_shaccess(struct page_dir *dir, u32 shid, u32 *addr, u32 *size);
+
void memory_install(struct mem_info *mem_info, struct vid_info *vid_info);
#endif