Repository navigation
accel/ane: add shared H16/H17 firmware transport - #706
Conversation
Validate the dynamic channel table before arming host rings, publish pool-backed commands, check replies and consume owned reports. Provide bounded SHAREDMALLOC allocations and match-data IRQ helpers with absolute command deadlines and retained failure state. Exercise malformed descriptors, ring ordering, reply corruption, report ownership, allocation ceilings and deadline expiry using synthetic KUnit accessors. Keep probe and hardware ownership unchanged. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Record the wrapped replacement description for commit 0a3bdfc. Keep the published history intact. Validate the dynamic channel table before arming host rings, publish pool-backed commands, check replies and consume owned reports. Provide bounded SHAREDMALLOC allocations and match-data IRQ helpers with absolute command deadlines and retained failure state. Exercise malformed descriptors, ring ordering, reply corruption, report ownership, allocation ceilings and deadline expiry using synthetic KUnit accessors. Keep probe and hardware ownership unchanged. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
|
Verification completed on 2026-10-31.
All 27 new transport cases are included in the 49 cases per architecture. The source tree at 8f9cd9c is identical to 0a3bdfc. The new empty fixup commit records a wrapped replacement description; the published commit history was preserved. All six QEMU runs used LLVM with CONFIG_KASAN=y, CONFIG_KASAN_GENERIC=y, CONFIG_KASAN_INLINE=y, CONFIG_UBSAN=y and CONFIG_UBSAN_BOUNDS=y. Saved final configurations confirm the options were enabled; raw kernel logs contain no KASAN/UBSAN reports or failed tests. Tool versions: Clang 22.1.6, QEMU 11.0.1. The driver builds enabled ARCH_APPLE, APPLE_MAILBOX, APPLE_RTKIT, APPLE_DART, DRM_ACCEL_ANE and both ANE KUnit options as built-ins. Each log below is from a fresh driver compilation after make clean: make O="$OUT" ARCH=arm64 LLVM=1 W=1 -j8 drivers/accel/ane/Complete clean arm64 LLVM W=1 driver build log (exit 0) |
H16 and H17 need the same validated firmware channel transport before their boot and execution backends can submit commands. Add device-independent helpers for channel-table validation, host ring arming, pool-backed IO and DATA_CHAIN publication, exact reply checking, owned IO_T2H report consumption, bounded SHAREDMALLOC allocations and match-data IRQ pending/acknowledge access.
The helpers use caller-supplied memory, DMA barrier, MMIO, allocation and monotonic clock accessors. Absolute deadlines survive provider servicing. Firmware errors retain transactions and mappings, and FREE/control forms remain logged refusals while their reply format is unspecified. Probe and ownership handling do not change.
Add 27 synthetic KUnit transport cases covering malformed and overlapping tables, write/barrier ordering, ring wrap, every reply predicate, stale report UUIDs, allocation ceilings and bad allocator results, IRQ masks and deadline expiry during allocation service. Command storage uses a bounded monotonic pool arena and is not recycled before reset.
A native compatibility harness passes all 27 new transport cases and all 10 existing protocol cases under ASAN/UBSAN. Full Linux KUnit on x86_64 and arm64 with KASAN/UBSAN, plus arm64 LLVM W=1 compilation of drivers/accel/ane, remain pending build capacity. Native runs are supplementary and do not establish kernel validation. Both new C files pass strict checkpatch with zero errors, warnings or checks. The complete diff passes strict checkpatch with the generic new-file MAINTAINERS advisory excluded; the directory is already covered by MAINTAINERS.
No hardware testing or inference claim is made. Keep this PR draft until the build results and backend integration have been reviewed.