diff options
author | Anup Patel <apatel@ventanamicro.com> | 2022-08-24 10:57:19 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2022-09-01 14:23:20 +0300 |
commit | c9b388d578647c3283aea03f74bf1251503a58f0 (patch) | |
tree | 6df78e707d0875d82eec32c7caa930c784511058 /include/sbi | |
parent | e238459fabb7bdf9237662297bbe8b177e0fb906 (diff) | |
download | opensbi-c9b388d578647c3283aea03f74bf1251503a58f0.tar.xz |
lib: sbi_pmu: Simplify FW counters to reduce memory usage
Currently, we have 32 elements (i.e. SBI_PMU_FW_EVENT_MAX) array of
"struct sbi_pmu_fw_event" for each of 128 possible HARTs
(i.e. SBI_HARTMASK_MAX_BITS).
To reduce memory usage of OpenSBI, we update FW counter implementation
as follows:
1) Remove SBI_PMU_FW_EVENT_MAX
2) Remove "struct sbi_pmu_fw_event"
3) Create per-HART bitmap of XLEN bits to track FW counters
which are started on each HART
4) Create per-HART uint64_t array to track values of FW
counters on each HART.
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Diffstat (limited to 'include/sbi')
-rw-r--r-- | include/sbi/sbi_pmu.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/include/sbi/sbi_pmu.h b/include/sbi/sbi_pmu.h index 34336f7..39cf007 100644 --- a/include/sbi/sbi_pmu.h +++ b/include/sbi/sbi_pmu.h @@ -19,9 +19,6 @@ /* Maximum number of hardware events that can mapped by OpenSBI */ #define SBI_PMU_HW_EVENT_MAX 256 -/* Maximum number of firmware events that can mapped by OpenSBI */ -#define SBI_PMU_FW_EVENT_MAX 32 - /* Counter related macros */ #define SBI_PMU_FW_CTR_MAX 16 #define SBI_PMU_HW_CTR_MAX 32 |