Repository navigation
Conversation
|
Installed on the J873g as its Stage 1 (the a30a589a self-boot lineage plus this change, v0.1.0-260-gb64f2266, enrolled from 1TR) with the hand-added DCPEXT properties removed from the device tree. The loader logs |
|
Thanks, the A/B table makes this easy to follow. Two small things before it goes in:
|
… wake iBoot loads the firmware of the J873g's two external display controllers and leaves each coprocessor running, waiting for the RTKit wake, with no AFK endpoint started. apple_dcpib (aurora-silicon/linux#2176) wakes such a controller for a rear USB-C display when its node carries apple,rtkit-wake and apple,afk-active-endpoints and the loader reserved its firmware. aura did none of this, so the M6 needed both properties added to its device tree by hand, and the nub's 12 MiB buffer, whose remap view lies at the start of the memory Linux gets, was reserved only by chance. For each DCPEXT that aura did not start (DCPEXT0 drives aura's second display when HDMI runs next to USB-C), dt_prepare_t8152() reads the controller's PSD service and, only when that reads powered, its CPU control register: a coprocessor read while gated hangs the bus. A controller that is running gets both views of every firmware and nub segment reserved, as the internal DCP's are, then apple,afk-active-endpoints = <0> and apple,rtkit-wake, in one display transaction. Any other controller gets neither, and a promise already in the tree is withdrawn first. The segment reservation becomes a helper shared with the internal DCP. Tested on the J873g (macOS 27.2): with a device tree that lacks both properties, Linux wakes DCPEXT0 and DCPEXT1 and runs a USB-C EV2780 at 2560x1440 and an S2431W at 1920x1200. The same boot without this change refuses both controllers ("bootloader AFK endpoint handoff required"). Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
…eport Both PSD readers in dcp.c take the current power state from bits 2:0 of the state register (T8152_PSD_STATE_CUR), as the kernel's dcpib driver does. t8152_psd_power_on() read the whole register before. dt_set_dcpext_t8152() leaves apple,afk-active-endpoints alone on the dcpext0 that aura started for HDMI. There the value describes the running session, so it belongs to the display hand-off that runs before this one (aura#89 publishes it there, after removing any value already in the tree). Removing it here would undo that. A comment now says so. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
9923ddb to
c04cefa
Compare
|
Thanks. Rebased onto main 5c70a29, which has #294, so
Checked: clang build (LLVM 22, BUILDSTD=1) with no warnings, and |
On the J873g (M6 Mac mini), iBoot loads the firmware of both external display controllers (DCPEXT0 and DCPEXT1) and leaves each coprocessor running, waiting for the RTKit wake. No AFK endpoint has been started on them. apple_dcpib (aurora-silicon/linux#2176) drives the rear USB-C displays from those controllers. It wakes a controller only when the loader:
apple,rtkit-wakeandapple,afk-active-endpointson its node.aura did neither, so the M6 needed both properties added to its DTB by hand. The DCPEXT nubs' 12 MiB buffer has its remap view at the start of the memory Linux gets, and only another reservation happened to cover it.
What this changes (
dt_prepare_t8152(), minimal-boot path, after the internal display's reservations)apple,afk-active-endpoints = <0>andapple,rtkit-wake. All of this happens in onedt_display_transaction.dt_reserve_t8152_dcp_segments(), shared with the internal DCP (no behavior change there).t8152_psd_state()in dcp.c anddisplay_second_attempted()in display.c.The internal DCP's AFK report is not part of this PR; it stays with #89.
Hardware test (E2E A/B on the J873g, macOS 27.2)
aura main cannot launch the desktop kernel on the M6 yet. That is a separate open issue: the kernel never prints under main, while the aura-test lineage boots the same files. So the test ran this change on the M6's installed self-boot loader (aura-test lineage
a30a589a). All seven new or changed functions are byte-identical to this PR. The only difference is the call site: theredt_prepare_t8152()calls it directly, while here it sits in theaurora,minimal-bootbranch, which the J873 desktop DTB carries.Both runs used the same flow and inputs:
chainload.py -r --callof the image withboot=appended.apple,rtkit-wakeandapple,afk-active-endpointsremoved from both DCPEXT nodes.a30a589a(control)a30a589a+ this changeFDT: dcpext0 firmware reserved, left to the kernel to wakeand the same for dcpext1apple,rtkit-wake,apple,afk-active-endpoints = <0>error -22: bootloader AFK endpoint handoff required(both)firmware handoff: CPU control 0x10 status 0xd,quiesced DCP wake: 0(both)In both runs the internal DCP's firmware crashed on a buffer request ("no mapping for firmware buffer"). That comes from chainloading over a Stage 1 that already drove the display, and it is identical in the control. The installed boot, which does not chainload, is unaffected.
Not exercised on hardware
Build: default LLVM build with no new warnings;
git clang-formatis clean.