From a1a97aa7b2b0c3d1f3b6766446d605f83de1c561 Mon Sep 17 00:00:00 2001 From: stefan Date: Fri, 7 Apr 2023 19:02:18 -0400 Subject: stuff and things --- sys/kern/init.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'sys/kern/init.c') 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 -#include +#include +#include +#include + +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(); } -- cgit v1.2.3