Skip to content
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

msm8939: huawei-kiwi: add lk1st #449

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

wonderfulShrineMaidenOfParadise
Copy link
Contributor

No description provided.

stephan-gh and others added 4 commits November 19, 2024 09:27
qhypstub [1] is an open-source "hyp" firmware replacement for MSM8916
that enables booting Linux and other operating systems in EL2 instead
of EL1, making it possible to use virtualization features like KVM.

To boot into aarch64 EL2 from aarch32 LK, the kernel must be started
through the hypervisor with a HVC instead of a SMC. If the original
"hyp" firmware is used (that does not allow booting in EL2), this HVC
will just fail silently and we'll fall back to booting in EL1 via SMC.

[1]: https://github.com/msm8916-mainline/qhypstub

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
This might need a better solution in the future, but for now lets place
the necessary code directly into oem_panel.

[Raymond: reimplement for huawei-kiwi]
Comment on lines +1080 to +1085
/* First try a hypervisor call to jump to EL2 if supported */
scm_arg.hvc = true;
scm_call2(&scm_arg, NULL);

dprintf(INFO, "Falling back to SCM call\n");
scm_arg.hvc = false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will crash on platforms that don't have hyp partition (or otherwise don't allow unknown hvc calls) so we didn't include el2 support until now, pending changes in qhypstub. Unfortunately neither me nor @stephan-gh had time to fix this yet...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'd prefer not re-introducing this to the new branch. It's cleaner to change this in qhypstub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants