[PATCH v2 4/7] include: sbi: Ignore rs1 and rd fields in FENCE.TSO.
Benedikt Freisen
b.freisen at gmx.net
Fri Nov 14 12:38:39 PST 2025
While FENCE.TSO is only specified with them set to zero, it is a special
case of FENCE, which needs to ignore these otherwise reserved fields, but
in some implementations, namely XuanTie C906 and C910, apparently does not.
See the RISCVuzz paper by Thomas et al. for details.
Signed-off-by: Benedikt Freisen <b.freisen at gmx.net>
---
include/sbi/riscv_encoding.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/sbi/riscv_encoding.h b/include/sbi/riscv_encoding.h
index 92cbc27..2970ba0 100644
--- a/include/sbi/riscv_encoding.h
+++ b/include/sbi/riscv_encoding.h
@@ -944,7 +944,7 @@
#define INSN_MASK_WFI 0xffffff00
#define INSN_MATCH_WFI 0x10500000
-#define INSN_MASK_FENCE_TSO 0xffffffff
+#define INSN_MASK_FENCE_TSO 0xfff0707f
#define INSN_MATCH_FENCE_TSO 0x8330000f
#define INSN_MASK_VECTOR_UNIT_STRIDE 0xfdf0707f
--
2.51.1
More information about the opensbi
mailing list