ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 1,823 microarchs · 16,083 chips · 105 sources
Arch:
Tier:

mscontext

T1 riscv register register
Machine Supervisor Context
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeRISC-V Privileged (S, Sdtrig)
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
PrivilegeS
ExtensionsS, Sdtrig

Summary

This optional register is an alias for scontext. It is only accessible in S/HS-mode, M-mode and Debug Mode. It is included for backward compatibility with version 0.13.

Syntax / Encoding

CSR 0x7aa (S-mode, RW)

Bitfields (1)

BitsFieldDescription
63:0DATASupervisor mode software can write a context number to this register, which can be used to set triggers that only fire in that specific context. An implementation may tie any number of high bits in this field to 0. It’s recommended to implement 16 bits on RV32 and 32 bits on RV64. [RV32: 31:0, RV64: 63:0]

Reference Notes

This optional register is an alias for `scontext`. It is only
accessible in S/HS-mode, M-mode and Debug Mode. It is included
for backward compatibility with version 0.13.

The encoding of this CSR does not conform to the CSR Address
Mapping Convention in the Privileged Spec. It is expected that
new implementations will not support this encoding and that new
debuggers will not use this CSR if `scontext` is available.