U Extension

Versions

Version 1.0.0

State

ratified

Ratification date

2019-12

Synopsis

User-mode privilege level is supported by an implementation if the U extension is present. Note that the RISC-V ISA doesn’t formally define a U extension and it is only discussed in the Privileged ISA manual.

Parameters

This extension has the following implementation options (AKA parameters):

MCOUNTENABLE_EN

Type

array

Valid Values

32-element array of boolean

Description

Indicates which counters can be delegated via mcounteren.

An unimplemented counter cannot be specified, i.e., if HPM_COUNTER_EN[3] is false, it would be illegal to set MCOUNTENABLE_EN[3] to true.

MCOUNTENABLE_EN[0:2] must all be false if Zicntr is not implemented. MCOUNTENABLE_EN[3:31] must all be false if Zihpm is not implemented.

MUTABLE_MISA_U

Type

boolean

Valid Values

boolean

Description

Indicates whether or not the U extension can be disabled with the misa.U bit.

TRAP_ON_ECALL_FROM_U

Type

boolean

Valid Values

boolean

Description

Whether or not an ECALL-from-U-mode causes a synchronous exception.

The spec states that implementations may handle ECALLs transparently without raising a trap, in which case the EEI must provide a builtin.

UXLEN

Type

array

Valid Values

1-element to 2-element array of [32, 64]

Description

Set of XLENs supported in U-mode. When both 32 and 64 are supported, SXLEN can be changed, via mstatus.UXL, between 32 and 64.

U_MODE_ENDIANNESS

Type

string

Valid Values

[little, big, dynamic]

Description

Endianness of data in U-mode. Can be one of:

  • little: U-mode data is always little endian

  • big: U-mode data is always big endian

  • dynamic: U-mode data can be either little or big endian, depending on the CSR field mstatus.UBE