From 0b1ba0f6125ad68ff24fb064d5f8e6f6518acc4e Mon Sep 17 00:00:00 2001 From: Fan YANG Date: Mon, 12 Aug 2024 17:08:11 +0800 Subject: [PATCH] [bsp][hpmicro] add missing fence apis - added missing fence apis Signed-off-by: Fan YANG --- .../libraries/hpm_sdk/arch/riscv/riscv_core.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bsp/hpmicro/libraries/hpm_sdk/arch/riscv/riscv_core.h b/bsp/hpmicro/libraries/hpm_sdk/arch/riscv/riscv_core.h index 4f95f4db9e..8cdaf95094 100644 --- a/bsp/hpmicro/libraries/hpm_sdk/arch/riscv/riscv_core.h +++ b/bsp/hpmicro/libraries/hpm_sdk/arch/riscv/riscv_core.h @@ -87,6 +87,18 @@ extern "C" { */ #define fencei() __asm volatile("fence.i") +/** + * @brief execute fence rw + * + */ +#define fencerw() __asm volatile("fence rw, rw") + +/** + * @brief execute fence iorw + * + */ +#define fenceiorw() __asm volatile("fence iorw, iorw") + /** * @brief enable fpu */