Skip to content

Add missing bits for tables in Paging document#89

Merged
DeanoBurrito merged 3 commits intodreamportdev:masterfrom
AnErrupTion:paging-typo-fix
Jun 4, 2024
Merged

Add missing bits for tables in Paging document#89
DeanoBurrito merged 3 commits intodreamportdev:masterfrom
AnErrupTion:paging-typo-fix

Conversation

@AnErrupTion
Copy link
Copy Markdown

Hello there! 👋🏻

While doing paging work on my OS, I've noticed that some bits for the PML4/PDPR/PD & Page Table were missing in the 03_Paging.md file, notably a few available bits & the PK (Protection Key) value. This PR adds them alongside an explanation of what the PK is. It also fixes the formatting of the tables within the file, because why not! 🙃

Source, for reference: https://wiki.osdev.org/images/6/6b/64-bit_page_tables2.png

@dreamos82
Copy link
Copy Markdown
Member

Thanks for the contribution @AnErrupTion , it looks good to me, and i know why this bit was missing!
Because i was using as reference a printed version of the intel manuals book pretty old, so at that time it wasn't present yet (in fact it was marked as avail to me).

I'm ready to merge, but at this point i wonder do we want to speicify that this part could be not present in older cpus and we should make sure that is present first? What do you think guys @AnErrupTion @DeanoBurrito ?

@AnErrupTion
Copy link
Copy Markdown
Author

@dreamos82 Ah yes, I do think specifying these bits are either what they are currently or available is better (I didn't know they were all available on older CPUs).

@DeanoBurrito
Copy link
Copy Markdown
Member

According to the intel SDM if the protection key features aren't enabled (or supported) those bits are ignored (which was the behavior before these features were added). So its safe to write to them without checking for support, even if thats a bit silly because you'd end up with a GPF later-on when trying to set them in cr4.

I feel like your addition already implies this, but I agree with what @dreamos82 said :)

@DeanoBurrito
Copy link
Copy Markdown
Member

thanks for contribution btw, and feel free to add yourself to the list in 99_Appendices/I_Acknowledgements.md

@AnErrupTion
Copy link
Copy Markdown
Author

@dreamos82 @DeanoBurrito Everything should be good to go now! Could you please check and confirm if that's the case?

@DeanoBurrito
Copy link
Copy Markdown
Member

Thanks, lgtm.

@DeanoBurrito DeanoBurrito merged commit ce27ce2 into dreamportdev:master Jun 4, 2024
@AnErrupTion AnErrupTion deleted the paging-typo-fix branch June 4, 2024 22:06
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