← Home

senvcfg

Supervisor Environment Configuration

Address: 0x10A (266) · Privilege: S · Length: SXLEN · Writable · Defined by: S (>=1.12) and U

Contains fields that control certain characteristics of the U-mode execution environment.

Fields

RV32

31:2423:1615:87:0
—UKTECBZECBCFECBIESSELPE—FIOM

RV64

63:5655:4847:4039:3231:2423:1615:87:0
—UKTECBZECBCFECBIESSELPE—FIOM
BitsFieldAliasDescriptionTypeReset
[7]CBZE*Cache Block Zero instruction Enable* Bit is read-only 0 when `menvcfg.CBZE` is clear. Enables the execution of the cache block zero instruction, `cbo.zero`, in U-mode and (in conjunction with `henvcfg.CBZE`) VU-mode. * `0`: The instruction raises an illegal instruction or virtual instruction exception * `1`: The instruction is executed To summarize access: ! `menvcfg.CBZE` ! `senvcfg.CBZE` behavior ! 0 ! read-only 0 ! 1 a! writable, independent bit from `menvcfg.CBZE` See `cbo.zero` for a summary of the effect.RWUNDEFINED_LEGAL
[6]CBCFE*Cache Block Clean and Flush instruction Enable* Enables the execution of the cache block clean instruction, `cbo.clean`, and the cache block flush instruction, `cbo.flush`, in S-mode in U-mode . * `0`: The instruction raises an illegal instruction or virtual instruction exception * `1`: The instruction is executed To summarize access: ! `menvcfg.CBCFE` ! `senvcfg.CBCFE` behavior ! 0 ! read-only 0 ! 1 a! writable, independent bit from `menvcfg.CBCFE` See `cbo.clean` and/or `cbo.flush` for a summary of the effect.RWUNDEFINED_LEGAL
[5:4]CBIE*Cache Block Invalidate instruction Enable* The legal values of this field do not depend on `menvcfg.CBIE`. When the reserved value `10` is written, it is ignored and the field remains unchanged. Execution of `cbo.inval` in U-mode is enabled only if it is also enabled in S-mode by `menvcfg.CBIE`. If `menvcfg.CBIE` is `01`, an enabled `cbo.inval` performs a flush operation in U-mode even if `senvcfg.CBIE` is `11`. Controls execution of the cache block invalidate instruction, `cbo.inval`, in U-mode and VU-mode (together with `henvcfg.CBIE`) . * `00`: The instruction raises an illegal instruction or virtual instruction exception * `01`: The instruction is executed and performs a flush operation * `10`: _Reserved_ * `11`: The instruction is executed and performs an invalidate operation See `cbo.inval` for more details.RW-RUNDEFINED_LEGAL
[8]UKTEIf the Svukte extension is implemented, the UKTE field affects the behavior of instruction fetches and explicit memory accesses. When UKTE=0, instruction fetches and explicit memory accesses proceed as though the Svukte extension were not implemented. When UKTE=1, instruction fetches and explicit memory accesses with effective privilege mode U or VU are Svukte-qualified, as described in <<sec:svukte>>. If Svukte is not implemented, UKTE is read-only zero.RWUNDEFINED_LEGAL
[3]SSE*Shadow Stack Enable* When the SSE field is set to 1, the Zicfiss extension is activated in VU/U-mode. When the SSE field is 0, the Zicfiss extension remains inactive in VU/U-mode, and the following rules apply: - 32-bit Zicfiss instructions will revert to their behavior as defined by Zimop. - 16-bit Zicfiss instructions will revert to their behavior as defined by Zcmop. - When menvcfg.SSE is one, SSAMOSWAP.W/D raises an illegal-instruction exception in U-mode and a virtual-instruction exception in VU-mode.RWUNDEFINED_LEGAL
[2]LPE*Landing Pad Enable* When the LPE field is set to 1, the Zicfilp extension is enabled in VU/U-mode. When the LPE field is 0, the Zicfilp extension is not enabled in VU/U-mode and the following rules apply to VU/U-mode: * The hart does not update the `ELP` state; it remains as `NO_LP_EXPECTED`. * The `LPAD` instruction operates as a no-op.RWUNDEFINED_LEGAL
[0]FIOM*Fence of I/O implies Memory* When either `senvcfg.FIOM` or `menvcfg.FIOM` is set, FENCE instructions ordering I/O regions also implicitly order memory regions when executed in U-mode as follows: !Instruction bit !Meaning when set !PI + PO !Predecessor device input and memory reads (PR implied) + Predecessor device output and memory writes (PW implied) !SI + SO !Successor device input and memory reads (SR implied) + Successor device output and memory writes (SW implied) Similarly, in U-mode when FIOM=1, if an atomic instruction that accesses a region ordered as device I/O has its _aq_ and/or _rl_ bit set, then that instruction is ordered as though it accesses both device I/O and memory. See `fence` for more details.RW0

Software read

Bits<64> value = $bits(CSR[senvcfg]);
if (implemented?(ExtensionName::Zicfiss) && (CSR[menvcfg].SSE == 0 || CSR[henvcfg].SSE == 0)) {
  # senvcfg.SSE must read-as-zero
  value = value & ~(1 `<< 3);
}
return value;

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.