Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix(vaddr): cross page write check should use original vaddr #587

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

good-circle
Copy link
Contributor

In our design, requests that cross page are split into two non-cross page requests in vaddr_write_cross_page, which are handled separately in vaddr_trans_and_check_exception.

However, in previous design, vaddr_trans_and_check_exception would pass a page-aligned vaddr (vaddr & ~PAGE_MASK) into isa_mmu_translate, which would result in the lower 12 bits of exception address (page offset) written to *tval going to all zeros. This will result in an error against rtl if an exception occurs. This commit fixes it.

In our design, requests that cross page are split into two non-cross page requests in `vaddr_write_cross_page`, which are handled separately in `vaddr_trans_and_check_exception`.

However, in previous design, `vaddr_trans_and_check_exception` would pass a page-aligned vaddr (`vaddr & ~PAGE_MASK`) into `isa_mmu_translate`, which would result in the lower 12 bits of exception address (page offset) written to *tval going to all zeros. This will result in an error against rtl if an exception occurs. This commit fixes it.
@good-circle good-circle merged commit c15f42c into master Oct 16, 2024
7 checks passed
@good-circle good-circle deleted the fix-misalign-tval branch October 16, 2024 08:18
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.

2 participants