aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/core/kmain.c
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2015-03-14 16:36:31 +0100
committerAlex Auvolat <alex@adnab.me>2015-03-14 16:36:31 +0100
commit3e2a3170501fb02b5b46a342c47d2ba8b1a6e244 (patch)
tree6cd0a3f3ded016de581e3b3841ab19f1e511dd86 /src/kernel/core/kmain.c
parent57c5eceb846f3109d017b4e6d4cbd7c507c0d098 (diff)
downloadkogata-3e2a3170501fb02b5b46a342c47d2ba8b1a6e244.tar.gz
kogata-3e2a3170501fb02b5b46a342c47d2ba8b1a6e244.zip
Factorize region allocator between kernel and user processes (same code was there twice)
Diffstat (limited to 'src/kernel/core/kmain.c')
-rw-r--r--src/kernel/core/kmain.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kernel/core/kmain.c b/src/kernel/core/kmain.c
index 3ee2238..2774e11 100644
--- a/src/kernel/core/kmain.c
+++ b/src/kernel/core/kmain.c
@@ -113,7 +113,8 @@ void kmain(multiboot_info_t *mbd, int32_t mb_magic) {
paging_setup(kernel_data_end);
dbg_printf("Paging seems to be working!\n");
- region_allocator_init(kernel_data_end);
+ region_allocator_init((void*)K_HIGHHALF_ADDR, (void*)PAGE_ALIGN_UP(kernel_data_end),
+ (void*)LAST_KERNEL_ADDR, alloc_map_single_frame);
dbg_printf("Region allocator initialized.\n");
TEST_PLACEHOLDER_AFTER_REGION;