minos/arch/riscv/trap.S
auser 8c44d12357 minos M1: minimal multi-arch kernel (x86 + RISC-V + ARM/Zynq)
Boots under QEMU on all three ISAs from one clang build:
- shared C core (kmain, console) calls a small per-arch contract (arch.h)
- per-arch asm entry + trap/vector table + UART driver
- parallel Makefile (make -j), 'make run-<arch>', 'make sizes'
M1 = boot, UART up, trap vector installed, banner from kmain().
2026-09-25 00:41:24 +03:00

10 lines
308 B
ArmAsm

# trap.S (RISC-V) — the machine-mode trap entry the M1 mtvec points at.
# M1 keeps it trivial: just loop. M2 will save registers and dispatch to
# a C handler for the timer interrupt.
.section .text
.globl trap_entry
.align 4 # mtvec base must be 4-byte aligned
trap_entry:
wfi
j trap_entry