Skip to content

accel/ane: h16: admit the 26B123 preload of the 32-core J616C - #3690

Merged
RyanTheTide merged 1 commit into
aurora-silicon:mainfrom
allanclempe:fix/t6041-26b123-32core-ane-h16
Dec 1, 2026
Merged

RyanTheTide merged 1 commit into
aurora-silicon:mainfrom
allanclempe:fix/t6041-26b123-32core-ane-h16

Conversation

@allanclempe

@allanclempe allanclempe commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

What: Admit the 32-core J616C's macOS 27.2 (26B123) ANE preload as its own H16 profile. main has one 26B123 profile, with another J616C's digest, so on a 32-core M4 Max with a 26B123 stub the Neural Engine never starts: "H16 preload has the H16 27.2 26B123 layout but digest 9189fac9…", "H16 preload matches none of 6 firmware profiles, error -8", "H16 stage program refused before RUN, error -8".
Tested: J616C (Mac16,5, 32-core GPU, 26B123 stub) at 1e0e243: preload accepted, firmware starts, program stage completes, /dev/accel/accel0; 0 failed units, 0 new kernel errors; GPU, display and speakers unchanged; SELinux not applicable (Omarchy). KUnit (boot and transport configs) 307/307 on arm64.
Risk: two-way door · T6041 only. The new profile admits only a preload whose bytes match this measurement; the other H16 profiles and the T8132 tables are unchanged.
Not yet: other 32-core J616Cs on 26B123 (not available to me); sleep at the head (this Mac's deep sleep needs #3670 and #3687; with them, sleep with the engine parked wakes, Evidence); sleep while a request holds the engine up.

Details

iBoot leaves a machine-specific ANE preload: on 25G83, the 32-core J616C and the J614C each have their own entry (f94d3a6). On 26B123 this Mac's preload has the existing entry's layout (the 26A428 patchbay cells and zeroed range 0x17c80..0x18320) but its own digest, the same on every boot and on two different kernels. This adds it as its own profile, "H16 27.2 26B123 J616C 32-core", on the 26A428 build, with require_dart_unlocked like the other 26B123 entry.

preload_profiles_test asserted that require_dart_unlocked is set exactly for ane_h16_preload_26b123; it now takes both 26B123 rules. apple-ane.rst names both profiles where it describes the DART protection check, and the other rule's comment says it is one J616C's.

Evidence

Head run: main 42169a04 plus this commit (1e0e243, nothing else), built with Omarchy edge's linux-aurora recipe and config (7.3.0-1-2.4-ARCH), cold boot:

ane_t6021 484000000.ane: H16 preload identity H16 27.2 26B123 J616C 32-core accepted
[drm] Initialized ane 3.1.0 for 484000000.ane on minor 0
ane_t6021 484000000.ane: [drm] H16 accel node ready (ABI 3, programs switch within one firmware boot)
ane_t6021 484000000.ane: H16 stage program complete; held until reboot
ane_t6021 484000000.ane: H16 ANE: idle: parked until the next request
aurora 28a600000.gpu: GPU firmware build: Apple GFX 26B123 for T6041 (normalized loaded image, 32-core J616C)

Kernel errors after 200 s: apple-dcp … AFK[ep:20]: failed to extract init props: -2 and aurora … G17 Primary Statistics ring stopped: EIO, both also on the kernel without this change. 0 failed units, no core dumps, greetd and speakersafetyd active, renderD128 present.

Earlier run (the same ANE driver on another tree, plus sleep):

Kernel: aurora-silicon/linux 37a19f92 plus three T6041 sleep patches (from #3670 and #3687, not ANE) plus this change's first version (671b16e2; the head differs only in a comment and a documentation line), built with Omarchy edge's linux-aurora recipe and config (7.3.0-1-2.3-ARCH). Boot chain: aura v1.0.0b17 Stage 1 and Stage 2.

Before (the same tree without this change, 7.3.0-1-2.2-ARCH):

ane_t6021 484000000.ane: H16 preload has the H16 27.2 26B123 layout but digest 9189fac9bff34a68ab1939e88e244e2584bff8d4ee0facecffbcddb0e3b71182
ane_t6021 484000000.ane: H16 preload matches none of 6 firmware profiles, error -8
ane_t6021 484000000.ane: H16 stage program refused before RUN, error -8

After:

ane_t6021 484000000.ane: H16 preload identity H16 27.2 26B123 J616C 32-core accepted
ane_t6021 484000000.ane: H16 READY 8042006 0
ane_t6021 484000000.ane: H16 CONFIG_GET tick 16e3600 0
[drm] Initialized ane 3.1.0 for 484000000.ane on minor 0
ane_t6021 484000000.ane: [drm] H16 accel node ready (ABI 3, programs switch within one firmware boot)
ane_t6021 484000000.ane: H16 stage program complete; held until reboot
ane_t6021 484000000.ane: H16 ANE: idle: parked until the next request

Regression check against 2.2 on the same Mac: kernel errors at boot, the ANE's two refusals gone and nothing new (the DCP's AFK[ep:20] … init props line and the GPU statistics-ring line are on both). Deep sleep (lid closed, 104 s): suspend and resume complete, the engine stays parked, /dev/accel/accel0 remains; the apple_soc_edac "event-log source 9" lines after the wake appear on 2.2 too. 0 failed units, no core dumps. SELinux not applicable (Omarchy).

KUnit: kunit.py run --arch=arm64 with drivers/accel/ane/boot.kunitconfig and transport.kunitconfig, LLVM 18, under QEMU: 307/307 each, preload_profiles_test included. checkpatch --strict: 0 errors, 0 warnings, 0 checks.

iBoot leaves a machine-specific ANE preload, and the J616C with 32 GPU
cores (MacBook Pro 16", M4 Max, macOS 27.2 26B123 stub) matches none of
the six profiles, so the ANE stays off:

  H16 preload has the H16 27.2 26B123 layout but digest
  9189fac9bff34a68ab1939e88e244e2584bff8d4ee0facecffbcddb0e3b71182
  H16 preload matches none of 6 firmware profiles, error -8
  H16 stage program refused before RUN, error -8

The 26B123 entry carries another J616C's digest. The preload has its
layout, and the digest is the same on every boot. Admit it as its own
profile, as the 25G83 entries do for each machine: the 26A428 patch cells
and zeroed range with this machine's digest, on the 26A428 build, with
the 26B123 DART protection refusal. The KUnit check that ties that
refusal to the 26B123 rule now takes both 26B123 rules, and the
documentation names both profiles.

On this J616C the preload then matches, the H16 firmware starts (READY,
startup acks, CONFIG_GET), the program stage completes and the accel
node is registered: "H16 accel node ready (ABI 3, ...)",
/dev/accel/accel0. KUnit (boot and transport configs) passes on arm64.

Signed-off-by: Allan Clempe <allan.clempe@gmail.com>
@allanclempe
allanclempe marked this pull request as ready for review November 30, 2026 11:40
@allanclempe
allanclempe requested review from a team as code owners November 30, 2026 11:40
@github-actions github-actions Bot added area:media Area from CODEOWNERS (bot) blast:m4 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 30, 2026
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Merge readiness at 1e0e243a: not ready yet

Check Detail
CI at head running running: KUnit isp, KUnit jpeg, KUnit prores, KUnit scaler, KUnit macsmc, KUnit clpc
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok in the PR body at 1e0e243a
Conflicts ok not computed yet
PR text ok Risk: two-way · T6041 only. The new profile admits only a preload whose bytes match this measurement; the other H16 profiles and the T8132 tables are unchanged.

Areas: area:media

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: HOLD at 1e0e243a

Blockers:

  • Hosted pull_request CI workflows (Apple build and KUnit, Host tests, pr-text) are action_required awaiting maintainer workflow approval for this fork PR.

Checked:

  • Profile addition (drivers/accel/ane/ane_h16_boot_data.h): ane_h16_preload_26b123_j616c_32 reuses ane_h16_patchbay_26a428, the same zeroed range (0x17c80..0x18320), ane_h16_build_26a428, and .require_dart_unlocked = true, scoped strictly to the measured SHA-256 digest 9189fac9bff34a68ab1939e88e244e2584bff8d4ee0facecffbcddb0e3b71182. Existing H16 and T8132 tables are untouched.
  • KUnit & docs (drivers/accel/ane/ane_h16_preload_test.c, Documentation/accel/apple-ane.rst): preload_profiles_test() updated cleanly to assert require_dart_unlocked for both 26B123 rules, and the docs match.
  • Exact-head hardware evidence (1e0e243 on J616C 32-core, 26B123 stub): preload identity accepted, H16 firmware reaches READY/CONFIG_GET, /dev/accel/accel0 ready and parks cleanly, 0 failed units, 0 new kernel errors, and arm64 KUnit (boot + transport) passes 307/307 with checkpatch --strict clean.
Evidence
  • Diff scope: +28/-3 across 3 files (Documentation/accel/apple-ane.rst, drivers/accel/ane/ane_h16_boot_data.h, drivers/accel/ane/ane_h16_preload_test.c).
  • Ready condition: No code, test, or hardware blockers; upgradeable to APPROVE as soon as hosted fork CI is approved and passes green.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at 1e0e243ac3af

Converts this App's earlier review at the same head to an approval under the 12-01 merge bar (better than before and doesn't break; block only on a shown failure). No code blocker was found in it. The merge gate (a row on one Mac at this head + fast CI) is tracked by pr-readiness, not held here.

Checked: - Profile addition (drivers/accel/ane/ane_h16_boot_data.h): ane_h16_preload_26b123_j616c_32 reuses ane_h16_patchbay_26a428, the same zeroed range (0x17c80..0x18320), ane_h16_build_26a428, and .require_dart_unlocked = true, scoped strictly to the measured SHA-256 digest 9189fac9bff34a68ab1939e88e244e2584bff8d4ee0facecffbcddb0e3b71182. Existing H16 and T8132 tables are untouched.

  • KUnit & docs (drivers/accel/ane/ane_h16_preload_test.c, Documentation/accel/apple-ane.rst): preload_profiles_test() updated cleanly to assert require_dart_unlocked for both 26B123 rules, and the docs match.
  • Exact-head hardware evidence (1e0e243 on J616C 32-core, 26B123 stub): preload identity accepted, H16 firmware reaches READY/CONFIG_GET, /dev/accel/accel0 ready and parks cleanly, 0 failed units, 0 new kernel errors, and arm64 KUnit (boot + transport) passes 307/307 with checkpatch --strict clean.

Follow-ups (not blocking): fork CI workflow approval

@RyanTheTide

Copy link
Copy Markdown
Contributor

Merging at 1e0e243ac3af (B2 merge train, 12-01 merge bar). Approval at this head: aurora-silicon-review[bot]. Row: the hardware row at 1e0e243 that the readiness check found (PR body or comment). CI: linux train L4 = main (after L3) + 34 approved PRs (#3419 dropped: conflicts): Apple driver compile pass, Apple DTBs W=1 pass, planned KUnit ane-boot/clpc/ane-pm/dcp-fabric/dcp-topology/dcp-display/macaudio/asahi/sep all pass, host tests apple-dcp + apple-scaler-recovery pass (the red host-tests on some heads were base failures since fixed on main). The rest of the hosted run is queued behind the backlog. Revert: git revert -m 1 <merge commit>.

@RyanTheTide
RyanTheTide merged commit 167af07 into aurora-silicon:main Dec 1, 2026
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:media Area from CODEOWNERS (bot) blast:m4 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants