Skip to content

Commit

Permalink
<Fix> ibex doesn't support wfi
Browse files Browse the repository at this point in the history
- Added guide on arch_wfi to disable use of wfi
- Added tag only in ibex simple platform
  • Loading branch information
akashkollipara committed Jun 28, 2024
1 parent 0faa34a commit cd31990
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/arch/riscv/32/i/terravisor/include/arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,13 @@ static inline void arch_nop()

static inline void arch_wfi()
{
#ifndef RV_NO_WFI
asm volatile("wfi");
#if ERRATA_CIP578
arch_nop();
arch_nop();
#endif
#endif
}

static inline void arch_isb()
Expand Down
3 changes: 3 additions & 0 deletions src/platform/ibex/simple_system/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ $(eval $(call add_define,BIT))
RV_VEC_MODE := 1
$(eval $(call add_define,RV_VEC_MODE))

RV_NO_WFI := 1
$(eval $(call add_define,RV_NO_WFI))

BOOT_CORE_ID:= 0
$(eval $(call add_define,BOOT_CORE_ID))

Expand Down

0 comments on commit cd31990

Please sign in to comment.