Repository navigation
T6050 (M5 Max, J714c): boot from disk through the Omarchy chain - #30
edimoldovan wants to merge 10 commits into
Conversation
kboot_boot programs only the MTP filter on T6050, dapf_init on reg 1 of dart-mtp at 0x294810000: the firmware's first access is PMGR at 0x28830c000, entry 0 of the ADT dapf-instance-0, and without it the MTP never sends HELLO. The AOP entry of dapf_init_all points at the block shared by every DART at 0x2890fc000 and faults with an SError on T6050. cpu_start_bit uses one bit per CPU index on T6050, as on T8142; the 4*cluster+core layout never releases cores 14-17 of its three 6-core clusters. The J714c ADT has nine i2c nodes; the i2c limit of dt_disable_missing_devs is raised to 16. Signed-off-by: Eduard Moldovan <edimoldovan@gmail.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- nvme: admit the J714c ADT's 64 KiB nvme window at 0x45dcc0000 with nvmmu at 0x41dcc0000 and use the 0x30000 aperture, as for T8140. - kboot: retain the loader's heap on T6050 as on T8140, so the live NVMe session's buffers survive into the next stage. - nvme: a shutdown path that stops the coprocessor and leaves its firmware resident, behind nvme_t6050_stop_coproc (default off, the session is preserved for the next stage). Signed-off-by: Eduard Moldovan <edimoldovan@gmail.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Cluster table for the M5 Pro/Max: MCPU0 at 0x210e00000, default P-state 4; the chip shares T8142's P-state register handling and keeps the firmware voltage, PLL and throttling configuration. Signed-off-by: Eduard Moldovan <edimoldovan@gmail.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Before starting the next stage on T6050, every USB port is brought up as for the proxy (power, usb2phy, pipe handler, dwc3 device init) and flipped to host: usb2phy host bits, gadget stopped, core soft reset, port capability host, PHY auto-suspend off, pipe handler link detection forced off (the parking the kernel PHY driver does for a USB 2.0-only host). On J714c the first flip never shows a plugged device; the second shutdown, bring-up and flip shows it at once. usb_t6050_host_prep polls PORTSC.CCS after each flip (50 ms the first time, 100 ms after that) and redoes the bring-up and flip up to three times. A port without a device stays in host mode after the last attempt. usb_t6050_host_record, called after the display handoff, writes /chosen/apple,t6050-usbprep with four words per port: attempts, PORTSC after the prep, PORTSC before the jump, and ms until PORTSC.CCS. It goes through the new kboot_set_chosen_u32s, which reopens the packed tree from a copy, since kboot_prepare_dt has packed it. The P_VECTOR path skips usb_hpm_restore_irqs on T6050. Signed-off-by: Eduard Moldovan <edimoldovan@gmail.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Generalise dt_set_gpu_t8140 into dt_set_gpu_g17 parameterised by the G17 perf-state shape (count, active states, table count) and the accepted compatibles, and call it for T6050 (apple,agx-t6050; 14/13/4) as well as T8140. Fills the OPP table and the four UAT reserved-memory regions from the ADT and leaves the node enabled when the data validates. Signed-off-by: Eduard Moldovan <edimoldovan@gmail.com> Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ainload target A stage 1 with boot= loads the kernel, DTB and initramfs from the ESP itself, so the secondaries start from the image iBoot loaded and their locked RVBAR needs no relay. The embedded stage 1 config is the only source of the USB proxy window, but a valid config also set the chainload target, and boot= plus chainload= is refused. With boot= set, the config now only provides the window. Signed-off-by: Eduard Moldovan <edimoldovan@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add /arm-io/dart-pmp0 to dapf_entries[] so dapf_init programs the T6050
PMP's DAPF filter. Without it the PMP ASC MMIO window stays fabric-gated
and AP access SYNC-faults. dart-pmp0 is dart,t8110 with a
dapf-instance-0 property, which dapf_init -> dapf_init_t8110 already
handles; the DAPF aperture is reg[1] (0x2841b0000). After
dapf_init("/arm-io/dart-pmp0", 1) the PMP ASC CPU_CONTROL reads cleanly,
where a raw read without the filter faults.
On the FDT path the kernel DT aliases pmp0 to the PMP's DART with
status = okay to match this entry.
Signed-off-by: Eduard Moldovan <edimoldovan@gmail.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ithout its chainload target A stage 1 that carries its next stage (U-Boot as the kernel payload, with its devicetree) uses the embedded config for the proxy window only, as boot= does. The default stage 2 target would otherwise replace the appended kernel. Signed-off-by: Eduard Moldovan <edimoldovan@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stage 1 reads m1n1/boot.bin with its own NVMe driver and hands the ANS session over live (nvme.adopt=live-rtkit-v1). The ANS firmware takes its RTKit handshake once per boot, so U-Boot must adopt that session instead of starting one. Set /chosen/asahi,nvme-adopt for the appended next stage; U-Boot's T6050 NVMe driver adopts when it is present. Signed-off-by: Eduard Moldovan <edimoldovan@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[Medium impact] The changes appear safe to merge, and the previous heap-reservation finding is fixed. SummaryAdds T6050 disk boot through stage 1, stage 2, and U-Boot.
No new actionable issues were found in the changes since the previous review.
|
On T6050 the USB host flip runs after kboot_prepare_dt() reserved the retained heap and after chainload_image() set the next stage's top_of_kernel_data. Its dwc3 bring-up allocates DART tables, which can extend the heap past that boundary, so the next stage could reuse memory the USB DART still points at. Right before the jump, kboot_retain_late_heap() reserves the heap added since the reservation, and chainload_retain_late_heap() raises the staged top_of_kernel_data over the heap added since the staging. When the late reservation fails, m1n1 returns to the proxy, as the display handoff does. Tested on J714c: stage 2 with this change (m1n1-aurora 1.6.1.aurora22-104) boots from disk into Omarchy, 22 of 22 feature checks pass. Signed-off-by: Eduard Moldovan <edimoldovan@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
[Joshua's agent] @maralcbr @scottjones Could one of you review this? It is mergeable with no conflicts, and 8 commits behind It boots the 14-inch MacBook Pro with M5 Max (J714c, T6050) from disk through the Omarchy chain. Per the PR text, the J714c ran this code as It needs the macOS 27.3 beta 1 firmware ( This PR replaces #26 and #27. linux-aurora#404 named #26 as its dependency, so #30 is now the m1n1 side of that pair. |
|
Gap analysis vs. a CTRR/chainload patch series we maintain for T6050 HV debugging. The series was authored against the AsahiLinux/m1n1 lineage and does not apply here — this branch already carries a parallel, more evolved implementation of most of it. Already covered in this branch's own form
Still missing — T6050 HV-debugging path only, not the normal boot path:
The sprr items target the AsahiLinux Recording as a known gap; no PR opened. |
This boots the 14-inch MacBook Pro with M5 Max (J714c, T6050) from disk the way Omarchy boots the other Macs: stage 1 m1n1, the ESP's m1n1 stage 2, U-Boot, Limine, then the EFI kernel. It replaces #26 and #27.
Requires the macOS 27.3 beta 1 system and OS firmware (iBoot
mBoot-20457.60.65.0.1) on the Omarchy volume. On earlier firmware (mBoot-20457.41.3tested) the secondary CPU cores do not start./chosen/apple,t6050-usbprep.boot=or an appended next stage, the stage 1 config gives only the proxy window, not its chainload target (from payload: the stage 1 config gives only the proxy window to boot= and an appended kernel #27)./chosen/asahi,nvme-adopt, so U-Boot takes over the ANS session stage 1 left live instead of starting a second one, which the firmware refuses.Builds: stage 1 with
CHAINLOADING=1, stage 2 withRELEASE=1 CHAINLOADING=1 ESP_STAGE2=1.Tested: the J714c runs this code as
m1n1-aurora1.6.1.aurora22-102. Stage 1 is installed with kmutil, stage 2 is on the ESP, and it boots from disk with no cable into an Omarchy login where 22 of 22 feature checks pass. On the rebase onto the currentintegration/aurora, the one conflict (payload.c, next toconfig_lost) keeps both sides.make format-checkwith clang-format 20.1.8 reports no new violations.The U-Boot half, adopting the session, is on edimoldovan/u-boot
j714c/t6050(70e990818a).🤖 Generated with Claude Code