From 62151ed614a18171617b02ef1bc317080bbeddb1 Mon Sep 17 00:00:00 2001 From: Jean-Michel Picod Date: Wed, 16 Sep 2020 17:15:33 +0200 Subject: [PATCH] Fix MPU issue --- patches/tock/05-mpu-fix.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 patches/tock/05-mpu-fix.patch diff --git a/patches/tock/05-mpu-fix.patch b/patches/tock/05-mpu-fix.patch new file mode 100644 index 0000000..4a3c4e4 --- /dev/null +++ b/patches/tock/05-mpu-fix.patch @@ -0,0 +1,12 @@ +diff --git a/kernel/src/sched.rs b/kernel/src/sched.rs +index ed3ae8260..f109960d3 100644 +--- a/kernel/src/sched.rs ++++ b/kernel/src/sched.rs +@@ -632,6 +632,7 @@ impl Kernel { + let context_switch_reason = process.switch_to(); + scheduler_timer.disarm(); + chip.mpu().disable_app_mpu(); ++ chip.mpu().clear_mpu(); + + // Now the process has returned back to the kernel. Check + // why and handle the process as appropriate.