Webcentive RISC-V Reference

mtinst

Machine trap instruction (transformed)

Address
0x34A
Group
Machine-level CSRs
Privilege
MRW (privileged spec CSR listing, Machine Trap Handling)
Access
read/write; lowest privilege M (machine)
Address range
Standard read/write
Name in riscv-unified-db
Machine Trap Instruction Register

Privileged spec: Machine trap instruction (transformed)

Description

When a trap is taken into M-mode, mtinst is written with a value that, if nonzero, provides information about the instruction that trapped, to assist software in handling the trap. The values that may be written to mtinst on a trap are documented in TODO.

mtinst is a WARL register that need only be able to hold the values that the implementation may automatically write to it on a trap.

From riscv-unified-db, reformatted.

Fields

FieldBitsTypeDescription
VALUERV32 31-0 / RV64 63-0

Exception-specific information for a trap into M-mode.

Fields from riscv-unified-db; field types computed by IDL functions there are not shown.

Specification and related pages