Skip to content

media: apple: ave: build 6070 Start and Process images - #1300

Closed
RyanTheTide wants to merge 4 commits into
integration/aurorafrom
ave-m1m2/6070-writers
Closed

RyanTheTide wants to merge 4 commits into
integration/aurorafrom
ave-m1m2/6070-writers

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • model 6070.11.1 split arrays, fixed address banks, rational frame rate, one-word initial QP, and retained Process state partitions
  • build H.264 and HEVC Main 8-bit CQ Start/Process images with four interleaved entropy sets, per-slot MB statistics/slice headers, and 16 KiB IOVA checks
  • restrict 6070 to one quality-first CQ session and keep both CRCs hardware gated with encode_ready=false
  • use Complete for normal drain and Flush only for aborted streams before Stop/Close/Halt

The tests use synthetic addresses and field values derived from the clean rev-2/P1 ledgers. No Apple command images are included.

Verification

  • full apple-ave arm64 QEMU KUnit: 25/25 passed (existing 22 plus 3 new 6070 cases)
  • apple-ave-abi: 14/14 passed, including existing 9003 byte equality
  • W=1 arm64 AVE directory build clean
  • 9003 host matrix: 288 sessions / 1,440 commands / 43,808,832 bytes identical to da80db9
  • sanitizer-backed ABI and recovery host suites passed
  • checkpatch.pl --strict: 0 errors, warnings, or checks

Hardware gate

This PR deliberately leaves ave_layout_6070_11_1.encode_ready=false. The AVE-M1M2 lane must prove firmware hello before enabling streaming, then qualify live H.264 and HEVC bitstreams plus drain/error recovery.

Three things kept the M2 encoder firmware from starting:

- The loader writes the DATA address into one TEXT cell (+0x423c on
  T8112) that is zero in the firmware image, so the live TEXT CRC never
  matched the image CRC and probe refused the build. Hash TEXT with
  that cell as the image has it, and refuse any other value in it.
- VCBAR reads back decoded (the code base with bit 0 set), so the
  read == written check always failed with -EIO before RUN. macOS writes
  it once and treats the first hello as the confirmation; do the same.
- Clear the SVE idle word in the mailbox before RUN, and restore DATA
  from the boot snapshot before the first start as well.

With these the T8112 probes ("6070.11.1 (lifecycle only): TEXT
25bfd039") and reaches RUN; the firmware does not say hello yet, so
the encoder stays disabled in the device tree.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
The M2 ADT gives the encoder the same two auxiliary banks as the
M1 Pro: a PMGR page that the host maps for the 6070 firmware and hands
over at Config, and the PIO window. The driver refuses to start the
firmware without the first one. Describe both like t6000-peripherals
does and let the binding accept them on T8112. The node stays disabled.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
The M1 Pro loader fills TEXT +0x423c with the DATA address too: the live
TEXT CRC is e689935f, and with that cell as zero it is 460c7a7c, the
H13S image CRC. Normalise it on T6000 as on T8112.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide RyanTheTide added the hardware-gated Requires approved hardware validation before merge label Nov 9, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Superseded by #1387 (f973697) and #1440 (d57390b), which carry the 6070 Start/Process images and H.264 encode.

@RyanTheTide
RyanTheTide deleted the ave-m1m2/6070-writers branch November 27, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hardware-gated Requires approved hardware validation before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant