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

@@ -680,6 +680,7 @@ const struct sbi_hart_ext_data sbi_hart_ext[] = {
__SBI_HART_EXT_DATA(ssccfg, SBI_HART_EXT_SSCCFG),
__SBI_HART_EXT_DATA(svade, SBI_HART_EXT_SVADE),
__SBI_HART_EXT_DATA(svadu, SBI_HART_EXT_SVADU),
__SBI_HART_EXT_DATA(smnpm, SBI_HART_EXT_SMNPM),
};
_Static_assert(SBI_HART_EXT_MAX == array_size(sbi_hart_ext),