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

Increase max num PMPs to 64 #2279

Open Moschn opened 1 week ago

Moschn commented 1 week ago

According to the current priv spec, 64 is the new maximum number of PMP entries. This commit aligns the core with the spec and allows up to a maximum number of 64 PMP entries. This commit also tries to simplify and unify the CSR read/write logic for PMPs.

The maximum number of PMPs is only selected in cva64a6_mmu

Related to: #2244 and #2248

Some further notes:

github-actions[bot] commented 1 week ago

:x: failed run, report available here.

github-actions[bot] commented 1 week ago

:x: failed run, report available here.

github-actions[bot] commented 1 week ago

:x: failed run, report available here.

github-actions[bot] commented 1 week ago

:x: failed run, report available here.

github-actions[bot] commented 1 week ago

:x: failed run, report available here.

github-actions[bot] commented 1 week ago

:x: failed run, report available here.

github-actions[bot] commented 1 week ago

:x: failed run, report available here.

Moschn commented 1 week ago

❌ failed run, report available here.

Tests pass on github CI. Not sure why gitlab tests don't pass... Also, I cannot access up-to-date runs with the link above. @JeanRochCoulon do you know why or how to access more recent CI runs?

JeanRochCoulon commented 1 week ago

Hello @Moschn I meet issues on the server. The plan is to reboot it within 1 hour to boost its RAM and CPU number. It should be better after the reboot.

github-actions[bot] commented 6 days ago

:x: failed run, report available here.

Moschn commented 5 days ago

From my side, this looks good to merge. I still cannot see any newer reports or runs in the gitlab CI. I think the only reports I see are from the first two commits. After that, I force-pushed my branch, and from that point on, the runs were no longer displayed.

Should I just close and reopen or what is the best procedure here?

JeanRochCoulon commented 5 days ago

Hello, we are facing CI server problems. We are working to fix it.

github-actions[bot] commented 4 days ago

:x: failed run, report available here.

github-actions[bot] commented 4 days ago

:x: failed run, report available here.

github-actions[bot] commented 4 days ago

:heavy_check_mark: successful run, report available here.

github-actions[bot] commented 4 days ago

:heavy_check_mark: successful run, report available here.

JeanRochCoulon commented 3 days ago

Nice job @Moschn !!! I will review the PR asap. I am available from next Monday

Moschn commented 4 hours ago

Ah ok thanks for the hint for the csr.rst file. I thought so, but was not sure. Could you generate it after this PR? I do not know how to generate it.

About the number of PMPCFGs and PMPADDRs: You are correct, as there are NbPMPRegion/4 PMPCFG CSRs and NbPMPRegion PMPADDR. In the CSR regfile, all 64 possible PMPADDR and 16 possible PMPCFG accesses are all correctly handled, but from then on, only the enabled NbPMPNumber are passed on, meaning there are NbPMPRegions PMPCFGs and PMPADDRs each one with the length of 8 or 64 bits.