summaryrefslogtreecommitdiff
path: root/sys/kern/init.c
diff options
context:
space:
mode:
authorstefan <stefan@s00.xyz>2023-04-07 19:02:18 -0400
committerstefan <stefan@s00.xyz>2023-04-07 19:02:18 -0400
commita1a97aa7b2b0c3d1f3b6766446d605f83de1c561 (patch)
tree445f9419aee4e0ffdb7271d84474452c7e69d225 /sys/kern/init.c
parentcd653dcee96a2673bf4ab5aadba0ecfaf5fe7a0f (diff)
downloadsv-a1a97aa7b2b0c3d1f3b6766446d605f83de1c561.tar.gz
stuff and things
Diffstat (limited to 'sys/kern/init.c')
-rw-r--r--sys/kern/init.c17
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();
}