lib: sbi_pmu: Implement sbi_pmu_counter_fw_read_hi
authorMayuresh Chitale <mchitale@ventanamicro.com>
Thu, 9 Mar 2023 13:13:52 +0000 (18:43 +0530)
committerAnup Patel <anup@brainfault.org>
Fri, 10 Mar 2023 08:30:07 +0000 (14:00 +0530)
commit51951d9e9af86c885cf5564bba7dd83a9a59a3b3
treeb30dce6f3b0760a42a9fd44457d5c96fcd6b4505
parent1fe8dc995566d869836d3caf37e427c28536f453
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 <mchitale@ventanamicro.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
include/sbi/sbi_ecall_interface.h
lib/sbi/sbi_ecall_pmu.c