summaryrefslogtreecommitdiff
path: root/kernel/lib.c
blob: fff4c1535c85493e7aad5879678139ef44ad7f51 (plain)
1
2
3
4
5
6
7
8
9
10
11
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();
}