lib: sbi: Add PMU support
authorAtish Patra <atish.patra@wdc.com>
Sat, 10 Jul 2021 16:18:11 +0000 (09:18 -0700)
committerAnup Patel <anup@brainfault.org>
Sun, 11 Jul 2021 04:53:18 +0000 (10:23 +0530)
commit13d40f21d588e17a31624ed415f114987b6bd3d0
treee54dd0463d90fbbc28b90e56b45a01539a981115
parente7cc7a3ab2770b9f40569a84c417afdad59531bc
lib: sbi: Add PMU support

RISC-V SBI v0.3 specification defined a PMU extension to configure/start/stop
the hardware/firmware pmu events.

Implement PMU support in OpenSBI library. The implementation is agnostic of
event to counter mapping & mhpmevent value configuration. That means, it
expects platform hooks will be used to set up the mapping and provide
the mhpmevent value at runtime.

Reviewed-by: Anup Patel <anup.patel@wdc.com>
Signed-off-by: Atish Patra <atish.patra@wdc.com>
include/sbi/sbi_ecall_interface.h
include/sbi/sbi_error.h
include/sbi/sbi_pmu.h [new file with mode: 0644]
lib/sbi/objects.mk
lib/sbi/sbi_init.c
lib/sbi/sbi_pmu.c [new file with mode: 0644]