[PATCH v6 05/11] lib: sbi: Add SiFive proprietary xsfcflushdlone
Nick Hu
nick.hu at sifive.com
Thu Sep 4 19:24:38 PDT 2025
Using ISA string "xsfcflushdlone" to detect the support of the
SiFive L1D cache flush custom instruction.
Reviewed-by: Cyan Yang <cyan.yang at sifive.com>
Reviewed-by: Anup Patel <anup at brainfault.org>
Signed-off-by: Nick Hu <nick.hu at sifive.com>
---
include/sbi/sbi_hart.h | 2 ++
lib/sbi/sbi_hart.c | 1 +
2 files changed, 3 insertions(+)
diff --git a/include/sbi/sbi_hart.h b/include/sbi/sbi_hart.h
index 82b19dcfd4582b39e1dafb6bdb41d2fbe77dc419..fdcf400aa8c494cd941c412294bd0c118c5ec2af 100644
--- a/include/sbi/sbi_hart.h
+++ b/include/sbi/sbi_hart.h
@@ -81,6 +81,8 @@ enum sbi_hart_extensions {
SBI_HART_EXT_SSCTR,
/** HART has Ssstateen extension **/
SBI_HART_EXT_SSSTATEEN,
+ /** Hart has Xsfcflushdlone extension */
+ SBI_HART_EXT_XSIFIVE_CFLUSH_D_L1,
/** Maximum index of Hart extension */
SBI_HART_EXT_MAX,
diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c
index 6a2d7d6f95339b9a6a37f346cf923ec63964cd3e..4160ad6c3d8b31ff9f3d5ab5dbf55356140232a8 100644
--- a/lib/sbi/sbi_hart.c
+++ b/lib/sbi/sbi_hart.c
@@ -715,6 +715,7 @@ const struct sbi_hart_ext_data sbi_hart_ext[] = {
__SBI_HART_EXT_DATA(smctr, SBI_HART_EXT_SMCTR),
__SBI_HART_EXT_DATA(ssctr, SBI_HART_EXT_SSCTR),
__SBI_HART_EXT_DATA(ssstateen, SBI_HART_EXT_SSSTATEEN),
+ __SBI_HART_EXT_DATA(xsfcflushdlone, SBI_HART_EXT_XSIFIVE_CFLUSH_D_L1),
};
_Static_assert(SBI_HART_EXT_MAX == array_size(sbi_hart_ext),
--
2.34.1
More information about the opensbi
mailing list