diff --git a/src/arch/riscv/32/i/terravisor/include/arch.h b/src/arch/riscv/32/i/terravisor/include/arch.h index 58751f2e..1121b5c3 100644 --- a/src/arch/riscv/32/i/terravisor/include/arch.h +++ b/src/arch/riscv/32/i/terravisor/include/arch.h @@ -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() diff --git a/src/platform/ibex/simple_system/config.mk b/src/platform/ibex/simple_system/config.mk index 61443020..d80f6d02 100644 --- a/src/platform/ibex/simple_system/config.mk +++ b/src/platform/ibex/simple_system/config.mk @@ -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))