Repository navigation
arm64: dts: apple: prepare T6040 ANE cold-boot mappings and J616s test DTB - #705
Closed
RyanTheTide wants to merge 4 commits into
Closed
RyanTheTide wants to merge 4 commits into
RyanTheTide wants to merge 4 commits into
Conversation
Describe the four inclusive DAPF ranges in record order so that the firmware backend can derive both its filters and identity MMIO pages from DT. Require them for T6041 and exercise the preload properties in a T6041 example. The preload DVAs are fixed; only physical reservations need to be supplied by the bootloader. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Describe the four DAPF ranges and preload device addresses without fixing boot-specific physical addresses. Hook the J616s ANE to disabled no-map TEXT and DATA placeholders for the bootloader to fill from segment-ranges. Widen the three DART windows down to zero, preserving their upper bound at 0x3ffffffffff. apple-dart uses the window for forced domain geometry, including private paging domains. Raw iommu_map() currently permits low mappings outside that geometry, but relying on that leaves the domain's advertised aperture inconsistent with the firmware's identity MMIO pages. The widened window covers both those pages and the high firmware DVAs. Add a tether-only test DTS that enables the existing ANE and three DART nodes. The shipping board tree keeps them disabled. Preload reservations remain disabled in both trees until a loader completes the handoff. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Enable the ANE and its three DARTs only for the tether-loaded test DTB. Keep the shipping board tree disabled and require the loader to fill the preload reservations before the driver can pass preflight. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Include the existing tether DTS so the ANE test boot keeps its debug console and the host-owned ATC0 path. Layer only the four ANE and DART status enables on top of that established tether configuration. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Contributor
Author
|
Superseded by #750 (ANE: H16 cold boot and first inference), which carries every commit of this branch. |
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.
The H16 firmware needs four identity MMIO pages below the current ANE DMA window and two personalized preload segments whose physical addresses change each boot. Describe the DAPF bounds and fixed preload DVAs, connect the J616s ANE to loader-filled no-map reservations, and add
t6040-j616s-ane-test.dtson top of the existing tether console and ATC0 ownership setup. The shipping DTS keeps the ANE and all three DARTs disabled.DMA window choice
Widen each ANE DART to
apple,dma-range = <0x0 0x0 0x400 0x0>. This includes the low identity pages and preserves the previous inclusive upper bound,0x3ffffffffff.apple_dart_probe()reads the DART's base and size.apple_dart_of_xlate()carries the common window into the client configuration, andapple_dart_finalize_domain()applies it as forced geometry, also for an unmanaged paging domain. The client-node override supported byapple_dart_domain_alloc_paging()could change that geometry, but would add a second aperture description. Rawiommu_map()currently does not enforce those geometry bounds, andapple_dart_map_pages()indexes the page table after applying its address mask, so an unlocked private domain can technically map these low pages even with the old property. Widening the DT window avoids depending on that discrepancy. No IOMMU driver change is needed. This describes an aperture, not an authorization to map all of it.Driver property contract
apple,dapf-rangescontains four pairs of inclusive 64-bit physical bounds in DAPF record order. The cold-boot backend can derive the four 16 KiB identity pages from these ranges. This PR defines the DT contract; the current preflight does not yet consume DAPF ranges.memory-regionandmemory-region-namesidentify TEXT and DATA asfirmware-textandfirmware-data. The existingane_fw_preload_check()reads these properties and checks enabled, non-reusable, no-map reservations.apple,firmware-iovassupplies TEXT DVA0x10000000000and DATA DVA0x100000c0000. Expected sizes are0xc0000and0x2ac000. Physical bases are never taken from fixed board constants.Loader status
Whether the Stage 2 loader in use converts
ane0ADTsegment-rangescannot be determined from the kernel bindings and static DT nodes. The existing ANE binding and preflight expect that handoff, but the original J616s tree had no ANE preload reservations or memory-region hookup. Existing loader-filled GPU and coprocessor placeholders establish a convention, not proof of an ANE fixup. No loader tree was read or changed.Before a test boot, the lead must check the loader's final J616s DT against that boot's
ane0segments. Both reservations must have the actual physical bases, the TEXT/DATA sizes above,no-map, noreusable, and enabled status; their phandles and names must remain in TEXT/DATA order. The loader must also rename the placeholder nodes to match their physical unit addresses. The test DTS enables only the ANE and its three DARTs, leaving the empty reservations disabled until the loader fills them. Without this handoff, the existing preflight rejects the device before power access. The test DTB is intended for tether loading with persistent Stage 2 untouched.Validation
FILE_PATH_CHANGESadvisory is excluded after confirming that the existingMAINTAINERSwildcard covers the new Apple DTS.