Skip to content

sunxi: fix Unhandled Exception in EL3. and/causing secondary cpus not coming online#9586

Merged
igorpecovnik merged 1 commit intoarmbian:mainfrom
EvilOlaf:skip-uboot-logging-for-sunxi
Mar 25, 2026
Merged

sunxi: fix Unhandled Exception in EL3. and/causing secondary cpus not coming online#9586
igorpecovnik merged 1 commit intoarmbian:mainfrom
EvilOlaf:skip-uboot-logging-for-sunxi

Conversation

@EvilOlaf
Copy link
Member

@EvilOlaf EvilOlaf commented Mar 25, 2026

Description

Possible fix for
#9555 and #9521

Successor PR of #9522

Credits to @AbdulKus for the deep dive and @pyavitz for the write_uboot_platform adjustment

How Has This Been Tested?

  • build from main and boot: the mentioned EL3 exception happens and only one core comes online
  • build and boot with these changes: no exception and secondary cpus are there.

Tests were conducted with fresh Trixie minimal images on current kernel using Orange Pi One Plus (H6).

This shall be tested on as many older Allwinner devices as possible to either verify fixed or still working as expected.
This also includes sunxi32 boards, because write_uboot_platform and ATF are also used for those.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

foot notes:

what I've tried to narrow this down:

  • built from main: crash on boot and cpus don't come online
  • remove LOGGING from uboot, same
  • used 2.12.9 ATF, same
  • used 2.12.9 ATF + remove LOGGING from uboot, same
  • used 2.12.9 ATF + remove LOGGING from uboot + remove DEBUG=1 from ATF, same
  • used uboot 2026.01, no more crash but cpus don't come online
  • used uboot 2026.01 + 2.12.9 ATF, no more crash but cpus don't come online
  • remove LOGGING from ATF, crash+ cpus don't come online
  • change uboot write function only, crash+ cpus don't come online
  • ultimately the combination sent with this PR worked. no crash, all cores online

Summary by CodeRabbit

  • Chores
    • Updated ARM Trusted Firmware to the latest LTS version (v2.12.9).
    • Refined bootloader write process with improved data synchronization.
    • Adjusted bootloader logging configuration handling.

@EvilOlaf EvilOlaf requested review from a team and igorpecovnik as code owners March 25, 2026 14:14
@EvilOlaf EvilOlaf requested review from swissiety and removed request for a team March 25, 2026 14:14
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 25, 2026

📝 Walkthrough

Walkthrough

Updates ATF firmware branch from tag:lts-v2.12.4 to tag:lts-v2.12.9, removes the preliminary zero-fill dd step in the U-Boot platform write operation, adds conv=fsync to the write invocation, and removes U-Boot logging configuration from the compilation function.

Changes

Cohort / File(s) Summary
ATF & U-Boot Write Behavior
config/sources/families/include/sunxi64_common.inc
Updated ATFBRANCH from tag:lts-v2.12.4 to tag:lts-v2.12.9; removed preliminary dd zero-fill step; added conv=fsync to write invocation and removed output redirection to /dev/null in write_uboot_platform().
U-Boot Compilation Logging
lib/functions/compilation/uboot.sh
Removed automatic U-Boot logging configuration (CONFIG_LOG, CONFIG_LOGLEVEL, CONFIG_LOG_MAX_LEVEL) from compile_uboot_target, leaving custom debugging logic to handle logging settings independently.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related issues

Poem

🐰 A nibble of code, a version so new,
ATF branches hop from old to the true,
With fsync and flush, the writes flow with care,
Logging takes rest, configuration runs spare!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main fix: addressing the 'Unhandled Exception in EL3' and secondary CPU onboarding issues on sunxi platforms.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added 05 Milestone: Second quarter release size/small PR with less then 50 lines Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Framework Framework components labels Mar 25, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
config/sources/families/include/sunxi64_common.inc (1)

49-49: Consider restoring quiet dd output for consistency.

Line 49 now emits default dd transfer stats. If you want parity with newer family patterns and cleaner logs, add status=none while keeping conv=fsync.

Proposed tweak
-	dd if=$1/u-boot-sunxi-with-spl.bin of=$2 conv=fsync bs=1024 seek=8
+	dd if=$1/u-boot-sunxi-with-spl.bin of=$2 conv=fsync bs=1024 seek=8 status=none

Based on learnings, newer Armbian write_uboot_platform() patterns commonly include status=none in dd commands.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@config/sources/families/include/sunxi64_common.inc` at line 49, The dd
invocation "dd if=$1/u-boot-sunxi-with-spl.bin of=$2 conv=fsync bs=1024 seek=8"
is emitting transfer stats; update this command (in the write_uboot_platform /
u-boot write step) to include "status=none" (keeping conv=fsync and existing
args) so dd runs quietly and matches newer family patterns.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@config/sources/families/include/sunxi64_common.inc`:
- Line 49: The dd invocation "dd if=$1/u-boot-sunxi-with-spl.bin of=$2
conv=fsync bs=1024 seek=8" is emitting transfer stats; update this command (in
the write_uboot_platform / u-boot write step) to include "status=none" (keeping
conv=fsync and existing args) so dd runs quietly and matches newer family
patterns.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 42e7b1eb-4661-4cbc-bd07-c2c382022e9e

📥 Commits

Reviewing files that changed from the base of the PR and between f15f594 and ed4bb4f.

📒 Files selected for processing (2)
  • config/sources/families/include/sunxi64_common.inc
  • lib/functions/compilation/uboot.sh
💤 Files with no reviewable changes (1)
  • lib/functions/compilation/uboot.sh

@EvilOlaf
Copy link
Member Author

EvilOlaf commented Mar 25, 2026

Tested on Orange Pi Zero 2 (H616), works just fine
Tested on Orange Pi PC (H3), works just fine

Copy link
Member

@igorpecovnik igorpecovnik left a comment

Choose a reason for hiding this comment

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

Tested on Inovato Quadra (H6)

@github-actions
Copy link
Contributor

✅ This PR has been reviewed and approved — all set for merge!

@github-actions github-actions bot added Ready to merge Reviewed, tested and ready for merge and removed Needs review Seeking for review labels Mar 25, 2026
@igorpecovnik igorpecovnik merged commit 88ddcb4 into armbian:main Mar 25, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

05 Milestone: Second quarter release Framework Framework components Hardware Hardware related like kernel, U-Boot, ... Ready to merge Reviewed, tested and ready for merge size/small PR with less then 50 lines

Development

Successfully merging this pull request may close these issues.

2 participants