Repository navigation
arm64: apple: t6041: support J616c (M4 Max) on macOS 27.2 (26B123) firmware - #1954
DjDeveloperr merged 5 commits into
Conversation
544c914 to
f0ba65d
Compare
|
The production boot stub pins at macOS 27.2 (26B123), so please retarget this to 27.2. 26B131 is the 27.2.1 build; please target the J616c on the 27.2 (26B123) stub. |
…firmware The T6041 AOP firmware shipped with macOS 27.2 (26B123) adds a translated __EDATA segment after __ETEXT (at IOVA 0x10000020000) and reads its base IOVA from the ED0p boot-argument patchbay entry, while __OS_LOG remains identity-mapped. Validate at most one additional translated firmware memory-region in check_fw_regions(), requiring it to be non-empty, page-aligned, mapped page-for-page in the AOP IOMMU domain, and placed at or after the end of the __ETEXT region at EC0p. When such a region is present, require a single 8-byte ED0p bootarg entry and patch it with the validated IOVA before writing MMIO; when absent, leave any unused ED0p entry untouched so 26.x firmware behavior is preserved. Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
macOS 27.2 (26B123) ships a new resident Neural Engine image on T6041 (J616c). Its DATA framing, patchbay cells and zeroed range match 26A428 and its cold-boot and ABI-3 program parameters match ane_h16_build_26a428, so add the normalized resident preload rule and profile to ane_h16_profiles. Also enforce that none of the three H16 DARTs has TTBR/TCR protection (bit 0) set before claiming DMA ownership in ane_h16_map(), free the saved pristine_data snapshot on pre-RUN rollback in ane_h16_release(), and cover the 26B123 preload rule and DART protection check in KUnit. Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
f0ba65d to
30dcfaf
Compare
|
Retargeted to macOS 27.2 ( |
30dcfaf to
54e846c
Compare
|
Updated commit 4 ( |
54e846c to
7e4fac7
Compare
|
Thanks for the 27.2 work on the M4 Max. The firmware UUID and version pins for the new interfaces make sense. Two gates select machines rather than hardware, and we try to avoid that in this tree:
Could you key both on the firmware identity and the IP compatible only? If useful, we can run no-regression rows on our M4 Pro. |
Add support for the T6041 (M4 Max) GPU firmware shipped with macOS 27.2 (26B123, iBoot mBoot-20457.41.3): - Add the g17::fw::initdata::v26b123 wire layouts for the updated interface version, 60-slot register descriptor table and separate GPTBAT MMIO mapping, 0x2850-byte hardware-data object, 0x6c48-byte cold power configuration, cold power-state limiter table, 19-row AON sensor table, shifted region-C prefix (+4 bytes past +0x38), and relocated main-configuration power pointer (+0x481). - Upgrade the T6041 25G83/25F84 runtime graph into distinct retained allocations when Variant::v26b123 is active, driving core count, AMCC register windows, OPPs, and power limits from the matched chip Config across both 40-core and 32-core 4-cluster T6041 parts while keeping all 25G83 and 25F84 paths unchanged. - Emit opcode 0x13 without incrementing the host power-assert tally for scheduler-state release on 26B123 (matching M5), as 0x14 is repurposed in 26B123. - Register the normalized T6041 26B123 loaded-image identity for both the 40-core and 32-core T6041 configurations in hw::t6041::BUILDS and cover both in the fwid and event-record unit tests. Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
…27.2 Enable internal and external displays on T6041 boards running macOS 27.2 (26B123): - Add apple_t6041_dcp_v27_2() and apple_t6041_dcpext_v27_2() keyed on the DCP IP compatibles (apple,t6041-dcp / apple,t6041-dcpext), 27.2.0 firmware/compat versions, and UUID 964EDE5B-8F78-38C2-A727-519CC9F0AF27. - Enable the internal display chain and external HDMI and USB-C chains in display-gate for the pinned 27.2 T6041 DCP image, while keeping external chains off on unapproved firmware-27 builds (including headless boards). - Select DCP_FIRMWARE_V_27_0 for 27.2 T6041 internal and external DCPs after checking the v27 method table. - Use 41-bit firmware DMA, live-session adoption, two DPTX ports, and sink metadata EDID on T6041 v27 dcpext. - Build the two-entry disp0 clock table when apple,clock-ids is absent, and allow zero clocks on T6041 dcpext. - Enable desktop Type-C route power, PHY handling, HDMI rail delay, and crossbar link-up on T6041 v27 dcpext. Existing 26.5.2 and 26.6.2 desktop display support stays unchanged. Add display-gate KUnit and apple-dcp selftests. Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
7e4fac7 to
e538e57
Compare
|
Thanks for the review! Both machine gates are now removed and keyed purely on the IP compatibles and firmware identities:
No-regression rows on M4 Pro would be very welcome if convenient! |
|
Thanks for removing both machine gates. DCP admission now follows the IP compatible and the firmware UUID, and the 26B123 initdata covers the 32-core parts too, with a comment on the four-cluster layout. We will run a no-regression row on our M4 Pro. |
The 26B123 builds made T6041 admit five firmware builds, but the asahi_g17_ta_mode KUnit suite still asserted three, so policy_is_local_to_the_admitted_t6041_builds and every test that asks t6041_ta_mode_1() panicked on the count. Expect five, check that the 40- and 32-core entries of both 25G83 and 26B123 share their rules, and hold 26B123 to the TA mode and register programs the other T6041 builds run. Signed-off-by: Diljit Singh <hey@djdev.me>
|
@astaff I added d3a9ec7 (tests only): the Review, on the board-scoping question. Nothing here reaches the Neo (T8140) or the M5 (T6050): the g17 variant and offset changes only exist in the T6041 build table, and the M5 already treats opcode 0x13 the same way. Three points remain, all outside T6041:
Also on cross-board scope: the DCP gate ( |
7f01c9e
into
aurora-silicon:integration/aurora
|
Merged as 7f01c9e. linux Actions has been stalled org-wide since ~16:24Z (checks queued since 19:16Z), so this went in under the owner's runner-outage rule. Host tests for the touched areas pass, and the PR's code built into the Neo (Ryzen kit) and M5 (on-device) test kernels. MacBook Neo (J700) A/B with the whole J616c set: no regression (work: display, G17P dEQP smoke, ANE, AOP, camera stream/runtime-PM/reopen, deep sleep). M5 Pro (J714s, T6050) A/B: PASS on every row. Post-merge: CI is watched once runners return, and the M4 mini row checks H16 ANE map/protect on T8132. |
|
M4 Pro (J616s, T6040) row on d3a9ec7: pass. Built from the exact head with the fleet75 config recipe (olddefconfig delta vs fleet75: +APPLE_J613_DISPLAY_SYNC, MT7932_AWDL y->n).
Rows on every test boot
Each test boot: SELinux enforcing, 0 failed units, 0 AVC denials, 0 kernel lines at err level, s2idle 2/2 (rtcwake, Wi-Fi reconnects, gateway ping ok), 0 DART faults, NVMe/USB/Wi-Fi up, eDP connected with 6 modes, AVE H.264 and HEVC 120-frame encodes byte-identical to production, GL and Vulkan both report "Apple M4 Pro (G16S B1)", AOP RTKit up with 8 IIO devices, ANE bound. Aura ran as a one-shot ESP Stage 2 (Stage 1 unchanged); kernels were built from the exact PR heads with the fleet75 config. |
apple: t6041: firmware-27 XRGB alpha fix and #1954 follow-ups
What this PR changes
This PR adds Linux support for macOS 27.2 (
26B123) firmware onT6041(M4 Max, verified onJ616cMacBook Pro 16-inch).soc: apple: aop: map__EDATAand patchED0p(60f279c2bc9e)apple_aopchecks one translated__EDATAfirmware region after__ETEXTand writes its IOVA intoED0p.ED0pentries untouched on26.xfirmware.accel/ane: add the H1627.2(26B123) profile (1a1c13889998)aneadds the26B123preload rule (ane_h16_preload_26b123), checks unlocked DART protection bits, and freespristine_dataon rollback.drm/asahi: addT604127.2(26B123) GPU support (f98da6090b66)asahiaddsv26b123initdata layouts driven from the chipConfig(covering both 40-coreBASEand 32-coret6041_25g83::CONFIG4-cluster layouts), upgrades the runtime graph, and uses release opcode0x13on26B123.drm/apple, soc/apple: enableT6041internal and external displays on27.2(e538e576af34)display-gateandapple-dcp(apple_t6041_dcp{,ext}_v27_2()) admitapple,t6041-dcpandapple,t6041-dcpext(dcpext0..2) on27.2.0keyed purely on the DCP IP compatible and26B123UUID964EDE5B-8F78-38C2-A727-519CC9F0AF27, failing closed on unapproved27.xbuilds across both internal and headless/externalT6041topologies.apple-dcpenables 41-bit DMA, live-session adoption, Type-C route PHY power, crossbar link-up, and DP/HDMI audio onT6041dcpext.Why
26B123) updates theAOP,ANE,GPU, andDCPfirmware interfaces onT6041.26.5.2(25F84) and26.6.2(25G83) desktop operation stays unchanged.Hardware and host tests
arm64KUnitarm64KUnit (ane,asahifwid, anddisplay-gate): passed cleanly, includingt604127.2admission and unapproved-27.xinternal/external refusal controls.tools/testing/selftests/drivers/gpu/apple-dcp/run.py:88 / 88passed, includingt6041-v27-admission(with zeroof_machine_is_compatible()stubs).aop-bootargs-tests.py,g17-t6041-initdata-tests.py,g17-firmware-selection-tests.py,t6040-calibration-tests.py, andscripts/checkpatch.pl: passed cleanly.J616c(M4 Max, 16-core CPU, 40-core GPU, 64 GB RAM)apple_aop,ane(0-ULPmatch), and Vulkan GPU compute (0faults).3456x2234@120), HDMI (dcpext0), dual USB-C DisplayPort (dcpext1..2), and DP/HDMI audio (0faults).26B123and26B131firmware binaries match acrossGFX,ANE,AOP,PMP,DeviceTree, andDCPcode.Paired bootloader PR