Skip to content

Revert #470 and #493 to restore Stage 1 link budget - #511

Merged
DjDeveloperr merged 2 commits into
mainfrom
revert/pr470-stage1-overflow
Nov 24, 2026
Merged

DjDeveloperr merged 2 commits into
mainfrom
revert/pr470-stage1-overflow

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

What: Revert merges 7bc55feb0b9b (#470, T8132 external DCP firmware-27 handoff) and a7a616a10390 (#493, T6050 single-die MCC ADT handoff) cleanly on top of main (f52d8324) to restore a green main tip above the 4,096 B Stage 1 headroom floor on all toolchains.

Tested: Bisected Stage 1 link headroom across every merge since 59af5065:

Risk: Two-way (P0 red-tip revert; restores Stage 1 linkability and headroom on all toolchains).

Not yet: Confirming CI passes across all five stage1-size toolchains, build, and test jobs, then re-landing #493 and #470 once they fit.

…pext-adt-v2"

This reverts commit 7bc55fe, reversing changes made to 27847f1.

Bisecting Stage 1 size across merges since 59af506 showed that #493
(a7a616a) still linked and passed gcc/fedora/alarm/nix stage1-size,
and #427 (27847f1) still linked with 8,584 B text headroom on clang,
while #470 (+1,626 lines in src/kboot_display_handoff.c) overflowed
Stage 1 into the DCP log buffer. Revert #470 to restore a green main
tip while keeping #492, #493, #474, #427, and #443.

Signed-off-by: Dj <43033058+DjDeveloperr@users.noreply.github.com>
…andoff"

This reverts commit a7a616a, reversing changes made to b294045.

Reverting #470 alone restored linking on all toolchains and passed nix,
but gcc stage1 headroom landed at 3,640 B (456 B below the 4,096 B floor
in tools/stage1_size.sh). Also revert #493 (2,048 B on gcc) as the
minimum 2-PR revert set that clears the 4,096 B floor on gcc while
keeping #492, #474, #427, and #443.

Signed-off-by: Dj <43033058+DjDeveloperr@users.noreply.github.com>
@DjDeveloperr DjDeveloperr changed the title Revert #470 (T8132 external DCP handoff) to restore Stage 1 link budget Revert #470 and #493 to restore Stage 1 link budget Nov 24, 2026

@satchlj satchlj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Verdict at 9901d706f46d

Approved.

Blockers

None.

Checked

  • Audited all 14 changed files (+130/-4156) across both commits (faf651db3c0d reverting #470 7bc55feb0b9b, and 9901d706f46d reverting #493 a7a616a10390; both carry Signed-off-by:) and confirmed via git diff against both original merges that each commit is a clean inverse of its target PR while leaving #492, #474, #427, and #443 intact.
  • Compiled build/kboot.o and build/kboot_display_handoff.o (RELEASE=1 CHAINLOADING=1 BUILTIN_LOGO=aurora) and syntax-checked tests/python/test_m4_dcp_handoff.py at 9901d706f46d.
  • Verified CI results at 9901d706f46d:
    • stage1-size/gcc (138792013064) now clears the 4096 B shipping Stage 1 floor and 8192 B secure floors: gcc stage1 headroom 7736 B (_file_vital_end 0x11ce90 of 0x120000, warning < 8192 B), gcc stage1-secure-audit 12832 B, gcc stage1-secure-enforce 12832 B.
    • format-check (138792012537) and Pytest (ubuntu-24.04-arm, native start.S) (138792012572) passed (SUCCESS).
  • Untested scope: no local Stage 1 link (aarch64-unknown-none-softfloat Rust target not installed in the review environment), no hardware boot testing, and stage1-size/{fedora,alarm,nix,clang-macos}, build, and the remaining Pytest matrix legs were still running or queued at review time.
Evidence
  • Exact inverse checks:
    • faf651db3c0d vs #470 (7bc55feb0b9b): 0 differing lines across all 13 files.
    • 9901d706f46d vs #493 (a7a616a10390): exact inverse of both files touched by #493 (src/kboot.c and its Python handoff test; line-number shift only from subsequent merges).
  • Local compilation at 9901d706f46d:
    • make -j$(nproc) build/kboot.o build/kboot_display_handoff.o RELEASE=1 CHAINLOADING=1 BUILTIN_LOGO=aurora succeeded.
    • python3 -m py_compile tests/python/test_m4_dcp_handoff.py succeeded.
  • stage1-size/gcc (138792013064) at 9901d706f46d:
    gcc stage1: _file_vital_end 0x11ce90 of 0x120000; room text 7736, rodata 42544, data 12656; headroom 7736 B
    gcc stage1-secure-audit: _file_vital_end 0x11cde0 of 0x120000; room text 56040, rodata 46880, data 12832; headroom 12832 B
    gcc stage1-secure-enforce: _file_vital_end 0x11cde0 of 0x120000; room text 56112, rodata 46880, data 12832; headroom 12832 B
    

@github-actions github-actions Bot added blast:all Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 24, 2026
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Merge readiness at 9901d706: not ready yet

Check Detail
CI at head running running: Pytest (macos-15 + llvm-brew), clang-macos
Review no approved by satchlj, but GitHub does not count it yet (code owner from Core or Omarchy Mac needed, or approval went stale)
Requested changes ok none
Hardware row at head no no line with the head SHA 9901d706, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text ok Risk: two-way · (P0 red-tip revert; restores Stage 1 linkability and headroom on all toolchains).

Areas: none matched in CODEOWNERS

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@DjDeveloperr
DjDeveloperr merged commit c0aaf31 into main Nov 24, 2026
19 of 21 checks passed
@DjDeveloperr
DjDeveloperr deleted the revert/pr470-stage1-overflow branch November 24, 2026 22:17
RyanTheTide pushed a commit to techmore/aura that referenced this pull request Nov 30, 2026
…rmware 27 from the ADT"

This reverts commit faf651d, which
reverted the merge of aurora-silicon#470 (7bc55fe), and so brings back Ryan
Murray's change unchanged: the external display processors (dcpext0/1)
that iBoot leaves running the internal DCP's image on firmware 27 are
handed over from the ADT, beside a complete internal DCP handoff or on
a board with no panel.

aurora-silicon#511 reverted it because, built into every image, it pushed Stage 1
past the DCP log buffer on every toolchain. The following commits keep
it out of Stage 1.

Signed-off-by: Erik Bourget <erik@ebourget.net>
RyanTheTide pushed a commit to techmore/aura that referenced this pull request Nov 30, 2026
…P Stage 2 only

Built into every image, dt_set_dcpext_handoff() and its helpers (about
1,250 lines) push Stage 1 past the DCP log buffer (aurora-silicon#511). Stage 1 does
not need them: its job on a Mac with an ESP is to chainload the ESP
Stage 2 (payload_run(): chainload= from its embedded config), and that
Stage 2 builds the devicetree, so a Stage 1 chainload never reaches
dt_set_display(). Stage 1 prepares a devicetree only when it starts an
OS itself (an appended kernel, boot=, or a payload sent over the
proxy). There it keeps what it did before the handoff existed: the
internal DCP handoff, then the firmware-ready path for the external
processors (dt_reserve_j713_dcpext()) after a handoff that was not
refused. On firmware 27 the kernel then does not drive them, as
before aurora-silicon#470; nothing else changes.

So the handoff is compiled only with ESP_STAGE2, the build switch the
ESP Stage 2 already uses for its own code (chainload.c, payload.c,
main.c):
- kboot_display_handoff.c wraps the external processors' block in
  #ifdef ESP_STAGE2; the helpers it shares with the T6041 external
  handoff stay in both stages.
- kboot.h declares dt_set_dcpext_handoff() in the ESP Stage 2 and gives
  every other build a static inline one that returns 0 (decline: keep
  the firmware-ready path), so dt_set_display()'s T8132 route is the
  same text in both stages. kboot.h now includes build_cfg.h, as
  secboot.h and smp.h do, so every file that includes it sees the same
  configuration; the FP objects (kboot_gpu*.o), which include it, now
  depend on build-cfg like every other object.
- The dcpext host test builds the handoff with ESP_STAGE2 defined, and
  a Stage 1 route test checks that the Stage 1 stub keeps the
  firmware-ready path after any internal handoff that was not refused.

Nothing is gated on a board, chip or firmware beyond what aurora-silicon#470 itself
keys on (dt_dcp_fw_clocks(), the firmware-27 rule).

Stage 1 headroom (tools/stage1_size.sh) is unchanged from main on gcc
16.2 (stage1 11808 B, secure-audit/enforce 11984 B) and clang 23.1
(stage1 10592 B, secure-audit/enforce 12464 B); the ESP Stage 2 links
with dt_set_dcpext_handoff on both.

Signed-off-by: Erik Bourget <erik@ebourget.net>
techmore pushed a commit to techmore/aura that referenced this pull request Nov 30, 2026
The T6050 MCC handoff (aurora-silicon#493) was reverted in aurora-silicon#511 because Stage 1 ran
out of room under the DCP log buffer. Build it into the ESP Stage 2 only,
which is the stage that boots Linux in the normal Stage 1 -> ESP Stage 2
chain. A direct Stage 1 boot leaves the node disabled, so the system level
cache stays off there, as on main today.

Signed-off-by: DjDeveloperr <hey@djdev.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blast:all Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants