mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-25 07:41:42 +01:00
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:
@@ -73,6 +73,9 @@ static int sbi_ecall_pmu_handler(unsigned long extid, unsigned long funcid,
|
||||
case SBI_EXT_PMU_COUNTER_STOP:
|
||||
ret = sbi_pmu_ctr_stop(regs->a0, regs->a1, regs->a2);
|
||||
break;
|
||||
case SBI_EXT_PMU_EVENT_GET_INFO:
|
||||
ret = sbi_pmu_event_get_info(regs->a0, regs->a1, regs->a2, regs->a3);
|
||||
break;
|
||||
case SBI_EXT_PMU_SNAPSHOT_SET_SHMEM:
|
||||
/* fallthrough as OpenSBI doesn't support snapshot yet */
|
||||
default:
|
||||
|
Reference in New Issue
Block a user