Posts / Tag
#privileged
4 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 CSR File Design: Permission Checks, Views and Counters Checked Against QEMU
Part 24 of the RISC-V series. We built the CSR file's permission check, views, WARL cleanup and counters as a cycle model and checked it against QEMU. Only 19 of 349 RV64 cells differed, all counters: QEMU read 1 higher right after a write.
RISC-V Privilege Modes and CSRs: M/S/U, Address Rules, WARL Fields on QEMU
Part 23 of the RISC-V series. We tested the M/S/U privilege modes, the CSR address rule ([11:10] read-only, [9:8] lowest privilege) and WARL/WLRL/WPRI fields on QEMU. The address rule predicted all 67 CSR cells, and illegal mtvec and satp values had the whole write ignored.

RISC-V