forked from Mirrors/opensbi
lib: utils: Add detection of Smepmp from ISA string in FDT
- Add function to parse ISA string in FDT. - Set Smepmp feature bit in extensions if "smepmp" string is found in ISA string. Signed-off-by: Himanshu Chauhan <hchauhan@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:

committed by
Anup Patel

parent
cbcfc7b10c
commit
d72f5f1747
@@ -211,6 +211,15 @@ static void generic_final_exit(void)
|
||||
|
||||
static int generic_extensions_init(struct sbi_hart_features *hfeatures)
|
||||
{
|
||||
int rc;
|
||||
|
||||
/* Parse the ISA string from FDT and enable the listed extensions */
|
||||
rc = fdt_parse_isa_extensions(fdt_get_address(), current_hartid(),
|
||||
&hfeatures->extensions);
|
||||
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
if (generic_plat && generic_plat->extensions_init)
|
||||
return generic_plat->extensions_init(generic_plat_match,
|
||||
hfeatures);
|
||||
|
Reference in New Issue
Block a user