Repository navigation
accel/ane: T8132: admit the macOS 27.2 firmware build (Mac mini J773g) - #2642
DjDeveloperr wants to merge 1 commit into
Conversation
The macOS 27.2 (26B123) iBoot preloads a new M4 Neural Engine image (h16_ane_fw_leto_j7x, LC_UUID fd35429f-6556-353e-b863-a26a02a71cdf, the ADT ane uuid): TEXT 0xbc000 and DATA 0x2b0000, DATA at 0x100_000b_c000 (26.6.2: 0xc0000 and 0x2ac000 at 0x100_000c_0000). Both end at the same IOVA, as on the M5's 27.2 build. The T8132 platform pins the 26.6.2 layout, so on a Mac mini (J773g) booted from 27.2 the module init refused the hand-off aura made from the ADT segment-ranges: "H16 requires bootloader-reserved no-map TEXT/DATA preload ranges". macOS 27.2.1 (26B131) ships the same image. Give T8132 a 27.2 build (next_build, as T6050 and T8142 have), selected by the handed-over layout. Preflight, which the module init also runs, and the H16 probe now take the build the loader preloaded. H16 preload rules get their own TEXT and DATA sizes; 0 keeps the 26.x/27.0 ones, so existing rules are unchanged. The 27.2 profile keeps the 25G83 boot values: the firmware span still ends at TEXT + 0x36c000, and the host pool, IPC, heap and shared windows lie past it, as on T6041, whose 27.2 build boots with its 27.0 values. Its DATA has the 25G83 patchbay records and the rewritten _rtk_tunables range 0x4480 earlier. As preloaded on a J773g it differs from the IPSW image only in the CE script (__TEXT,ce_env), which stays in the identity as on T6041 27.2; in fixed patchbay values (_COS 0x8132, RCOS 0x11, dApC, dArW, GLFp); in GKTS, ECAP and ARcM, which normalize as before; and in _rtk_tunables, which is zeroed. The digest is that normalized preload, read on one boot; it matched on the next two boots. Like T6041 27.2, the profile refuses DARTs with TTBR/TCR protection set. Tested on a Mac mini (J773g), macOS 27.2 (26B123) firmware, kernel 7.3.0-m4drv8 with these modules: "H16 preload identity H16 T8132 27.2 26B123 accepted", the DARTs unprotected, READY, startup acks 4/0/3/0x22, the ABI 3 accel node, and the pinned add-128 HWX (h16-run.py) run 20 times on each of two boots, 16384 of 16384 fp16 values exact every run. The ANE KUnit suites were compiled, not run. Signed-off-by: Diljit Singh <hey@djdev.me> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This overlaps with #2630, which admits the same T8132 27.2 build in the same six files. The two agree on the values that matter: TEXT 0xbc000 / DATA 0x2b0000, the same digest bytes, and the same patchbay offsets. Two independent readings matching is good evidence, but only one of them should land. #2642 additionally carries per-rule TEXT/DATA sizes in the preload rules and the protected-DART refusal. #2630 is already in a J713 (M4 Air, 27.2) lab kernel, so a J713 ANE run will cover the shared values whichever PR is kept. Code-wise: picking Assisted-by: LLM (Claude:Opus 5.5) |
Problem
On a Mac mini M4 (J773g) booted from the macOS 27.2 (26B123) firmware, the Neural Engine never starts:
aura hands the preload over correctly (no-map reserved-memory,
apple,firmware-iovasfrom the ADTsegment-ranges). But 27.2 ships a new M4 image with a different layout, and the T8132 platform pins the 26.6.2 one:The image is
h16_ane_fw_leto_j7x, LC_UUIDfd35429f-6556-353e-b863-a26a02a71cdf(= the ADTaneuuid). 27.2.1 (26B131) ships it byte-identical. Both layouts end at the same IOVA, as on the M5's 27.2 build (#1899).Change
next_build, as T6050 and T8142 have), selected from the layout the loader handed over. Preflight (which the module init also runs) and the H16 probe now take the build that was preloaded.H16 T8132 27.2 26B123:_rtk_tunablesrange sit 0x4480 earlier in DATA;__TEXT,ce_env, which stays in the identity, as on T6041 27.2;_COS= 0x8132,RCOS,dApC,dArW,GLFp);_rtk_tunables, which is zeroed.Testing
Mac mini J773g, macOS 27.2 (26B123) firmware, kernel 7.3.0 (m4drv8), with this driver built as modules for it:
H16 preload identity H16 T8132 27.2 26B123 accepted, DART protect bit clear, READY, startup acks 4/0/3/0x22, ABI 3 accel node.tools/testing/selftests/drivers/ane/h16-run.py --runs 20): 20/20 runs exact (16384/16384 fp16 values) on each of two boots.Not covered: system sleep with the 27.2 image (it uses the same cold sleep path as 26.6.2), and other M4 boards on 27.2 (they should take the same image).
🤖 Generated with Claude Code