Repository navigation
drm/asahi: g18: J873 G18G on the macOS 27.2 (26B123) firmware - #1652
Conversation
The J873 GPU hand-off pins one firmware build, 26A428 (macOS 27.0, 27.0.1), and refuses anything else. A stub on macOS 27.2 makes iBoot load the 26B123 G18G images (RTKit 3514.41.1), so the hand-off refused the GPU and Linux got no receipt. Keep one entry per build: the receipt it publishes and both roles' identities. The iop nub uuids in the ADT, which iBoot fills in from the images it loaded, select the entry; the TEXT digest, TLV and region checks then run against that entry as before. The 26B123 images use the same 40 patchbay TLVs; their patchbay sits at 0x4a670 (GFX) and 0x4e590 (GFX1). tools/g18g_firmware_identity.py prints a build's entry from the decoded FUD payloads. It reproduces the pinned 26A428 entry from the 26A434 images byte for byte. boot_j873.py accepts either receipt in the prepared DT. The 26B123 receipt needs a kernel that builds the 26B123 InitData graph (aurora-silicon/linux#1652). Tested on a Mac mini M6 (J873g) booted from a macOS 27.2 stub: the live ADT names 4930E685-1B70-3199-8FE5-75369B0DDF24 and 64573826-0202-3955-8CDC-8A2949B9D495, and kboot_prepare_dt on the integration/aurora t8152-j873g.dtb reports "G18G eight regions and both firmware TEXT identities verified (G18G-RTKit-3514.41.1.release)" and publishes that receipt with both GFX mailboxes enabled. Signed-off-by: Thomas Glanzmann <[email protected]>
|
Reviewed the per-build layouts, the band relayout and the receipt selection. 26A428 keeps identity layouts, and the other profiles are untouched. @sithglan two small things before this goes in: the new comments cite addresses inside the firmware image; please describe the layout by its fields only. And the "G18G: firmware receipt" line prints "absent or differentNone" when nothing matches. |
The G18G GFX firmware of macOS 27.2 (RTKit 3514.41.1) writes 0x4b1d000000000003 to the handoff's firmware magic while it maps the handoff region during its own boot, whether or not a peer exists. The 26A428 firmware (RTKit 3514.0.15) never writes the magic. The T8152 no-peer check took the marker for a PPL peer and refused the handoff: T8152 handoff: unexpected firmware peer; refusing no-peer mode Accept that value as well as zero. A PPL reply (PPL_MAGIC) or a held firmware lock still refuses no-peer mode. Signed-off-by: Thomas Glanzmann <[email protected]>
c5f0f9f to
d5f18b0
Compare
|
@RyanTheTide both done, force-pushed as d5f18b0 (was c5f0f9f). The diff between them is comments, commit messages and the receipt print.
Built with |
|
Blockers: 2.
The rest checks out. HW row: J873g on this tree twice, once from a 27.0.1 stub (26A428 receipt) and once from a 27.2 stub (26B123 receipt): render node up, a GLES CTS or es2gears run with no GPU faults or recoveries, and 0 AVC, 0 failed units, 0 new kernel errors. Assisted-by: LLM (Claude:Opus 5.5) |
d5f18b0 to
2563da1
Compare
|
@RyanTheTide both blockers are addressed in
HW row:
The PR description now ends with the Assisted-by: LLM (Claude:Opus 5.5) |
|
Re-review of 2563da1: No blockers. From our last comment:
The 26A428 path stays the same.
HW row: J873g on this tree from a 27.0.1 (26A428) stub would still be worth running when one exists: render node up, no GPU faults or recoveries, 0 failed units and 0 new kernel errors. Until then the 26A428 path rests on the identity argument above. Assisted-by: LLM (Claude:Opus 5.5) |
The J873 backend builds only the 26A428 (macOS 27.0, 27.0.1) InitData graph and admits only that firmware's loader receipt. macOS 27.2 (26B123) ships the G18G firmware RTKit 3514.41.1, which rejects that graph at its first check. Against 26A434, whose GPU firmware is the 26A428 one, 26B123 differs in three places: - the root version word gains bit 45 (0x0c8b_4339_83a0_04c0 -> 0x0c8b_6339_83a0_04c0), which both roles compare with root +0; - the perf/policy block grows from 0x7800 to 0x7860 and the status config from 0x6d0 to 0x6d8; the other 22 allocations keep their sizes. Everything after the policy in shared allocation #1 moves by 0x80, and the page total stays 0x28000. The private cluster keeps its layout, as 0x6d8 packs to the same 0x700; - inside those two objects fields move: policy +0x2f0c..+0x2f17 by 0x10 and +0x2fb4..+0x6d9f by 0x18, with a new word at +0x2f28; status config +0x59c..+0x5b3 by 4 and +0x5b4 to the end by 8, with new words at +0x59c and +0x5b8. +0x2f28 and +0x5b8 carry a new parameter of the GPU power controller. Neither the ADT's GPU node nor the firmware data the loader passes carries it. With both words zero the firmware boots, and renders with the same throughput and latency, so they stay zero, as +0x59c does; the 26A428 layout runs without them. hw_data, the roots, the main configs, status B and region C keep their field offsets. Describe a firmware build's layouts as G18GLayouts. The 26A428 encoders stay as they are; for 26B123 the policy and status config they produce are moved by relocation bands. The loader receipt names the build: G18G-RTKit-3514.0.15.release selects 26A428 as before, G18G-RTKit-3514.41.1.release selects 26B123. The 26A428 graph is unchanged. Tested on a J873 (Mac mini M6) booted from a macOS 27.2 stub, with this change on the tree that drives its display: both firmware roles accept the graph, stage 10 registers the render node, sway composites on the GPU and es2gears runs at about 300 FPS without vsync. With the power-controller words zero, a 1M-triangle scene runs at 20.2 fps, a 20k one at 493 fps and a compositor-like clear every 16.7 ms signals after 0.39 ms (p50), the same as with them set, and no GPU job fails. Signed-off-by: Thomas Glanzmann <[email protected]>
2563da1 to
b4f7dde
Compare
|
@RyanTheTide thanks. Head A 27.0.1 (26A428) stub row on this tree will follow once there is one on the M6. Assisted-by: LLM (Claude:Opus 5.5) |
4af8147
into
aurora-silicon:integration/aurora
The J873 (Mac mini M6) G18 backend builds only the 26A428 (macOS 27.0, 27.0.1) InitData graph. A stub on macOS 27.2 (26B123) makes iBoot load the G18G firmware RTKit 3514.41.1, which rejects that graph at its first check. This series adds the 26B123 graph next to the 26A428 one, selected by the loader's receipt.
What 26B123 changes in the InitData the host writes (26B123 against 26A428, by InitData field):
Commits
drm/asahi: mmu: tolerate the 27.2 G18G firmware boot markerdrm/asahi: g18: InitData for the macOS 27.2 (26B123) G18G firmwareG18G-RTKit-3514.0.15.releasekeeps the 26A428 behaviour;G18G-RTKit-3514.41.1.releaseselects 26B123.Testing
The loader verified both loaded TEXT images against the 26B123 images and published the new receipt.
Both firmware roles accepted the graph, and stage 10 registered the render node.
sway composites on the GPU: EGL reports "Apple M6 (G18G B1)", OpenGL ES 3.2.
es2gears runs at ~147 FPS through sway's frame callbacks and ~300 FPS with vblank_mode=0.
No GPU faults or recoveries.
Power-controller words zero vs set, on the same M6 the same evening, each from a fresh boot:
I found nothing the word changes in these loads, so it stays zero rather than being written from a constant.
DRM_ASAHI_G18=yandDRM_ASAHI_M5=y(LLVM 22), with no warnings in the touched code.Loader: aura main's T8152 hand-off still publishes only the 26A428 receipt. aurora-silicon/aura#189 pins the 26B123 TEXT identities and publishes the new receipt (tested on the M6).
cc @DjDeveloperr @RyanTheTide @Acelogic @LiamRay10
Assisted-by: LLM (Claude:Opus 5.5)