From b30ee14270a44e48167934b9b3923b4280bdc855 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 1 Oct 2021 20:36:15 +0300 Subject: First jump to virtual memory! + Lots of bughunting to do, probably lots of off-by-one and so on errors, and I make a lot of naive and possibly dangerous assumptions. But cool start nonetheless. Should also come up with some method of exchanging data between the init and actual kernel, probably some struct of some sort. TODO --- arch/riscv/kernel/main.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'arch/riscv/kernel/main.c') diff --git a/arch/riscv/kernel/main.c b/arch/riscv/kernel/main.c index 9334fb3..510ea42 100644 --- a/arch/riscv/kernel/main.c +++ b/arch/riscv/kernel/main.c @@ -1,13 +1,8 @@ -#include #include +#include -void yeet() +void __main main(void *uart) { - int a = 23; -} - -void __main main(struct mm_ptinfo *pageinfo) -{ - yeet(); - while(1){}; + dbg_init(uart, NS16550A); + dbg("Hello from (hopefully) virtual memory!\n"); } -- cgit v1.3