From c24f1fc9d774495cc62cf6ac7bb937d5cd532a9c Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Fri, 1 Apr 2022 23:10:52 +0000 Subject: [PATCH] Merge "sel4-sys: add BootInfo serde support" GitOrigin-RevId: a6191ecf1b2bddbe8c92dbe7d2e5ba0a65824117 --- apps/system/components/kata-os-common/src/sel4-sys/Cargo.toml | 1 + .../system/components/kata-os-common/src/sel4-sys/arch/riscv.rs | 2 +- apps/system/components/kata-os-common/src/sel4-sys/lib.rs | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/system/components/kata-os-common/src/sel4-sys/Cargo.toml b/apps/system/components/kata-os-common/src/sel4-sys/Cargo.toml index 588d640..f5f69e6 100644 --- a/apps/system/components/kata-os-common/src/sel4-sys/Cargo.toml +++ b/apps/system/components/kata-os-common/src/sel4-sys/Cargo.toml @@ -60,3 +60,4 @@ path = "lib.rs" [dependencies] static_assertions = "1.1" +serde = { version = "1.0", default-features = false, features = ["derive"] } diff --git a/apps/system/components/kata-os-common/src/sel4-sys/arch/riscv.rs b/apps/system/components/kata-os-common/src/sel4-sys/arch/riscv.rs index 755b0cf..5d62fef 100644 --- a/apps/system/components/kata-os-common/src/sel4-sys/arch/riscv.rs +++ b/apps/system/components/kata-os-common/src/sel4-sys/arch/riscv.rs @@ -93,7 +93,7 @@ impl From for seL4_RISCV_VMAttributes { } #[repr(C)] -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] pub enum seL4_ObjectType { seL4_UntypedObject = 0, seL4_TCBObject, diff --git a/apps/system/components/kata-os-common/src/sel4-sys/lib.rs b/apps/system/components/kata-os-common/src/sel4-sys/lib.rs index 373c313..f7f4d76 100644 --- a/apps/system/components/kata-os-common/src/sel4-sys/lib.rs +++ b/apps/system/components/kata-os-common/src/sel4-sys/lib.rs @@ -13,6 +13,7 @@ #![allow(bad_style, unused_parens, unused_assignments)] use core::mem::size_of; +use serde::{Deserialize,Serialize}; use static_assertions::*; // NB: this mimics the logic in build.rs