kernel: rework init

This commit is contained in:
Matheus
2025-08-14 20:25:43 -03:00
parent fb6cbe49d7
commit 607566531d
41 changed files with 268 additions and 164 deletions
+6
View File
@@ -6,6 +6,7 @@
#include <mutex.h>
#include <util.h>
#include <kernel/vmmcache.h>
#include <kernel/init.h>
uintptr_t hhdmbase;
static size_t memorysize;
@@ -266,6 +267,11 @@ void pmm_init() {
MUTEX_INIT(&freelistmutex);
}
INIT_ROUTINE_DEFINE(pmm,
INIT_ROUTINE_FLAGS_NONE,
pmm_init,
arch_early);
// XXX pmm_alloc won't be able to take pages from the page cache when the allocation size is over 1 page
void *pmm_alloc(size_t size, int section) {