Skip to content

drm/asahi: g16: Accept the J773g loaded 25G83 image - #1718

Closed
techmore wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
techmore:j773g-gpu-fwid-20261112
Closed

techmore wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
techmore:j773g-gpu-fwid-20261112

Conversation

@techmore

Copy link
Copy Markdown
Contributor

Summary

  • add the J773g-loaded 25G83 image to the T8132 firmware table
  • normalize the per-boot header word and iBoot-filled eight-byte DILS payload before hashing
  • cover the measured-image lookup with a regression test

Evidence

On J773g with 25G83, the loaded image has a zeroed per-boot word at 0x224, an iBoot-filled DILS payload at 0x5c917, and normalized SHA-256 9154c7f84bce32151e8a97417d6a207a9eaf0354b4b8d6f02af5299540d3e85a. A previously boot-tested J773g kernel carrying the same identity initialized the GPU firmware and provided accelerated rendering.

Checks

  • scripts/checkpatch.pl --strict --no-signoff: clean
  • firmware-table lookup test added for the measured sizes, entropy range, digest, and boot-filled ranges

Signed-off-by from the author to follow.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T19:19:47.150191Z 9b49d76 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@RyanTheTide

Copy link
Copy Markdown
Contributor

@techmore the code looks good. The commit still has no Signed-off-by. Please add it (git commit --amend -s) and force-push, and we can merge.

J773g loads a distinct normalized 25G83 image after iBoot fills a header word at 0x224 and the eight-byte DILS payload at 0x5c917. Add those per-boot regions and the measured digest so firmware admission recognizes that image.

The same identity was boot-tested on a J773g with 25G83: GPU firmware started and accelerated rendering worked. Cover the new table entry with the existing measured-image lookup tests.

Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
@techmore

Copy link
Copy Markdown
Contributor Author

Hardware test, Mac mini M4 (J773g), 2026-11-14: PASS at this PR's head 5fbbff263a80.

Kernel: aurora-silicon/linux integration/aurora 5d112b1d5493 plus the exact heads of #1192 36383187, #1718 5fbbff26, #1191 (first five commits) 3fa83613, #1865 9c71c29f, #1702 0430675d, #1703 9b0ca002 and #1872 2eb84498, merged without conflicts (release 7.3.0-prheads+, native arm64 build with GCC 15.2.0, 0 warnings). One boot on a Mac mini M4 (J773g, T8132) with a Fedora 44 userspace. The device tree came from the boot chain, not from this tree, so DT-only changes were not exercised.

Check Result Evidence
25G83 firmware image accepted PASS GPU firmware build: Apple GFX 25G83 (normalized loaded image, J773g), then M4: firmware identity accepted
Firmware reaches READY PASS G16: firmware at READY, starting the backend at 1.50 s
DRM device and render node PASS [drm] Initialized aurora 1.0.0 for 302600000.gpu on minor 1; renderD128 is aurora-g16
Bounded GPU job PASS glmark2-es2-gbm --off-screen (build, texture, shading, 15 s each): rc=0, GL_RENDERER: Apple M4 (G16G B0), score 971; a second run scored 980
GPU errors in the kernel log PASS 0 error, fault or timeout lines from the GPU driver

Not covered: Vulkan (no Vulkan tools on the test system) and GPU load longer than one 45 s glmark2 run.

@RyanTheTide

Copy link
Copy Markdown
Contributor

The production boot stub pins at macOS 27.2 (26B123), so please retarget this to 27.2. 25G83 is the 26.6.2 stub's GPU image; please identify the J773g G16 image loaded by the 27.2 stub instead.

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Hardware test, second Mac mini M4 (J773g, 24 GB), 2026-11-19: this PR's digest does not match this machine.

Setup: macOS 26.6.2 stub (25G83 GPU image) and aura 1.0.0b13 with the boot-HDMI Stage 2. Kernel is the linux-aurora 7.3.0-40 pin (9125b31) + #1898 + #1191 at e0835278 (which includes this PR's d78b3c2b), with the distribution config.

  • Sizes and entropy offsets match the J773g entry: TEXT 0x60000, DATA 0x13c000, entropy 0x5c8df/0x5c9c2.
  • With 0x224 and 0x5c917 zeroed, this machine's TEXT hashes to 9b10049829d4…, not 9154c7f8…, so G16 still fails with loaded GFX TEXT identity mismatch: EINVAL.
  • Cause: the header at 0x22c/0x230 describes a 0x231-byte parameter block at 0x5c8df (39 TLV records). iBoot fills every value in it. Besides the slide at 0x5c917, it writes carveout addresses below the top of DRAM (PTPB, GptB, PplB, Gx2S = 0x105fff… on 24 GB), which differ between machines with different memory sizes.
  • Two boots of this machine differ only in the 0x224 word, the slide and the entropy.

#2232 zeroes every record value instead, keeping the tags and lengths and the rest of TEXT exact. With it, this machine admits the image, reaches READY and KWin composites on the GPU (details in #2232). Could you check whether your J773g also matches #2232's digest d0d2a0267f82…? If it does, one entry covers both machines.

🤖 Generated with Claude Code

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Follow-up: I compared the loaded TEXT with Apple's armfw_g16g.im4p (build b000, from the 26.6.2 stub's Preboot). Besides 0x224 and the slide, iBoot also writes:

  • the DATA address at 0x23c;
  • all 39 boot-parameter values;
  • the count and body of two tunable tables at 0x5cb10 and 0x5ce60.

#2232 now zeroes exactly those ranges. Its digest b9ea7e6b… is computed from Apple's file, so it should match your J773g as well. It is verified on this 24 GB machine across two boots.

🤖 Generated with Claude Code

@techmore

Copy link
Copy Markdown
Contributor Author

Checked on our J773g (16 GB, board-id 0x2a).

25G83 (26.6.2 stub): matches #2232. Three loaded-TEXT dumps from three boots, with #2232's 45 ranges zeroed, all hash to b9ea7e6b2aca70a275a0b068ee791ed50527e8db761964d2733fa407a6f2226c. The raw dumps differ only at 0x225, 0x5c8e7, 0x5c917 and 0x5c9ca. So one entry covers the 16 GB and 24 GB machines.

26B123 (27.2 stub), in case it is useful for a second entry: TEXT is 0x64000, same structure at shifted offsets (parameter block at 0x60a1b, tables at 0x60c4c and 0x60f9c). The same rule gives 484c43cb798900dd14654ed54efe1624b43de3ce8028b771425d63bcc6a72c92, for the loaded image and for Apple's file alike. One boot read; no kernel with #2232 has been booted here.

Closing this in favour of #2232.

@techmore techmore closed this Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants