Skip to content

fix: preserve 2KB TOR PMP granularity - #74

Open
KnightGOKU wants to merge 1 commit into
XUANTIE-RV:mainfrom
KnightGOKU:fix/openc910-pmp-tor-2kb-granularity
Open

KnightGOKU wants to merge 1 commit into
XUANTIE-RV:mainfrom
KnightGOKU:fix/openc910-pmp-tor-2kb-granularity

Conversation

@KnightGOKU

Copy link
Copy Markdown

Fixes #60

Summary

OpenC910 advertises a 2-KB PMP granularity, but TOR address checks dropped physical address bit 11. As a result, accesses in a 2-KB TOR region could be treated as belonging to the same 4-KB range.

Changes

  • Extended the internal MMU-to-PMP physical address path from 28 to 29 bits.
  • Propagated PA[11] through the TLB, PTW, MMU, and PMP interfaces.
  • Updated TOR comparison to use the full PA[39:11] value.
  • Preserved the existing NAPOT matching behavior.

No external physical address interface or PMP CSR format is changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 2KB PMP regions are enforced inconsistently in TOR mode

1 participant