Repository navigation
Conversation
9ca2b7a to
56e38d1
Compare
56e38d1 to
7c22e40
Compare
4c3bbeb to
0118361
Compare
|
Rebased onto current main (efd7963). Two changes:
|
a43f86d to
5050321
Compare
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5050321975
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (dt_disable_t8132_absent_isp(dt)) | ||
| return -1; |
There was a problem hiding this comment.
Validate the new disable paths on affected hardware
The commit's validation report explicitly lists the AOP/ISP disable paths as untested on hardware; the reported native boot used an older revision stacked with two additional commits and a tree whose ISP was already disabled. AGENTS.md requires changes to be tested on the hardware they affect before merge. Record a hardware boot of this revision that exercises these paths and verifies the resulting AOP, ISP and unshared DART statuses; the isolated host harnesses do not satisfy that merge requirement.
AGENTS.md reference: AGENTS.md:L15-L15
Useful? React with 👍 / 👎.
| if (status && !strcmp(status, "disabled")) | ||
| continue; |
There was a problem hiding this comment.
Run the absence gate before generic ISP setup
On a camera-less T8132 with an isp alias and enabled ISP/DART nodes, kboot_prepare_dt() executes dt_set_isp() before this helper (src/kboot.c:11457–11460). The generic step fails to find either ADT ISP node and sets the ISP to disabled, so this early skip bypasses all DART cleanup and leaves the unused ISP DARTs enabled in the handed-off tree. Running both production steps in order reproduces an exclusively owned DART remaining okay; move the absence gate before generic ISP setup, or allow it to clean up DARTs when the preceding step disabled the ISP.
Useful? React with 👍 / 👎.
DjDeveloperr
left a comment
There was a problem hiding this comment.
Holding this for two things:
-
The ordering issue from the automated review (
src/kboot_t8132.c) is real. Inkboot_prepare_dt(),dt_set_isp()runs first. On a T8132 whose ADT has noisp/isp0,dt_reserve_asc_firmware()fails, anddt_set_isp()sets theispnode todisableditself.dt_disable_t8132_absent_isp()then skips that ISP because it's already disabled, so the DARTs only it uses stayokayin the handed-off tree: the case this gate is for. Two possible fixes, either is fine:- run the absent-ISP gate before
dt_set_isp(); - let the gate also clean up the unshared DARTs of an ISP that's already disabled when the ADT has no camera.
A host test that runs both steps in order would pin it.
- run the absent-ISP gate before
-
Your own hardware plan: a J773g boot of this head alone as the ESP Stage 2, recording the AOP disabled, no enabled ISP or ISP-only DART, and the USB3 copy lines. aura's policy wants the affected hardware tested before merge. The AOP disable also changes the J623/J624/J715 trees, which are offline-only so far.
Stage 1 headroom on this head's CI: nix 7536 B, fedora 8160 B, gcc 15784 B. #199 stays behind this one.
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>
5050321 to
d042241
Compare
|
Updated to On the two points in the review:
“This head alone”: I booted the literal #113 branch head; that head includes the one #244 commit. I also tried main + only these four #113 commits on the same Stage 1 1.0.0b8 machine. Stage 1 accepted the image but hands Stage 2 a live ANS session with no SART entries; the embedded U-Boot deliberately does not adopt that inherited session, so Linux was not reached and the trial watchdog recovered. #244 converts that old-Stage-1 handoff to ANS off plus The J773g's own OS tree describes the AOP disabled and has no ISP node, so in a normal boot the AOP gate is not reached and the absent-ISP gate finds nothing to disable. One more boot of the same signed head, installed the same way, used a test OS tree on the same machine and ADT that enables the AOP and adds an enabled The same four patches, except for the two J623, J624, J715: the AOP rule disables the AOP on every T8132 board except the J713 and J604, so it changes those three trees as well. They are covered by the host test only; we have none of that hardware. The absent-ISP rule applies to any T8132 Mac whose ADT has neither Makefile and Stage 1 headroom: Upstream Tests on the booted tree: full pytest 729 passed, 52 skipped (main alone: 706 passed, 52 skipped); the three #113 files plus the ANS regression file 173 passed, 8 skipped; on plain main + only the four #113 commits, the three #113 files collect four items and all 4 passed. HDMI stays dark with this branch: without #199 the DCP mappings are not published, Not covered: J713, J604, J623, J624 and J715 boots; USB3 link speed. |
|
Dependency note: this branch currently carries #244's |
d042241 to
24812c5
Compare
|
Updated to The four commits are patch-identical to the previous branch (
Host comparison for the decoupled chain through Boot-queue 20 PASS: exact signed head |
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>
|
The production boot stub pins at macOS 27.2 (26B123), so please retarget this to 27.2. The gate is validated on 26.6.2 only, so a J773g on a 27.2 stub fails closed. Please validate and admit 27.2. |
|
Tested on the owner's Mac mini J773g (Mac16,10, 26.6.2 stub), 2026-11-19, as aura-try trials. Stage 2 was the boot-HDMI test series (fdf6510) with this PR's commits on top:
🤖 Generated with Claude Code |
|
Thanks for the careful J773g work and the thorough test matrix. The USB3 calibration copy and the AOP decision are selected by a board-and-firmware predicate ( Your own comment states the property: "the ADT has every group of this bundle on all four PHYs". Could the copy run on any
|
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 does not ask for the handoff is left as it is. The host test runs the production function on six board trees, fails each step in turn and checks the order of the hardware write. Assisted-by: LLM 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. Assisted-by: LLM 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. Assisted-by: LLM Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
|
Thanks for the boot-queue row on 24812c5. One more point, beyond the gating question already raised above: the J773g row from 11-19 shows a side effect of the USB3 calibration copy. On a rear port where the mini acts as the USB device, the role now fails ( |
24812c5 to
53be821
Compare
|
Thanks for 53be821: the USB3 calibration now follows each |
|
The device-mode rows are in the description: a Thunderbolt/USB4 partner comes up on USB2 with aurora-silicon/linux#1702; a plain USB 3.x host needs aurora-silicon/linux#2420 (draft), with which the gadget enumerates at 480 Mb/s. A configured gadget does not re-enumerate after a software unbind and rebind; that happens without #2420 as well, so it is not caused by it. (Edited: the first version of this comment called that an open defect of #2420.) |
|
Thanks for pointing to the device-mode rows and the two kernel changes; that answers the open item. We'll note that this should land together with or after aurora-silicon/linux#2420, so a plain USB 3.x host keeps a USB2 device role. |
|
Heads-up after aura#304 merged into main (7dae354): |
Summary
Three T8132 (M4) rules in kboot, each decided by what the ADT and the OS tree describe. None has a board list, board-id, model or OS-version test;
kboot_is_j773g()is removed.kboot_atc.c). A tree node that isapple,t8132-atcphywhose ADT node isatc-phy,t8132gets the T8132 USB3 bundle when the ADT has every required group, well formed. A PHY that lacks one gets nothing of the bundle and keeps its USB2 fallback; the other PHYs are not affected. The J713/J604 list and the chip-id test are removed.dt_set_t8132_aop()). The board list is removed. When the tree asks for the handoff (linux-enablement-mac,dapf-handofflists/arm-io/aop) and the AOP is halted, the segment and DAPF-window reservations are made as one tree transaction and the DAPF is programmed last; it is the only hardware write, anddapf_init_t8132_halted()restores every slice if its read-back fails. A failure at any step leaves no reservation and no changed DAPF slice, and disables the AOP. A tree that does not ask is not changed.kboot_t8132.c). When the ADT has neitherispnorisp0, an enabledapple,t8132-ispnode is disabled together with the DARTs only it uses. No chip-id test. If the rule cannot write the tree it logs that and the boot continues.What changes on other boards: needs your explicit acceptance
We can test only the J773g. These follow from removing the board lists:
apple,t8132-atcphynodes now get the bundle wherever their ADT carries it in full. Untested there.dwc3-apple …: USB3 PHY setup failed, err=-95(reported by DjDeveloperr on a J773g, 26.6.2); with USB2 only it ran as a USB2 device. Point 1 extends it to every board that gets the bundle. See "USB device mode" below: the fallback has to be a kernel change.If any of these is not acceptable, say which and we will narrow it by a property you name.
USB device mode
The loader cannot make device mode fall back. In aurora-silicon/linux
integration/aurora(0abc2f38):drivers/phy/apple/atc.c:4728-4731:atcphy_usb3_set_mode()returns-EOPNOTSUPPforPHY_MODE_USB_DEVICEwhenever the T8132 PHY is in a USB3 mode;atc.c:5812puts it in a USB3 mode once the calibration is loaded (ss_tunables,atc.c:6327).drivers/usb/dwc3/dwc3-apple.c:942-952:dwc3_apple_set_role()treats any USB3 PHY error onapple,t8132-dwc3as fatal instead of continuing on USB2, which gives theerr=-95line.So the USB2 fallback for device role belongs in one of those two kernel places.
Device-mode row (J773g, 27.2 stub, this head's loader with 4 ×
FDT: Copied T8132 USB3 calibration, rear port, Thunderbolt 4 cable to a MacBook Pro, kernel = our test tree with aurora-silicon/linux#1702's two commits, one boot):phy-apple-atc 40aa90000.phy: USB4/Thunderbolt is not available on this port: serving its USB2 onlydata=host [device], partner present; nofailed to configure Type-C connection, noerr=-9540a280000.usb mode=device, UDC presentconfigured,current_speedhigh-speedWithout #1702 the same cable fails earlier, in the port controller (
sn201202x 1-0a: failed to configure Type-C connection: -19, thencable revalidation failed after 3 attempts), because the partner enters USB4.This row is a Thunderbolt/USB4 partner, where the PHY serves USB2 only and takes the device role by itself. It does not cover the
err=-95case above (a plain USB 3.x host): the kernel change for that (indwc3-apple.c: continue the device role on USB2 when the T8132 PHY answers-EOPNOTSUPP) is now in aurora-silicon/linux#2334 (as of 055fed84, for every SoC; our aurora-silicon/linux#2420 was closed in its favour). With #2420's commit, on the same unit and loader, a rear port to a plain USB 3.x host (the USB-C data port of a dock on a MacBook Pro):USB3 PHY has no SuperSpeed device mode, USB2 only,mode=device, the gadget configured at high speed and listed by the host at 480 Mb/s; without it, 3 ×err=-95and no device. A gadget that was configured does not re-enumerate after a software unbind and rebind; that also happens without that commit on this controller, so it is not caused by it. Replug and a SuperSpeed host session afterwards were not run.Relation to #310
#310 qualifies the J773g through the board list and
kboot_is_j773g(); this PR removes both, and the J773g reaches the handoff by property.Tests
test_t8132_aop_gate.py: the production function on J713, J604, J623, J624, J715 and J773g trees: same result on each; each step failed in turn disables the AOP and leaves no reservation; the DAPF write is asserted to come after both reservations; an unrequested handoff leaves the tree byte for byte and touches no hardware.test_t8132_atc_usb3_any_board.py: the production copy on the four PHYs of a J773g ADT (27.2 stub) under five board trees: four served. Bundle incomplete on one PHY, copied on the others: one required group hidden on one PHY (four different groups, four different PHYs in turn): that PHY gets nothing and prints theincompleteline, and the other three must each have the full bundle with the ADT's values. The case fails if a refusal withdraws the bundle from any other PHY. An ADT PHY of another type, and a tree node of another type: none.test_t8132_isp_absent.py: enabled and disabled ISP, a shared DART, a malformediommus, a full tree, an ADT withisporisp0; and the realdt_set_isp()order.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 head's tree as a one-shot ESP Stage 2 (built as
dbf4073dbefore the Signed-off-by was added, henceaura 1.0.0b13-gdbf4073d;53be8212has the same tree9f33b332; built on macOS with clang 23.1.5), 2 boots, both the same:FDT: Copied T8132 USB3 calibration, 0 ×calibration incompleteapple,t8132-atcphynodes, 7apple,tunable-usb3-*each15 AOP DAPF windows reserved,AOP handed off with its DAPF and firmware segmentsaop@390600000okay, withasc-firmware@…andasc-mmio@…reservationsA third boot of the same loader build with a test tree whose
apple,t8132-ispnode is enabled, to exercise the absent-ISP rule:FDT: no ISP in the ADT; T8132 ISP disabled with the DARTs only it uses; Linux receivedisp@48c000000and its three DARTs disabled; SSH, no Oops or WARNING, no ISP or DART probe line.Both boots reached SSH with no Oops, BUG or WARNING. The kernel booted has no AOP driver, so nothing started the AOP: the handoff was prepared, not exercised. No SuperSpeed device was plugged in, so no 5/10G link was measured.
Not tested: any other T8132 board; any refusal path on hardware (host tests only); 26.6.2 with this head; a physical replug in device mode.