diff options
author | Atish Patra <atishp@rivosinc.com> | 2022-08-24 15:17:00 -0700 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2022-09-07 09:19:15 +0200 |
commit | abd9a20665496aa4f3680fbbd42b5c389ea53d1c (patch) | |
tree | e57eecd59500f7b79f94a5c91ec46dd468d8bf98 /target/riscv/pmu.h | |
parent | 892320facd73136b48bb58af3bd742686eb05416 (diff) |
hw/riscv: virt: Add PMU DT node to the device tree
Qemu virt machine can support few cache events and cycle/instret counters.
It also supports counter overflow for these events.
Add a DT node so that OpenSBI/Linux kernel is aware of the virt machine
capabilities. There are some dummy nodes added for testing as well.
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Message-Id: <20220824221701.41932-5-atishp@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'target/riscv/pmu.h')
-rw-r--r-- | target/riscv/pmu.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/target/riscv/pmu.h b/target/riscv/pmu.h index 036653627f..3004ce37b6 100644 --- a/target/riscv/pmu.h +++ b/target/riscv/pmu.h @@ -31,5 +31,6 @@ int riscv_pmu_init(RISCVCPU *cpu, int num_counters); int riscv_pmu_update_event_map(CPURISCVState *env, uint64_t value, uint32_t ctr_idx); int riscv_pmu_incr_ctr(RISCVCPU *cpu, enum riscv_pmu_event_idx event_idx); +void riscv_pmu_generate_fdt_node(void *fdt, int num_counters, char *pmu_name); int riscv_pmu_setup_timer(CPURISCVState *env, uint64_t value, uint32_t ctr_idx); |