diff options
author | Marvin Borner | 2021-03-21 12:40:41 +0100 |
---|---|---|
committer | Marvin Borner | 2021-03-21 12:46:08 +0100 |
commit | 09c3bdb186868204cb03d457244e05e12eb685d6 (patch) | |
tree | 7bf59794173d700df08ad303acd6c5a49193a9eb /kernel/inc/mm.h | |
parent | 68a0ad7f21ba07b93cd63613996e27afd8780f9c (diff) |
Hardened syscalls
Diffstat (limited to 'kernel/inc/mm.h')
-rw-r--r-- | kernel/inc/mm.h | 7 |
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 |