lib: sbi: fwft: add support for SBI_FWFT_POINTER_MASKING_PMLEN

Add support for controlling the pointer masking mode on harts which
support the Smnpm extension. This extension can only exist on harts
where XLEN >= 64 bits. This implementation selects the mode with the
smallest PMLEN that satisfies the caller's requested lower bound.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Samuel Holland
2024-08-14 01:40:30 -07:00
committed by Anup Patel
parent ebfaf1974e
commit 1cb234b1c9
5 changed files with 76 additions and 1 deletions

View File

@@ -67,6 +67,8 @@ enum sbi_hart_extensions {
SBI_HART_EXT_SVADE,
/** Hart has Svadu extension */
SBI_HART_EXT_SVADU,
/** Hart has Smnpm extension */
SBI_HART_EXT_SMNPM,
/** Maximum index of Hart extension */
SBI_HART_EXT_MAX,