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

hw: prepare ARMv8 EL2 mode appropriatedly to run Rockchip 3588 #4759

Closed
skalk opened this issue Feb 10, 2023 · 7 comments
Closed

hw: prepare ARMv8 EL2 mode appropriatedly to run Rockchip 3588 #4759

skalk opened this issue Feb 10, 2023 · 7 comments

Comments

@skalk
Copy link
Member

skalk commented Feb 10, 2023

@mickenx has enabled a first version of Genode's hw kernel running on RK3588. Therefore, it was necessary to zero out HCR and CPTR of EL2. He has done this within the initial assembler code that is run more or less unconditionally. In the generic codebase we cannot do so, because we do not necessarily start in EL2 mode. I wonder whether it is enough to zero these two registers within bootstrap's high-level code in Platform::enable_mmu() at the right place.

@skalk skalk added the feature label Feb 10, 2023
skalk added a commit to skalk/genode that referenced this issue Feb 10, 2023
Instead of re-using the register values found in HCR_EL2 and CPTR_EL2
and setting single bits within them, define the complete content to
prevent inconsistent hardware/hypervisor state.

Ref genodelabs#4759
@skalk
Copy link
Member Author

skalk commented Feb 10, 2023

@mickenx I've prepared commit 9c6b97e that shall also solve your initial bootstrap problems without replacing our crt0.so. I would be happy, if you could try it on your hardware target. In case it works, I would push it upstream. I did not zeroed the general-purpose and FPU registers. AFAIK there is no need in calling conventions to hand over zeroed registers, did you really need that to proceed?

skalk added a commit to skalk/genode that referenced this issue Feb 10, 2023
Instead of re-using the register values found in HCR_EL2 and CPTR_EL2
and setting single bits within them, define the complete content to
prevent inconsistent hardware/hypervisor state.

Ref genodelabs#4759
@skalk
Copy link
Member Author

skalk commented Feb 10, 2023

@mickenx I had to re-merge the commit to Genode's master branch, the staging one had problems, the new commit id is 0e6f390.

@mickenx
Copy link

mickenx commented Feb 10, 2023

I will not be able to test this right away because of health issues. But will do in a week or so.

@skalk
Copy link
Member Author

skalk commented Feb 10, 2023

@mickenx please take the time you need. There is no need to hurry up. Get well soon!

@mickenx
Copy link

mickenx commented Feb 23, 2023

It works! Thanks.

@skalk
Copy link
Member Author

skalk commented Feb 23, 2023

@mickenx thanks for testing.

@skalk skalk added the fixed label Feb 23, 2023
skalk added a commit to skalk/genode that referenced this issue Feb 23, 2023
Instead of re-using the register values found in HCR_EL2 and CPTR_EL2
and setting single bits within them, define the complete content to
prevent inconsistent hardware/hypervisor state.

Ref genodelabs#4759
chelmuth pushed a commit that referenced this issue Feb 27, 2023
Instead of re-using the register values found in HCR_EL2 and CPTR_EL2
and setting single bits within them, define the complete content to
prevent inconsistent hardware/hypervisor state.

Ref #4759
@chelmuth
Copy link
Member

Merged to master.

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

No branches or pull requests

3 participants