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 atp updating #360

Merged
merged 2 commits into from
Jun 19, 2024
Merged

Fix atp updating #360

merged 2 commits into from
Jun 19, 2024

Conversation

huxuan0307
Copy link
Contributor

No description provided.

@huxuan0307 huxuan0307 requested review from cebarobot and pxk27 and removed request for cebarobot June 18, 2024 09:51
* This commit correct the updating of hgatp CSR.
* As descriped in spec, VMID and PPN fields in hgatp behavior as WARL in the normal way, regardless of new_val.mode.
* Never set the remaining fields in hgatp to zeros when hgatp.MODE is bare, since this is set by software.
…ting

* When hgatp.MODE=Bare, the width of vsatp.PPN should be the length of PADDR minus the length of in-page address.
* When hgatp.MODE=Sv39x4, the width of vsatp.PPN should be 41 minus the length of in-page address.
Copy link
Member

@cebarobot cebarobot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pxk27 pxk27 merged commit ca66b37 into master Jun 19, 2024
4 checks passed
@pxk27 pxk27 deleted the fix-atp branch June 19, 2024 07:43
xinhecuican pushed a commit to xinhecuican/NEMU that referenced this pull request Aug 31, 2024
* csr:update PPN and VMID field regardless of the new MODE

* This commit correct the updating of hgatp CSR.
* As descriped in spec, VMID and PPN fields in hgatp behavior as WARL in the normal way, regardless of new_val.mode.
* Never set the remaining fields in hgatp to zeros when hgatp.MODE is bare, since this is set by software.

* csr:make the effective bits of vsatp.PPN relies on the hgatp.MODE setting

* When hgatp.MODE=Bare, the width of vsatp.PPN should be the length of PADDR minus the length of in-page address.
* When hgatp.MODE=Sv39x4, the width of vsatp.PPN should be 41 minus the length of in-page address.
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.

3 participants