Commit graph

6 commits

Author SHA1 Message Date
Tom Roberts
f190e3abe4 [rtl] Fix PMP NA4 address matching
- Split out address matching into less than, greater than and equals to
  correctly match NAPOT, NA4 and TOR modes.
- Relates to #902

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2020-06-02 13:41:03 +01:00
Tom Roberts
344279906f [rtl] Fix PMP address matching
- For TOR matching, match should be range_low <= addr < range_high
- Adapt masking so TOR matching can still be reused for NAPOT matching
- Relates to #864

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2020-05-26 09:33:50 +01:00
Tom Roberts
ea2ffe82f1 [rtl/pmp] Fix PMP error prioritization
- Region matches should be prioritized from 0 - N as stated in the RISCV
  Privileged Spec v1.11

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2020-03-27 16:43:35 +00:00
Tom Roberts
f35db04b7c [RTL PMP] Fix address matching bugs
- Partial matching not relevant for 32bit only accesses
- Apply region size masking correctly
2019-10-03 10:41:29 +01:00
Tom Roberts
2aacd2b98b [Priv modes] Add support for U-Mode
- General changes to suport U-mode (fixes #88)
- Update documentation
- Add priv mode flops to CSRs module
- Propagate correct priv mode to PMP module
- Implement CSR priv-mode permission checking
- Implement illegal U-mode instruction checking
- Add extra mstatus bits for U-mode (MPRV and TW)
2019-10-03 10:41:29 +01:00
Tom Roberts
892ad8a621 [RTL] - Add PMP module
- Instantiate generic PMP module
- Wire up I-side and D-side PMP faults
- The output of the PMP check is used to gate external bus requests from the
  I-side and LSU
- Each of those units progresses with their request as-if it was granted
  externally and registers the PMP error
- The error is then sent to the controller at the appropriate time to trigger
  an exception
2019-08-29 17:43:37 +01:00