openhwgroup / cva6

The CORE-V CVA6 is an Application class 6-stage RISC-V CPU capable of booting Linux
https://docs.openhwgroup.org/projects/cva6-user-manual/
Other
2.14k stars 652 forks source link

[Pmp] Parameter for PMP without MMU #2260

Closed CoralieAllioux closed 2 weeks ago

CoralieAllioux commented 2 weeks ago

First step for the PMP standalone: adding a dedicated parameter in config package and all configs.

It contributes to https://github.com/openhwgroup/cva6/issues/1447

github-actions[bot] commented 2 weeks ago

:heavy_check_mark: successful run, report available here.

JeanRochCoulon commented 2 weeks ago

Hello @CoralieAllioux The new parameter name tells the PMP instruction and data will be present when PmpPresent = 1. For instance:

CoralieAllioux commented 2 weeks ago

Hello @JeanRochCoulon, About the parameter, it only instantiates the PMP when the MMU is not present. Therefore the parameter PmpPresent is ignore in that case. I could then rename it to PmpStandalonePresent or something similar to be more explicit. Would it be better for you?

JeanRochCoulon commented 2 weeks ago

This new parameter allows to disable the PMP data when MMU not present and PmpPresent=0. To me this configuration does not need to be supported: this configuration is not compliant to RISC-V (because PMP instruction is present and _data not present) and I do not know a CVA6 user pleased to use it so far (maybe youself ?).

CoralieAllioux commented 2 weeks ago

I am not sure to understand your last comment. PmpStandalonePresent was a suggestion to rename PmpPresent if not explicit enough. This is not a new parameter

Here the possible configuration we're proposing:

JeanRochCoulon commented 2 weeks ago

RISC-V specification tells that PMP is optional. But in CVA6, PMP regions are always 16. To be compliant PMP data and instruction shall be supported. It is not the case Today when MMU is not present. Your modification will make CVA6 compliant to RISCV when MMU is not present.

CoralieAllioux commented 2 weeks ago

Oh, so you're telling MmuPresent=0 is sufficient? If so, PmpPresent is not necessary... and the PR is not needed anymore

JeanRochCoulon commented 2 weeks ago

Yes, that's it !

CoralieAllioux commented 2 weeks ago

Sorry for the missunderstanding. Then I cancel the PR.