1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:37:36 +00:00

Kernel/riscv64: Add assembly trap handler

This trap handler can't handle traps from userspace yet.
This commit is contained in:
Sönke Holz 2024-01-19 19:22:56 +01:00 committed by Andrew Kaster
parent df21d435eb
commit cec20908a5
3 changed files with 140 additions and 1 deletions

View file

@ -206,7 +206,8 @@ static UNMAP_AFTER_INIT void setup_kernel_page_directory(u64* root_table)
" sd zero, (t0) \n"
" sfence.vma \n"
// TODO: Set `stvec` to a trap handling function
" la t0, asm_trap_handler \n"
" csrw stvec, t0 \n"
" li ra, 0 \n"
" li fp, 0 \n"