Initial commit
This commit is contained in:
12
kernel/lib.c
Normal file
12
kernel/lib.c
Normal file
@ -0,0 +1,12 @@
|
||||
#include "kernel/lib.h"
|
||||
#include "kernel/riscv.h"
|
||||
|
||||
__attribute__((noreturn)) void panic(const char* s)
|
||||
{
|
||||
// @Todo Refactor UART
|
||||
|
||||
volatile char* kUartBase = (volatile char*)0x1000'0000;
|
||||
while (*s) *kUartBase = *s++;
|
||||
|
||||
hart_halt();
|
||||
}
|
Reference in New Issue
Block a user