From 513a8d20beeacb3a7fc2c3c140d014f7fb25cd6f Mon Sep 17 00:00:00 2001 From: Kimplul Date: Thu, 6 Jan 2022 17:41:38 +0200 Subject: Jump back to kernelspace tested + Added automated categories to debugging, bug/info/warn/error etc. Now I should just try to use them here and there :D --- common/pmem.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'common/pmem.c') diff --git a/common/pmem.c b/common/pmem.c index c919204..ae01175 100644 --- a/common/pmem.c +++ b/common/pmem.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -426,7 +427,7 @@ void init_pmem(void *fdt) size_t actual_size = populate_pmap(ram_base, ram_size, pmap_base); if(probe_size != actual_size) - dbg("BUG! probe_size (%#lx) != actual_size (%#lx)\n", + bug("probe_size (%#lx) != actual_size (%#lx)\n", probe_size, actual_size); /* mark init stack, this should be unmapped once we get to executing @@ -434,7 +435,8 @@ void init_pmem(void *fdt) mark_area_used((pm_t)__va(PM_STACK_BASE), (pm_t)__va(PM_STACK_TOP)); /* mark kernel */ - mark_area_used((pm_t)__va(PM_KERN_BASE), (pm_t)__va(PM_KERN_TOP)); + /* this could be made more explicit, I suppose. */ + mark_area_used(VM_KERN, VM_KERN + PM_KERN_SIZE); /* mark fdt and initrd */ mark_area_used(get_initrdbase(fdt), initrd_top); @@ -446,5 +448,7 @@ void init_pmem(void *fdt) /* mark reserved mem */ mark_reserved_mem(fdt); + init_mem_blocks(); + init_devmem((pm_t)__pa(ram_base), (pm_t)__pa(ram_base + ram_size)); } -- cgit v1.3