Skip to content

Commit

Permalink
Update to Zephyr 3.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
m42uko authored and olofk committed Aug 2, 2024
1 parent 28e4704 commit 830d808
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ manifest:
projects:
- name: zephyr
remote: zephyrproject-rtos
revision: v3.5.0
revision: v3.7.0
import: true
1 change: 1 addition & 0 deletions zephyr/soc/riscv/servant/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
zephyr_sources(
soc_irq.S
vector.S
cpu_idle.c
irq.c)
22 changes: 22 additions & 0 deletions zephyr/soc/riscv/servant/cpu_idle.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include <zephyr/irq.h>
#include <zephyr/tracing/tracing.h>

// Override arch_cpu_idle() and arch_cpu_atomic_idle() to prevent insertion
// of `wfi` instructions, which lock up our system. This was introduced in
// Zephyr 3.6.0 with commit 5fb6e267f629dedb8382da6bcad8018b1bb8930a.
//
// This is probably a hardware bug in SERV. This issue is tracked as #131.
// https://github.com/olofk/serv/issues/131

void arch_cpu_idle(void)
{
sys_trace_idle();
irq_unlock(MSTATUS_IEN);
}

void arch_cpu_atomic_idle(unsigned int key)
{
sys_trace_idle();
irq_unlock(key);
}

0 comments on commit 830d808

Please sign in to comment.