Skip to content

accel/ane: h16: start the firmware once the PMP runs - #1502

Merged
RyanTheTide merged 1 commit into
integration/aurorafrom
ane/h16-start-after-pmp
Nov 11, 2026
Merged

RyanTheTide merged 1 commit into
integration/aurorafrom
ane/h16-start-after-pmp

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

On the J616s (T6041), Linux starts the PMP itself, about a second before the ANE probes, and the PMP firmware takes about another second to come up. If the H16 CPU is released during that window, it is stopped part way through its startup on about one boot in six. The ASC wrapper control word reads 0 (RUN cleared) and the status reads 0x30006a. No CPU exception, debug halt request or LSU/FED/L2C error is latched. #1412 catches the stop and restarts the engine, but the first start fails.

This change:

  • adds apple_pmp_report_wait_running(), which waits until the PMP behind a report region runs (bounded; returns -ENODEV for an unavailable report and -EPROBE_DEFER while the report is unbound);
  • makes H16 bring-up wait for it before the first CPU release. The wait runs in the start work, outside every lock, with a 10 s bound; on a timeout it warns and starts anyway. accel/ane: h16: restart a stopped startup at once #1412 stays as the fallback;
  • names the SoC's report in the T6041 platform data.

Results, J616s, 7.3.0-aurora-fleet55 base, one-shot cold boots with a dead-man:

  • As is: 3 of 12 boots stopped. The fleet51..fleet55 journal has 12 of 121.
  • First release delayed past the PMP start: 0 of 22.
  • This wait (module build with the same running check through the report's existing exported read): 0 of 22.
  • This change as a kernel (7.3.0-aurora-anestart1 = fleet55 + this commit, installed beside the default): 0 of 22, no startup restart, no PMP timeout warning; ANE READY at about 4.0 s.
  • MobileNet top-1 16/16 on all 66 boots, p50 0.23-0.28 ms.
  • Firmware bring-up 13-33 ms after probe, against 30-190 ms before.
  • Three s2idle cycles: resume ok, cold, firmware ready in 13-15 ms. Enforcing, 0 failed units.

KUnit (x86_64, KASAN + UBSAN, ANE boot and transport kunitconfigs): 227/227 pass. arm64 build: full fleet config, W=1 clean in the touched files. checkpatch --strict: 0/0/0.

🤖 Generated with Claude Code

On the J616s (T6041) Linux starts the PMP itself, about a second before
the ANE probes, and its firmware takes about another second to come up.
A H16 CPU released during that window is stopped part way through its
startup on about one boot in six: the ASC wrapper control word reads 0
(RUN cleared), status 0x30006a, with no CPU exception, no debug halt
request and no LSU/FED/L2C error latched. The startup stop detection then
restarts the engine, but the first start fails.

Add apple_pmp_report_wait_running(), which waits until the PMP behind a
report region runs, and make H16 bring-up wait for it, outside every
lock, before it first releases the CPU. The T6041 platform data names its
report. A PMP that does not come up within 10 s is reported and the
firmware is started anyway; the stop detection stays as the fallback.

J616s, 7.3.0-aurora-fleet55 base, one-shot cold boots: the firmware
stopped on 3 of 12 boots as is (12 of 121 in the fleet51..55 journal),
on 0 of 22 when its release was simply delayed past the PMP start, and on
0 of 22 with this wait (the same check through the report's running
status). MobileNet top-1 16/16 on every boot; three s2idle cycles resume
cold in 13-15 ms as before.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
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