Skip to content

accel/ane: run the M5 Pro (T6050) Neural Engine on the H17 backend - #1595

Merged
DjDeveloperr merged 3 commits into
integration/aurorafrom
ane/t6050-h17
Nov 11, 2026
Merged

DjDeveloperr merged 3 commits into
integration/aurorafrom
ane/t6050-h17

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

The M5 Pro (T6050, J714s) Neural Engine on the existing H17 staged backend, the A18 Pro (T8140) path.

What the T6050 ANE is

This comes from the J714s ADT and from macOS's own bring-up of the engine, traced on this machine under the HV.

  • ADT ane0 is ane,t8132exclave, the same as T8140, with ane-type 0x220. It is exclave-assigned and iBoot preloads its firmware (TEXT 0xc0000 and DATA 0x2ac000 bytes at T8140's IOVAs). The boot handshake, CE step, doorbell, IRQ status and ack, DAPF record layout and IPC table are T8140's. The open compiler's H17 target covers M5 (HWX subtype 9).
  • These differ from T8140:
    • PMGR words: ANE_SYS is pmgr1 +0x3a8 (parents FAB8_SOC and FAB9_SOC). Behind it are ANE_CPU (+0x3c8) and the sub-block ANE_TDBASE (+0x3d0). macOS switches those in T8140's order around the power gate, which is ADT reg[2] +0x1590.
    • Scratch cells: they start at engine +0x1880028.
    • DARTs: revision 0x204 (PARAMS3 0x2a2a0204), 16 SIDs. The ADT's static bypass streams are 10 and 13.
    • DAPF: five records (dart-ane0 dapf-instance-0); the first two share one PMGR page.
  • ADT reg[3..6] are not described. That includes reg[4], a CPU cluster's CPM/ACC pages.

Changes

  1. dt-bindings: apple,t6050-ane on the T8140 model, with five DAPF ranges.
  2. accel/ane:
    • The staged backend's T8140 constants become per-SoC data: PMGR words, DART compatible and revision, DAPF count, TEXT pin.
    • Adds ane_t6050_platform with the J714s 27.0 TEXT pin.
    • Maps each DAPF page once.
    • Logs the preloaded TEXT digest when it isn't the pinned one, so the next firmware update can be pinned from one boot.
  3. arm64: dts: apple: t6050:
    • ANE_SYS, the ANE node and its DARTs, all from the ADT. ps_ane_cpu moves under ANE_SYS and stays disabled, since the driver switches the child words.
    • The DARTs are normal T6050 DARTs, as T6041's ANE DARTs are, with the ADT bypass streams. The builtin DART driver isn't touched.
    • t6050-j714s-ane.dtsi adds the preload placeholders and enables the ANE on J714s.

The engine only starts after the loader hands off the T6050 preload, in aurora-silicon/aura#168 (node lookup by compatible: on T6050, /soc resolves to /soc@200000000) and aurora-silicon/aura#169 (apple,t6050-ane in the hand-off). Without that hand-off, the driver leaves the engine off, as on T8140.

Validation (M5 Pro J714s, 11-11)

  • Measurement boot: at the hand-off the cold state was ANE_SYS 0x300, CPU 0xf000300, TDBASE 0x300, PWGATE 3/0. The engine read control 0, status 0x6a, RVBAR 0x10000000001, CE 0/0, scratch all zero, and the DARTs were at revision 0x204, unlocked and unfaulted. These are T8140's reset values. The 27.0 TEXT digest was measured on this boot.
  • Final run: the default 7.3.0-m5-intg2 kernel (same integration base) with this PR's J714s DTB and ANE modules, chain-loaded with a Stage 2 of aura main + drm/asahi: Export AGX firmware stats to /sys/class/drm/card*/device/agx_stats #168 + drm/apple: audio: open the DCP PCM without a sink, and release data_lock on a DMA error #169:
    • The loader hand-off was verified. Power-up, map and DAPF checks passed, the firmware reached READY, startup commands 4, 0, 3 and 0x22 were acked, and the ABI 3 node registered.
    • An H17 add-128 program (mil-hwx-compiler --target H17, run with tools/testing/selftests/drivers/ane/ane-run.py) gave 128/128 exact outputs (0 ulp) on runs 0 and 19 of 20; host latency p50 344 us.
    • No DART fault, oops or warning.
    • The same result came from an earlier lab boot (20/20).
  • Every T6050 board DT builds. checkpatch is clean apart from the author/sign-off name convention.

Not validated: system sleep with the ANE running. The cold cycle is T8140's, at T6050's offsets.

🤖 Generated with Claude Code

The M5 Pro's ANE (J714s ADT ane0, "ane,t8132exclave", ane-type 0x220) is
the A18 Pro's engine: an exclave-assigned H17 engine with two interrupts,
one system power domain, a power gate and iBoot's preloaded firmware.
Describe it that way, with the five DAPF ranges of its dart-ane0 (T8140
has four, T6041 four).

Signed-off-by: Diljit Singh <[email protected]>
The M5 Pro's ANE is the A18 Pro's H17 engine (ADT "ane,t8132exclave",
ane-type 0x220): exclave-assigned, its firmware preloaded by iBoot at the
same IOVAs, with the same boot handshake, CE step, doorbells and IPC
table. Its ADT and macOS's own bring-up of it on this machine differ
from T8140 in:
- the PMGR words: ANE_SYS at +0x3a8, then ANE_CPU (+0x3c8) and the
  sub-block ANE_TDBASE (+0x3d0), switched in T8140's order around the
  power gate;
- the scratch cells, from engine +0x1880028;
- the DARTs: normal T6050 DARTs, as on T6041, at revision 0x204;
- five DAPF records, of which the first two share one PMGR page.

Make those per-SoC data of the staged backend (PMGR words, DART compatible
and revision, DAPF count, TEXT pin), add ane_t6050_platform and the
apple,t6050-ane match, map each DAPF page once, and log the preloaded
TEXT digest when it is not the pinned one. The pin is the 27.0 TEXT
measured on the J714s; the engine's cold state there matches T8140's
reset values.

Signed-off-by: Diljit Singh <[email protected]>
… it on J714s

From the J714s ADT and macOS's own bring-up of the engine on this machine:
- ANE_SYS is pmgr1 +0x3a8 (parents FAB8_SOC and FAB9_SOC). Its children
  ANE_CPU (+0x3c8) and ANE_TDBASE (+0x3d0) are switched by the ANE driver,
  so ps_ane_cpu, now under ANE_SYS, stays disabled.
- The ANE: the engine, its PMGR window and the power gate at ADT reg[2]
  +0x1590; ADT reg[3..6] (a CPU cluster's pages among them) are not the
  ANE's. The five DAPF ranges of dart-ane0 dapf-instance-0, the firmware
  IOVAs, and on J714s the preload placeholders the boot loader fills.
- Its three DARTs are in ANE_SYS, with the ADT's 0x100 to 0x400 0000 0000
  VM range and its static bypass streams 10 and 13.
J714s enables them; without the loader's hand-off the driver leaves the
engine off.

Signed-off-by: Diljit Singh <[email protected]>
@DjDeveloperr
DjDeveloperr merged commit b96b0fc into integration/aurora Nov 11, 2026
2 checks passed
DjDeveloperr added a commit that referenced this pull request Nov 12, 2026
Five conflicts:
- accel/ane: h17: this series' power-down (each word off whole in
  macOS's order, the PWGATE ack, the stuck-word deep path), its genpd
  notifier and cold-state logs, on #1595's per-SoC PMGR words and SoC-
  aware cold-state checks. A new platform flag, macos_sleep, set on
  T8140 only, keeps this series' sleep model there: the macOS-order
  power-down, the firmware started at the first request and parked
  after a wake, and the start-up host flags. T6050 keeps #1595's staged
  boot-time start and power-down unchanged; the DART deactivation and
  clean stop were already T8140-only.
- iommu/apple-dart: this series' system and noirq sleep callbacks, with
  integration's live J613 MTP handling first in them: s2idle retains it,
  any other sleep is refused.
- media: apple: isp: a latched IPC error refuses every command, on IO
  and DEBUG, and the stop sends nothing over a failed session before the
  T8140 cold stop; a stop the firmware didn't answer latches -ESHUTDOWN.
- soc: apple: rtkit-helper: a firmware-driven suspend idles the AP side
  as before, and integration's J613 s2idle retention follows unchanged.
  The two resume callbacks are one: the AP-on notice (a no-op without
  an idle notice), then the J613 check.

Signed-off-by: Diljit Singh <[email protected]>
@RyanTheTide
RyanTheTide deleted the ane/t6050-h17 branch November 16, 2026 05:01
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