Repository navigation
accel/ane: h16: admit the 26B123 preload of the 32-core J616C - #3690
Conversation
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>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
There was a problem hiding this comment.
Verdict: HOLD at 1e0e243a
Blockers:
- Hosted
pull_requestCI workflows (Apple build and KUnit,Host tests,pr-text) areaction_requiredawaiting maintainer workflow approval for this fork PR.
Checked:
- Profile addition (
drivers/accel/ane/ane_h16_boot_data.h):ane_h16_preload_26b123_j616c_32reusesane_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 digest9189fac9bff34a68ab1939e88e244e2584bff8d4ee0facecffbcddb0e3b71182. 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 assertrequire_dart_unlockedfor both26B123rules, and the docs match. - Exact-head hardware evidence (
1e0e243on J616C 32-core,26B123stub): preload identity accepted, H16 firmware reachesREADY/CONFIG_GET,/dev/accel/accel0ready and parks cleanly, 0 failed units, 0 new kernel errors, and arm64 KUnit (boot+transport) passes307/307withcheckpatch --strictclean.
Evidence
- Diff scope:
+28/-3across 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
APPROVEas soon as hosted fork CI is approved and passes green.
There was a problem hiding this comment.
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 assertrequire_dart_unlockedfor both26B123rules, and the docs match. - Exact-head hardware evidence (
1e0e243on J616C 32-core,26B123stub): preload identity accepted, H16 firmware reachesREADY/CONFIG_GET,/dev/accel/accel0ready and parks cleanly, 0 failed units, 0 new kernel errors, and arm64 KUnit (boot+transport) passes307/307withcheckpatch --strictclean.
Follow-ups (not blocking): fork CI workflow approval
|
Merging at |
What: Admit the 32-core J616C's macOS 27.2 (26B123) ANE preload as its own H16 profile.
mainhas 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, withrequire_dart_unlockedlike the other 26B123 entry.preload_profiles_testasserted thatrequire_dart_unlockedis set exactly forane_h16_preload_26b123; it now takes both 26B123 rules.apple-ane.rstnames both profiles where it describes the DART protection check, and the other rule's comment says it is one J616C's.Evidence
Head run:
main42169a04plus this commit (1e0e243, nothing else), built with Omarchy edge'slinux-aurorarecipe and config (7.3.0-1-2.4-ARCH), cold boot:Kernel errors after 200 s:
apple-dcp … AFK[ep:20]: failed to extract init props: -2andaurora … G17 Primary Statistics ring stopped: EIO, both also on the kernel without this change. 0 failed units, no core dumps, greetd and speakersafetyd active,renderD128present.Earlier run (the same ANE driver on another tree, plus sleep):
Kernel: aurora-silicon/linux
37a19f92plus 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'slinux-aurorarecipe and config (7.3.0-1-2.3-ARCH). Boot chain: aurav1.0.0b17Stage 1 and Stage 2.Before (the same tree without this change,
7.3.0-1-2.2-ARCH):After:
Regression check against
2.2on the same Mac: kernel errors at boot, the ANE's two refusals gone and nothing new (the DCP'sAFK[ep:20] … init propsline 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/accel0remains; theapple_soc_edac"event-log source 9" lines after the wake appear on2.2too. 0 failed units, no core dumps. SELinux not applicable (Omarchy).KUnit:
kunit.py run --arch=arm64withdrivers/accel/ane/boot.kunitconfigandtransport.kunitconfig, LLVM 18, under QEMU: 307/307 each,preload_profiles_testincluded.checkpatch --strict: 0 errors, 0 warnings, 0 checks.