-
Notifications
You must be signed in to change notification settings - Fork 13
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
Implement page table reader for aarch64 #121
Conversation
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.
A strange calculation, can you give the numbers names or put in a comment?
|
||
/// Get the level of the last page table. | ||
pub fn last_level() -> usize { | ||
0 |
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.
Does this need a const?
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.
It can be
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.
Thanks for the fixes.
This PR implements part of the paging system which deals with reading the memory mappings created by the bootloader. It assumes, for now, that the hardware supports a 4 KiB translation table granule and that the bootloader uses this granule size to set up our initial page tables.
The biggest change is a slight modification of the APIs between the aarch specific code and the generic code for memory management. Specifically to determine certain properties (i.e., physical address) in a PTE for aarch64, we need to know what level we are at. For x86_64 this is a different story, and the bits in the PTE corresponding to the physical address are more/less in the same.
Summary