summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Hu <[email protected]>2025-10-20 14:34:07 +0800
committerAnup Patel <[email protected]>2025-10-28 11:27:55 +0530
commit8752c809b34fed3378860258922c67df14236d11 (patch)
treeeabae052e292bffecd03de43134b62b7e82047f5
parentce4dc7649e5e1f7053d996f08c7da071b80b654f (diff)
lib: sbi: Add SiFive proprietary xsfcflushdlone
Using ISA string "xsfcflushdlone" to detect the support of the SiFive L1D cache flush custom instruction. Reviewed-by: Cyan Yang <[email protected]> Reviewed-by: Anup Patel <[email protected]> Signed-off-by: Nick Hu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
-rw-r--r--include/sbi/sbi_hart.h2
-rw-r--r--lib/sbi/sbi_hart.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/include/sbi/sbi_hart.h b/include/sbi/sbi_hart.h
index 82b19dcf..fdcf400a 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 1b50f671..4159dff5 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),