Crate sbi_spec

source ·
Expand description

RISC-V SBI Specification structure and constant definitions.

This crate adapts to RISC-V SBI Specification version 2.0 ratified. It provides structures in Rust semantics and best practices to simplify designs of RISC-V SBI ecosystem, both implementation and applications.

You may find it convenient to use this library in a vast range of packages, from operating system kernels, hypervisors, to SBI bare metal implementations. This crate is no_std compatible and does not need dynamic memory allocation, which makes it suitable for embedded development.

Although this library is dedicated to RISC-V architecture, it does not limit which build target the dependents should compile into. For example, when developing a RISC-V emulator on platforms other than RISC-V, the emulator designed on other platforms can still make use of sbi-spec structures, to provide the necessary features where the emulated RISC-V environment would make use of.

Modules§

  • Chapter 4. Base Extension (EID #0x10).
  • Chapter 3. Binary Encoding.
  • Chapter 14. CPPC Extension (EID #0x43505043 “CPPC”).
  • Chapter 12. Debug Console Extension (EID #0x4442434E “DBCN”).
  • Chapter 9. Hart State Management Extension (EID #0x48534D “HSM”).
  • Chapter 15. Nested Acceleration Extension (EID #0x4E41434C “NACL”).
  • Chapter 11. Performance Monitoring Unit Extension (EID #0x504D55 “PMU”).
  • Chapter 8. RFENCE Extension (EID #0x52464E43 “RFNC”).
  • Chapter 7. IPI Extension (EID #0x735049 “sPI: s-mode IPI”).
  • Chapter 10. System Reset Extension (EID #0x53525354 “SRST”).
  • Chapter 16. Steal-time Accounting Extension (EID #0x535441 “STA”).
  • Chapter 13. System Suspend Extension (EID #0x53555350 “SUSP”).
  • Chapter 6. Timer Extension (EID #0x54494D45 “TIME”).