Bump Tock kernel version (#374)
* Bump Tock kernel version * Update boards to new kernel * Update patches to new kernel * Update PR template * Bump libtock-rs * Use new layout from libtock-rs * Fix clippy warnings due to updated toolchain * Fix new toolchain file format * Bump elf2tab to v0.7.0 * Fix worklow and setup.sh script to use the TOML rust-toolchain file * New libtock-rs style of declaring the stack. * Fix padding in layout file. The layout from libtock-rs generates invalid flash padding. The value is 32-bit and therefore setting padding to 0xff yields 0xff000000 instead of 0xffffffff that we want. * adds tock patch for app break hard fault * sets in deploy, removed patch 04-mpu-fix * fixed the if deploy * fixes indentation * updates board names in install.md * fix docs and deploy style Co-authored-by: Fabian Kaczmarczyck <kaczmarczyck@google.com> Co-authored-by: kaczmarczyck <43844792+kaczmarczyck@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
c2b3aeca88
commit
c1f2551d0d
56
patches/tock/06-upgrade-partitions.patch
Normal file
56
patches/tock/06-upgrade-partitions.patch
Normal file
@@ -0,0 +1,56 @@
|
||||
diff --git a/kernel/src/lib.rs b/kernel/src/lib.rs
|
||||
index 807170195..a13413791 100644
|
||||
--- a/kernel/src/lib.rs
|
||||
+++ b/kernel/src/lib.rs
|
||||
@@ -122,7 +122,7 @@ pub use crate::sched::cooperative::{CoopProcessNode, CooperativeSched};
|
||||
pub use crate::sched::mlfq::{MLFQProcessNode, MLFQSched};
|
||||
pub use crate::sched::priority::PrioritySched;
|
||||
pub use crate::sched::round_robin::{RoundRobinProcessNode, RoundRobinSched};
|
||||
-pub use crate::sched::{Kernel, Scheduler, StorageLocation};
|
||||
+pub use crate::sched::{Kernel, Scheduler, StorageLocation, StorageType};
|
||||
|
||||
// Export only select items from the process module. To remove the name conflict
|
||||
// this cannot be called `process`, so we use a shortened version. These
|
||||
diff --git a/kernel/src/memop.rs b/kernel/src/memop.rs
|
||||
index 5465c95f4..e596648f7 100644
|
||||
--- a/kernel/src/memop.rs
|
||||
+++ b/kernel/src/memop.rs
|
||||
@@ -127,6 +127,14 @@ pub(crate) fn memop(process: &dyn ProcessType, op_type: usize, r1: usize) -> Ret
|
||||
}
|
||||
}
|
||||
|
||||
+ // Op Type 15: The type of the storage location indexed by r1.
|
||||
+ 15 => {
|
||||
+ match process.get_storage_location(r1) {
|
||||
+ None => ReturnCode::FAIL,
|
||||
+ Some(x) => ReturnCode::SuccessWithValue { value: x.storage_type as usize }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
_ => ReturnCode::ENOSUPPORT,
|
||||
}
|
||||
}
|
||||
diff --git a/kernel/src/sched.rs b/kernel/src/sched.rs
|
||||
index 031159500..0cbfea929 100644
|
||||
--- a/kernel/src/sched.rs
|
||||
+++ b/kernel/src/sched.rs
|
||||
@@ -118,10 +118,19 @@ pub enum SchedulingDecision {
|
||||
TrySleep,
|
||||
}
|
||||
|
||||
+/// Represents the type of a storage slice.
|
||||
+#[derive(Copy, Clone)]
|
||||
+pub enum StorageType {
|
||||
+ STORE = 1,
|
||||
+ PARTITION = 2,
|
||||
+ METADATA = 3,
|
||||
+}
|
||||
+
|
||||
/// Represents a storage location in flash.
|
||||
pub struct StorageLocation {
|
||||
pub address: usize,
|
||||
pub size: usize,
|
||||
+ pub storage_type: StorageType,
|
||||
}
|
||||
|
||||
/// Main object for the kernel. Each board will need to create one.
|
||||
Reference in New Issue
Block a user