From 513a8d20beeacb3a7fc2c3c140d014f7fb25cd6f Mon Sep 17 00:00:00 2001 From: Kimplul Date: Thu, 6 Jan 2022 17:41:38 +0200 Subject: Jump back to kernelspace tested + Added automated categories to debugging, bug/info/warn/error etc. Now I should just try to use them here and there :D --- arch/riscv/kernel/irq.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'arch/riscv/kernel/irq.c') diff --git a/arch/riscv/kernel/irq.c b/arch/riscv/kernel/irq.c index ed97c00..f844dd1 100644 --- a/arch/riscv/kernel/irq.c +++ b/arch/riscv/kernel/irq.c @@ -1,13 +1,21 @@ #include +#include +#include #include void init_irq(void *fdt) { UNUSED(fdt); + csr_write(CSR_STVEC, &handle_irq); + + long s = 0; + csr_read(CSR_SIE, s); + info("CSR_SIE: %lx\n", s); } -void handle_irq() +__aligned(4) void handle_irq() { + while(1); } /* very simple for now */ -- cgit v1.3