Skip to content

arm64: dts: apple: prepare T6040 ANE cold-boot mappings and J616s test DTB - #705

Closed
RyanTheTide wants to merge 4 commits into
aurora-wipfrom
ane/t6041-dt-boot
Closed

RyanTheTide wants to merge 4 commits into
aurora-wipfrom
ane/t6041-dt-boot

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

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.dts on 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, and apple_dart_finalize_domain() applies it as forced geometry, also for an unmanaged paging domain. The client-node override supported by apple_dart_domain_alloc_paging() could change that geometry, but would add a second aperture description. Raw iommu_map() currently does not enforce those geometry bounds, and apple_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-ranges contains 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-region and memory-region-names identify TEXT and DATA as firmware-text and firmware-data. The existing ane_fw_preload_check() reads these properties and checks enabled, non-reusable, no-map reservations.
  • apple,firmware-iovas supplies TEXT DVA 0x10000000000 and DATA DVA 0x100000c0000. Expected sizes are 0xc0000 and 0x2ac000. Physical bases are never taken from fixed board constants.

Loader status

Whether the Stage 2 loader in use converts ane0 ADT segment-ranges cannot 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 ane0 segments. Both reservations must have the actual physical bases, the TEXT/DATA sizes above, no-map, no reusable, 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

  • Strict checkpatch passes on all four commits. The generic FILE_PATH_CHANGES advisory is excluded after confirming that the existing MAINTAINERS wildcard covers the new Apple DTS.
  • Required LLVM/arm64 compilation and schema checks are pending controller build capacity. No compiled test DTB or SHA-256 is available from this run yet.

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]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Superseded by #750 (ANE: H16 cold boot and first inference), which carries every commit of this branch.

@RyanTheTide RyanTheTide closed this Nov 1, 2026
@RyanTheTide
RyanTheTide deleted the ane/t6041-dt-boot branch November 7, 2026 12:07
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