Skip to content

kboot: hand off a T8132 HDMI DCP and its display frontend through the M4 DCP path - #199

Open
techmore wants to merge 5 commits into
aurora-silicon:mainfrom
techmore:upstream/aura-j773g-hdmi-dcp-maps-20261111
Open

techmore wants to merge 5 commits into
aurora-silicon:mainfrom
techmore:upstream/aura-j773g-hdmi-dcp-maps-20261111

Conversation

@techmore

@techmore techmore commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A T8132 Mac without a panel drives a fixed HDMI port from its main DCP. dt_set_m4_dcp_handoff() refused it, so nothing of the display handoff reached the kernel. Both commits extend the existing J713 code and act on two properties, with no board name, board-id or OS version:

  • the tree's DCP node has apple,connector-type = "HDMI-A", and
  • the ADT's /arm-io/disp0 is external.

1. DCP firmware mappings. The HDMI case goes through dt_set_m4_dcp_handoff() and the publication the J713 uses (apple,firmware-uuid, firmware version, one reservation per ADT segment from dt_reserve_asc_firmware()). Refused before the tree is touched: an HDMI tree over an ADT with a panel; an external ADT under a tree that does not say HDMI; an HDMI tree whose DCP already lists memory-region (the path appends); and every existing refusal.

2. Display frontend (was #258). dt_set_j713_display_maps() and its page callback gain an HDMI mode instead of a second copy. It reads SID0 and SID16 of the display DART, locked and read only, as for a panel. In HDMI mode SID0 must map exactly one whole DCP segment (two with a panel) and may also map pages of the retained framebuffer (/vram); SID16 must map exactly one whole segment and no framebuffer page. disp0 gets its segment and a no-map framebuffer region of /vram; the PIODMA child gets its segment. The devices are not enabled, and a tree that already describes disp0 is left alone. Any other page refuses this step only: the DCP mappings stay.

Trees with a panel take the same code as before, including their existing 26.6.2 condition.

Stage 1 size is unchanged: 17968 B headroom on main and on this head (shipping flavour, same clang).

Review points of 11-19 13:08/13:09

  • ATC copy keyed on the ADT bundle, OS pin dropped: that is kboot: T8132 USB3 calibration, AOP handoff and absent-ISP rule by ADT property #113 at 53be8212 (per PHY, no board or OS test); this PR is stacked on it.
  • No 26.6.2 pin and no kboot_is_j773g() on the HDMI path: src/kboot_t8132.c has neither, and the only firmware test left in dt_set_m4_dcp_handoff() is main's existing one for trees with a panel. Validated on 27.2 (rows below).
  • 083dbc3f, 79fcfc00, 7fdadb3e:
    • 083dbc3f (unit-less names of regions already in the tree) and 79fcfc00 (empty gpu-fw-*/uat-* placeholders in the overlap scan) each fixed a check inside dt_set_j773g_dcp_regions(). That function is gone, so neither applies: the shared path has no name check and no overlap scan (the booted tree has those placeholders), and a tree that already lists DCP regions is refused as a whole.
    • 7fdadb3e (the display frontend's inherited regions) is here as the second commit, in the J713 function's HDMI mode.
  • The two fixes for the SID23 refusal (dart: release aura's L2 tables from a locked DART at shutdown #311 and e553f9dc): not folded in, because the state they repair cannot exist with this code. Both undo what a loader-run modeset leaves in the DCP's DART (heap L2 tables; a framebuffer alias). On main plus this PR the loader prints display: preserving inherited display on a J773g and maps nothing there, and the kernel accepted SID23 in the boot below. e553f9dc also does not build here (dcp->no_reset and kboot_is_j773g_machine() come from the boot-HDMI series). dart: release aura's L2 tables from a locked DART at shutdown #311 is open against main on its own.

Scope

This covers a unit whose HDMI port iBoot has lit. A unit iBoot does not light (DjDeveloperr's second J773g) additionally needs the boot-HDMI series, with e553f9dc and #311; none of that is in this PR.

Tests

tests/python/test_m4_dcp_handoff.py runs the production functions on real FDTs against a host model of the ADT and the DART tables. With the two properties, J773g trees (26.6.2 and 27.2 segment lists) and a tree of another name are handed over on 26.6.2, 27.0 and 27.2; the 27.2 OS log (0x26000) is reserved as 0x28000. Refused with the tree unchanged: no connector-type, another type, HDMI over a panel ADT, no disp0, an existing memory-region, no UUID, an empty list, a segment outside DRAM. Frontend only refused: a stray page, a partly mapped segment, two segments in SID0, a framebuffer page in SID16, a wrong physical address inside a segment, an unaligned /vram. The J713, J604, J715 and J624 cases are unchanged.

Full host suite on the head: no failure that main does not have.

Hardware

J773g (Mac mini), macOS 27.2 (26B123) stub, Stage 1 1.0.0b13, this exact head b3e74135 (tree 06936317) as a one-shot ESP Stage 2, built on macOS with clang 23.1.5, 2 boots on 2026-11-19, HDMI to a 1080p monitor; the rows are from the first. The kernel is not an upstream one: 7.3.0 with our T8132 PMGR policy change (aurora-silicon/linux#2317) and firmware 27 DCP changes that are not in any PR yet.

Row Seen
Stage 2 version aura 1.0.0b13-gb3e74135
Loader FDT: M4 HDMI DISP0 SID0/SID16 mappings and framebuffer [0x103e5300000, +0x854000) published; FDT: M4 DCP firmware mappings published (HDMI DCP, external disp0); display device status unchanged
DCP accepted apple-dart 30a340000.iommu: Preserving DCP SID23 root … no writes; the same for SID0 and SID16 on 30a300000.iommu; Inherited SID0/SID16 frontend admitted; SID0 strict DMA outside 1 foreign and 4 retained slices; apple-dcp 30ae00000.dcp: firmware-compat 27.2.0: firmware 27 path; dcp_hotplug() connected:1 valid_mode:0 nr_modes:26. DCP consumer reservations are invalid: 0 lines
HDMI-A-1 mode HDMI-A-1 connected, enabled, dpms On, 26 modes; set_digital_out_mode(color:81 timing:76) "1920x1080": 75 174500 …, set_digital_out_mode finished; CRTC active at 1920x1080
Framebuffer reservation /reserved-memory/framebuffer@103e5300000: reg = <0x103e5300000 0x854000>, apple,asc-mem, no-map; kernel: OF: reserved mem: 0x00000103e5300000..0x00000103e5b53fff (8528 KiB) nomap non-reusable framebuffer@103e5300000
dcp-os-log reservation /reserved-memory/asc-firmware@1000cbcc000: size 0x28000, apple,dcp-os-log, no-map; kernel: OF: reserved mem: 0x000001000cbcc000..0x000001000cbf3fff (160 KiB) nomap non-reusable asc-firmware@1000cbcc000

SSH came up with no WARNING, BUG, Oops or DART fault. A second boot of the same image was watched: the monitor showed the Plasma welcome screen at 1080p with aura 1.0.0b13-gb3e74135 as the running loader. An earlier boot of the same tree, built before the Signed-off-by was added (673ac78b), gave the same lines.

Not tested: any refusal on hardware (host tests only); 26.6.2 with this head; any machine but the J773g; an upstream kernel.

@techmore
techmore force-pushed the upstream/aura-j773g-hdmi-dcp-maps-20261111 branch 2 times, most recently from 8f91fd2 to 6cc6a81 Compare November 12, 2026 21:41
@RyanTheTide

Copy link
Copy Markdown
Contributor

Three things before this can go in:

  1. kboot: T8132 USB3 calibration, AOP handoff and absent-ISP rule by ADT property #113 has to land first. This branch carries kboot: T8132 USB3 calibration, AOP handoff and absent-ISP rule by ADT property #113's four commits, so merging it now would merge kboot: T8132 USB3 calibration, AOP handoff and absent-ISP rule by ADT property #113 as well.
  2. The commit needs your Signed-off-by (docs/licensing.md).
  3. A J773g boot of the exact head once it is rebased on main. The useful row is the same as runs 52 to 57: Stage 2 version string, DCP domain accepted, HDMI-A-1 connected with its mode, and the apple,dcp-os-log node in /proc/device-tree/reserved-memory.

@RyanTheTide

Copy link
Copy Markdown
Contributor

@techmore still open from the earlier review: #113 needs to land first and this branch rebased onto main, the last commit needs your Signed-off-by, and a J773g boot of the rebased head (Stage 2 version, DCP domain accepted, HDMI-A-1 with its mode, and the apple,dcp-os-log node in /proc/device-tree/reserved-memory).

@techmore
techmore force-pushed the upstream/aura-j773g-hdmi-dcp-maps-20261111 branch 2 times, most recently from c452bef to 71d587c Compare November 13, 2026 22:58
techmore added a commit to techmore/aura that referenced this pull request Nov 14, 2026
Stage 2 handles the powered-off post-M4 ANS handoff (nvme.sart=, see
aaec599 "payload: start a post-M4 ANS an earlier stage powered off
before any payload"), but hands a live session without SART entries on
as it found it.

T8132 Stage 1 releases from before the powered-off handoff (v1.0.0b10
and earlier, including 1.0.0b8) leave ANS running and pass no SART
entries. The newer U-Boot tail (1b60b47e, U-Boot aurora-silicon#38 plus aurora-silicon#40) dropped
adoption of such an inherited session and starts ANS from
apple,sart-entries instead, so it refuses what Stage 2 hands on. A Mac
mini M4 (J773g) on Stage 1 1.0.0b8 then stops after the Stage 1 vector:
no Stage 2 display, no U-Boot output, no Linux.

On T8132, when a non-boot= Stage 2 has not used NVMe and no SART
entries were passed, take the inherited session over with nvme_init()
and shut it down normally, so the payload receives ANS off with its
SART entries. If the takeover fails, stop rather than hand over an ANS
in an unknown state. The nvme.sart= and boot= paths and every other
chip are unchanged.

This changes the old-Stage-1 contract for every non-boot= T8132
payload. An older U-Boot that adopts a live ANS but cannot start one
from off would no longer work with an old Stage 1; keep the aura and
U-Boot pins coordinated.

Tested on a J773g with Stage 1 1.0.0b8 and U-Boot 1b60b47e: a Stage 2
from main + aurora-silicon#113 + aurora-silicon#199 with this change booted Linux five times in a
row; without it the same stack stopped before U-Boot.

Assisted-by: LLM
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
@FatBoy721

Copy link
Copy Markdown

Second J773g data point (Mac mini M4; Stage 1 1.0.0b8, stub 26.6.2, stock Aurora U-Boot, kernel = techmore hwtest 787d70b2 + linux#1192 DTS 70049184):

#199 alone isn't enough here. With b8461a8, dart-disp0 still refuses with DCP consumer reservations are invalid.

Adding three commits from techmore/fix/aura-j773g-disp0-regions-20261114 fixes it:

  • 083dbc3 accept unit-less names for existing J773g DCP regions
  • 79fcfc0 skip empty reservation placeholders in the J773g DCP handoff
  • 7fdadb3 describe the J773g display frontend's inherited regions

With them: Inherited SID0/SID16 frontend admitted, external DCP adopted, card1-HDMI-A-1, then G16 READY. 3/3 boots.

Those three commits aren't in any PR yet. 083dbc3 and 79fcfc0 are authored M4 Agent <m4-agent@localhost> and have no Signed-off-by.

@techmore

Copy link
Copy Markdown
Contributor Author

Status against your three conditions: (1) #113 has not landed, so #199 remains unpushed; (2) every rebased commit carries Sean Dolbec's Signed-off-by; (3) the exact signed preview has one J773g boot.

  1. kboot: T8132 USB3 calibration, AOP handoff and absent-ISP rule by ADT property #113 is 24812c55, directly on main without payload: support live ANS from older T8132 Stage 1 #244. It has to land first, so I have not pushed kboot: hand off a T8132 HDMI DCP and its display frontend through the M4 DCP path #199. The rebased signed preview is ready at ab6f3611. When kboot: T8132 USB3 calibration, AOP handoff and absent-ISP rule by ADT property #113 lands, I will rebase onto the then-current main; if the resulting head differs from ab6f3611 in anything but its base, I will boot that exact head again and report the same four rows before asking for review.

  2. Every commit in the rebased stack carries Sean Dolbec's Signed-off-by. The two fix commits have the human author and retain Assisted-by: LLM.

  3. I booted the exact signed preview once on the J773g:

Requested row Verbatim evidence Source
Stage 2 version string [ 3.107066] aurora kernel: DMI: Apple Inc. Mac mini (M4)/J773g, BIOS aura 1.0.0b13-gab6f3611 / U-Boot 2026.07-ge1ef8b636fc9 07/01/2026 Kernel journal from that boot
DCP domain accepted [ 3.109650] aurora kernel: apple-dart 30a300000.iommu: Inherited SID0/SID16 frontend admitted; SID0 strict DMA outside 1 foreign and 4 retained slices
[ 3.110819] aurora kernel: platform 30ae00000.dcp: Adding to iommu group 1
Kernel journal from that boot
HDMI-A-1 connected with its mode connector=card1-HDMI-A-1 status=connected enabled=enabled modes=1920x1080 3840x2160 3840x2160
Nov 15 00:49:59 aurora kernel: apple-dcp 30ae00000.dcp: dcpext-30ae00000.dcp on: 1920x1080@120 Hz, 297000 kHz
Connector capture and kernel journal from that boot
apple,dcp-os-log node in /proc/device-tree/reserved-memory dcp-os-log=/proc/device-tree/reserved-memory/asc-firmware@1000d4c0000 Device-tree capture from that boot

DCP domain accepted is the requested row label, not a literal kernel message. The two journal lines above are the evidence from this boot. This boot's kernel log contains no DCP consumer reservations are invalid refusal and records Nov 15 00:49:23 aurora kernel: apple-dcp 30ae00000.dcp: external DCP adopted.

This was one boot on our J773g with Stage 1 1.0.0b8 and stock U-Boot e1ef8b63, built by us from that commit. It used the installed default kernel 7.3.0-m4atlrx+ and its matching device tree (SHA-256 5a72db650a379a3320d2736be69a152c5836e16a3cb038a50f0d692180620e46), not the exact linux #1192 head. Ethernet had carrier at 2.5 Gb/s and the boot had 0 RTKit crash lines. The Stage 2 artifact SHA-256 is 7b79c7a9b695fae04706249bcbe0e8652e287c05b249f77e6473076f3f3290d3. Not covered: a newer Stage 1, the exact linux #1192 head, the HDMI boot menu, hotplug, audio, or an active 4K modeset.

The second J773g owner's report found #199 alone insufficient. This preview includes the unit-less region-name and empty-placeholder fixes; the display follow-up remains draft #258.

techmore added a commit to techmore/aura that referenced this pull request Nov 15, 2026
Stage 2 handles the powered-off post-M4 ANS handoff (nvme.sart=, see
aaec599 "payload: start a post-M4 ANS an earlier stage powered off
before any payload"), but hands a live session without SART entries on
as it found it.

T8132 Stage 1 releases from before the powered-off handoff (v1.0.0b10
and earlier, including 1.0.0b8) leave ANS running and pass no SART
entries. The newer U-Boot tail (1b60b47e, U-Boot aurora-silicon#38 plus aurora-silicon#40) dropped
adoption of such an inherited session and starts ANS from
apple,sart-entries instead, so it refuses what Stage 2 hands on. A Mac
mini M4 (J773g) on Stage 1 1.0.0b8 then stops after the Stage 1 vector:
no Stage 2 display, no U-Boot output, no Linux.

On T8132, when a non-boot= Stage 2 has not used NVMe and no SART
entries were passed, take the inherited session over with nvme_init()
and shut it down normally, so the payload receives ANS off with its
SART entries. If the takeover fails, stop rather than hand over an ANS
in an unknown state. The nvme.sart= and boot= paths and every other
chip are unchanged.

This changes the old-Stage-1 contract for every non-boot= T8132
payload. An older U-Boot that adopts a live ANS but cannot start one
from off would no longer work with an old Stage 1; keep the aura and
U-Boot pins coordinated.

Tested on a J773g with Stage 1 1.0.0b8 and U-Boot 1b60b47e: a Stage 2
from main + aurora-silicon#113 + aurora-silicon#199 with this change booted Linux five times in a
row; without it the same stack stopped before U-Boot.

Assisted-by: LLM
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for publishing the J773g HDMI DCP mappings.

This builds on kboot_is_j773g() (board-id, model, OS 26.6.2 and tree compatible), now also at src/kboot.c:7947 and :9035, and adds a J773g-only region publisher (src/kboot.c:7970-8084 dt_set_j773g_dcp_regions()). We select behaviour by a hardware property, not by the boards it was tested on, and we try to extend one path rather than add a per-board copy.

Could the DCP region publishing be the existing T8132 DCP mapping path (the one the J713 uses), driven by the DCP node's connector-type and the ADT segments, for any T8132 tree that describes an HDMI DCP? The same review on #113 applies to the predicate itself.

The branch also needs a rebase (it currently conflicts). We can't test a T8132 ourselves, but are happy to help line up owner rows.

dt_set_t8132_aop() began with a list of boards (J713, J604), so no other
T8132 tree could get the handoff. Its conditions are already checked one
by one: the tree asks for it, the AOP is halted, the ADT's segments and
DAPF windows reserve, and the DAPF programs from the ADT.

Drop the board list. Make the tree edits a transaction and program the
DAPF, the only hardware write, after them: a failed step leaves no
reservation behind and no DAPF slice changed, and disables the AOP. A
tree that does not ask for the handoff is left as it is.

The host test runs the production function on six board trees, fails
each step in turn and checks the order of the hardware write.

Assisted-by: LLM
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
A T8132 Mac without a camera has no isp or isp0 node in its ADT, but
nothing stopped a tree from enabling the ISP there: the OS would probe
a camera and ISP power domains that do not exist. dt_set_isp() disables
only the node the isp alias names, and not its DARTs.

When the ADT has neither node, disable every enabled apple,t8132-isp
node and the DARTs in its iommus list that no other node uses, before
dt_set_isp() runs. The rule follows the ADT and the tree only; it lives
in kboot_t8132.c, out of Stage 1's full .init slot. If it cannot write
the tree it says so and the boot goes on.

The host tests cover an enabled and a disabled ISP, a shared DART, a
malformed iommus list, a full tree and an ADT with isp or isp0, and run
the rule with the real dt_set_isp() in kboot_prepare_dt()'s order.

Assisted-by: LLM
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
dt_copy_atc_tunables() gave an apple,t8132-atcphy node the T8132 USB3
bundle only under a J713 or J604 tree. The copy itself already decides
per PHY from the ADT: every required group must be present and well
formed, or nothing of the bundle is published and the PHY keeps its
USB2 fallback.

Drop the board list and the chip id test. The bundle goes to any tree
node that is apple,t8132-atcphy whose ADT node is atc-phy,t8132.

The host test runs the production copy on the four PHYs of a J773g ADT
under five board trees; hides one required group on one PHY; and tries
an ADT PHY of another type and a tree node of another type.

Assisted-by: LLM
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
A T8132 Mac without a panel drives a fixed HDMI port from its main DCP,
and its ADT marks /arm-io/disp0 external. dt_set_m4_dcp_handoff()
refused that, so the DCP firmware reservations never reached the kernel.

Admit it in that function, through the publication the J713 uses, when
the tree's DCP node has apple,connector-type = "HDMI-A" and the ADT's
disp0 is external. No board or firmware version is asked for this case.
A tree and an ADT that disagree, and an HDMI tree whose DCP already
lists memory-region (the path appends), are refused before the tree is
touched. Trees with a panel are handled as before.

The host test hands over trees with the two properties and refuses each
missing or contradicting one with the tree unchanged.

Assisted-by: LLM
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
Where the main DCP drives an HDMI port, the display frontend (disp0,
SID0 of the display DART) and its PIODMA child (SID16) keep running on
the tables iBoot left, and a kernel that adopts them needs every
inherited page described. Only the DCP's own regions were published.

dt_set_j713_display_maps() already reads and describes these two
streams for a panel. Give it an HDMI mode: SID0 maps one DCP segment,
not two, and may still map pages of the retained framebuffer (/vram),
which disp0 gets as a "framebuffer" region; the devices are not
enabled, and a tree that already describes disp0 is left alone. Any
other page refuses the step and keeps the DCP mappings.

The host test models the streams as read on a J773g and refuses a stray
page, a partly mapped segment, a second segment in SID0, a framebuffer
page in SID16, a wrong physical address and an unaligned /vram.

Assisted-by: LLM
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Two additions to the earlier review, so they can be folded into the same rework. First, kboot_is_j773g() also pins os_firmware.version == V26_6_2, and it now gates the ATC tunable copy in src/kboot_atc.c; please key that copy on the ADT carrying the bundle groups on every PHY, and drop the OS pin (or move it to 27.2, the stub target). Second, the 11-14 J773g report shows head b8461a8 still refusing dart-disp0 with "DCP consumer reservations are invalid" until 083dbc3, 79fcfc0 and 7fdadb3 from your fix/aura-j773g-disp0-regions branch are added; please include those in this PR so the pushed head is the one that boots, and attach that boot's rows (Stage 2 version, DCP accepted, HDMI-A-1 mode, dcp-os-log reservation). Happy to help line up the shared T8132 path.

@techmore
techmore force-pushed the upstream/aura-j773g-hdmi-dcp-maps-20261111 branch from 71d587c to b3e7413 Compare November 19, 2026 13:22
@techmore techmore changed the title kboot: publish the J773g HDMI DCP firmware mappings kboot: hand off a T8132 HDMI DCP and its display frontend through the M4 DCP path Nov 19, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for the rework: the HDMI DCP is now selected by the DCP node's apple,connector-type and the ADT's external disp0, and the frontend mappings extend the existing M4 path instead of a separate publisher, with no board or OS-version check. What remains is a J773g boot row on b3e7413 (Stage 2 version, DCP accepted, HDMI-A-1 mode, the framebuffer and dcp-os-log reservations); this PR carries #113's commits, so it lands after #113.

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.

3 participants