For RV64, eight even-numbered CSRs, pmpcfg0, pmpcfg2, ..., pmpcfg14, hold the configurations for the 64 PMP entries, as shown in Figure 3.32.
For RV64, the odd-numbered configuration registers, pmpcfg1, pmpcfg3, ..., pmpcfg15, are illegal.
How to reproduce
Modify target/rv64gc/riscv_core_setting.sv as following,
riscv_pmp_test
will generatepmp_setup
routine in the output code. When the target is rv64gc, this routine containscsrw pmpcfg1, rs1
instruction.According to RISC-V specification, there is no pmpcfg1 register when XLEN=64. So, generated code is invalid.
How to reproduce
Modify target/rv64gc/riscv_core_setting.sv as following,
Modify target/rv32imc/testlist.yaml as following,
test: riscv_pmp_test gen_opts: >
+pmp_num_regions=1
+pmp_num_regions=16
Run following command,
Refer to out/asm_test/riscv_pmp_test_0.S, and check there are following instructions,
Versions
I am using following environment