From 0c304b661965d81ba2194b54a0c71f4c2e5cab16 Mon Sep 17 00:00:00 2001 From: Atish Patra <atish.patra@wdc.com> Date: Mon, 8 Nov 2021 10:53:02 -0800 Subject: lib: sbi: Allow programmable counters to monitor cycle/instret events A platform may use programmable counters for cycle/instret events. The priv spec allows that provided that cycle/instret also report those events in addition to the programmable counters. We should allow that functionality in OpenSBI. Reviewed-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Atish Patra <atish.patra@wdc.com> --- include/sbi/sbi_pmu.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/sbi/sbi_pmu.h b/include/sbi/sbi_pmu.h index b3010cc..f018556 100644 --- a/include/sbi/sbi_pmu.h +++ b/include/sbi/sbi_pmu.h @@ -26,6 +26,7 @@ #define SBI_PMU_FW_CTR_MAX 16 #define SBI_PMU_HW_CTR_MAX 32 #define SBI_PMU_CTR_MAX (SBI_PMU_HW_CTR_MAX + SBI_PMU_FW_CTR_MAX) +#define SBI_PMU_FIXED_CTR_MASK 0x07 /** Initialize PMU */ int sbi_pmu_init(struct sbi_scratch *scratch, bool cold_boot); -- cgit v1.2.3