You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 13, 2019. It is now read-only.
target/riscv/pmp: Fix address matching, granularity and debug
- Rename pmp_hart_has_priv to pmp_has_access as this is a more
appropriate name for tracing
- Add tracing for CSR reads and writes to pmpcfg and pmpaddr
using -d trace:pmpcfg_csr_read,trace:pmpcfg_csr_write,
trace:pmpaddr_csr_read,trace:pmpaddr_csr_write
- Add tracing for PMP access and rule matching using
-d trace:pmp_has_access,trace:pmp_rule_match
- Add early out if not all rules are present; short-circuit
optimization bug for discontiguous rules fixed (reported by
wxjstz <[email protected]>)
- Fix bug where TLB entries were created for rules smaller
than the page size (4096), which caused results of rules
with small spans to be erroneously used in subsequent accesses
- Fix integer promotion bug in pmpcfg_csr_read (also reported
by wxjstz <[email protected]>)
- Fix bug where PMP allowed non M-mode accesses when no rules
have been configured (default behaviour is to deny access
to other modes until PMP has been configured. (also reported
by wxjstz <[email protected]>)
- Fix illegal offsets for pmpcfg CSR accesses on rv64 (reported
by wxjstz <[email protected]>)
- Use size_t for PMP CSR address offsets (unsigned int can
result in sign extension on some 64-bit architectures)
- Add granularity parameter and mask addresss writes so that
granularity can be detected.
- Use NA4 bit to represent terminal granule size where G > 0
(this is implied by the specification)
- Remove redundant debugging statements (unnecessar with the
new tracing support).
- Simplify rule matching loop and use a ternary expression
that contains the entire rule match result in a similar
condensed style to spike (riscv-isa-sim).
Co-authored-by: wxjstz <[email protected]>
Signed-off-by: Michael Clark <[email protected]>
0 commit comments