Repository navigation
kboot: hand off the AVE firmware on the M4 Pro too - #25
Merged
Merged
Conversation
dt_set_ave() only ran on the T8140 and looked the encoder up by its A18 Pro path. The T6040 DT already describes the encoder (apple,t6041-ave at /video-codec@283100000, disabled), and iBoot preloads its firmware the same way: the ADT node /arm-io/ave0 is pre-loaded with __TEXT and __DATA segments remapped at 0x100_0000_0000, like /arm-io/ave on the A18 Pro. Find the DT node by its compatible instead of a chip check and a fixed path, and take the ADT node from /arm-io/ave or /arm-io/ave0. The checks, the reservation and the CRC export are unchanged, and the node is only ever disabled here, never enabled, so the T6040 encoder stays off until the kernel driver supports it. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The T6000 and T8112 DTs describe the encoder (apple,t6000-ave and apple,t8112-ave, disabled), and iBoot preloads its firmware the same way as on the A18 Pro and M4 Pro: /arm-io/ave0 on the M1 Pro, /arm-io/ave on the M2, pre-loaded, with __TEXT and __DATA segment ranges. On the M2 the remap address differs from the physical one, which the reservation already takes from the ADT. Reserve the segments and export their CRCs on these SoCs too, so the driver can tell which firmware build it is talking to. The node is still only ever disabled here, never enabled. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dt_set_ave()only ran on the T8140 and found the encoder by its A18 Pro path. The T6040 kernel DT already describes the encoder (apple,t6041-aveat/video-codec@283100000, disabled), and iBoot preloads its firmware the same way: ADT/arm-io/ave0ispre-loadedwith__TEXTand__DATAsegments remapped at 0x100_0000_0000, like/arm-io/aveon the A18 Pro.This finds the DT node by its compatible instead of a chip check and a fixed path, and takes the ADT node from
/arm-io/aveor/arm-io/ave0. The segment checks, the reservation and the CRC export are unchanged. The node is only ever disabled here, never enabled, so the T6040 encoder stays off until the kernel driver supports it (the T6040 command differences are still being collected).Testing
make, toolchain env), no new warnings./chosenstill carriesaurora,ave-text-crc32andaurora,ave-data-crc32,/proc/device-tree/reserved-memory/has the twoasc-firmware@nodes the encoder points at, andv4l2-ctl --list-devicesshows the encoder as before.FDT: AVE disabledline,/proc/device-tree/video-codec@283100000/memory-regionexists, twoasc-firmware@reserved nodes appear, and/chosenhas bothaurora,ave-*-crc32values. The node staysdisabled.Second commit: the M1 Pro (
apple,t6000-ave, ADT/arm-io/ave0) and M2 (apple,t8112-ave, ADT/arm-io/ave) get the same hand-off. Their DTs already carry the disabled node. On the M2 the segment remap address differs from the physical one; the reservation already uses the ADTremap.Expected
/chosen/aurora,ave-text-crc32values, computed on the host as the CRC32 of the__TEXTsegment of each firmware image (the same method gives the live J700 value 69c54454 for the 26.6.2AppleAVE2FW_H17):The head builds reproducibly:
gmake RELEASE=1 CHAINLOADING=1 ESP_STAGE2=1of the merge base gives the exact loader bytes now running on the J616s (sha256 972507e6...), so a test Stage 2 differs from the running one only by this change.🤖 Generated with Claude Code