mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
target/riscv: pmu: Make number of counters configurable
The RISC-V privilege specification provides flexibility to implement any number of counters from 29 programmable counters. However, the QEMU implements all the counters. Make it configurable through pmu config parameter which now will indicate how many programmable counters should be implemented by the cpu. Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-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: <20220620231603.2547260-5-atishp@rivosinc.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
d3be1299fb
commit
18d6d89efc
3 changed files with 63 additions and 36 deletions
|
@ -397,7 +397,6 @@ struct RISCVCPUConfig {
|
|||
bool ext_zksed;
|
||||
bool ext_zksh;
|
||||
bool ext_zkt;
|
||||
bool ext_pmu;
|
||||
bool ext_ifencei;
|
||||
bool ext_icsr;
|
||||
bool ext_svinval;
|
||||
|
@ -421,6 +420,7 @@ struct RISCVCPUConfig {
|
|||
/* Vendor-specific custom extensions */
|
||||
bool ext_XVentanaCondOps;
|
||||
|
||||
uint8_t pmu_num;
|
||||
char *priv_spec;
|
||||
char *user_spec;
|
||||
char *bext_spec;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue