feat: some clean up and validation of multiboot header

This commit is contained in:
2021-03-04 22:18:58 +01:00
parent 300e80c2e8
commit e532099ea7
9 changed files with 419 additions and 15 deletions

View File

@@ -50,6 +50,10 @@ void kprint_internal(const char *msg) {
}
}
void kprint_sync(const char* msg) {
kprint_internal(msg);
}
void kprint_init() {
kprint_stream = stream_create(STREAM_SIZE);
}

View File

@@ -15,6 +15,8 @@ void kprint_register(kprint_handler);
void kprint(const char *msg);
void kprint_sync(const char* msg);
void kprint_init();
void kprint_start_task();

View File

@@ -17,12 +17,12 @@ void k_wait_for_interrupt() {
void noreturn k_panics(const char *msg) {
// todo this is not printed
kprint(msg);
kprint_sync(msg);
k_panic();
}
void noreturn k_panic() {
kprint("PANIC!");
kprint_sync("PANIC!");
while (true) {
__asm__ __volatile__("cli;"
"hlt;");