summaryrefslogtreecommitdiff
path: root/include/sbi
diff options
context:
space:
mode:
authorAtish Patra <atish.patra@wdc.com>2021-11-08 21:53:02 +0300
committerAnup Patel <anup@brainfault.org>2021-11-11 15:18:45 +0300
commit0c304b661965d81ba2194b54a0c71f4c2e5cab16 (patch)
treec95d6230fbd16b7753807ea7acabbed9f1fc1e14 /include/sbi
parent2363f950bcc497d8bd42654d32d05522fd24b9d7 (diff)
downloadopensbi-0c304b661965d81ba2194b54a0c71f4c2e5cab16.tar.xz
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>
Diffstat (limited to 'include/sbi')
-rw-r--r--include/sbi/sbi_pmu.h1
1 files changed, 1 insertions, 0 deletions
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);