You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closing this in favour of #526, which records what's actually left to do.
To be clear about why: this is not superseded. arch_chain_load() is still PANIC_UNIMPLEMENTED on arm64 today, so the gap you were filling is real and open. But the branch is 1550 commits behind and no longer cherry-picks cleanly, and re-reading it against your own note about phase 2, the remaining work is the hard part rather than a rebase.
Specifically, arm_chain_load hardcodes sctlr_el1 with the comment "LK runs in EL1", clears SCTLR.M with an isb but no dsb or TLB invalidate, and leaves SCTLR.C/SCTLR.I alone. Getting back to the boot exception level — the phase 2 you flagged — isn't symmetric with arm64_elX_to_el1 dropping down, and needs either a stashed return path or firmware help. The scratch-aspace trick you used to keep the loader identity mapped across the MMU-off transition is the right idea and I've written it into the issue so it isn't lost.
Thanks for the original work, and sorry it sat unreviewed for this long.
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
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.
Tested on VIM2 by loading LK from LK.
This is phase 1. Will need to add support to go back to initial boot exception level (as opposed to booting the next stage in EL1).