diff options
| author | Nick Hu <[email protected]> | 2025-10-20 14:34:08 +0800 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2025-10-28 11:27:57 +0530 |
| commit | 64904e5d5c99dbb067c0a82d450e2ebf15d48f33 (patch) | |
| tree | 43001beb40952c5106c0fe99ff89072ba14367db | |
| parent | 8752c809b34fed3378860258922c67df14236d11 (diff) | |
lib: sbi: Add SiFive proprietary xsfcease
Using ISA string "xsfcease" to detect the support of the custom
instruction "CEASE".
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.h | 2 | ||||
| -rw-r--r-- | lib/sbi/sbi_hart.c | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/sbi/sbi_hart.h b/include/sbi/sbi_hart.h index fdcf400a..ff682fb4 100644 --- a/include/sbi/sbi_hart.h +++ b/include/sbi/sbi_hart.h @@ -83,6 +83,8 @@ enum sbi_hart_extensions { SBI_HART_EXT_SSSTATEEN, /** Hart has Xsfcflushdlone extension */ SBI_HART_EXT_XSIFIVE_CFLUSH_D_L1, + /** Hart has Xsfcease extension */ + SBI_HART_EXT_XSIFIVE_CEASE, /** Maximum index of Hart extension */ SBI_HART_EXT_MAX, diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c index 4159dff5..de135818 100644 --- a/lib/sbi/sbi_hart.c +++ b/lib/sbi/sbi_hart.c @@ -716,6 +716,7 @@ const struct sbi_hart_ext_data sbi_hart_ext[] = { __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), + __SBI_HART_EXT_DATA(xsfcease, SBI_HART_EXT_XSIFIVE_CEASE), }; _Static_assert(SBI_HART_EXT_MAX == array_size(sbi_hart_ext), |
