Skip to content

Use RISC-V Sstc extension #2702

Description

@sbutz

Enables RustyHermit to manage timers without trapping to m-mode or to the hypervisor.

https://docs.riscv.org/reference/isa/v20260120/priv/sstc.html

This extension serves to provide supervisor mode with its own CSR-based timer interrupt facility that it can directly manage to provide its own timer service (in the form of having its own stimecmp register) - thus eliminating the large overheads for emulating S/HS-mode timers and timer interrupt generation up in M-mode. Further, this extension adds a similar facility to the Hypervisor extension for VS-mode.

As long as RustyHermit supports hardware not compliant with RVA23 profile, we need to support both mechanisms.

Options:

  1. Detect availability of Ssct extension at runtime by parsing the fdt.
  2. Add feature flag.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions