summaryrefslogtreecommitdiff
path: root/sys/kern/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/init.c')
-rw-r--r--sys/kern/init.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/kern/init.c b/sys/kern/init.c
new file mode 100644
index 0000000..a49c304
--- /dev/null
+++ b/sys/kern/init.c
@@ -0,0 +1,11 @@
+#include <fdt.h>
+#include <kernel_earlyprintf.h>
+
+void
+init(unsigned long hartid, struct fdt_header *fdt)
+{
+ kernel_earlyputs("booting...\n");
+ if (fdt_uint32(fdt->magic) == FDT_HEADER_MAGIC)
+ kernel_earlyputs("found flattened device tree!\n");
+
+}