forked from Mirrors/opensbi
lib: sbi_pmu: Implement SBI PMU event info function
Allow the supervisor software to query about the event using the new function. This supports both firmware and hardware events. The hardware event presence is verified hw_event_map which is populated via PMU device tree node. The firmware event presence is checked through event validation function which should take care of both standard and platform firmware events. Signed-off-by: Atish Patra <atishp@rivosinc.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -142,6 +142,8 @@ int sbi_pmu_ctr_start(unsigned long cidx_base, unsigned long cidx_mask,
|
||||
unsigned long flags, uint64_t ival);
|
||||
|
||||
int sbi_pmu_ctr_get_info(uint32_t cidx, unsigned long *ctr_info);
|
||||
int sbi_pmu_event_get_info(unsigned long shmem_lo, unsigned long shmem_high,
|
||||
unsigned long num_events, unsigned long flags);
|
||||
|
||||
unsigned long sbi_pmu_num_ctr(void);
|
||||
|
||||
|
Reference in New Issue
Block a user