瀏覽代碼

spec: add Coreboot and Oreboot to impl_id list

Coreboot have RISC-V SBI Implementation ID 9, while Oreboot have ID 10.

Signed-off-by: Zhouqi Jiang <luojia@hust.edu.cn>
Zhouqi Jiang 6 月之前
父節點
當前提交
9f6e54a43b
共有 4 個文件被更改,包括 11 次插入1 次删除
  1. 2 0
      sbi-spec/CHANGELOG.md
  2. 5 1
      sbi-spec/src/base.rs
  3. 2 0
      sbi-spec/src/lib.rs
  4. 2 0
      sbi-testing/src/base.rs

+ 2 - 0
sbi-spec/CHANGELOG.md

@@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
 
 ### Added
 
+- base: add Coreboot and Oreboot to `impl_id` module
+
 ### Modified
 
 ### Fixed

+ 5 - 1
sbi-spec/src/base.rs

@@ -95,8 +95,12 @@ pub mod impl_id {
     pub const DIOSIX: usize = 5;
     /// Coffer.
     pub const COFFER: usize = 6;
-    /// Xen Project
+    /// Xen Project.
     pub const XEN: usize = 7;
     /// PolarFire Hart Software Services.
     pub const POLARFIRE_HSS: usize = 8;
+    /// Coreboot.
+    pub const COREBOOT: usize = 9;
+    /// Oreboot.
+    pub const OREBOOT: usize = 10;
 }

+ 2 - 0
sbi-spec/src/lib.rs

@@ -106,6 +106,8 @@ mod tests {
         const_assert_eq!(6, impl_id::COFFER);
         const_assert_eq!(7, impl_id::XEN);
         const_assert_eq!(8, impl_id::POLARFIRE_HSS);
+        const_assert_eq!(9, impl_id::COREBOOT);
+        const_assert_eq!(10, impl_id::OREBOOT);
     }
     // §5
     #[cfg(feature = "legacy")]

+ 2 - 0
sbi-testing/src/base.rs

@@ -90,6 +90,8 @@ pub fn test(mut f: impl FnMut(Case)) {
         impl_id::COFFER => Ok("Coffer"),
         impl_id::XEN => Ok("Xen Project"),
         impl_id::POLARFIRE_HSS => Ok("PolarFire Hart Software Services"),
+        impl_id::COREBOOT => Ok("Coreboot"),
+        impl_id::OREBOOT => Ok("Oreboot"),
         unknown => Err(unknown),
     }));
     f(Case::GetSbiImplVersion(sbi::get_sbi_impl_version()));