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().
10 lines
308 B
ArmAsm
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
|