Posts / Tag
#trap
2 posts
RISC-V Traps 2: Delegation, S-mode Trap CSRs, Interrupt and Exception Priority, WFI on QEMU
Part 26 of the RISC-V series. We checked delegation, S-mode trap CSRs, 24 interrupt gating cells, priority and WFI on QEMU. Gating matched the spec everywhere. Only the default interrupt order differed (lowest number first, spec order with smaia and ssaia).
RISC-V Traps 1: Exceptions, Interrupts, mtvec Modes, mepc/mcause/mtval and mret on QEMU
Part 25 of the RISC-V series. We raised traps on QEMU and read mepc, mcause, mtval, MIE, MPIE and MPP. Vectored mode sent MSI and MTI to slots 3 and 7, and enabling MIE before saving let a nested trap overwrite mepc so code meant for S returned to U.

RISC-V