Webcentive RISC-V Reference

senvcfg

Supervisor environment configuration register

Address
0x10A
Group
Supervisor-level CSRs
Privilege
SRW (privileged spec CSR listing, Supervisor Configuration)
Access
read/write; lowest privilege S (supervisor)
Address range
Standard read/write
Name in riscv-unified-db
Supervisor Environment Configuration

Privileged spec: Supervisor environment configuration register

Description

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

From riscv-unified-db, reformatted.

Fields

FieldBitsTypeDescription
CBZE7RW

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(when H is implemented: and (in conjunction with henvcfg.CBZE) VU-mode).

  • 0: The instruction raises an illegal instruction(when H is implemented: or virtual instruction exception)
  • 1: The instruction is executed

To summarize access:

menvcfg.CBZEsenvcfg.CBZE behavior
0read-only 0
1
writable, independent bit from menvcfg.CBZE

See cbo.zero for a summary of the effect.

CBCFE6RW

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,

When S is implemented:

in S-mode

Otherwise, when U is implemented:

in U-mode

.

  • 0: The instruction raises an illegal instruction (when H is implemented: or virtual instruction exception)
  • 1: The instruction is executed

To summarize access:

menvcfg.CBCFEsenvcfg.CBCFE behavior
0read-only 0
1
writable, independent bit from menvcfg.CBCFE

See cbo.clean and/or cbo.flush for a summary of the effect.

CBIE5-4RW-R

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

When H is implemented:

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.

UKTE8RW

If 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 svukte. If Svukte is not implemented, UKTE is read-only zero.

SSE3RW

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.
LPE2RW

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.
FIOM0RW

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 bitMeaning 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.

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

Specification and related pages