forked from Mirrors/opensbi
lib: sbi_pmu: PMU raw event v2 support
As per the updated ISA specification and SBI PMU v3.0, lower 56 bits are available for the platform to implement mhpmeventX encoding. Implement the PMU raw event V2 support defined in SBI v3.0 which allows more bits for platforms to encode the raw events. Signed-off-by: Atish Patra <atishp@rivosinc.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -392,7 +392,8 @@ static uint64_t generic_pmu_xlate_to_mhpmevent(uint32_t event_idx,
|
||||
uint64_t evt_val = 0;
|
||||
|
||||
/* data is valid only for raw events and is equal to event selector */
|
||||
if (event_idx == SBI_PMU_EVENT_RAW_IDX)
|
||||
if (event_idx == SBI_PMU_EVENT_RAW_IDX ||
|
||||
event_idx == SBI_PMU_EVENT_RAW_V2_IDX)
|
||||
evt_val = data;
|
||||
else {
|
||||
/**
|
||||
|
Reference in New Issue
Block a user