-
Notifications
You must be signed in to change notification settings - Fork 155
loader: update the page table builder to be no_std #2062
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
base: main
Are you sure you want to change the base?
Conversation
@chris-oo pushed a new version without the big trait and generics, where we just allocate space up front LMK if it's looking good in principle, let me know, it will need to be fixed up for ARM |
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.
getting closer
/// linkage_gpa represents the GPA at which the linked PML4E should be linked. | ||
pub fn build_page_tables_64( | ||
pub fn build_page_tables_64<'a>( | ||
page_table_gpa: u64, |
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.
at this point with so many arguments i wonder should we use a Builder
pattern instead?
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.
pushed, what do you think?
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.
I think it's cleaner - are you going to delete the old function as well? We shouldn't have both APIs.
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.
I think it's possible you could be looking at an old revision, otherwise I'm missing your point here
build_page_tables_64
was removed, that interface doesn't exist anymore. is there other dead code I left in?
hey Chris could you kick off a CI run for me? I recall there are build issues on arm, but I'm not seeing them when I build for aarch64 locally |
/// linkage_gpa represents the GPA at which the linked PML4E should be linked. | ||
pub fn build_page_tables_64( | ||
pub fn build_page_tables_64<'a>( | ||
page_table_gpa: u64, |
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.
I think it's cleaner - are you going to delete the old function as well? We shouldn't have both APIs.
Discussed w/ @chris-oo, this PR updates the page table builder in the loader to be no_std, and to accept a generic buffer for its working memory
The goal is to prepare the library to be used within the openhcl_boot shim, which is a no_std environment. The generic buffer change allows the loader code to continue using a vectors for its working memory, whereas the boot shim will be providing its working buffer as ArrayVec stashed in the global section