From 13d40f21d588e17a31624ed415f114987b6bd3d0 Mon Sep 17 00:00:00 2001 From: Atish Patra Date: Sat, 10 Jul 2021 09:18:11 -0700 Subject: 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 Signed-off-by: Atish Patra --- include/sbi/sbi_error.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/sbi/sbi_error.h') diff --git a/include/sbi/sbi_error.h b/include/sbi/sbi_error.h index 3655d12..dd65e14 100644 --- a/include/sbi/sbi_error.h +++ b/include/sbi/sbi_error.h @@ -21,6 +21,8 @@ #define SBI_EDENIED SBI_ERR_DENIED #define SBI_EINVALID_ADDR SBI_ERR_INVALID_ADDRESS #define SBI_EALREADY SBI_ERR_ALREADY_AVAILABLE +#define SBI_EALREADY_STARTED SBI_ERR_ALREADY_STARTED +#define SBI_EALREADY_STOPPED SBI_ERR_ALREADY_STOPPED #define SBI_ENODEV -1000 #define SBI_ENOSYS -1001 -- cgit v1.2.3