Browse Source

spec: add structure for SSE, FWFT, DBTR, and MPXY extensions (#120)

This commit adds support for the following SBI 3.0 extensions:
- SSE (Supervisor Software Events)
- FWFT (Firmware Feature Tracking)
- DBTR (Debug Trigger)
- MPXY (Multi-plexing)

The changes include:
- Added new extensions using the `define_extension!` macro.
- Updated documentation to reflect the new extensions.
- Updated `CHANGELOG.md` to record the changes.

Signed-off-by: polypopopo <[email protected]>
polypopopo 1 week ago
parent
commit
dd7a831c29
2 changed files with 10 additions and 0 deletions
  1. 2 0
      library/sbi-rt/CHANGELOG.md
  2. 8 0
      library/sbi-rt/src/base.rs

+ 2 - 0
library/sbi-rt/CHANGELOG.md

@@ -16,6 +16,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 - Add C language naming alias tags to all functions of the sbi-rt library
 - rt: add DBTR extension support to SBI implementation.
 - dbtr: use `TriggerMask` structure in sbi-rt DBTR functions
+- rt: add structure for SSE, FWFT, DBTR, and MPXY extensions
 
 ### Modified
 
@@ -73,3 +74,4 @@ If user chooses to use `integer-impls` feature, it would fall back to older styl
 [0.0.3]: https://github.com/rustsbi/sbi-rt/compare/v0.0.2...v0.0.3
 [0.0.2]: https://github.com/rustsbi/sbi-rt/compare/v0.0.1...v0.0.2
 [0.0.1]: https://github.com/rustsbi/sbi-rt/releases/tag/v0.0.1
+

+ 8 - 0
library/sbi-rt/src/base.rs

@@ -146,6 +146,10 @@ define_extension! {
     Cppc(sbi_spec::cppc::EID_CPPC) /// SBI CPPC extension.
     Nacl(sbi_spec::nacl::EID_NACL) /// Nested Acceleration extension.
     Sta(sbi_spec::sta::EID_STA) /// Steal-time Accounting extension.
+    Sse(sbi_spec::sse::EID_SSE) /// Supervisor Software Events extension.
+    Fwft(sbi_spec::fwft::EID_FWFT) /// Firmware Features extension.
+    Dbtr(sbi_spec::dbtr::EID_DBTR) /// Debug Triggers extension.
+    Mpxy(sbi_spec::mpxy::EID_MPXY) /// Message Proxy extension.
 }
 
 #[cfg(feature = "integer-impls")]
@@ -201,5 +205,9 @@ mod tests {
         assert_eq!(crate::Cppc.extension_id(), 0x43505043);
         assert_eq!(crate::Nacl.extension_id(), 0x4E41434C);
         assert_eq!(crate::Sta.extension_id(), 0x535441);
+        assert_eq!(crate::Sse.extension_id(), 0x535345);
+        assert_eq!(crate::Fwft.extension_id(), 0x46574654);
+        assert_eq!(crate::Dbtr.extension_id(), 0x44425452);
+        assert_eq!(crate::Mpxy.extension_id(), 0x4D505859);
     }
 }