From 1923e47fd296399180eaf19b990d5e951d71ccd2 Mon Sep 17 00:00:00 2001 From: Ada Christine Date: Thu, 24 Feb 2022 01:58:07 +0000 Subject: many changes - boot time memory allocation has changed. the fractal page map has been replaced by a single self-mapped page giving 2MiB of ready virtual space to play with without needing a fully-initialized memory manager. this scheme may be repeated for other purposes - the page stack has now been totally overhauled to make use of sparse allocation and all of the ugly init_*() procedures are gone. long live the new interface. also reference counting is a thing now. sort of. - found a bug in vmt_init_node where insertion did not use the root node as the parent in the case of no predecessor node. whoops. --- kc/core/task.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kc/core/task.c') diff --git a/kc/core/task.c b/kc/core/task.c index f9a8fc8..e43dbe0 100644 --- a/kc/core/task.c +++ b/kc/core/task.c @@ -73,7 +73,7 @@ noreturn void task_init(void) // XXX: unfuck this mess at some point // XXX: make this also not demand-allocated or it's gonna fail - char *kernel_rsp0 = vm_alloc(4096); + char *kernel_rsp0 = vm_alloc(4096, VM_ALLOC_ANY); kernel_rsp0[1] = 0; *get_tss_rsp0() = (uintptr_t)kernel_rsp0 + 4096; @@ -169,7 +169,7 @@ void update_time(void) static struct kc_thread *create_thread(void (*thread_f)(void)) { - char *task_bottom = vm_alloc(16384); + char *task_bottom = vm_alloc(16384, VM_ALLOC_ANY); struct kc_thread *thread = (struct kc_thread *)(task_bottom + 16384 - sizeof(*thread)); -- cgit v1.3.1-1-g115d