[PATCH v4 03/11] lib: sbi: Detect Sscofpmf extension at run time

Bin Meng bmeng.cn at gmail.com
Sun Nov 7 17:58:50 PST 2021


On Sat, Nov 6, 2021 at 6:06 AM Atish Patra <atish.patra at wdc.com> wrote:
>
> Sscofpmf ISA extension introduces PMU counter overflow and filtering support.
> It introduces a read only `scountovf` csr that can be used to detect if
> a hart supports this extension at runtime. However, this feature is only
> useful if the hart already supports mcounteren and mcountinhibit.
>
> Add a dynamic detection mechanism and boot time print message if sscofpmf
> is present.
>
> Reviewed-by: Anup Patel <anup.patel at wdc.com>
> Signed-off-by: Atish Patra <atish.patra at wdc.com>
> ---
>  include/sbi/sbi_hart.h |  4 +++-
>  lib/sbi/sbi_hart.c     | 12 ++++++++++++
>  2 files changed, 15 insertions(+), 1 deletion(-)
>

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>



More information about the opensbi mailing list