Repository navigation
Conversation
9efa489 to
3cb4003
Compare
|
Thanks for the J716c display and Type-C handoff; that's a big piece of work. Several branches are selected by the board compatible rather than by a hardware property: We select behaviour by a hardware property and extend one path. The comment at We can't run a T6050 ourselves, but are glad to help line up owner rows. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Thanks for the J716c display and Type-C handoff. The 27.2 row with all three displays and a deep-sleep resume is great, and rewriting apple,firmware-compat on each apple,t6050-dcpext node from the stub's version is a good catch.
I agree with Ryan's comment, and it is what holds the merge. Six branches are chosen by chip_id == T6050 plus apple,j716c:
src/kboot.c:770,:8150,:8186src/kboot_atc.c:939,:1286src/kboot_display_handoff.c:4451
That gate also creates a second T6050 display path (dt_set_display_j716c()) next to t6050_handoff(), and a second ATC path next to t6050_setup_atc().
What would make it mergeable:
- Key the T6050 handoff on the tree shape that the comment at
:8185already names: the inherited display is described by address, with clocks and scratch prewired. - Key the combo-PHY tunable copy on the
apple,t6050-combo-phynode alone. - Reserve RTBuddySeg logs as no-map on every chip whose ADT has them (
dt_reserve_j716c_oslogs()). The overlap rules you wrote (inside the retained heap or image reservation, refused otherwise) are the right ones to keep. - The dcpext firmware-version rewrite already keys on the node, so it needs no board check either.
New: the red format-check is base drift, not this PR. Every violation is in src/sptm_virt_s2r.c, which main has since fixed, and the four files you touch pass clang-format 20.1.8 at this head.
Once reworked and green, it merges. These rows come after the merge, with a revert ready:
- your J716c display and deep-sleep rows on 27.0 and 27.2;
- a J714s and J775D display no-regression row for the shared T6050 path.
dba81b8 to
dcb82ac
Compare
|
Note 🤖 Claude Opus 5.5 responding on behalf of erikwb Thanks @RyanTheTide and @DjDeveloperr. Reworked along those lines; no branch tests
The J716c rows on the 27.2 stub are in the description. 27.0 and the J714s/J775D no-regression rows will follow after the merge, as you suggested. |
RyanTheTide
left a comment
There was a problem hiding this comment.
No blockers. Re-checked dcb82ac (on top of #427) against our 11-19 comment.
Earlier points, all resolved:
- No branch tests
chip_id == T6050plusapple,j716cany more.dt_set_display_j716c()and the second ATC path are gone, and the onlyj716cleft insrc/outside comments is the existing ISP table. - The handoff picks the prewired shape from the tree (
t6050_prewired(): a dcp node at the ADT coprocessor address carryingclocks,apple,clock-idsandapple,bw-scratch). It is tried after the aliased and headless shapes, and the headless match needs exactly oneiommusentry, so a prewired tree can't fall into the headless path. kboot_setup_atc()(src/kboot_atc.c:1316) now keys on theapple,t6050-combo-phynode, and the RTBuddySeg logs moved to #427.
The new checks fail safe: a missing or mismatched clocks/apple,clock-ids, bad scratch cells, a non-identity ranges, a DART mismatch or a pt-region in OS RAM all bail before the scratch copy is committed, so the panel stays on the boot framebuffer.
Three smaller points:
src/kboot_atc.c:1209-1210: the RX clock groups are now cut to 4 records. That table is shared with every T6050 board (J714s, J775D), so ports 1-5 there change too, not only the J716c. The fixed 4 also silently drops records if a later ADT lays the group out differently. Please derive the count from the group itself: for example, require the group to be exactly two halves of equal size and copy the first half, and keep the whole group (with a log line) otherwise. Please also move the J714s/J775D Type-C no-regression row ahead of the merge, since that path changes for them.src/kboot_display_handoff.c:3731: the prewired path takes the firstapple,display-subsystemnode, while the comment att6050_check_dt()says there is one display subsystem. Refuse the prewired shape when a second one exists, so a multi-die tree can't hand off the wrong one.src/kboot_display_handoff.c:4311: when the stub's version is not three cells, the external engines the tree enables keep the tree's version, and the driver uses that version's method IDs. That is the mismatch this commit fixes. The edit is made on adcp6_scratch()copy, andt6050_publish()already usesfirmware_set_fdt()on such a copy for the internal dcp. Using it here too would handle a four-cell version, and a failed write would still change nothing. Otherwise, at least say in the log that those engines will use the wrong method IDs.
We can't run a T6050. The J716c rows in the description cover the new shape. The J714s and J775D rows (internal panel or headless scanout, plus a Type-C port 1-5 device) cover the shared path and point 1.
Assisted-by: LLM (Claude:Opus 5.5)
|
Blockers: 2. The tree-shape selection and the combo-phy keying look right to me. The three points in the 11-21 03:54Z review (the fixed 4 RX clock records at
Checked: HW row: J714s (internal panel) and J775D (headless scanout), each with a Type-C device on a port 1-5, on this head: display up, the port enumerates, the same tunable set as main apart from the RX-clock change, 0 new kernel errors, 0 failed units. Run these before the merge, because the ATC table and the port filter change for them too. Plus the promised J716c row on 27.0. Assisted-by: LLM (Claude:Opus 5.5) |
0ee24fc to
2e2d7e7
Compare
dcb82ac to
71708f7
Compare
|
Note 🤖 Claude Opus 5.5 responding on behalf of erikwb @RyanTheTide, thanks. The stack is now 2e2d7e7 (#427) ← 6b8cc4a ← 71708f7, rebased onto main 58e712b. Both commits of this PR were amended in place.
From your 06:15 comment:
Other checks:
J716c row (this head, on #427 and with #281, 27.2 stub): panel and two 4K monitors over a Thunderbolt dock are up. The four |
RyanTheTide
left a comment
There was a problem hiding this comment.
No blockers in the code. Re-checked 6b8cc4a and 71708f7 (on #427 at 2e2d7e7) against our 03:54Z and 16:57Z comments.
Resolved:
- RX clock groups (
src/kboot_atc.c): every T6050 tunable group is copied whole and in the ADT's order, as on main. The J714s and J775D tunables are therefore unchanged by this PR. - A second display subsystem:
t6050_disp_node()(src/kboot_display_handoff.c:3736) refuses the prewired shape when a secondapple,display-subsystemnode exists. The aliased path keepsdisp0. - dcpext version:
t6050_ext_version()(:4329) writes throughfirmware_set_fdt()on adcp6_scratch()copy, so a four-cell version is serialized whole and a failed write changes nothing. It touches only availableapple,t6050-dcpextnodes, and those are disabled in the J714s/J775D trees. - The disclosure lines are out of both commits, and the description ends with the Assisted-by line.
Still open: CI. Because this PR's base is #427's branch, only the policy and size jobs ran on this head, not Pytest. test_t6050_tree_shape.py and test_rtbuddyseg_logs.py pass for us on a Linux host at 71708f7, but the macOS jobs haven't built these fixtures. After #427 merges, please retarget this PR to main and get a full green run before it merges.
HW rows still needed before merge, as you listed: J714s (internal panel) and J775D (headless scanout), each with a Type-C device on a port 1-5. Pass: display up, the port enumerates, the same tunable set as main, 0 new kernel errors, 0 failed units. Then the undocked J716c s2idle resume row and the J716c row on 27.0.
Assisted-by: LLM (Claude:Opus 5.5)
There was a problem hiding this comment.
Re-review at 71708f74110f (stacked on #427 2e2d7e71): 0 code, policy, or attribution blockers remain.
Our earlier CHANGES_REQUESTED blockers from dba81b8 and @RyanTheTide's follow-up items are all resolved:
- No chip/board gates (§1):
dt_set_display_j716c()and the second ATC path are gone.t6050_handoff(dt, true)keys on the prewired tree shape (t6050_prewired()),kboot_setup_atc()keys onapple,t6050-combo-phy,t6050_setup_atc()copies every port withapple,guest-port-reserved(0..5) whole and in ADT order (no RX-clock truncation), and RTBuddySeg log reservation moved to #427 for all chips. - Validation & fail-soft transactions (§2/§3):
t6050_identity_reg(),t6050_check_prewired(),t6050_disp_node()(refusing a secondapple,display-subsystem),t6050_check_ext_scanout()/t6050_ext_display_dart(), and the ADTpt-regionalignment/bounds/OS-RAM checks all bail before committing the scratch copy.t6050_ext_version()updates availableapple,t6050-dcpextnodes transactionally viafirmware_set_fdt()(handling 3- and 4-cell versions and leaving disabled nodes untouched). - Attribution (§4): Both commits (
6b8cc4a6,71708f74) carry human author/committer andSigned-off-by:only.
Still owed before approval/merge:
- Stacked base & full CI: Merge #427 (
2e2d7e71), retarget #282 ontomain, and get a full green CI run on this head (onlypolicyandESP stage 2 vital sizeran against #427's branch;build,format-check,stage1-size, and all Linux/macOSPytestjobs still need to run on71708f74). - Hardware rows (§5): J714s (internal panel) and J775D (headless scanout) each with a Type-C device on port 1-5 (display up, port enumerates, same tunable set as
main, 0 new kernel errors, 0 failed units), plus undocked J716cs2idleresume and the J716c 27.0 stub row.
|
Note 🤖 Gemini 4 Neon responding on behalf of erikwb Thanks @RyanTheTide and @DjDeveloperr for confirming zero code, policy, or attribution blockers on
|
e6e66a9 to
78337e0
Compare
8907fa6 to
545f0ef
Compare
|
Note 🤖 Gemini 4 Neon responding on behalf of erikwb Restacked cleanly onto the rebased #427 head (
|
|
Could the external engines this PR enables from the tree get the same placement checks as the internal display before they are handed over? On the internal side, For an engine the tree enables itself, Suggestion: run a per-engine placement check (segment-ranges and pt-regions against RAM, parameterised by the nub and DART paths) for each tree-enabled engine, and have Assisted-by: LLM (Claude:Opus 5.5) |
There was a problem hiding this comment.
Formal §1–§6 pre-PR re-review at 545f0ef504f8 (base j716c/rtbuddyseg-logs-no-map / #427, only 3 CI checks ran).
Stage 1 Impact
- Touches Stage 1: Yes. Modifies
src/kboot_atc.candsrc/kboot_display_handoff.c(both in unconditionalOBJECTS). Requires Stage 1 owner sign-off under §3 before merge — andstage1-sizehas not yet run on545f0ef504f8.
Audit Summary
- §1 No model gating: Pass. No chip/board gates (
t6050_handoff(dt, true)keys ont6050_prewired(),kboot_setup_atc()keys onapple,t6050-combo-phy, RX clock tunable groups are copied whole in ADT order). - §4 Attribution: Pass. Both commits (
da106863ed60,545f0ef504f8) carry human author/committerErik Bourget <erik@ebourget.net>and humanSigned-off-by:only, with zero AI commit trailers; PR body ends withAssisted-by:. - §2 / §6: Pass.
Blocking Findings
- Stacked base (
#427) & incomplete CI:- Because this PR still targets
#427's branch (j716c/rtbuddyseg-logs-no-map, which is stillOPENandDIRTY/conflicting withmain), onlyaurora-agent-policyandesp-stage2-sizeran (3 checks). Allbranches: [ main ]workflows (build,format-check, all 5stage1-sizetoolchains, and all 5 Linux/macOS/arm64Pytestjobs) never ran on545f0ef504f8. - Land
#427, retarget#282ontomain, and obtain a full green CI run on the resulting head.
- Because this PR still targets
- §3 Safety — External-engine placement checks (echoing @RyanTheTide's 2026-11-22 review):
- While internal display handoff verifies that non-
__OS_LOGiop-dcp-nubsegment-rangesandpt-region-23/0/16stay outside OS RAM[phys_base, +mem_size), DT-enabledapple,t6050-dcpextengines bypasst6050_ext_one()early (src/kboot_display_handoff.c:4195) and are accepted byt6050_check_ext_scanout()and version-stamped byt6050_ext_version()without checkingiop-dcpextN-nubsegment-ranges,dart-dcpextNpt-region-23,dart-dispextNpt-region-16, or engine running/UUID state. - Add per-engine placement/state checks (or call @RyanTheTide's shared helper once it lands on
main) so any tree-enabled engine with segments/page tables in OS RAM or invalid state is skipped with a log message rather than handed over.
- While internal display handoff verifies that non-
- §5 Hardware evidence (still owed before merge):
- J714s (internal panel) and J775D (headless scanout), each with a Type-C device on port 1–5 (display up, port enumerates, same tunable set as
main, 0 new kernel errors, 0 failed units). - J716c undocked
s2idleresume row and J716c 27.0 stub row.
- J714s (internal panel) and J775D (headless scanout), each with a Type-C device on port 1–5 (display up, port enumerates, same tunable set as
|
The external-engine safety follow-up uses the shared placement check from #471 for DT-enabled engines. The candidate checks the engine's firmware identity, running state and live DART roots before stamping the firmware version or accepting its scanout stream. It refuses unsafe engines and their child nodes even with a packed tree, and drops their scanout references. I tested the safety change locally with a clean merge of the #427 base and current main. The combined candidate passed 1,106 Python tests, linked both stages, and passed the GCC Stage 1 size checks, including dev-audit with 2,072 bytes of headroom. The published head is still |
…andoff Resolve the merge conflict in tests/python/test_t6050_handoff_bounds.py by keeping both prewired() and t6041_headless_fb(), and update t6041_headless_fb() to call dcp6_headless_display(dt, dcp6.soc->disp_compat) after the rename in #470. Signed-off-by: Erik Bourget <erik@ebourget.net>
t6050_ext_version() and t6050_ext_reject() run after t6050_handoff() and t6050_headless_handoff() so they can see any pinned t6050.uuid, which previously caused them to inspect and reject engines Aura had just enabled via t6050_ext_one(). When pt-region-* was omitted from a headless ADT/fixture, t6050_headless_handoff() recorded "published" and enabled the engine, display subsystem, and providers, and t6050_ext_reject() then disabled the engine and display subsystem while leaving the providers enabled. Record engines committed by t6050_ext_one() in t6050.ext_aura and skip them in t6050_ext_reject() and t6050_ext_version(), keeping the pass scoped to engines already enabled in the input DT. Add a headless missing-pt-region regression test and an ext_aura scoping test. Signed-off-by: Erik Bourget <erik@ebourget.net>
A device tree with multiple apple,t6050-dcpext nodes at the same coprocessor register address caused t6050_node_at() to pick the first match, allowing t6050_ext_one() to enable it and set its t6050.ext_aura bit so t6050_ext_reject() skipped a second, input-enabled node at the same address even when its ADT checks failed. Require t6050_node_at() and t6050_ext_index() to return -1 unless a matching coprocessor register address is unique across the tree, so ambiguous duplicate-reg mappings are refused before committing and rejected by t6050_ext_reject(). Add headless and unit regression cases. Signed-off-by: Erik Bourget <erik@ebourget.net>
… index In t6050_ext_reject(), deleting or mutating the first duplicate apple,t6050-dcpext node on a packed tree could make a second duplicate at the same coprocessor address look unique and survive into version-stamping after its scanout DART had already been removed. Record ambiguous ADT indices across the input tree before mutating anything and reject every available node at those indices. Also preserve the ADT index returned by t6050_ext_index() via a separate uniqueness output so t6050_drop_ext_scanout() still strips /arm-io/dart-dispextN from display-subsystem iommus when duplicate nodes lack piodma subnodes. Add packed-tree and no-piodma duplicate-node regression cases. Signed-off-by: Erik Bourget <erik@ebourget.net>
|
Note 🤖 Gemini 4 Hydrogen responding on behalf of erikwb Merged
|
satchlj
left a comment
There was a problem hiding this comment.
Verdict at f6e5eaceec09
REQUEST_CHANGES — No code defects found across all 5 changed files (src/kboot_atc.c, src/kboot_display_handoff.c, and the 3 host test files); blocked on red Stage 1 CI at head (inherited dev-flavour 0x120000 overflow on main), pending exact-head hardware boot verification at f6e5eaceec09, and Stage 1 / board owner sign-off.
Blockers
- Red Stage 1 CI at
f6e5eaceec09:build,gcc,fedora,alarm, andnixfail linkingbuild/aura-raw.elf(inherited frommainf52d8324prior to Stage 1 dev-flavour link-budget restoration;gcc stage1-secure-auditandgcc stage1-secure-enforcepass with12640 Bheadroom, andESP stage 2,format-check,policy,selftest, and host Pytest jobs pass). Re-sync withmainonce Stage 1 headroom is restored so full CI passes at head.
- Exact-head hardware re-test & Stage 1 / board owner sign-off still pending:
- Modifies unconditional Stage 1 objects (
src/kboot_atc.c,src/kboot_display_handoff.c), requiring Stage 1 / board owner sign-off. - As noted in the PR body, the prior hardware boot was at
71708f74(before the external-engine placement/rejection rework andmainmerge); exact-head boot verification atf6e5eaceec09(internal panel + externalapple,t6050-dcpextengines up) is still owed before merge.
- Modifies unconditional Stage 1 objects (
Checked
- Audited all 5 changed files (
src/kboot_atc.c,src/kboot_display_handoff.c,tests/python/fdt_harness.py,tests/python/test_t6050_handoff_bounds.py,tests/python/test_t6050_tree_shape.py;+2474/-61) and all 6 commits (39b5db2b4c21,0113c4eea3c1,7e85cfe98eab,4101923fe382,be98aca94ec8,f6e5eaceec09; cleanSigned-off-by: Erik Bourgettrailers). - Verified
t6050_ext_reject()/t6050_ext_version()decoupling (rejection runs in its own scratch transaction beforeos_firmwarechecks/version writes, scoped to input-DT-enabled engines viat6050.ext_aura). - Verified unique coprocessor register matching in
t6050_node_at()andt6050_ext_index(), plus upfront ambiguous-ADT-index tracking (be98aca94ec8,f6e5eaceec09) so duplicateapple,t6050-dcpextreg mappings are rejected cleanly while preserving the ADT index for scanout DART cleanup. - Verified in-place
iommuscompaction (fdt_getprop_w()+memmove()+fdt_setprop_placeholder()) againstsrc/libfdt/fdt_rw.c:fdt_resize_property_()->fdt_splice_()shifts only the bytes pastprop->data + oldlen, preserving the compacted prefix with no fixed stack cap or heap allocation. - Verified
kboot_setup_atc()/t6050_setup_atc()keys strictly onapple,t6050-combo-phy+apple,guest-port-reservedand copies tunable groups in ADT order. - Executed host suites locally on Linux ARM64 at
f6e5eaceec09:test_t6050_tree_shape.py(7/7) +test_t6050_handoff_bounds.py(151/151) =158/158passed under bothgccandclang.- Targeted shell suites (
run-t8122-display-handoff.sh,run-fdt-disable.sh,run-aop-os-ram.sh,run-pmp-boot-data.sh,run-t8122-gpu26-identity.sh):5/5passed.
- Untested scope: Live Stage 1 / Stage 2 flashing or hardware boot testing (userspace host-harness audit only); Stage 1 dev-flavour link headroom once
mainrestores budget.
Evidence
- Local host execution on Linux ARM64 at
f6e5eaceec09:CC=gcc:test_t6050_tree_shape(7/7),test_t6050_handoff_bounds(151/151) —158/158passed.CC=clang:test_t6050_tree_shape(7/7),test_t6050_handoff_bounds(151/151) —158/158passed.- Shell suites:
run-t8122-display-handoff.sh,run-fdt-disable.sh,run-aop-os-ram.sh,run-pmp-boot-data.sh,run-t8122-gpu26-identity.sh—5/5passed.
- CI inspection at
f6e5eaceec09:gcc:stage1-secure-audit(_file_vital_end 0x11cea0 of 0x120000; headroom 12640 B),stage1-secure-enforce(_file_vital_end 0x11cea0 of 0x120000; headroom 12640 B); dev-flavourbuild/aura-raw.elffails linking (inherited frommain).
|
The K114s (Mac17,13) needs port 0 described: its left-back USB-C port is ATC0, and the loader's current skip of What has been checked, offline only: on the K114s the ADT has I can give a K114s row at this PR's head: Stage 2 built from the head, the K114s tree with |
|
@erikwb, what is still open from satchlj's review at
The Stage 1/board owner sign-off is on our side. Once these are in, satchlj will re-review. |
…andoff Merge main (26c1a85) to pick up the restored Stage 1 link budget and recent T6050 display/PMP changes. Update t6041_headless_fb() in tests/python/test_t6050_handoff_bounds.py to call t6041_headless_display(dt) following main's revert of #470 (faf651d). Signed-off-by: Erik Bourget <erik@ebourget.net>
In t6050_ext_version(), a failed scratch allocation, firmware-compat/version property write, or commit previously rolled back and left an input-DT-enabled apple,t6050-dcpext engine active with stale or missing apple,firmware-compat, causing Linux to pick the wrong method table. Run each surviving engine's version update in its own scratch transaction via t6050_ext_version_one(), and extract t6050_ext_disable() from t6050_ext_reject() so any engine whose compatibility could not be updated is disabled (or deleted on a packed DT where status = "disabled" does not fit) and stripped from every apple,display-subsystem scanout iommus. Update the packed-tree and scratch-failure tests to assert the fail-closed behavior. Signed-off-by: Erik Bourget <erik@ebourget.net>
Place the T6050 display handoff (T6050_INIT / T6050_TEXT in src/kboot_display_handoff.c) and combo PHY handoff (T6050_ATC / T6050_ATC_INIT in src/kboot_atc.c) in .rodata.xtext via AURA_XTEXT instead of .init.t6050/.text, guarding Clang's minsize attribute with __clang__. With .init and .text sharing one 64 KiB step in aura-raw.ld, keeping these run-once helpers in .text left default clang (without -Oz) at 112 B of Stage 1 headroom; moving them to .rodata.xtext brings Stage 1 headroom to 8,128 B (clang), 6,904 B (GCC 16.2), and 6,560 B (Ubuntu 24.04 GCC 13.3). Signed-off-by: Erik Bourget <erik@ebourget.net>
|
Merged
|
|
Updated the PR body with the completed J716c (M5 Max, 27.2 stub) one-shot
|
test_wdt_arm.py (merged from main) appends fdt_addresses.c to LIBFDT_SOURCES, so including fdt_addresses.c in LIBFDT_SOURCES linked it twice and failed on macOS ld (and Linux ld) with duplicate symbols (_fdt_address_cells, _fdt_size_cells, _fdt_appendprop_addrrange). Keep LIBFDT_SOURCES unchanged for external callers and link fdt_addresses.c inside fdt_harness.run() instead. Signed-off-by: Erik Bourget <erik@ebourget.net>
t6050_check_ext_adt() only checked the ADT's l1-tt values and pt-region placement, so a pre-enabled apple,t6050-dcpext engine whose live DART root differed from the ADT (for instance pointing into OS RAM) could still retain its scanout DART in t6050_publish_prewired() and receive firmware version properties in t6050_ext_version(). Extract the guarded live power, CPU run, and DART lock/TTBR checks from t6050_ext_one() into t6050_check_ext_live() and call it from both t6050_ext_one() and t6050_check_ext_adt() so scanout retention, rejection, and version updates verify the live registers match the validated ADT roots. Supply external power and DART register state in the host fixtures and cover live roots that differ from the ADT. Signed-off-by: Erik Bourget <erik@ebourget.net>
With both #281 (T6050 G17C GPU handoff) and #282 (T6050 display handoff) merged on top of main, placing both in .rodata.xtext pushes .rodata + .rela.dyn 1,728 bytes past a 64 KiB boundary while .text still has 24 KiB free. Keep T6050_INIT and T6050_TEXT in .text so .text, .rodata, and .data all fit cleanly below _file_limit (6,072 B headroom). Signed-off-by: Erik Bourget <erik@ebourget.net>
…ioning If an input-enabled apple,t6050-dcpext engine passes t6050_ext_reject() but fails t6050_check_ext_adt() (for example its live power, CPU run, or DART state changes before t6050_ext_version() stamps it), the versioning loop previously skipped it and left it enabled with its original firmware properties and display-subsystem scanout entry. Disable and strip scanout via t6050_ext_disable() when t6050_check_ext_adt() fails in t6050_ext_version(), and only mark the engine done once its firmware properties update cleanly so a rescan after enclosing display-subsystem deletion cannot skip it. Add host tests covering an engine that passes rejection and stops running before versioning on both normal and packed device trees. Signed-off-by: Erik Bourget <erik@ebourget.net>
|
Updated
Verified at
Hardware at
@satchlj @DjDeveloperr: the J716c |
What: Extend
t6050_handoff()andkboot_setup_atc()to support prewired T6050 device trees (matching the internal display by coprocessor address with prewired clocks andapple,bw-scratch, and copying combo PHY tunables byapple,t6050-combo-phy+apple,guest-port-reserved), and validate, reject, and version-stamp input-DT-enabledapple,t6050-dcpextexternal engines (t6050_ext_reject(),t6050_ext_version()). Also place the T6050 display and ATC handoff helpers in.rodata.xtextviaAURA_XTEXTso Stage 1 links below the DCP log buffer.Tested: J716c (16-inch M5 Max, T6050, 27.2 stub) one-shot
aura-tryStage 2 boot ate6a3bcb13fca(1.0.0b17-ge6a3bcb1):eDP-1up at3456x2234@120, all 4apple,t6050-dcpextengines atapple,firmware-version/apple,firmware-compat(27, 2, 0), 4apple,t6050-combo-phynodes with tunables, 0 new kernel errors and 0 new failed units; themain(26c1a85bb788) control boot on the same Mac fell back to a 60 Hz simplefb with(27, 0, 0)engines. Host unit, shell, format, Stage 1 size (clang, GCC 16.2, Ubuntu 24.04 GCC 13.3), and ESP Stage 2 size checks also pass ate6a3bcb13fca.Risk: one-way door (Stage 1 code in
src/kboot_display_handoff.candsrc/kboot_atc.c; Stage 2 on ESP is reversible) · T6050 Macs (J716c,J714s,J775D,K114s) and Stage 1 image size.Not yet:
e6a3bcb13fca(includingBUILDSTD=1esp-stage2-size,stage1-sizefedora/alarm/nix/clang-macos, and macOSPytest).s2idleresume (pending hardware alarm IRQ support) and a live external-monitor check on J716c ate6a3bcb13fca(the boot above checks the handed-over DT nodes, not a monitor on a Type-C port). The GPU stays disabled because#282carries no GPU handoff.Details
Branch progression over
main(26c1a85bb788, merged as15191b3c2b06):39b5db2b/0113c4ee: initial prewired T6050 internal-panel and combo PHY handoff plus external-engine firmware version stamping.4101923fe382: scoped the external-engine pass viat6050.ext_aurato input-DT-enabled engines.be98aca94ec8/f6e5eaceec09: required unique coprocessor register matches int6050_node_at()andt6050_ext_index(), recorded ambiguous ADT indices up front int6050_ext_reject(), and preserved the ADT index for scanout DART cleanup.15191b3c2b06: mergedmain(26c1a85bb788), updatingt6041_headless_fb()->t6041_headless_display(dt)intests/python/test_t6050_handoff_bounds.py.9b661123e3d0: failed closed on external-engine version/allocation errors int6050_ext_version().1458e4eb7cba: placed the T6050 display and ATC handoff helpers in.rodata.xtextviaAURA_XTEXT.d3184b1778fc: keptfdt_addresses.cout offdt_harness.LIBFDT_SOURCESsotests/python/test_wdt_arm.pydoes not link it twice.1ddba986798f: extractedt6050_check_ext_live()sot6050_check_ext_adt()verifies live power, CPU run, and DART lock/TTBRstate against the ADT roots before retaining scanout or version-stamping.e6a3bcb13fca: ift6050_check_ext_adt()fails duringt6050_ext_version()after passingt6050_ext_reject(), disabled the engine and stripped its scanout entry viat6050_ext_disable()instead of skipping it with original firmware properties intact, and deferreddone |= 1u << nuntil a clean version update so rescans after enclosing display-subsystem deletion cannot skip an engine.Design & integration notes:
Under the inherited
chip_id != T6050dispatch check indt_set_display_handoff()(and directly fromapple,t6050-combo-phyinkboot_setup_atc()), the new node matching tests no board compatible or chip sub-variant; each keys on the device tree or the ADT:t6050_prewired(),t6050_handoff(),t6050_check_prewired(),t6050_disp_node()): Findsapple,t6050-dcpby its unique ADT coprocessor address (t6050_node_at()) and the singleapple,display-subsystemnode by compatible (refusing a second display subsystem). Verifiesapple,clock-idsagainstdisp0clock IDs in order, checks that each clock is a distinct availablefixed-clockwith#clock-cells = <0>, and validatesapple,bw-scratchagainstdisp0bandwidth agent metadata. Register windows fordcp, external engines (t6050_ext_index()), DARTs, and the PMC node must reach the CPU 1:1 with 2/2 address/size cells and identityranges(t6050_identity_reg()).t6050_check_ext_scanout(),t6050_check_ext_adt(),t6050_check_ext_live(),t6050_check_placement(),t6050_publish_prewired()): External display DARTs listed inapple,display-subsystemiommusare matched to ADTdart-dispextNby CPU address, checked for page-alignedpt-regionoutside OS RAM holding thel1-ttroot, and validated foriop-dcpextN-nubrunning == 1, valid/pinned UUID, non-__OS_LOGsegment-ranges,pt-region-23(dart-dcpextN), andpt-region-16(dart-dispextN) outside OS RAM.t6050_check_ext_adt()then invokest6050_check_ext_live()(shared witht6050_ext_one()) to check PMGR power domains,ASC_CPU_CONTROL_RUN, and both DART streams (DART_T8110_PROTECT_TTBR_TCR, four-level translateTCR, validTTBRmatching the ADTl1-ttroot) underdcp6_guard_begin()/dcp6_guard_end()beforet6050_publish_prewired()retains scanout ort6050_ext_version()stamps firmware properties. Failed external engines are dropped fromapple,display-subsystemiommuswhile keeping the internal panel handoff intact.kboot_setup_atc(),t6050_setup_atc()): Keyed onapple,t6050-combo-phy, copying tunables whole and in ADT order (including RX clock groups) for each port carryingapple,guest-port-reserved, including port 0 where the tree claims it.t6050_ext_disable(),t6050_ext_reject(),t6050_drop_ext_scanout(),t6050_ext_walk(),t6050_available(),t6050_ext_version_one(),t6050_ext_version()): Before checkingos_firmware,t6050_ext_reject()runs on a scratch copy (falling back to in-place edits if scratch allocation fails), skips engines Aura just enabled itself (t6050.ext_aura, recorded whent6050_ext_one()commits int6050_headless_handoff()/t6050_ext_handoff()), uses first-stringstatusmatching (t6050_available()), and callst6050_ext_disable()to strip any failing or unmatched input-DT-enabledapple,t6050-dcpextengine fromapple,display-subsystemiommusin place viafdt_getprop_w()+fdt_setprop_placeholder()without a 128-byte cap and disable (or delete viafdt_del_node()on packed trees) the rejected node. For knownos_firmware,t6050_ext_version()re-checkst6050_check_ext_adt(n)and updatesapple,firmware-compatand existingapple,firmware-versionper surviving engine viat6050_ext_version_one()in its own scratch transaction; if the live/ADT check fails or if scratch allocation, any property write, or commit fails, it callst6050_ext_disable()so no input-enabled engine remains active advertising staleapple,firmware-compat..rodata.xtextplacement (1458e4eb7cba):T6050_INIT/T6050_TEXTinsrc/kboot_display_handoff.candT6050_ATC/T6050_ATC_INITinsrc/kboot_atc.cexpand toAURA_XTEXT(.rodata.xtext,noinline, mapped executable insrc/memory.c) with__attribute__((minsize))guarded by#ifdef __clang__, freeing.init+.textheadroom before the DCP log buffer inaura-raw.ld.d3184b1778fc): Keepsfdt_addresses.cout offdt_harness.LIBFDT_SOURCESand appends it only insidefdt_harness.run(), becausetests/python/test_wdt_arm.py::test_dt_set_wdt_reconfig(merged frommain) appendsfdt_addresses.ctoLIBFDT_SOURCESitself and failedPytestwith duplicate-symbol linker errors whenLIBFDT_SOURCESalready contained it.main + #281 + #282at1458e4eb7cbafailed Stage 1 link withld.lld: error: Code and data reach the DCP log buffer after stage 1!under clang, clang-Oz, and gcc (each PR links alone), so#281+#282require Stage 1 size reconciliation if merged together;t6050_check_placement()should also be reconciled with#471if#471lands first.pytestsuites; unattendeds2idleRTC wake on J716c is currently blocked becauseapple,t6050-pmu-rtcint6050-j716c-sleep.dtsihas nointerruptsandrtc-apple-pmu.chas no generation-4 SPMI alarm IRQ yet (confirmed byrtcwake -m no -s 5leavingwakealarmset withalrm_pending: no).Evidence
Local & container verification at
e6a3bcb13fca:pytest -q tests/python/test_wdt_arm.py tests/python/test_rtbuddyseg_logs.py tests/python/test_t6050_tree_shape.py tests/python/test_t6050_handoff_bounds.py:167 passed(cc),167 passed(CC=clang).pytest -q tests/python/test_dcp6_max_brightness.py tests/python/test_t6041_display_handoff.py tests/python/test_t6041_27_display_handoff.py tests/python/test_oslog_reservation.py tests/python/test_dcp_fw27_clocks.py tests/python/test_dcp_typec_routes_adt.py tests/python/test_display_dart_view.py tests/python/test_m4_dcp_handoff.py tests/python/test_ave_handoff.py tests/python/test_t6031_runner_failures.py tests/python/test_stage1_room.py tests/python/test_rela_layout.py:182 passed, 1 skipped(cc;CC=clangpasses153, skips1, and fails setup ontest_display_dart_view.py's pre-existing unuseddart_gen3_tlbi_broadcast).sh tests/run-t8122-display-handoff.sh,sh tests/run-fdt-disable.sh,sh tests/run-aop-os-ram.sh,sh tests/run-pmp-boot-data.sh,sh tests/run-t8122-gpu26-identity.sh,sh tests/run-rtkit-placed-buffer.sh(ccandCC=clang): all 6 pass under both compilers.clang-format --dry-run -Werror src/kboot_display_handoff.c src/kboot_atc.c: pass.make rustfmt-check: pass.NM=llvm-nm sh tools/stage1_size.sh clang USE_CLANG=1 BUILTIN_LOGO=aurora:clang stage17752 Bheadroom (_file_vital_end 0x11d010),stage1-secure-auditandstage1-secure-enforce77928 B, optionalstage1-dev-audit2520 B.NM=aarch64-linux-gnu-nm sh tools/stage1_size.sh gcc ARCH=aarch64-linux- BUILTIN_LOGO=aurora EXTRA_CFLAGS='-Wstack-usage=2048 -Os':gcc stage16584 Bheadroom (_file_vital_end 0x11d228),stage1-secure-auditandstage1-secure-enforce77448 B, optionalstage1-dev-audit1504 B.aarch64-linux-gnu-gcc13.3.0):gcc13 stage16152 Bheadroom (_file_vital_end 0x11d1d8),stage1-secure-auditandstage1-secure-enforce77528 B(optionalstage1-dev-auditdoes not link).esp-stage2-size(CARGO_PROFILE_RELEASE_OPT_LEVEL=z make -j$(nproc) USE_CLANG=1 BUILTIN_LOGO=aurora RELEASE=1 CHAINLOADING=1 EXTRA_CFLAGS=-Oz ESP_STAGE2=1 SPTM_VIRT=1 SPTM_VIRT_ESP=1 AURACTL=1withoutBUILDSTD=1, plustools/esp-macos/esp_vital_size.py build/aura-raw.elf --nm llvm-nm):ESP vital region: 811160 B (0xc6098),368488 Bfree.make -j$(nproc) ARCH=aarch64-linux-gnu- CHAINLOADING=1 EXTRA_CFLAGS='-Wstack-usage=2048 -Os',make -j$(nproc) ARCH=aarch64-linux-gnu- CHAINLOADING=1 ESP_STAGE2=1 EXTRA_CFLAGS='-Wstack-usage=2048 -Os', andmake -j$(nproc) RELEASE=1 CHAINLOADING=1 USE_CLANG=1 ESP_STAGE2=1(aura.binsha256prefix24c2d8fde8eb620d,BUILD_TAG "1.0.0b17-ge6a3bcb1"): pass.Hardware run at
e6a3bcb13fca(J716c M5 Max, T6050, 27.2 stub, Linux 7.3.0, default kernel command line, one-shotaura-tryStage 2 with the default payload tail appended; the defaultstage2.binwas never touched, sha25621edee972e1ff171…before and after):make -j$(nproc) RELEASE=1 CHAINLOADING=1 USE_CLANG=1 ESP_STAGE2=1; PRaura.bin(3,997,696 B) sha25624c2d8fde8eb620d…(the prefix in the build line above), controlmain26c1a85bb788aura.bin(3,997,696 B) sha256ce40f9c41946f13b….1.0.0b17-ge6a3bcb1:apple-drmcard witheDP-1at3456x2234@120;dcp@48ae00000status = "okay"withapple,bw-scratchpresent.apple,t6050-dcpextnodes (dcp@2b2e00000,dcp@302e00000,dcp@306e00000,dcp@392e00000)status = "okay"withapple,firmware-versionandapple,firmware-compatboth(27, 2, 0).apple,t6050-combo-phynodes (phy@2a3000000,phy@2ab000000,phy@383000000,phy@38b000000; the 3 active ones carry fullapple,tunable-*sets) and 6 Type-C port nodes.disabled, as expected.dmesg -l err,crit,alert,emerg:40lines vs43on the default Stage 2; 0 new display, DCP, ATC or DART errors. The only trial-specific line,apple-pmp-report-entry 284240000.pmp-report:report@f: probe failed -110, also appears in themaincontrol (no GPU handoff). 0 new failed units.main(26c1a85bb788,1.0.0b17-g26c1a85b) on the same Mac:simple-framebuffercard withUnknown-1at3456x2234@60;dcp@48ae00000status = "disabled"; all 4apple,t6050-dcpextengines left at(27, 0, 0);2b2e00000.dcpand302e00000.dcpprobe failed with-110;apple-t6050-dp-phy 2a3000000.phyfailed with-ENOENT(missing or invalid apple,tunable-axi2af).1.0.0b17-g00976384,eDP-1at3456x2234@120), trial binaries deleted,aura-trymarker restored, defaultstage2.binsha256 verified unchanged.Earlier hardware verification at superseded head
1458e4eb7cba(J716c M5 Max, 27.2 stub, one-shotaura-tryStage 2):make RELEASE=1 CHAINLOADING=1 USE_CLANG=1 ESP_STAGE2=1(aura.binsha256prefix34bfcaf4184d84ee,chosen/asahi,m1n1-stage2-version1.0.0b17-g1458e4eb), staged with the default payload tail viaaura-tryinto the default kernel (defaultstage2.binuntouched).main(26c1a85bb788,1.0.0b17-g26c1a85b) without#282: no panel driver (simple framebufferUnknown-1at 60 Hz), GPUdisabled, 6 kernelerrlines.#282boot (1.0.0b17-g1458e4eb):eDP-1up at3456x2234@120; all 4apple,t6050-dcpextengines handed over withapple,firmware-versionandapple,firmware-compat = <0x1b 0x02 0x00>andapple,tunablepresent; 4 combo-PHY nodes and Type-Cport0–port3present; 39 unique kernelerrlines vs 40 on the default Stage 2 (0 new, differing only by PID-numbered generator lines and onemd-managerAFK message); 0 new failed units (aurora-peripherals.servicepre-existing on default); GPU staysdisabledbecause#282alone has no GPU handoff.Earlier hardware run (superseded, head
71708f74on#4272e2d7e71+#281, Linux 7.3.0 with#2185and#2187, default cmdline):3456x2234) and two 4K Thunderbolt dock monitors up; fourapple,t6050-dcpextnodes carriedapple,firmware-compatandapple,firmware-version<27 2 0>.