7.1. RVA22 Profiles

The RVA22 profiles are intended to be used for 64-bit application processors running rich OS stacks. Only user-mode (RVA22U64) and supervisor-mode (RVA22S64) profiles are specified in this family.

7.1.1. RVA22U64 Profile

The RVA22U64 profile specifies the ISA features available to user-mode execution environments in 64-bit applications processors. This is the most important profile within the application processor family in terms of the amount of software that targets this profile.

7.1.1.1. RVA22U64 Mandatory Base

RV64I is the mandatory base ISA for RVA22U64, including mandatory fence.tso, and is little-endian.

Later versions of the RV64I unprivileged ISA specification ratified in 2021 made clear that fence.tso is mandatory.

As per the unprivileged architecture specification, the ecall instruction causes a requested trap to the execution environment.

7.1.1.2. RVA22U64 Mandatory Extensions

The following mandatory extensions were present in RVA20U64.

  • M Integer multiplication and division.

  • A Atomic instructions.

  • F Single-precision floating-point instructions.

  • D Double-precision floating-point instructions.

  • C Compressed Instructions.

  • Zicsr CSR instructions. These are implied by presence of F.

  • Zicntr Base counters and timers.

  • Zihpm Hardware performance counters.

  • Ziccif Main memory regions with both the cacheability and coherence PMAs must support instruction fetch, and any instruction fetches of naturally aligned power-of-2 sizes up to min(ILEN,XLEN) (i.e., 32 bits for RVA22) are atomic.

  • Ziccrse Main memory regions with both the cacheability and coherence PMAs must support RsrvEventual.

Ziccrse is a new extension name capturing this feature.
  • Ziccamoa Main memory regions with both the cacheability and coherence PMAs must support AMOArithmetic.

Ziccamoa is a new extension name capturing this feature.
  • Zicclsm Misaligned loads and stores to main memory regions with both the cacheability and coherence PMAs must be supported.

This is a new extension name for this feature. Even though mandated, misaligned loads and stores might execute extremely slowly. Standard software distributions should assume their existence only for correctness, not for performance.

The following mandatory feature was further restricted in RVA22U64:

  • Za64rs Reservation sets are contiguous, naturally aligned, and a maximum of 64 bytes.

This is a new extension name capturing this feature. The maximum reservation size has been reduced to match the required cache block size. The minimum reservation size is effectively set by the instructions in the mandatory A extension.

The following mandatory extensions are new for RVA22U64.

  • Zihintpause Pause instruction.

While the pause instruction is a HINT can be implemented as a NOP and hence trivially supported by hardware implementers, its inclusion in the mandatory extension list signifies that software should use the instruction whenever it would make sense and that implementors are expected to exploit this information to optimize hardware execution.
  • Zba Address computation.

  • Zbb Basic bit manipulation.

  • Zbs Single-bit instructions.

  • Zic64b Cache blocks must be 64 bytes in size, naturally aligned in the address space.

This is a new extension name for this feature. While the general RISC-V specifications are agnostic to cache block size, selecting a common cache block size simplifies the specification and use of the following cache-block extensions within the application processor profile. Software does not have to query a discovery mechanism and/or provide dynamic dispatch to the appropriate code. We choose 64 bytes at it is effectively an industry standard. Implementations may use longer cache blocks to reduce tag cost provided they use 64-byte sub-blocks to remain compatible. Implementations may use shorter cache blocks provided they sequence cache operations across the multiple cache blocks comprising a 64-byte block to remain compatible.
  • Zicbom Cache-Block Management Operations.

  • Zicbop Cache-Block Prefetch Operations.

As with other HINTS, the inclusion of prefetches in the mandatory set of extensions indicates that software should generate these instructions where they are expected to be useful, and hardware is expected to exploit that information.
  • Zicboz Cache-Block Zero Operations.

  • Zfhmin Half-Precision Floating-point transfer and convert.

Zfhmin is a small extension that adds support to load/store and convert IEEE FP16 numbers to and from IEEE FP32 format. The hardware cost for this extension is low, and mandating the extension avoids adding an option to the profile.
  • Zkt Data-independent execution time.

Zkt requires a certain subset of integer instructions execute with data-independent latency. Mandating this feature enables portable libraries for safe basic cryptographic operations. It is expected that application processors will naturally have this property and so implementation cost is low, if not zero, in most systems that would support RVA22.

7.1.1.3. RVA22U64 Optional Extensions

RVA22U64 has four profile options (Zfh, V, Zkn, Zks):

  • Zfh Half-Precision Floating-Point.

A future profile might mandate Zfh.
  • V Vector Extension.

The smaller vector extensions (Zve32f, Zve32x, Zve64d, Zve64f, Zve64x) are not provided as separately supported profile options. The full V extension is specified as the only supported profile option.
A future profile might mandate V.
  • Zkn Scalar Crypto NIST Algorithms.

  • Zks Scalar Crypto ShangMi Algorithms.

The scalar crypto extensions are expected to be superseded by vector crypto standards in future profiles, and the scalar extensions may be removed as supported options once vector crypto is present.
The smaller component scalar crypto extensions (Zbc, Zbkb, Zbkc, Zbkx, Zknd, Zkne, Zknh, Zksed, Zksh) are not provided as separate options in the profile. Profile implementers should provide all of the instructions in a given algorithm suite as part of the Zkn or Zks supported options.
Access to the entropy source (Zkr) in a system is usually carefully controlled. While the design supports unprivileged access to the entropy source, this is unlikely to be commonly used in an application processor, and so Zkr was not added as a profile option. This also means the roll-up Zk was not added as a profile option.
The Zfinx, Zdinx, Zhinx, Zhinxmin extensions are incompatible with the profile mandates to support the F and D extensions.

7.1.1.4. RVA22U64 Recommendations

Recommendations are not strictly mandated but are included to guide implementers making design choices.

Implementations are strongly recommended to raise illegal-instruction exceptions on attempts to execute unimplemented opcodes.

7.1.2. RVA22S64 Profile

The RVA22S64 profile specifies the ISA features available to a supervisor-mode execution environment in 64-bit applications processors. RVA22S64 is based on privileged architecture version 1.12.

7.1.2.1. RVA22S64 Mandatory Base

RV64I is the mandatory base ISA for RVA22S64, including mandatory fence.tso, and is little-endian.

Later versions of the RV64I unprivileged ISA specification ratified in 2021 made clear that fence.tso is mandatory.

The ecall instruction operates as per the unprivileged architecture specification. An ecall in user mode causes a contained trap to supervisor mode. An ecall in supervisor mode causes a requested trap to the execution environment.

7.1.2.2. RVA22S64 Mandatory Extensions

The following unprivileged extensions are mandatory:

  • The RVA22S64 mandatory unprivileged extensions include all the mandatory unprivileged extensions in RVA22U64.

  • Zifencei Instruction-Fetch Fence.

Zifencei is mandated as it is the only standard way to support instruction-cache coherence in RVA22 application processors. A new instruction-cache coherence mechanism is under development which might be added as an option in the future.

The following privileged extensions are mandatory:

  • Ss1p12 Privileged Architecture version 1.12.

Ss1p12 supersedes Ss1p11.
  • Svbare The satp mode Bare must be supported.

This is a new extension name for this feature.
  • Sv39 Page-Based 39-bit Virtual-Memory System.

  • Svade Page-fault exceptions are raised when a page is accessed when A bit is clear, or written when D bit is clear.

  • Ssccptr Main memory regions with both the cacheability and coherence PMAs must support hardware page-table reads.

  • Sstvecd stvec.MODE must be capable of holding the value 0 (Direct). When stvec.MODE=Direct, stvec.BASE must be capable of holding any valid four-byte-aligned address.

  • Sstvala stval must be written with the faulting virtual address for load, store, and instruction page-fault, access-fault, and misaligned exceptions, and for breakpoint exceptions other than those caused by execution of the EBREAK or C.EBREAK instructions. For illegal-instruction exceptions, stval must be written with the faulting instruction.

  • Sscounterenw For any hpmcounter that is not read-only zero, the corresponding bit in scounteren must be writable.

This is new extension name capturing this feature.
  • Svpbmt Page-Based Memory Types

  • Svinval Fine-Grained Address-Translation Cache Invalidation

7.1.2.3. RVA22S64 Optional Extensions

RVA22S64 has four unprivileged options (Zfh, V, Zkn, Zks) from RVA22U64, and eight privileged options (Sv48, Sv57, Svnapot, Ssu64xl, Sstc, Sscofpmf, Zkr, H).

The privileged optional extensions are:

  • Sv48 Page-Based 48-bit Virtual-Memory System.

  • Sv57 Page-Based 57-bit Virtual-Memory System.

  • Svnapot NAPOT Translation Contiguity

It is expected that Svnapot will be mandatory in the next profile release.
  • Ssu64xl sstatus.UXL must be capable of holding the value 2 (i.e., UXLEN=64 must be supported).

This is a new extension name for this feature.
  • Sstc supervisor-mode timer interrupts.

Sstc was not made mandatory in RVA22S64 as it is a more disruptive change affecting system-level architecture, and will take longer for implementations to adopt. It is expected to be made mandatory in the next profile release.
  • Sscofpmf Count Overflow and Mode-Based Filtering.

Platforms may choose to mandate the presence of Sscofpmf.
  • Zkr Entropy CSR.

Technically, Zk is also a privileged-mode option capturing that Zkr, Zkn, and Zkt are all implemented. However, the Zk rollup is less descriptive than specifying the individual extensions explicitly.
  • H The hypervisor extension.

When the hypervisor extension is implemented, the following are also mandatory:

  • Ssstateen Supervisor-mode view of the state-enable extension. The supervisor-mode (sstateen0-3) and hypervisor-mode (hstateen0-3) state-enable registers must be provided.

The Smstateen extension specification is an M-mode extension as it includes M-mode features, but the supervisor-mode visible components of the extension are named as the Ssstateen extension. Only Ssstateen is mandated in the RVA22S64 profile when the hypervisor extension is implemented. These registers are not mandated or supported options without the hypervisor extension, as there are no RVA22S64 supported options with relevant state to control in the absence of the hypervisor extension.
  • Shcounterenw For any hpmcounter that is not read-only zero, the corresponding bit in hcounteren must be writable.

This is a new extension name for this feature.
  • Shvstvala vstval must be written in all cases described above for stval.

This is a new extension name for this feature.
  • Shtvala htval must be written with the faulting guest physical address in all circumstances permitted by the ISA.

This is a new extension name for this feature.
  • Shvstvecd vstvec.MODE must be capable of holding the value 0 (Direct). When vstvec.MODE=Direct, vstvec.BASE must be capable of holding any valid four-byte-aligned address.

This is a new extension name for this feature.
  • Shvsatpa All translation modes supported in satp must be supported in vsatp.

This is a new extension name for this feature.
  • Shgatpa For each supported virtual memory scheme SvNN supported in satp, the corresponding hgatp SvNNx4 mode must be supported. The hgatp mode Bare must also be supported.

This is a new extension name for this feature.

7.1.2.4. RVA22S64 Recommendations

  • Implementations are strongly recommended to raise illegal-instruction exceptions when attempting to execute unimplemented opcodes.