summaryrefslogtreecommitdiff
path: root/src/kernel/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/proc.c')
-rw-r--r--src/kernel/proc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/kernel/proc.c b/src/kernel/proc.c
index 2b96c8f..636c237 100644
--- a/src/kernel/proc.c
+++ b/src/kernel/proc.c
@@ -26,10 +26,9 @@ struct process *process_seed(struct kmain_info *info) {
pagedir_map(process_first->pages, (userptr_t)~PAGE_MASK, page_alloc(1), true, true);
process_first->regs.esp = (userptr_t) ~0xF;
- // map the kernel
- // yup, .text is writeable too. the plan is to not map the kernel
- // into user memory at all, but i'll implement that later. TODO
- for (size_t p = 0x100000; p < (size_t)&_bss_end; p += PAGE_SIZE)
+ // map .text.early
+ extern char _text_early_len;
+ for (size_t p = 0; p < (size_t)&_text_early_len; p += PAGE_SIZE)
pagedir_map(process_first->pages, (userptr_t)p, (void*)p, false, true);
// map the init module as rw