Repository navigation
kboot_gpu26: keep the 27.2 GPU off without its ADT start values - #455
Conversation
The 27.2 GPU start copied gpu-fast-die0-target and coredump-copy-buffer from the ADT onto the GPU node only when the ADT had them, and handed the GPU over either way. A Mac whose ADT lacks either value then got an enabled GPU node, an enabled mailbox and apple,no-auto-pm on the GPU power domain, and only the kernel's own check kept the firmware from starting without its thermal target. The values were also checked only after the calibration had powered the GPU up and down once. Require both values and read them from the ADT before anything is powered. An absent, malformed or zero value now refuses the start: the transaction rolls back, the GPU node and its mailbox stay disabled and the GPU is never powered. The values are written to the GPU node after the calibration, as before, through the same GPU node lookup as the rest of the 27.2 start. The host tests change to match: absent values (together and each on its own), a malformed value and a zero value all refuse with no power cycle. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Adversarial review of
Nits, left for a later change so CI doesn't run again for wording:
Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Reviewed live head a9c1917e4687527f07bd6fda4b93ef8741a6036e against pre-pr-checklist.md (§1–§6).
Code, safety, and CI audit: 0 code blockers
- §1 Scope & no new model gating: Adds no chip, board, or firmware-version gates; decides solely from the machine's ADT properties. Verified across all GPU paths in
src/kboot_gpu.c,src/kboot_gpu26.c, andsrc/kboot_gpu_m4.cthatt8122_gpu_publish_27()->t8122_gpu_enable_27()is the only 27.2 GPU path consuminggpu-fast-die0-targetandcoredump-copy-buffer(M4/M4 Pro/M4 MaxT8132/T6040/T6041, G17T8140/T8142/T6050, andT8152use separate handoff paths; no other T8122 enable path can run underV27_2). - §2–§3 Fail-closed ordering & no regression: Moving
dt_gpu_t8122_27_machine_values_read()ahead ofdt_gpu_t8122_26_calibrate()closes a genuine §3 gap from #448. An absent, non-u32, or zerogpu-fast-die0-targetorcoredump-copy-buffernow aborts insidet8122_fdt_transaction()before SGX is ever powered, discarding the draft FDT so GPU and mailbox staydisabledwithoutapple,no-auto-pm,apple,gpu-power-model, or partial start values (while preservingchosen.asahi,t8122-gpu-power-diag=1as before). On boards with both valid non-zero ADT values,t8122_gpu_node()matches thegpualias validated by calibration, re-resolves the FDT offset per write, and emits the exact same DT properties and log line asmain. - §4 & §6 Attribution & naming: Commit
a9c1917e4687527fcarries human author/committer + humanSigned-off-by:with zero AI trailers; PR body carriesAssisted-by:. Naming is clean. - CI & host tests: 15/15 CI checks green on
a9c1917e(build,ESP stage 2 vital size,format-check,policy, all 5stage1-sizeand 5Pytestjobs), and the updated G15 host scenarios cover both-absent, each-absent, malformed-length, and zero-value refusals with!pmgr_enables && !pmgr_disables. - Non-blocking nits (no change required for merge): A zero ADT value currently logs
malformed ... (len 4)rather than distinguishing zero from wrong length, andtests/kboot_gpu_g15_host.conly checksgpu-fast-die0-target = 0(notcoredump-copy-buffer = 0).
Blocker before merge (§5 Hardware Evidence)
This PR is marked ready for review (OPEN, non-draft), while ## Still to run notes that the J615 aura-try Stage 2 one-shot on the default kernel has not run yet. Per pre-pr-checklist.md §5 (and the bar applied on #448), please either:
- Run the queued J615
aura-tryStage 2 one-shot ona9c1917e4687527f07bd6fda4b93ef8741a6036e(default kernel & cmdline) and post the build/SHA binding, verified GPU node properties (apple,fast-die0-target,apple,coredump-copy-buffer), GPU firmware ready, and explicit regression counts (0 SELinux denials, 0 failed units, 0 new kernel errors), or - Convert the PR to draft until that run completes.
No code changes are required — once the J615 §5 run is posted on this head, this is ready to flip immediately to APPROVE.
Assisted-by: LLM (Gemini 4 Neon)
|
J615 §5 row on this head (
Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Re-reviewed live head a9c1917e4687527f07bd6fda4b93ef8741a6036e against pre-pr-checklist.md (§1–§6).
Re-review verification
- Head & mergeability: Live head is unchanged at
a9c1917e4687527f07bd6fda4b93ef8741a6036e(0 code blockers from the prior §1–§4/§6 audit). The 4 commits landed onmainsince merge-basedff1235donly touch build/release metadata (Makefile,VERSION,.github/workflows/stage1-size.yml,docs/releases/1.0.0b15.md) with zero overlap; PR isMERGEABLE/CLEAN. - §5 Hardware evidence (J615 row resolved): Audited #issuecomment-7081143597 and the updated PR body:
- J615
aura-tryone-shot on default kernel7.3.0-aurora-g15g272aand default command line. - Explicit SHA-256 binding between production Stage 2 (
dff1235d, payload05df4aa8…) and trial (dff1235d+a9c1917e,aura.binc87a34e4…, byte-identical DTB/U-Boot tail, payload60a9aed8…, confirmed via booted DMI string;-dirtysuffix from pre-commit build documented; restored to05df4aa8and trial payload removed). - GPU & mailbox DT parity confirmed: all 76 properties identical to production (
apple,fast-die0-target=88,apple,coredump-copy-buffer=0x8000, bothokay,apple,no-auto-pmon the GPU power domain); GPU firmware ready at 1.32 s withrenderD128. - Regression counts: 0 SELinux denials, 0 failed units, 0 oops, 0 new kernel errors (12 error-level lines, matching production baseline).
- J615
- CI: 15/15 checks green on
a9c1917e. - Open blockers: None.
Ready to merge.
Assisted-by: LLM (Gemini 4 Neon)
…Airs Since aurora-silicon#604 (0ed3c1e) the full T8122 recipe (display, GPU, stand-in power model, leakage fuse) goes in by default only on a board list (J613, J615); every other T8122 board, the J504 14" MacBook Pro included, gets the display switch only, and its GPU node stays disabled ("GPU: not armed (no chosen.asahi,t8122-gpu=1)"). The list stood in for "the stand-in power model was run on these boards", but the inputs the GPU setup acts on are this Mac's own on every T8122: its ADT perf states and power values, its leakage fuse, its powered identity (G15G, one cluster of 8 or 10 cores) and, on 27.2, its ADT start values (aurora-silicon#455). The J504's 27.2 ADT describes the same sgx and gfx-asc properties as the J613's, and the J504 loads the same G15G images. Every check behind the switch still fails closed. Drop the board list: every T8122 board gets the one recipe. chosen.asahi,t8122-gpu=0, chosen.asahi,t8122-dcp=0 and chosen.asahi,m3-defaults=0 still turn it off. Link: aurora-silicon#583 Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
Problem
On macOS 27.2 the T8122 GPU start (#448) copies
gpu-fast-die0-targetandcoredump-copy-bufferfrom the ADT onto the GPU node only when the ADT has them, and hands the GPU over either way. On a Mac whose ADT lacks either value, aura still enables the GPU node and its mailbox and setsapple,no-auto-pmon the GPU power domain. Only the kernel's own check then keeps the firmware from starting without its thermal target. The two values were also checked only after calibration had powered the GPU up and down once.Change
dt_set_gpu()is updated; it still said 27.2 leaves the GPU disabled.Testing
G15 host harness (
tests/kboot_gpu_g15_host.c, arm64): every scenario was run on this branch and on maindff1235d, and each scenario's output (DT, PMGR/bus traces, log) was compared. The positive 27.2 start (t8122-27-start, the J615 case) is byte-identical to main. The changed scenarios are the refusals: absent values (both together, and each alone), malformed, and zero. All of them now refuse with no power cycle. Pass counts: this branch 102, main 99, with the same 12 pre-existing failures on both (25G83/stand-in fixtures, unrelated to this change).pytest (the CI set): 864 passed, 27 skipped, same as main.
ESP Stage 2 build with the CI flags (
-Wstack-usage=2048 -Os): links, no new warnings. clang-format is clean.J615 aura-try one-shot on the default kernel (
7.3.0-aurora-g15g272a, default command line). Production Stage 2 is aura maindff1235dexactly; the trial isdff1235d+ this commit with the same DTB/U-Boot tail (byte-compared). The trial booted and GPU firmware was ready at 1.32 s with renderD128. All 76 GPU and mailbox DT properties are identical to production (apple,fast-die0-target88,apple,coredump-copy-buffer0x8000, bothokay), andapple,no-auto-pmis on the GPU power domain in both. The boot had 0 SELinux AVCs, 0 failed units, 0 oops and the same error-level count as production.Adversarial review (someone other than the author): no blockers, 4 nits, see the comment below.
Still to run
Review notes
This came from an adversarial review of #448 after it merged. The same review raised two more points that this PR does not change:
calc_power_t8122_standin(), not ADT values). The kernel turns that model into the firmware's power target. A machine-sourced source is still needed.t8122_full_identity_prepare(),m3_air_boards). Replacing them with ADT facts is drafted separately. It waits on the power-model point, so the stand-in model does not reach more machines first.Assisted-by: LLM (Claude:Opus 5.5)