Conversation
Contributor
Author
qwandor
reviewed
Aug 18, 2025
Collaborator
qwandor
left a comment
There was a problem hiding this comment.
Nice! This looks like it should make things easier to maintain in future.
| #[unsafe(link_section = ".init")] | ||
| #[unsafe(export_name = "enable_mmu")] | ||
| pub extern "C" fn enable_mmu() { | ||
| core::arch::naked_asm!("ret") |
Collaborator
There was a problem hiding this comment.
Please add a use statement for naked_asm at the top of the file rather than using the full path every time.
Contributor
Author
There was a problem hiding this comment.
I left it in since I moved the entry code to its own module and this is the only naked_asm usecase in lib.rs. If I added a use for it, it'd have to be guarded with #[cfg(not(feature = "initial-pagetable"))] to prevent an unused import lint
5c13a0f to
32f5c40
Compare
qwandor
reviewed
Aug 18, 2025
Naked functions were stabilised in 1.88.0 [0], use them for entry.S code. This will make it easier for extending entry code with compile-time options in the future. [0]: https://blog.rust-lang.org/2025/07/03/stabilizing-naked-functions/ Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
32f5c40 to
993199d
Compare
qwandor
approved these changes
Aug 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Naked functions were stabilised in 1.88.0 0, use them for
entry.Sanddummy_enable_mmu.Scode.This will make it easier for extending entry code with compile-time
options in the future such as PR #20
Signed-off-by: Manos Pitsidianakis manos.pitsidianakis@linaro.org