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

Xstatus.CRG clarification #443

Merged
merged 3 commits into from
Nov 7, 2024
Merged

Conversation

tariqkurd-repo
Copy link
Collaborator

@tariqkurd-repo tariqkurd-repo commented Nov 6, 2024

#441

When looking at the text I noticed that it had typos and xrefs missing.

This PR doesn't solve the actual problem yet.

What's the relationship between mstatus.CFG and sstatus.CFG? @jonwoodruff ? @jrtc27 ?

The text is very vague, should it be that the same bit is in mstatus and sstatus like in mip/sip.ssip? for example.....

@tariqkurd-repo tariqkurd-repo marked this pull request as draft November 6, 2024 17:35
@tariqkurd-repo tariqkurd-repo changed the title CFG clarification Xstatus.CRG clarification Nov 7, 2024
@tariqkurd-repo tariqkurd-repo marked this pull request as ready for review November 7, 2024 09:54
@jonwoodruff
Copy link
Contributor

This bit was written by @andresag01 , so I'm not confident of any considerations he might have had, but, if I understand what this is asking:
The generation bit is tied to the current page table. If a new page table root is swapped in on any exception level change, then CRG should change as well. If the page table root must be swapped manually, then CRG should also be swapped manually.

(Assuming that "CFG" in this issue is meant to be "CRG" in the original issue...)

@tariqkurd-repo
Copy link
Collaborator Author

This bit was written by @andresag01 , so I'm not confident of any considerations he might have had, but, if I understand what this is asking: The generation bit is tied to the current page table. If a new page table root is swapped in on any exception level change, then CRG should change as well. If the page table root must be swapped manually, then CRG should also be swapped manually.

(Assuming that "CFG" in this issue is meant to be "CRG" in the original issue...)

yes - CFG was a typo, sorry! It should have been CRG.
All the exception handling and PTE management is in S-mode.
Personally I can't see any use for mstatus.CRG, would M-mode software ever want control over this?
I don't know the answer but maybe it's safer to leave it in, following the clarification in the second commit.

@tariqkurd-repo
Copy link
Collaborator Author

We've discussed this internally and can't think of any use for mstatus.CRG, so I've removed it.

@arichardson arichardson merged commit 1594796 into riscv:main Nov 7, 2024
3 checks passed
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