-
Notifications
You must be signed in to change notification settings - Fork 1k
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
arm64 EL3 runtime support #12353
Merged
Merged
arm64 EL3 runtime support #12353
Conversation
This file contains 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
putreg32() arguments were swapped. Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
This provides means to run NuttX completely in EL3. This may be useful with NuttX based bootloaders that are executed from OCRAM. Instead of SPL/U-boot combo, NuttX may replace SPL completely. Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
jlaitine
reviewed
May 15, 2024
jlaitine
reviewed
May 15, 2024
jlaitine
reviewed
May 15, 2024
jlaitine
reviewed
May 15, 2024
eenurkka
force-pushed
the
arm64-el3
branch
2 times, most recently
from
May 15, 2024 13:00
fe5b16e
to
57a790f
Compare
Added a few comments, otherwise looks good. Nice work! |
eenurkka
commented
May 15, 2024
Currently MMU supports only EL1. Introduce EL3 support as well. Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
acassis
reviewed
May 15, 2024
pussuw
reviewed
May 15, 2024
pussuw
reviewed
May 15, 2024
pussuw
reviewed
May 15, 2024
pussuw
reviewed
May 15, 2024
@pussuw could you please take a look at those CI errors on imx9: "nuttx/tools/imx9/Config.mk: No such file or directory" |
Value 1021, when read from ICC_IAR0_EL1 means: "The GIC returns this value in response to a read of ICC_IAR0_EL1 or ICC_HPPIR0_EL1 at EL3, to indicate that the interrupt being acknowledged is one which is expected to be handled at Non-secure EL1 or EL2. This INTID is only returned when the PE is executing at EL3 using AArch64 state, or when the PE is executing in AArch32 state in Monitor mode." When this happens: - FIQ is fired on group0 - IRQ is pending at group1 So simply check and handle the interrupt. In short, this provides interrupt support for EL3. Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
jlaitine
reviewed
May 16, 2024
eenurkka
force-pushed
the
arm64-el3
branch
7 times, most recently
from
May 16, 2024 14:01
43f4bfd
to
481c908
Compare
eenurkka
force-pushed
the
arm64-el3
branch
4 times, most recently
from
May 17, 2024 07:55
8f73d4e
to
5864090
Compare
This provides a capable bootloader that may be run from OCRAM. The OCRAM contains regions that are always zero, so the linker file avoids those with best effort. iMX9 infrastructure expects: - 0x20480000 (Start of OCRAM, AHAB) - 0x2049a000 (NuttX or SPL) - 0x204e0000 (ARM Trustzone, not used) When started from SD-card, the offsets are: - 0x1f000 with AHAB - 0xa000 without AHAB Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
Search and replace ARCH_BOOT_EL3 with more generic ARCH_ARM64_EXCEPTION_LEVEL that holds the EL level in an integer variable. Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
xiaoxiang781216
approved these changes
May 21, 2024
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.
Summary
This introduces EL3 support for NuttX meaning it may run from EL3 without dropping privileges. It's useful when it replaces an existing bootloader, such as SPL (from SPL/U-boot combo).
Impact
Most functionalities are behind #ifdef:s, so it should not break other code.
Testing
iMX93 evkit, NSH shell