Repository navigation
Conversation
8f91fd2 to
6cc6a81
Compare
|
Three things before this can go in:
|
|
@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). |
c452bef to
71d587c
Compare
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>
|
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 Adding three commits from
With them: Those three commits aren't in any PR yet. 083dbc3 and 79fcfc0 are authored |
|
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.
This was one boot on our J773g with Stage 1 1.0.0b8 and stock U-Boot 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. |
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>
|
Thanks for publishing the J773g HDMI DCP mappings. This builds on Could the DCP region publishing be the existing T8132 DCP mapping path (the one the J713 uses), driven by the DCP node's 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>
|
Two additions to the earlier review, so they can be folded into the same rework. First, |
71d587c to
b3e7413
Compare
|
Thanks for the rework: the HDMI DCP is now selected by the DCP node's |
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:apple,connector-type = "HDMI-A", and/arm-io/disp0isexternal.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 fromdt_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 listsmemory-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.disp0gets its segment and a no-mapframebufferregion of/vram; the PIODMA child gets its segment. The devices are not enabled, and a tree that already describesdisp0is 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
53be8212(per PHY, no board or OS test); this PR is stacked on it.kboot_is_j773g()on the HDMI path:src/kboot_t8132.chas neither, and the only firmware test left indt_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) and79fcfc00(emptygpu-fw-*/uat-*placeholders in the overlap scan) each fixed a check insidedt_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.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 printsdisplay: preserving inherited displayon a J773g and maps nothing there, and the kernel accepted SID23 in the boot below.e553f9dcalso does not build here (dcp->no_resetandkboot_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
e553f9dcand #311; none of that is in this PR.Tests
tests/python/test_m4_dcp_handoff.pyruns 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, nodisp0, an existingmemory-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(tree06936317) 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.aura 1.0.0b13-gb3e74135FDT: M4 HDMI DISP0 SID0/SID16 mappings and framebuffer [0x103e5300000, +0x854000) published;FDT: M4 DCP firmware mappings published (HDMI DCP, external disp0); display device status unchangedapple-dart 30a340000.iommu: Preserving DCP SID23 root … no writes; the same for SID0 and SID16 on30a300000.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 linesHDMI-A-1connected, 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/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/reserved-memory/asc-firmware@1000cbcc000: size0x28000,apple,dcp-os-log,no-map; kernel:OF: reserved mem: 0x000001000cbcc000..0x000001000cbf3fff (160 KiB) nomap non-reusable asc-firmware@1000cbcc000SSH 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-gb3e74135as 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.