-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat: modularize console implementation for late UEFI output #324
Conversation
8387af1
to
a453839
Compare
Signed-off-by: Martin Kröning <[email protected]>
Signed-off-by: Martin Kröning <[email protected]>
Signed-off-by: Martin Kröning <[email protected]>
Signed-off-by: Martin Kröning <[email protected]>
Signed-off-by: Martin Kröning <[email protected]>
Signed-off-by: Martin Kröning <[email protected]>
Signed-off-by: Martin Kröning <[email protected]>
Signed-off-by: Martin Kröning <[email protected]>
Signed-off-by: Martin Kröning <[email protected]>
Signed-off-by: Martin Kröning <[email protected]>
Signed-off-by: Martin Kröning <[email protected]>
Signed-off-by: Martin Kröning <[email protected]>
Signed-off-by: Martin Kröning <[email protected]>
stdout: NonNull<u8>, | ||
} | ||
|
||
fn stdout() -> u32 { |
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 found this fn name a little confusing. Maybe something like get_stdout
or stdout_addr
would be more self-explanatory. A doc-comment might also help.
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.
Maybe. Though, just adding “get” does not help much, I think. I did not rework this code, I only moved it around.
I am planning a proper rework of this while migrating from hermit-dtb
to fdt
.
Self::None | ||
} | ||
|
||
fn exit_boot_services(&mut self) { |
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.
Do I get this correct: This is a callback for exiting the boot services? If so, I'd suggest modifying the name to reflect this. Also, I'm a huge fan of doc comments also for private fns 😉
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.
Correct. I was inspired by https://github.com/rust-osdev/uefi-rs/blob/137932086eff0e0a7d0e5a63426a9e47f32439b3/uefi-services/src/lib.rs#L179.
For me, the few lines of code made the purpose self-explanatory, though we can always add docs if people are confused.
This is a larger restructuring, allowing UEFI to use native console implementations as fallback once boot services have exited. This should also allow nice GOP support later.
This is in preparation for #285 (modulo GOP support).