From cd31990e4cb4e146cf65c944279f34a0b2579974 Mon Sep 17 00:00:00 2001 From: Akash Kollipara Date: Sat, 29 Jun 2024 00:22:04 +0530 Subject: [PATCH] ibex doesn't support wfi - Added guide on arch_wfi to disable use of wfi - Added tag only in ibex simple platform --- src/arch/riscv/32/i/terravisor/include/arch.h | 2 ++ src/platform/ibex/simple_system/config.mk | 3 +++ 2 files changed, 5 insertions(+) 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))