diff options
author | Marvin Borner | 2021-03-12 17:27:01 +0100 |
---|---|---|
committer | Marvin Borner | 2021-03-12 17:27:01 +0100 |
commit | 0aef683b9d1e08555791426ba12223ed78051353 (patch) | |
tree | 324cbc61b7fb38f648a82041656f5fea48e53856 /kernel/inc | |
parent | f1751c121d48f2d8936c72bdc347777d1e7402d9 (diff) |
Boots successfully...
Diffstat (limited to 'kernel/inc')
-rw-r--r-- | kernel/inc/load.h | 1 | ||||
-rw-r--r-- | kernel/inc/mm.h | 9 |
2 files changed, 8 insertions, 2 deletions
diff --git a/kernel/inc/load.h b/kernel/inc/load.h index 330caca..f493e84 100644 --- a/kernel/inc/load.h +++ b/kernel/inc/load.h @@ -5,7 +5,6 @@ #include <proc.h> -void proc_load(struct proc *proc, u32 entry); int bin_load(const char *path, struct proc *proc); #endif diff --git a/kernel/inc/mm.h b/kernel/inc/mm.h index aad4ffd..6a1c063 100644 --- a/kernel/inc/mm.h +++ b/kernel/inc/mm.h @@ -16,6 +16,7 @@ struct memory_range { */ struct memory_range physical_alloc(u32 size); +void physical_free(struct memory_range range); /** * Virtual @@ -70,11 +71,14 @@ struct page_dir { union page_dir_entry entries[PAGE_COUNT]; } PACKED; +u8 virtual_present(struct page_dir *dir, u32 vaddr); u32 virtual_to_physical(struct page_dir *dir, u32 vaddr); void virtual_map(struct page_dir *dir, struct memory_range prange, u32 vaddr, u32 flags); struct memory_range virtual_alloc(struct page_dir *dir, struct memory_range physical_range, u32 flags); +void virtual_free(struct page_dir *dir, struct memory_range vrange); struct page_dir *virtual_create_dir(void); +void virtual_destroy_dir(struct page_dir *dir); struct page_dir *virtual_kernel_dir(void); /** @@ -89,10 +93,13 @@ struct page_dir *virtual_kernel_dir(void); struct memory_range memory_range_from(u32 base, u32 size); struct memory_range memory_range_around(u32 base, u32 size); -void memory_install(struct mem_info *mem_info); void *memory_alloc(struct page_dir *dir, u32 size, u32 flags); void *memory_alloc_identity(struct page_dir *dir, u32 flags); +void memory_map_identity(struct page_dir *dir, struct memory_range prange, u32 flags); void memory_free(struct page_dir *dir, struct memory_range vrange); void memory_switch_dir(struct page_dir *dir); +void memory_backup_dir(struct page_dir **backup); + +void memory_install(struct mem_info *mem_info); #endif |