Repository navigation
accel/ane: H16 26.5.2 firmware profile and transport fixes - #950
Merged
RyanTheTide merged 5 commits intoNov 5, 2026
Merged
Conversation
macOS 26.5.2 leaves a different resident image in the Neural Engine's preload on the M4 Max. Its DATA framing, patchbay cells and cleared range match 25G83 and its boot values match the shared build, so only the image digest is new. Without a profile the driver refuses the image. Assisted-by: LLM Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
The firmware logs text through channel 0, a unidirectional type 2 ring. macOS's interrupt handler drains it and H14 serves it during boot, but the H16 transport never does. On the M4 Max a first command stalled with a message waiting at the ring's head; with the ring served, startup passes after about fifty messages. Drain the ring whenever the transport waits. The text is discarded, and a channel of another type is left alone. Assisted-by: LLM Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
ane_h16_faults() runs on every poll, now including the 2 us busy steps, and each call reads the two address registers of all three DARTs before it knows whether they will be logged. Read them only when they are. Assisted-by: LLM Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
Every backing page comes from alloc_pages(__GFP_ZERO), so the memset after vmap() clears them a second time through the new alias. Assisted-by: LLM Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
Mapping every 16 KiB block separately syncs the DART once per block. A single iommu_map_sgtable() does it once, with the same pages, protection and DVAs. Assisted-by: LLM Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
astaff
force-pushed
the
accel/ane-h16-26.5.2
branch
from
November 5, 2026 03:35
d16c093 to
18d90e4
Compare
RyanTheTide
approved these changes
Nov 5, 2026
RyanTheTide
left a comment
Contributor
There was a problem hiding this comment.
Thanks, the split makes this easy to take, and the m->mapped answer is what I hoped. Fair enough on the benchmark, dropping the number from the commit is the right call.
KUnit ANE boot and transport are 205/205 here (base 201/201). W=1 adds nothing in accel/ane. On our M4 Pro (J616s), the one-shot boot of the merge train came up with "H16 READY" and the accel node ready, no startup stall that boot, and nothing new in the kernel log next to fleet16. Merging!
One thing for later: the 25F84 digest covers a TEXT region iBoot fills, so a second M4 Max on 26.5.2 would be a good check that it really is stable across machines.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Split from #920: none of this is specific to T6041. The driver refuses the resident image macOS 26.5.2 leaves in the preload, and the H16 transport never serves the firmware's text log.
What
iommu_map_sgtable()call.Based directly on
integration/aurora.Testing
Kernel is the same merge as #525's proof, with a local boot loader that fills and enables the ANE nodes.
conv3x3output equals the macOS reference over 200 runs, with 0 faults.The digest also covers a TEXT region iBoot fills in. It has been stable across boots of one machine and hasn't been checked on another.
Review questions from #920
m->mappedalways equalssizeon success:iommu_map_sgtable()maps the whole table or unmaps and fails, and a failure returns beforem->mappedis set. The unmap path unmapsm->mappedbytes fromm->dvaas one range, so it doesn't rely on per-block granularity.🤖 Generated with Claude Code