Skip to content

2022-11: add paging-calculator #134

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

Merged
merged 1 commit into from
Dec 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions content/this-month/2022-11/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,18 @@ Any feedback is very welcome of course.
[`generic_once_cell`]: https://github.com/mkroening/generic_once_cell
[API docs]: https://docs.rs/hermit-sync

### [`phip1611/paging-calculator`](https://github.com/phip1611/paging-calculator)

<span class="maintainer">(Section written by [@phip1611](https://github.com/phip1611))</span>

I worked on setting up page tables in a low-level project and noticed that there is lots of room for
confusion. For example, x86 has at least four different modes of paging: 32-bit paging, 32-bit
paging with PAE, 64-bit 4-level paging, and 64-bit 5-level paging. 32-bit without PAE paging uses 10
bits to index into a page table while 64-bit paging uses 9 bits to index into the table of each
level. To demystify the magic a little, I created a CLI utility called `paging-calculator` that
takes a virtual address as input and shows you the indices the hardware will use. You can find the
utility on [crates.io](https://crates.io/crates/paging-calculator).

## Other News

<!--
Expand Down