Skip to content

drm/asahi: J714s G17S voltage profile and fuse-mask guard - #1

Closed
TripleU613 wants to merge 1 commit into
rolotrealanis98:pr/m5-gpu-27.2from
TripleU613:codex/j714s-gpu-profile
Closed

TripleU613 wants to merge 1 commit into
rolotrealanis98:pr/m5-gpu-27.2from
TripleU613:codex/j714s-gpu-profile

Conversation

@TripleU613

Copy link
Copy Markdown

J714s and J716s report the same G17S GPU ID, so the current probe selects J716s voltage tables on both. This draft selects a separate J714s board profile from the root compatible and rejects unexpected GPU geometry or invalid fuse masks before firmware initialization.

The three-file change adds the main and auxiliary voltage tables captured as ADT metadata on one J714s running macOS 27.3 beta 1 (26C5035r). Other board fields retain the existing J716s assumptions. The existing firmware identity checks are unchanged; this patch adds no firmware layout or identity entries.

This is stacked directly on pr/m5-gpu-27.2 at 34f2f5bb4d03bbe3acce237cb67af8dc9972aa4a, the head of aurora-silicon/linux#1173. It supplies the J714s tables explicitly listed there as missing, without copying that series or the separate platform/boot patches.

Validation:

  • Compiled the complete production InitData module with rustc; checked all 28 main voltage/SRAM pairs and 14 auxiliary states against the captured metadata.
  • Compiled the actual production mask predicate outside the kernel: observed masks 0x3db,0x3db (16 enabled cores), maximum 20-slot masks, and zero/high-bit/short-mask negative cases pass.
  • Existing tools/asahi/g17-firmware-selection-tests.py passes. The telemetry suite's 18 Rust tests pass; its later legacy C comparison was not completed because its historical baseline was absent from the partial clone. scripts/checkpatch.pl --strict --no-signoff reports zero errors, warnings or checks.
  • Equivalent functional fragments were built and exercised in a larger J714s integration with firmware 27.3, 15 online CPUs, 16 enabled GPU cores, four hardware-rendering tests and an accelerated Hyprland desktop. Public results. The isolated three-file change has not been full-kernel-built or booted on this clean base.

Review limitations: these voltage bins come from one unit, but selection currently covers every apple,j714s. This does not validate other J714s units or SKUs, and the patch does not compare runtime ADT voltage bins. The two clusters have ten physical slots each; enabled cores come from the masks, rather than an assumed 20 enabled cores. Please review whether per-unit provisioning or another admission mechanism is required before enabling this model-wide. No new CPU, clock/governor, firmware, DT, mailbox or SMC changes are included.

Prepared with Codex assistance, including extraction of the owned metadata tables, source adaptation, host checks and this description. The changed GPL-2.0 source retains its existing license headers; no firmware, raw ADT dump or private runtime logs are included. This remains a draft pending human review and a human DCO sign-off; no human sign-off has been generated.

J714s and J716s share the G17S GPU ID but have different voltage bins.
Select a J714s board profile using the root compatible, retaining the
existing J716s assumptions for fields not measured on this J714s.
Reject unexpected geometry, out-of-range masks and an empty enabled-core
set before firmware initialization.

The main and auxiliary voltage tables come from ADT metadata on one
J714s running macOS 27.3 beta 1 (26C5035r). Selection covers the model,
not a measured per-unit bin match; other units and SKUs remain unverified.
This is a review candidate rather than a universal voltage-table claim.

The complete InitData module and extracted production mask predicate
pass host checks. Equivalent functional fragments ran in a larger
integration with 16 enabled GPU cores and hardware rendering; the
isolated patch has not been full-kernel-built or booted on this base.
Existing firmware identity checks remain unchanged.

Link: aurora-silicon#1173
Assisted-by: LLM
TripleU613 added a commit to betizzel/omarchy-m5 that referenced this pull request Nov 9, 2026
Capture the full commit series of omacom/linux-aurora#414, omacom/m1n1#39
and #40, rolotrealanis98/linux#1, rolotrealanis98/m5pro-linux#1 and #2,
and the unsubmitted m5pro-linux n1-loader-admission branch as git-am
mboxes, with an index. The PRs and their forks are being closed so this
repo is the single home for the work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H3rUWr3saGxDib7Zd5Ksyw
@TripleU613

Copy link
Copy Markdown
Author

Closing: consolidating all my M5/J714s work into one place, https://github.com/betizzel/omarchy-m5 (this series is preserved as a git-am mbox in patches/upstream-prs/). Thanks for the reviews.

@TripleU613 TripleU613 closed this Nov 9, 2026
rolotrealanis98 pushed a commit that referenced this pull request Nov 24, 2026
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 <thomas@glanzmann.de>
rolotrealanis98 pushed a commit that referenced this pull request Nov 26, 2026
make pacman-pkg rebuilds and relinks the kernel (the build number goes
from #1 to aurora-silicon#2), so the standalone Image.gz and modules tarball were not
the binaries in the Arch package, and the QEMU smoke run booted the
former. When the Arch packages build, take Image.gz (decoded from the
package's EFI zboot vmlinuz), the modules tree (with depmod run against
the package's System.map), the DTBs, the config and System.map from
the runtime and headers packages, so every asset and the smoke run use
the binaries that ship. Without makepkg the previous direct path stays.

Checked against the Arch packages of run 45429366862: the staged Image
equals the zstd payload of the package's vmlinuz byte for byte; 5915
modules with modules.dep; 1629 DTBs.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
rolotrealanis98 pushed a commit that referenced this pull request Nov 30, 2026
Behind a non-posted BAR (USB4/Thunderbolt PCIe tunnels on Apple
Silicon) a VRAM buffer object is mapped Device-nGnRnE, and plain
memset(), memcpy() and compiler-merged struct stores through its kernel
pointer take an alignment fault. amdgpu_bo_memset(),
amdgpu_bo_memcpy_to() and amdgpu_bo_memcpy_from() cover this for the
GFX v11/v12, SDMA v7, MES, PSP and display paths, but not for CIK:

  Internal error: Oops: 0000000096000061 [#1] SMP
  pc : __pi_memset_generic+0x16c/0x188
  lr : gfx_v7_0_mec_init+0x90/0x120 [amdgpu]

and, with that fixed,

  pc : amdgpu_uvd_ring_test_ib+0x48/0x244 [amdgpu]

Use the helpers for the GFX v7 HPD EOP clear, the MQD clear, backup and
restore, the UVD create and destroy messages, and the reset-magic copy
and check that read the GART table. On hosts without non-posted BARs
the helpers are the plain functions, so nothing changes there.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
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.

1 participant