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
MMU: Tidy up PTE-related code #10074
Conversation
Keeps the register definitions in one spot and lets us remove a comment about them.
These are trivial to resolve. Converting the structure member into a u32 results in no increase in structure size, as it's making use of the three extra padding bits in the structure.
Puts the invalidation logic in one place and lets us tidy up InvalidateTLBEntry a little.
Lets us simplify SDRUpdated() a little bit. This also fixes the layout of UReg_SDR1. Turns out this struct has been incorrect (from a little-endian perspective) the entire time and went unnoticed, since the union was never used.
Will be used in the following commit.
Allows us to get rid of a bit of masking in exchange for stating the bits being accessed or written to directly.
Now that we're using register unions where applicable, we can remove these defines, since they're now unused.
PTEs are only ever operated on in terms of their halves in our code currently, so this can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1, 2 of 2 files at r2, 2 of 2 files at r3, 2 of 2 files at r4, 2 of 2 files at r5, 1 of 1 files at r6, 1 of 1 files at r7, 1 of 1 files at r8, 1 of 1 files at r9, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @lioncash)
This moves the split PTE definition unions into Gekko.h and eliminates the need for several macro definitions in the MMU code, since we can use the register unions to access the relevant info.
This also fixes the layout of the SDR1 union, which has been incorrect (from a little-endian POV) since it was introduced.
Each commit should be fairly self-isolated for review