kernel: add basic console registration system and printk()

This commit is contained in:
2023-02-04 19:03:45 +00:00
parent d0a431c860
commit 31cb7aab8b
11 changed files with 186 additions and 31 deletions

View File

@@ -2,12 +2,15 @@
#include <socks/init.h>
#include <socks/printk.h>
#include <socks/machine/init.h>
#include <socks/machine/cpu.h>
extern unsigned long get_rflags(void);
void kernel_init(uintptr_t arg)
{
ml_init(arg);
for (int i = 0; i < 8; i++) {
printk("Line %d\n", i);
}
printk("hello, world!");
ml_halt_cpu();
}