Repository navigation
drm/asahi: g16: admit 25G83 on every T8132 Air with one normalized entry - #2672
Conversation
|
Nice work. Deriving the three ranges from the image's own header and its One risk before it lands: the three J713 entries are removed, and this has only run on a J715. If a J713's iBoot writes anywhere outside these three ranges (the 10-core entry was added separately in #1704 for that kind of reason), its GPU stops at "unsupported GPU firmware build" after this merges. Two options: keep the old J713 entries next to the new one until someone runs an 8-core and a 10-core J713 on 26.6.2 with only the new entry, or check offline against the J713 loaded-TEXT digests the old entries were made from, if those dumps still exist. A 27.2 J713 doesn't load 25G83, so it can't prove this. Assisted-by: LLM (Claude:Opus 5.5) |
|
Thanks. I took the first option in ae30d1a: the normalized entry is now added ahead of the per-board entries, and the three J713 entries stay. I don't have a J713 or its loaded-TEXT dumps, so I can't run the offline check. The new entry is named A build of Once someone boots an 8-core and a 10-core J713 on 26.6.2 with only the normalized entry, I can remove the old entries in a follow-up. |
|
Thanks. Checked ae30d1a: the normalized entry is first, and both J713 entries (8-core, 10-core) are still there below it, so nothing a J713 boots today loses admission. With the entry name telling which one admitted a boot, removing the old entries later is easy to justify from a J713 row. Resolved from my side. Assisted-by: LLM (Claude:Opus 5.5) |
There was a problem hiding this comment.
Reviewed at ae30d1aeca6c. Requesting changes for a KUnit regression introduced by shifting t8132::CONFIG.firmware indices.
Blocker
- Broken KUnit test (
drivers/gpu/drm/asahi/fwid.rs:547-572):asahi_fwid::tests::j713_accepts_all_loaded_images()checks the three existing J713 25G83 digests and asserts:Prepending the new normalizedassert!(core::ptr::eq(found, &builds[i]));
FirmwareBuildat index0ofcrate::g16::hw::t8132::CONFIG.firmware(drivers/gpu/drm/asahi/g16/hw.rs:41-57) shifts the three existing J713 entries tobuilds[1..=3]. Becausemeasured()will now return&builds[i + 1],j713_accepts_all_loaded_images()will panic under KUnit (this was missed by CI becausehost-testsdoes not run kernel KUnit tests).- Please update
j713_accepts_all_loaded_images()indrivers/gpu/drm/asahi/fwid.rsto cover the new normalized entry atbuilds[0](including verifying itsboot_filledranges lie withintext_size) alongside the shifted per-board fallback entries atbuilds[1..=3].
- Please update
Non-blocking Suggestion
- Consider squashing
d8bf1a092dd1andae30d1aeca6ctogether with thefwid.rsKUnit update sogit bisectdoes not pass through an intermediate commit that removes the J713 fallback entries.
Checklist Summary (§1–§6)
- Firmware entry (
drivers/gpu/drm/asahi/g16/hw.rs:41-57): All threeboot_filledranges(0x23c, 8),(0x5c8df, 0x231),(0x5cb10, 0x6a0)fit withintext_size(0x60000), andfwid::digest_at()verifies intactGKTS/ECAPrecords at0x5c8df/0x5c9c2before zeroingboot_filled, matching the G17boot_filledpattern. Keeping the three J713 entries below the normalized entry preserves J713 admission until confirmed. - §1–§4, §6: Clean — moves away from per-board gating, no cmdline hacks, clean-room structural offsets + SHA-256 digest, human-only commit metadata with
Signed-off-by:. - §5 Evidence: J715 (
Mac16,13, 26.6.2) boot with only the normalized entry is reported; on the updated head, please also include regression counts (0 SELinux denials, 0 failed units, 0 new kernel errors). J713 8-core and 10-core 26.6.2 rows remain needed before a follow-up drops the fallback entries.
The T8132 table pins the same 25G83 image (build 2 of armfw_g16g.im4p) three times, one TEXT digest per J713 variant, and aurora-silicon#2667 would add a fourth for the J715. The images differ only in what iBoot writes into TEXT at load time. Comparing the TEXT of the 26.6.2 firmware file with the TEXT loaded on a J715 shows that iBoot writes three ranges besides the two entropy records. The image describes each of them itself: - 0x23c, 8 bytes: a header field. - 0x5c8df, 0x231 bytes: the record block (GKTS ... ECAP ...). The header states this offset and length at 0x22c/0x230. - 0x5cb10, 0x6a0 bytes: the tunables block. The block's TUNS record points at it, and its TUNZ record gives the size. With these ranges in boot_filled, the file's TEXT and the J715's loaded TEXT hash to the same digest. Every byte that differs between the two lies inside the ranges. Add that single entry ahead of the per-board ones, as the G17 tables already do, and name it so the identity line says which entry admitted the image. Keep the J713 8-core and 10-core entries after it for now. Only a J715 has booted with just the normalized entry; if a J713's iBoot writes anywhere outside the three ranges, removing its entries would stop its GPU at "unsupported GPU firmware build". They can go once both J713 variants have booted on 26.6.2 with only the normalized entry. j713_accepts_all_loaded_images() now expects the J713 digests at builds[1..=3], and checks that the normalized entry at builds[0] is found by its own digest and that its boot_filled ranges lie inside TEXT. Tested on J715 (Mac16,13, 10 cores, OS firmware 26.6.2) with only the normalized entry in the table: "firmware identity accepted", READY, Hyprland session. Not tested on J713. Signed-off-by: Kazuhide Takahashi <[email protected]>
ae30d1a to
ad87173
Compare
|
Thanks, you're right: with the normalized entry first, Updated, squashed into one commit:
Checked locally:
§5 counts: I don't have them for the J715 boot with only the normalized entry. That record covered the GPU only. The J715's everyday kernel admits the GPU through its own per-board 25G83 entry, the one #2667 proposed. Its boots show:
That kernel isn't this table. If you want exact counts for this head, I can boot the J715 with it once more. J713 8-core and 10-core rows are still needed before the per-board entries can go. |
|
Re-checked at ad87173. The squash leaves One thing left: the J715 row in the description was taken with the entry's earlier name and with a table holding only that entry, so it isn't at this head. Yes please to the boot you offered at ad87173 with the full table: the "GPU firmware build: Apple GFX 25G83 (normalized loaded image, boot-filled ranges)" line, plus failed units and new kernel errors. A KUnit run of Assisted-by: LLM (Claude:Opus 5.5) |
|
KUnit run of Setup
Result: 10/10 pass Control: I also ran the same kernel with only The J715 boot at this head with the full table is being prepared as a module swap, and I'll post it here. |
|
Thanks, Assisted-by: LLM (Claude:Opus 5.5) |
|
J715 row at Build
Result: pass (one boot)
Not covered: whether the J713 entries still match (no J713 here), GPU load beyond the desktop, and suspend. The original module went back afterwards. Its boot shows the old local entry ( |
There was a problem hiding this comment.
Formal §1–§6 re-review at ad87173bf07970fae21bffb1b48c51f9d9d2d7e0 against pre-pr-checklist.md (verified against live integration/aurora 70a00e583b03: not superseded).
0 code, policy, attribution, or §5 hardware/test blockers — holding solely because live CI has not yet run green on this head.
Blocker
- §6 (Live CI not green — fork workflow awaiting approval):
Host tests(run 45044103708) iscompleted / action_requiredonad87173bf079(mergeStateStatus: UNSTABLE), so no live CI check has passed on the PR head yet.- No further code or hardware changes are requested from the author: once a maintainer approves the fork CI run and
host-testsreports green onad87173bf079, this PR is ready forAPPROVE.
Checklist Verification
- Prior KUnit Blocker Resolved (
drivers/gpu/drm/asahi/fwid.rs:566-588):j713_accepts_all_loaded_images()now validatesbuilds[0]'sboot_filledbounds againsttext_size, checksmeasured()matchesbuilds[0]by its digest, and verifies the three preserved J713 fallback digests atbuilds[1..=3]. Confirmed by arm64 KVM QEMU KUnit run (asahi_fwid10/10 pass atad87173b, plus negative control failing atj713_accepts_all_loaded_imageswhen revertingfwid.rs). - §1–§3 (Correctness / safety / bisectability): Clean. Squashed into a single bisect-safe commit. All three
boot_filledranges(0x23c, 8),(0x5c8df, 0x231),(0x5cb10, 0x6a0)fit insidetext_size(0x60000), anddigest_at()verifies intactGKTS/ECAPrecords at0x5c8df/0x5c9c2before zeroingboot_filled. Keeping the three J713 entries belowbuilds[0]guarantees zero regression for 8-core and 10-core J713 boards on 26.6.2 until confirmed in a follow-up. - §4 & §6 (Attribution / clean-room / naming): Clean. Single commit with human author/committer (
Kazuhide Takahashi <[email protected]>) and humanSigned-off-by:only (zero AI commit trailers); structural offsets and SHA-256 digest only. - §5 (Exact-head HW & regression evidence): Satisfied by the J715 (
Mac16,13, 26.6.2) boot with the exactad87173bfull table (aurora.koswap, no local J715 entry): loggedGPU firmware build: Apple GFX 25G83 (normalized loaded image, boot-filled ranges),firmware identity accepted,READY, desktop functional (card0/renderD128+card1/eDP-1), 0 new failed units (2 pre-existing local units), 0 new kernel errors, SELinux N/A on this install.
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Verdict: FINISH, then merge at ad87173bf079: the code is ready; it needs only a row at this head.
Blockers: none in the code. Missing row: I've approved the waiting CI run, and it has to pass. Then one T8132 Air boot at this head admitted by the normalized entry alone (the J715 is fine), with a render node and no admission refusal. Thanks for normalizing it.
Checked: no Apple material, no board gate: the loaded image hashes the same as the firmware file's TEXT once the boot-filled ranges are zeroed, and the KUnit case checks the normalized entry first. The per-board J713 entries stay until an 8-core and a 10-core J713 boot with only the normalized entry.
Superseded by the review at ad87173
|
J713 check at We booted main 42d693c + this PR + #2666 on our J713 (M4 Air). It doesn't exercise the 25G83 entry:
The boot itself was clean: s2idle 1/1, 0 AVC denials, 0 faults. But that says nothing about the normalized entry. A real row needs a J713 or J715 on 26.6.2, and we have none in the lab. Your J715 boot is the closest evidence. |
|
|
What: admit the 25G83 GPU firmware on every T8132 Air with one normalized
boot_filledentry, instead of one entry per board. With it the J715's GPU comes up.Tested: J715 M4 Air, 10 cores, OS firmware 26.6.2, with this entry as the only one in the table, in the J715's own kernel build:
firmware identity accepted, READY, Hyprland session. Not booted fromad87173bitself.Risk: two-way · M4 (T8132) Airs; the J713 entries stay
Not yet: a boot at this head; J713 8-core and 10-core.
Follow-up to the review of #2667: describe the block iBoot fills in
boot_filled, so that one normalized entry admits every T8132 Air.What iBoot writes
I compared the 25G83 TEXT from the 26.6.2 IPSW (
Firmware/agx/armfw_g16g.im4p, rkosftab imageb000, whose entropy records are at 0x5c8df/0x5c9c2) with the TEXT loaded on a J715. Besides the entropy, all the differing bytes fall into three ranges, and the image itself describes each one:(0x23c, 8)(0x5c8df, 0x231)(0x5cb10, 0x6a0)TUNS(pointer) andTUNZ(size) recordsWith these zeroed, the file's TEXT and the J715's loaded TEXT give the same digest (
3a41e477…), and no differing byte is left outside the ranges. The digest can therefore be derived from the public firmware file alone.Change
Adds one normalized 25G83 entry with
boot_filled, ahead of the per-board entries. The G17 tables already work this way.The three J713 entries stay after it until both J713 variants have booted on 26.6.2 with only the normalized entry (see the review). They can then go in a follow-up. The normalized entry has its own name, so the identity line shows which entry admitted the image. With this PR, #2667 (a J715 entry) is no longer needed.
Testing
GPU firmware build: Apple GFX 25G83 (normalized loaded image),firmware identity accepted, READY, Hyprland sessionCould someone with a J713 boot this, so the 8-core and 10-core images are covered before the old entries go? If a J713 doesn't match, its identity line will show which digest it measured, and I'll look at it again.