Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1926: Prepare for 64 PMP config registers r=hudson-ayers a=alistair23 ### Pull Request Overview This PR was supposed to add support for 64 PMP config register on RISC-V now that it is supported by the spec. Instead this patch has turned more info converting the riscv-csr library to use the new inline assembly macro and to allow dynamic array access to the RISC-V registers. This PR does a few things: - Converts the PMP CSRs to an array (to allow simplifying the PMP code) - Uses the new inline assembly. Unfortunately Rust won't let use access CSR dynamically like we used to (see rust-lang/rust#73220) so we now have a giant if statement to see which one to access. I couldn't see any other way to make the value const. - We also implement the register functions on specific types (u32) instead of generics. This is because with generics we can't dynamically access arrays of CSRs with the inline assembly. - Finally we clean up some of the PMP code. ### Testing Strategy None yet. ### TODO or Help Wanted Comments please, this is uglier then I would like it to be. ### Documentation Updated - [X] Updated the relevant files in `/docs`, or no updates are required. ### Formatting - [X] Ran `make prepush`. Co-authored-by: Alistair Francis <alistair.francis@wdc.com>
- Loading branch information