forked from Mirrors/opensbi
lib: sbi: Convert hart features into hart extensions
Since past few years, we have been using "hart features" in OpenSBI to represent all optionalities and multi-letter extensions defined by the RISC-V specifications. The RISC-V profiles specification has taken a different approach and started assigning extension names for all optionalities which did not have any extension name previously. (Refer, https://github.com/riscv/riscv-profiles/blob/main/profiles.adoc) Inspired from the RISC-V profiles specification, we convert OpenSBI hart features into hart extensions. Going forward, we align the extension naming with RISC-V profiles specification. Currently, only "time CSR" and "AIA CSR" have not been assigned extension name but for everything else we have a name. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com>
This commit is contained in:
@@ -53,7 +53,7 @@ int fdt_pmu_fixup(void *fdt)
|
||||
fdt_delprop(fdt, pmu_offset, "riscv,event-to-mhpmcounters");
|
||||
fdt_delprop(fdt, pmu_offset, "riscv,event-to-mhpmevent");
|
||||
fdt_delprop(fdt, pmu_offset, "riscv,raw-event-to-mhpmcounters");
|
||||
if (!sbi_hart_has_feature(scratch, SBI_HART_HAS_SSCOFPMF))
|
||||
if (!sbi_hart_has_extension(scratch, SBI_HART_EXT_SSCOFPMF))
|
||||
fdt_delprop(fdt, pmu_offset, "interrupts-extended");
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user