diff options
Diffstat (limited to 'sys/kern/init.c')
-rw-r--r-- | sys/kern/init.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/sys/kern/init.c b/sys/kern/init.c index a49c304..18feaa3 100644 --- a/sys/kern/init.c +++ b/sys/kern/init.c @@ -1,11 +1,20 @@ #include <fdt.h> -#include <kernel_earlyprintf.h> +#include <printf.h> +#include <stdint.h> +#include <mm/kalloc.h> + +extern uint64_t HEAP_START; void init(unsigned long hartid, struct fdt_header *fdt) { - kernel_earlyputs("booting...\n"); + printf("booting from hart #%d\n", hartid); if (fdt_uint32(fdt->magic) == FDT_HEADER_MAGIC) - kernel_earlyputs("found flattened device tree!\n"); - + printf("found flattened device tree at %p!\n", (uint64_t)fdt); + + printf("setting up the heap at %p\n", HEAP_START); + kalloc_init(); + printf("done!\n"); + printf("printing free pages:\n"); + walkfree(); } |