Machine Trap Instruction Register
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.
| 31:24 | 23:16 | 15:8 | 7:0 | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| VALUE | |||||||||||||||||||||||||||||||
| 63:56 | 55:48 | 47:40 | 39:32 | 31:24 | 23:16 | 15:8 | 7:0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| VALUE | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Bits | Field | Alias | Description | Type | Reset |
|---|---|---|---|---|---|
| RV32 [31:0] RV64 [63:0] | VALUE | Exception-specific information for a trap into M-mode. | if ( (TINST_VALUE_ON_FINAL_LOAD_GUEST_PAGE_FAULT != "always zero")
|| (TINST_VALUE_ON_FINAL_STORE_AMO_GUEST_PAGE_FAULT != "always zero")
|| (TINST_VALUE_ON_FINAL_INSTRUCTION_GUEST_PAGE_FAULT != "always zero")
|| (TINST_VALUE_ON_INSTRUCTION_ADDRESS_MISALIGNED != "always zero")
|| (TINST_VALUE_ON_BREAKPOINT != "always zero")
|| (TINST_VALUE_ON_VIRTUAL_INSTRUCTION != "always zero")
|| (TINST_VALUE_ON_LOAD_ADDRESS_MISALIGNED != "always zero")
|| (TINST_VALUE_ON_LOAD_ACCESS_FAULT != "always zero")
|| (TINST_VALUE_ON_STORE_AMO_ADDRESS_MISALIGNED != "always zero")
|| (TINST_VALUE_ON_STORE_AMO_ACCESS_FAULT != "always zero")
|| (TINST_VALUE_ON_UCALL != "always zero")
|| (TINST_VALUE_ON_SCALL != "always zero")
|| (TINST_VALUE_ON_MCALL != "always zero")
|| (TINST_VALUE_ON_VSCALL != "always zero")
|| (TINST_VALUE_ON_LOAD_PAGE_FAULT != "always zero")
|| (TINST_VALUE_ON_STORE_AMO_PAGE_FAULT != "always zero")) {
return CsrFieldType::RWH;
} else {
return CsrFieldType::RO;
} | UNDEFINED_LEGAL |
Version af3eaf9+cheriot.f635218
Data from the RISC-V Unified Database, copyright RISC-V International and contributors.
CHERIoT extensions from the CHERIoT specification and Sail model, copyright Microsoft and the CHERIoT Platform contributors.
This site is provided as a community resource and is NOT affiliated with nor endorsed by RISC-V International.