summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMayuresh Chitale <[email protected]>2023-03-09 18:43:52 +0530
committerAnup Patel <[email protected]>2023-03-10 14:00:07 +0530
commit51951d9e9af86c885cf5564bba7dd83a9a59a3b3 (patch)
treeb30dce6f3b0760a42a9fd44457d5c96fcd6b4505 /include
parent1fe8dc995566d869836d3caf37e427c28536f453 (diff)
lib: sbi_pmu: Implement sbi_pmu_counter_fw_read_hi
To support 64 bit firmware counters on RV32 systems, we implement sbi_pmu_counter_fw_read_hi() which returns the upper 32 bits of the firmware counter value. On RV64 (or higher) systems, this function will always return zero. Signed-off-by: Mayuresh Chitale <[email protected]> Reviewed-by: Atish Patra <[email protected]> Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/sbi/sbi_ecall_interface.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sbi/sbi_ecall_interface.h b/include/sbi/sbi_ecall_interface.h
index 4c378c3e..d4482129 100644
--- a/include/sbi/sbi_ecall_interface.h
+++ b/include/sbi/sbi_ecall_interface.h
@@ -101,6 +101,7 @@
#define SBI_EXT_PMU_COUNTER_START 0x3
#define SBI_EXT_PMU_COUNTER_STOP 0x4
#define SBI_EXT_PMU_COUNTER_FW_READ 0x5
+#define SBI_EXT_PMU_COUNTER_FW_READ_HI 0x6
/** General pmu event codes specified in SBI PMU extension */
enum sbi_pmu_hw_generic_events_t {