Repository navigation
Conversation
8f91fd2 to
6cc6a81
Compare
|
Three things before this can go in:
|
|
@techmore still open from the earlier review: #113 needs to land first and this branch rebased onto main, the last commit needs your Signed-off-by, and a J773g boot of the rebased head (Stage 2 version, DCP domain accepted, HDMI-A-1 with its mode, and the apple,dcp-os-log node in /proc/device-tree/reserved-memory). |
c452bef to
71d587c
Compare
Stage 2 handles the powered-off post-M4 ANS handoff (nvme.sart=, see aaec599 "payload: start a post-M4 ANS an earlier stage powered off before any payload"), but hands a live session without SART entries on as it found it. T8132 Stage 1 releases from before the powered-off handoff (v1.0.0b10 and earlier, including 1.0.0b8) leave ANS running and pass no SART entries. The newer U-Boot tail (1b60b47e, U-Boot aurora-silicon#38 plus aurora-silicon#40) dropped adoption of such an inherited session and starts ANS from apple,sart-entries instead, so it refuses what Stage 2 hands on. A Mac mini M4 (J773g) on Stage 1 1.0.0b8 then stops after the Stage 1 vector: no Stage 2 display, no U-Boot output, no Linux. On T8132, when a non-boot= Stage 2 has not used NVMe and no SART entries were passed, take the inherited session over with nvme_init() and shut it down normally, so the payload receives ANS off with its SART entries. If the takeover fails, stop rather than hand over an ANS in an unknown state. The nvme.sart= and boot= paths and every other chip are unchanged. This changes the old-Stage-1 contract for every non-boot= T8132 payload. An older U-Boot that adopts a live ANS but cannot start one from off would no longer work with an old Stage 1; keep the aura and U-Boot pins coordinated. Tested on a J773g with Stage 1 1.0.0b8 and U-Boot 1b60b47e: a Stage 2 from main + aurora-silicon#113 + aurora-silicon#199 with this change booted Linux five times in a row; without it the same stack stopped before U-Boot. Assisted-by: LLM Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
|
Second J773g data point (Mac mini M4; Stage 1 1.0.0b8, stub 26.6.2, stock Aurora U-Boot, kernel = techmore hwtest 787d70b2 + linux#1192 DTS 70049184): #199 alone isn't enough here. With b8461a8, dart-disp0 still refuses with Adding three commits from
With them: Those three commits aren't in any PR yet. 083dbc3 and 79fcfc0 are authored |
|
Status against your three conditions: (1) #113 has not landed, so #199 remains unpushed; (2) every rebased commit carries Sean Dolbec's Signed-off-by; (3) the exact signed preview has one J773g boot.
This was one boot on our J773g with Stage 1 1.0.0b8 and stock U-Boot The second J773g owner's report found #199 alone insufficient. This preview includes the unit-less region-name and empty-placeholder fixes; the display follow-up remains draft #258. |
Stage 2 handles the powered-off post-M4 ANS handoff (nvme.sart=, see aaec599 "payload: start a post-M4 ANS an earlier stage powered off before any payload"), but hands a live session without SART entries on as it found it. T8132 Stage 1 releases from before the powered-off handoff (v1.0.0b10 and earlier, including 1.0.0b8) leave ANS running and pass no SART entries. The newer U-Boot tail (1b60b47e, U-Boot aurora-silicon#38 plus aurora-silicon#40) dropped adoption of such an inherited session and starts ANS from apple,sart-entries instead, so it refuses what Stage 2 hands on. A Mac mini M4 (J773g) on Stage 1 1.0.0b8 then stops after the Stage 1 vector: no Stage 2 display, no U-Boot output, no Linux. On T8132, when a non-boot= Stage 2 has not used NVMe and no SART entries were passed, take the inherited session over with nvme_init() and shut it down normally, so the payload receives ANS off with its SART entries. If the takeover fails, stop rather than hand over an ANS in an unknown state. The nvme.sart= and boot= paths and every other chip are unchanged. This changes the old-Stage-1 contract for every non-boot= T8132 payload. An older U-Boot that adopts a live ANS but cannot start one from off would no longer work with an old Stage 1; keep the aura and U-Boot pins coordinated. Tested on a J773g with Stage 1 1.0.0b8 and U-Boot 1b60b47e: a Stage 2 from main + aurora-silicon#113 + aurora-silicon#199 with this change booted Linux five times in a row; without it the same stack stopped before U-Boot. Assisted-by: LLM Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
|
Thanks for publishing the J773g HDMI DCP mappings. This builds on Could the DCP region publishing be the existing T8132 DCP mapping path (the one the J713 uses), driven by the DCP node's The branch also needs a rebase (it currently conflicts). We can't test a T8132 ourselves, but are happy to help line up owner rows. |
|
Two additions to the earlier review, so they can be folded into the same rework. First, |
71d587c to
b3e7413
Compare
|
Thanks for the rework: the HDMI DCP is now selected by the DCP node's |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Thanks Sean. The rework is what Ryan asked for on 11-19: the HDMI DCP is chosen by the tree's apple,connector-type = "HDMI-A" and the ADT's external disp0, it goes through the existing M4 DCP path instead of a J773g copy, and no board or OS check is left on it. The frontend's HDMI mode refuses anything it can't describe and keeps the DCP mappings when it does. The J773g rows on b3e7413 (Stage 2 version, DCP accepted, HDMI-A-1 at 1080p, the framebuffer and dcp-os-log reservations) are the ones we needed.
This approves the two commits of its own (66998b0, b3e7413). The other three are #113's, so this lands right after #113. Once #113 is merged, the branch needs main merged in (src/kboot.c and src/kboot_atc.c have moved since your base) and a green CI run on that head. The Pytest (macos-15) job on this head was cancelled, not failed.
dt_set_t8132_aop() began with a list of boards (J713, J604), so no other T8132 tree could get the handoff. Its conditions are already checked one by one: the tree asks for it, the AOP is halted, the ADT's segments and DAPF windows reserve, and the DAPF programs from the ADT. Drop the board list. Make the tree edits a transaction and program the DAPF, the only hardware write, after them: a failed step leaves no reservation behind and no DAPF slice changed, and disables the AOP. A tree that enables the AOP without asking for the handoff gets it disabled, as J713 and J604 did before, now on every T8132: the OS cannot run an AOP whose DAPF was not programmed. The host test runs the production function on six board trees, fails each step in turn, checks the order of the hardware write, and checks that an unrequested handoff disables the AOP and touches nothing else. Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
A T8132 Mac without a camera has no isp or isp0 node in its ADT, but nothing stopped a tree from enabling the ISP there: the OS would probe a camera and ISP power domains that do not exist. dt_set_isp() disables only the node the isp alias names, and not its DARTs. When the ADT has neither node, disable every enabled apple,t8132-isp node and the DARTs in its iommus list that no other node uses, before dt_set_isp() runs. The rule follows the ADT and the tree only; it lives in kboot_t8132.c, out of Stage 1's full .init slot. If it cannot write the tree it says so and the boot goes on. The host tests cover an enabled and a disabled ISP, a shared DART, a malformed iommus list, a full tree and an ADT with isp or isp0, and run the rule with the real dt_set_isp() in kboot_prepare_dt()'s order. Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
dt_copy_atc_tunables() gave an apple,t8132-atcphy node the T8132 USB3 bundle only under a J713 or J604 tree. The copy itself already decides per PHY from the ADT: every required group must be present and well formed, or nothing of the bundle is published and the PHY keeps its USB2 fallback. Drop the board list and the chip id test. The bundle goes to any tree node that is apple,t8132-atcphy whose ADT node is atc-phy,t8132. The host test runs the production copy on the four PHYs of a J773g ADT under five board trees; hides one required group on one PHY; and tries an ADT PHY of another type and a tree node of another type. Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
|
Blockers: 2. I checked the two commits that belong to this PR (66998b0, b3e7413). The HDMI selection is sound: the DCP's
HW row: J773g one-shot of the rebased head, with an integration/aurora kernel and its in-tree DT (no change from main: no HDMI line, 0 new kernel errors) and with #1192 (the existing rows: HDMI-A-1 mode, framebuffer and dcp-os-log reservations). Plus a J713 boot to show the panel path is unchanged. Assisted-by: LLM (Claude:Opus 5.5) |
|
Could you merge current main into this branch to resolve the conflicts? Please retain the current display handoff ABI and address the outstanding frontend and kernel consumer findings in the review before requesting another pass. Assisted-by: LLM (Codex) |
Read each IOMMU provider's cell count before advancing to the next tuple. Keep the DART enabled when an unresolved or malformed reference prevents proving exclusive ownership. Cover mixed-width and unresolved provider references in the absent-ISP fixture. Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
DjDeveloperr
left a comment
There was a problem hiding this comment.
Verdict: HOLD at 52dfbed7261e: it carries aura#113's commits and a merge commit, so it lands after #113. Then rebase so only your own commits remain, with a J773g HDMI row at that head. Thanks.
Rows before merging: kboot.c and kboot_atc.c are shared, so besides the J773g HDMI row it also needs one boot of that head on another generation with its displays unchanged.
Checked: no Apple material; the HDMI DCP goes through the M4 DCP path.
Superseded by the review at 52dfbed
|
Merge readiness at
Areas: none matched in CODEOWNERS Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
RyanTheTide
left a comment
There was a problem hiding this comment.
Verdict: HOLD at 52dfbed7261e
Blockers:
- The branch conflicts with
main(GitHub: DIRTY).git merge-tree origin/main pr199conflicts inMakefile:270(kboot_t8132.ovsmain'skboot_display_routes.oin the same object line) andsrc/kboot.ckboot_prepare_dt()(#113'sdt_disable_t8132_absent_isp()call vsmain's newdt_set_mtp_dma_window()). Please merge currentmaininto the branch (no rebase/force push needed) and push. - This branch carries #113's four commits as they were at
a7b6340c(e23fc551,9088ade5,0742e541,a7b6340c) plus a merge commit; #113 has since moved to22ed42f9(same subjects, new commits on a newermain) and is still open. Merging #199 now would land a stale copy of #113. #113 has to merge first; then mergemainhere so that only this PR's own two commits (3f279057,52dfbed7) are left in the diff. src/kboot.c:8827dt_set_m4_dcp_handoff(): the 27.2 routing question from the 11-21 review is still open in code. Onmainan externaldisp0makesdt_set_m4_dcp_handoff()bail (no internal panel), and the open #383 and #536 hand that port to dcpext0 on firmware 27 (#536 reports the externaldisp0back asDCP_INTERNAL_NO_PANELfor exactly that); this PR instead takes theexternal+HDMI-Ashape into the main-DCP path on any firmware. Your 11-24 comment proposes #383 for 27.2 and this path for older firmware only, but the head does not do that. When you mergemain, please make the precedence explicit in the code, using the firmware-27 rulemainalready uses for the DCP clocks (os_firmware.version < V27_0indt_set_dcp_fw27_clocks()), not a new board check, and say it in the description.
Checked: Read this PR's own two commits in full (3f279057, 52dfbed7) and the discussion. The HDMI selection is by the tree's apple,connector-type = "HDMI-A" agreeing with the ADT's disp0 external, and the display DART window now comes from ADT /arm-io/dart-disp0 reg 0 (with overflow/alignment checks) instead of the hard-coded 0x30a300000, so no new board or firmware gate. The HDMI frontend runs inside dt_display_transaction(), so a refusal rolls back the frontend edits and keeps the DCP reservations; SID16 cannot accept framebuffer pages (fb_size is 0 for maps[1]); a tree whose disp0 already has memory-region is left alone. chip_id != T8132 in dt_set_m4_dcp_handoff() is pre-existing. DCO: every non-merge commit has Sean Dolbec's Signed-off-by; the merge commit acd577f9 has none (the policy job passed, but it goes away anyway once the branch only carries your commits). No Apple binary/tuning data. CI was green at this head before the conflict; the PR body also lacks the org template's Tested: and Risk: lines (readiness asks for them on the next edit), please add them when you update the description.
Hardware: no row at this head. Merge needs a J773g HDMI row at the head after the main merge (Stage 2 version, DCP accepted, HDMI-A-1 with its mode, framebuffer and dcp-os-log reservations), and, because kboot.c/kboot_atc.c are shared, one boot of that head on a panel T8132 (J713) with its display unchanged, as Dj asked on 11-25.
Evidence
gh pr view 199:mergeable: CONFLICTING,mergeStateStatus: DIRTY;gh pr view 113: OPEN at22ed42f9.git log --oneline a7b6340c..22ed42f9shows #113's four commits re-made on newermain.- Local pytest 9.1.1 at
52dfbed7:test_m4_dcp_handoff.py,test_t8132_aop_gate.py,test_t8132_atc_usb3_any_board.py,test_t8132_isp_absent.py: 5 passed.
|
Display routing disposition: use #536 as the owner series for the live external-engine handoff, selected by the ADT and live engine state. Keep the older HDMI main-DCP contribution from this PR if the ADT identifies that route and the Linux consumer agrees on the framebuffer ABI. Carry its commits with authorship intact after #113, then qualify J773g HDMI on 26.6.2 and 27.2 and the J713 panel on the combined branch. The older path has distinct coverage and remains open until that work is carried. |
Resolve the old stacked aurora-silicon#113 changes to the versions landed on main. Keep firmware 27 HDMI on the external DCP path. For 26.6.2, publish the display framebuffer as the sole named reservation and keep ASC and PIODMA reservations available by phandle. Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
|
Updated Tested: 82 focused host cases and the generated device tree’s framebuffer naming schema passed on the identical source tree. Matched macOS Clang Stage 2 builds measured 6,744 B headroom on main and 4,280 B on this tree, 184 B above the floor. Risk: Stage 2 size is close to the floor. The hosted compiler matrix and the requested J773g 26.6.2, J773g 27.2 and J713 panel boot rows are still pending, along with final Linux ABI agreement. Please review this revision for that pairing. |
There was a problem hiding this comment.
Verdict: HOLD at cb25d49d
Blockers:
- Hosted
pull_requestCI checks (build,test,stage1-size,esp-stage2-size,format-check,pr-text,aurora-agent-policy) are allaction_requiredawaiting maintainer workflow approval for this fork PR. - Missing exact-head
cb25d49dhardware boot rows: J773g on firmware 26.6.2 (verifyingHDMI-A-1output plusframebufferanddcp-os-logreservations), J773g on firmware 27.2 (confirming clean deferral to the merged#536path), and a J713 panel regression boot (sincedt_set_j713_display_maps()now reads/arm-io/dart-disp0from ADT and checksdisp0-piodma). - Paired Linux consumer ABI (
aurora-silicon/linux#1192) is still in Draft, and the prior change request remains open. - PR body still lacks
Tested:andRisk:lines (needs-template; the details are currently in a PR comment rather than the PR description).
Checked:
- Diff (
+403/-49acrosssrc/kboot.candtests/python/test_m4_dcp_handoff.py): the merge ofmaincleanly dropped the stale#113commits, leaving only the M4 HDMI handoff changes and host tests. - Firmware 27+ deferral:
kboot_prepare_m4_dcp()now explicitly returnsDCP_INTERNAL_NO_PANELwithout mutating the HDMI FDT maps whenhdmi && os_firmware.version != V26_6_2, avoiding conflict with merged#536. - Transactional FDT updates & ADT parsing:
dt_display_transaction(dt_set_hdmi_display_maps, 0)rolls back cleanly on error,dt_get_dart_disp0_base()checks range overflow and alignment on/arm-io/dart-disp0,disp0-piodma/disp0_piodmaaliasing is handled, the sole named"framebuffer"region is placed at index 0 ahead of the unnamed ASC segment phandle,dt_mark_m4_dcp_ready(false)runs only after frontend success, andj713_display_pagekeepsfb_size == 0on panel/SID16 paths.
Evidence
- Non-blocking note (ESP Stage 2 headroom): Since the comment reports 4,280 B ESP Stage 2 vital headroom on macOS Clang (184 B above the floor), once
esp-stage2-sizeruns in CI you could consider marking the new cold HDMI helper(s)AURA_XTEXTif headroom ends up tight under the CI toolchain. - Host tests: 82 Python host tests reported passing in
tests/python/test_m4_dcp_handoff.py, covering both 26.6.2 HDMI mapping and 27+ deferral, rollback, and J713 panel paths; awaiting hosted CI confirmation. - Code audit: No logic, safety, or rollback defects found in
src/kboot.catcb25d49d.
|
Thanks Sean, both for this and for merging main at The diff here was clean, but the branch's history still has #113's pre-squash commits, and #113 landed by squash so that those don't reach main. A merge of this branch would bring them back. #617 is current main plus your change ( What's left is on #617: the J773g HDMI row on its head (Stage 2 version, DCP accepted, HDMI-A-1 with its mode, |
kboot: hand off a T8132 HDMI DCP and its display frontend (carries #199)
Current series
Head
cb25d49dmerges main7dbbeb1a, including the #113 squash. The diff contains the T8132 HDMI handoff and its host fixture.On firmware 26.6.2, the main DCP handles fixed HDMI when the device tree selects HDMI-A and the ADT describes an external display. It reads the DART window from the ADT, supports both PIODMA aliases, and rolls back partial frontend updates while retaining the DCP firmware reservations. The display frontend publishes
framebufferas its sole named region at index 0. The SID0 and SID16 ASC reservations remain available by phandle. The main DCP is marked ready after frontend publication succeeds. Firmware 27 HDMI defers to the external DCP route in #536.Tested: 82 focused host cases and the generated device tree’s framebuffer naming schema passed on this source tree. Matched macOS Clang ESP Stage 2 builds measured 6,744 B headroom on main and 4,280 B here, 184 B above the required floor.
Risk: The size margin is narrow and the hosted compiler matrix is pending fork workflow approval. The older HDMI path still needs agreement on the Linux #1192 consumer ABI and a J773g 26.6.2 boot with HDMI output and reservation evidence. J773g 27.2 external-route and J713 panel boots remain pending on this revision.
Previous series and earlier hardware observations
Summary
A T8132 Mac without a panel drives a fixed HDMI port from its main DCP.
dt_set_m4_dcp_handoff()refused it, so nothing of the display handoff reached the kernel. Both commits extend the existing J713 code and act on two properties, with no board name, board-id or OS version:apple,connector-type = "HDMI-A", and/arm-io/disp0isexternal.1. DCP firmware mappings. The HDMI case goes through
dt_set_m4_dcp_handoff()and the publication the J713 uses (apple,firmware-uuid, firmware version, one reservation per ADT segment fromdt_reserve_asc_firmware()). Refused before the tree is touched: an HDMI tree over an ADT with a panel; an external ADT under a tree that does not say HDMI; an HDMI tree whose DCP already listsmemory-region(the path appends); and every existing refusal.2. Display frontend (was #258).
dt_set_j713_display_maps()and its page callback gain an HDMI mode instead of a second copy. It reads SID0 and SID16 of the display DART, locked and read only, as for a panel. In HDMI mode SID0 must map exactly one whole DCP segment (two with a panel) and may also map pages of the retained framebuffer (/vram); SID16 must map exactly one whole segment and no framebuffer page.disp0gets its segment and a no-mapframebufferregion of/vram; the PIODMA child gets its segment. The devices are not enabled, and a tree that already describesdisp0is left alone. Any other page refuses this step only: the DCP mappings stay.Trees with a panel take the same code as before, including their existing 26.6.2 condition.
Stage 1 size is unchanged: 17968 B headroom on main and on this head (shipping flavour, same clang).
Review points of 11-19 13:08/13:09
53be8212(per PHY, no board or OS test); this PR is stacked on it.kboot_is_j773g()on the HDMI path:src/kboot_t8132.chas neither, and the only firmware test left indt_set_m4_dcp_handoff()is main's existing one for trees with a panel. Validated on 27.2 (rows below).083dbc3f,79fcfc00,7fdadb3e:083dbc3f(unit-less names of regions already in the tree) and79fcfc00(emptygpu-fw-*/uat-*placeholders in the overlap scan) each fixed a check insidedt_set_j773g_dcp_regions(). That function is gone, so neither applies: the shared path has no name check and no overlap scan (the booted tree has those placeholders), and a tree that already lists DCP regions is refused as a whole.7fdadb3e(the display frontend's inherited regions) is here as the second commit, in the J713 function's HDMI mode.e553f9dc): not folded in, because the state they repair cannot exist with this code. Both undo what a loader-run modeset leaves in the DCP's DART (heap L2 tables; a framebuffer alias). On main plus this PR the loader printsdisplay: preserving inherited displayon a J773g and maps nothing there, and the kernel accepted SID23 in the boot below.e553f9dcalso does not build here (dcp->no_resetandkboot_is_j773g_machine()come from the boot-HDMI series). dart: release aura's L2 tables from a locked DART at shutdown #311 is open against main on its own.Scope
This covers a unit whose HDMI port iBoot has lit. A unit iBoot does not light (DjDeveloperr's second J773g) additionally needs the boot-HDMI series, with
e553f9dcand #311; none of that is in this PR.Tests
tests/python/test_m4_dcp_handoff.pyruns the production functions on real FDTs against a host model of the ADT and the DART tables. With the two properties, J773g trees (26.6.2 and 27.2 segment lists) and a tree of another name are handed over on 26.6.2, 27.0 and 27.2; the 27.2 OS log (0x26000) is reserved as 0x28000. Refused with the tree unchanged: no connector-type, another type, HDMI over a panel ADT, nodisp0, an existingmemory-region, no UUID, an empty list, a segment outside DRAM. Frontend only refused: a stray page, a partly mapped segment, two segments in SID0, a framebuffer page in SID16, a wrong physical address inside a segment, an unaligned/vram. The J713, J604, J715 and J624 cases are unchanged.Full host suite on the head: no failure that main does not have.
Hardware
J773g (Mac mini), macOS 27.2 (26B123) stub, Stage 1 1.0.0b13, this exact head
b3e74135(tree06936317) as a one-shot ESP Stage 2, built on macOS with clang 23.1.5, 2 boots on 2026-11-19, HDMI to a 1080p monitor; the rows are from the first. The kernel is not an upstream one: 7.3.0 with our T8132 PMGR policy change (aurora-silicon/linux#2317) and firmware 27 DCP changes that are not in any PR yet.aura 1.0.0b13-gb3e74135FDT: M4 HDMI DISP0 SID0/SID16 mappings and framebuffer [0x103e5300000, +0x854000) published;FDT: M4 DCP firmware mappings published (HDMI DCP, external disp0); display device status unchangedapple-dart 30a340000.iommu: Preserving DCP SID23 root … no writes; the same for SID0 and SID16 on30a300000.iommu;Inherited SID0/SID16 frontend admitted; SID0 strict DMA outside 1 foreign and 4 retained slices;apple-dcp 30ae00000.dcp: firmware-compat 27.2.0: firmware 27 path;dcp_hotplug() connected:1 valid_mode:0 nr_modes:26.DCP consumer reservations are invalid: 0 linesHDMI-A-1connected, enabled, dpms On, 26 modes;set_digital_out_mode(color:81 timing:76) "1920x1080": 75 174500 …,set_digital_out_mode finished; CRTC active at 1920x1080/reserved-memory/framebuffer@103e5300000:reg = <0x103e5300000 0x854000>,apple,asc-mem,no-map; kernel:OF: reserved mem: 0x00000103e5300000..0x00000103e5b53fff (8528 KiB) nomap non-reusable framebuffer@103e5300000/reserved-memory/asc-firmware@1000cbcc000: size0x28000,apple,dcp-os-log,no-map; kernel:OF: reserved mem: 0x000001000cbcc000..0x000001000cbf3fff (160 KiB) nomap non-reusable asc-firmware@1000cbcc000SSH came up with no WARNING, BUG, Oops or DART fault. A second boot of the same image was watched: the monitor showed the Plasma welcome screen at 1080p with
aura 1.0.0b13-gb3e74135as the running loader. An earlier boot of the same tree, built before the Signed-off-by was added (673ac78b), gave the same lines.Not tested: any refusal on hardware (host tests only); 26.6.2 with this head; any machine but the J773g; an upstream kernel.