From c90523e56412bdb7660dcc72f97a6f33996feefc Mon Sep 17 00:00:00 2001 From: Jos Dehaes Date: Tue, 10 Nov 2026 10:07:13 +0100 Subject: [PATCH 1/2] drm/asahi: admit the 25G83 image the 40-core J614C loads iBoot fills part of the loaded GPU firmware TEXT for each Mac, so every admitted T6041 25G83 image is a measurement. The 40-core MacBook Pro 14" M4 Max (J614C, macOS 26.6.2 stub, iBoot mBoot-18000.161.10) loads one whose digest differs from the J616C's: unsupported GPU firmware build: TEXT 0x60000 DATA 0x138000 entropy 0x59839/0x5991c sha256 7c04360e05a6b8628f61262d0a244166187ad87a734716d8910908e94ffec08a List it next to the J616C's. Both builds that share the 25G83 images admit it, and the selector picks the 40-core configuration for this GPU. Link: https://github.com/aurora-silicon/linux/issues/1372 Signed-off-by: Jos Dehaes Co-Authored-By: Claude Opus 5.5 --- drivers/gpu/drm/asahi/hw/t6041.rs | 39 ++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/asahi/hw/t6041.rs b/drivers/gpu/drm/asahi/hw/t6041.rs index 04ddfacd53cec..74423a026660a 100644 --- a/drivers/gpu/drm/asahi/hw/t6041.rs +++ b/drivers/gpu/drm/asahi/hw/t6041.rs @@ -104,22 +104,35 @@ const BUILD_25F84: fw::variant::Build = fw::variant::Build { /// The macOS 26.6.2 boot firmware (iBoot mBoot-18000.161.10) loads the 25G83 build the M4 Pro /// runs. iBoot fills part of the loaded TEXT for each Mac, so each admitted image is a -/// measurement. The one listed is the only T6041 image measured so far, on a 32-core J616C, -/// which runs it with [`super::t6041_25g83::CONFIG`]. +/// measurement. Two are listed: the 32-core J616C's, which runs with +/// [`super::t6041_25g83::CONFIG`], and the 40-core J614C's, which runs with [`CONFIG_25G83`]. pub(super) const BUILD_25G83: fw::variant::Build = fw::variant::Build { os_version: [26, 6, 2], name: "macOS 26.6.2 (25G83, iBoot mBoot-18000.161.10)", - images: &[crate::fwid::FirmwareBuild { - name: "Apple GFX 25G83 for T6041 (normalized loaded image, 32-core J616C)", - text_size: 0x60000, - data_size: 0x138000, - entropy: [0x59839, 0x5991c], - text_sha256: [ - 0xaa, 0x11, 0x3e, 0xd6, 0x20, 0x79, 0xbc, 0xfd, 0xee, 0xf0, 0xf8, 0x6c, 0x2a, 0x8d, - 0x7e, 0xae, 0x9f, 0x90, 0x7b, 0x03, 0xbe, 0x28, 0xcc, 0xf2, 0x98, 0xc9, 0x43, 0x95, - 0x1d, 0x0e, 0xff, 0xc5, - ], - }], + images: &[ + crate::fwid::FirmwareBuild { + name: "Apple GFX 25G83 for T6041 (normalized loaded image, 32-core J616C)", + text_size: 0x60000, + data_size: 0x138000, + entropy: [0x59839, 0x5991c], + text_sha256: [ + 0xaa, 0x11, 0x3e, 0xd6, 0x20, 0x79, 0xbc, 0xfd, 0xee, 0xf0, 0xf8, 0x6c, 0x2a, 0x8d, + 0x7e, 0xae, 0x9f, 0x90, 0x7b, 0x03, 0xbe, 0x28, 0xcc, 0xf2, 0x98, 0xc9, 0x43, 0x95, + 0x1d, 0x0e, 0xff, 0xc5, + ], + }, + crate::fwid::FirmwareBuild { + name: "Apple GFX 25G83 for T6041 (normalized loaded image, 40-core J614C)", + text_size: 0x60000, + data_size: 0x138000, + entropy: [0x59839, 0x5991c], + text_sha256: [ + 0x7c, 0x04, 0x36, 0x0e, 0x05, 0xa6, 0xb8, 0x62, 0x8f, 0x61, 0x26, 0x2d, 0x0a, 0x24, + 0x41, 0x66, 0x18, 0x7a, 0xd8, 0x7a, 0x73, 0x47, 0x16, 0xd8, 0x91, 0x09, 0x08, 0xe9, + 0x4f, 0xfe, 0xc0, 0x8a, + ], + }, + ], // Four clusters: the tiler segment values of 25F84 on this machine. variant: &fw::variant::Variant { ta_mode_1: true, From 49306bcc277e849062e5abfe16c6248a4337b2bd Mon Sep 17 00:00:00 2001 From: Jos Dehaes Date: Tue, 10 Nov 2026 10:07:34 +0100 Subject: [PATCH 2/2] drm/asahi: leave +0x2610 at 0 for T6041 on 25G83 The 40-core T6041 runs 25G83 with the 25F84 profile and the 25G83 register map (#1345). On the J614C (MacBook Pro 14" M4 Max, 40 cores, macOS 26.6.2 stub) the firmware then starts, takes every job and marks its items done, but the GPU never runs one: no completion stamp, no fault, no firmware crash. Every job times out after two seconds. The 25F84 profile's hardware data words include +0x2610 = 1. The J616C's 25G83 contents, and #1373's 32-core builders that reproduce them, have 0 there. Bisected on the J614C, with the J616C capture as the baseline: capture as dumped (32-core words, 6-MCC map) runs + the 40-core words +0xf6c/+0xf88/+0xf8c/+0xfac/ +0xfb8/+0xfc0/+0x2570 and this unit's OPP/CS runs + +0x2610 = 1 alone hangs and on this tree: 40-core 25G83 configuration as merged hangs the same with +0x2610 left at 0 runs "Runs" means a Vulkan compute dispatch (1, 64 and 4096 workgroups), a buffer fill, a clear and a triangle render pass all complete with the expected contents. With the fix, vkcube and a full X11 desktop (Cinnamon on yserver, with fractional scaling and full-screen video) run on the GPU. Give the 40-core 25G83 configuration its own chip without the word. The 25F84 configuration keeps it. The initdata host test now builds the 25G83 objects with that chip and checks that they differ from 25F84's only in the register map and +0x2610. Link: https://github.com/aurora-silicon/linux/issues/1372 Fixes: 579bcc38d686 ("drm/asahi: run the 25G83 build on the 40-core M4 Max") Signed-off-by: Jos Dehaes Co-Authored-By: Claude Opus 5.5 --- drivers/gpu/drm/asahi/fwid.rs | 6 ++++++ drivers/gpu/drm/asahi/hw/t6041.rs | 20 +++++++++++++++++++- tools/asahi/g17-t6041-initdata-tests.py | 14 +++++++++----- 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/asahi/fwid.rs b/drivers/gpu/drm/asahi/fwid.rs index 2aeca708359d8..1c4480defadad 100644 --- a/drivers/gpu/drm/asahi/fwid.rs +++ b/drivers/gpu/drm/asahi/fwid.rs @@ -279,6 +279,12 @@ mod tests { assert_eq!((window.slot, window.va), (expected.slot, expected.va)); } assert!(g83.reserved_slots.is_empty()); + // 25G83 does not run work on 40 cores with the 25F84 word +0x2610 = 1. + let chip = g83.chip.unwrap(); + assert!(chip + .hw_data_words + .iter() + .all(|&(offset, _, _)| offset != 0x2610)); let cores = crate::hw::t6041::CONFIG.core_layout.cores; assert_eq!(g83.core_layout.cores, cores); assert_eq!(cores, Some((4, 40))); diff --git a/drivers/gpu/drm/asahi/hw/t6041.rs b/drivers/gpu/drm/asahi/hw/t6041.rs index 74423a026660a..11385a7a0a4b2 100644 --- a/drivers/gpu/drm/asahi/hw/t6041.rs +++ b/drivers/gpu/drm/asahi/hw/t6041.rs @@ -141,10 +141,12 @@ pub(super) const BUILD_25G83: fw::variant::Build = fw::variant::Build { config: None, }; -/// The 40-core M4 Max on 25G83: the 25F84 configuration with the 25G83 register map. +/// The 40-core M4 Max on 25G83: the 25F84 configuration with the 25G83 register map and +/// [`CHIP_25G83`]. const CONFIG_25G83: Config = Config { windows: ®ISTER_WINDOWS_25G83, reserved_slots: &[], + chip: Some(&CHIP_25G83), firmware: fw::variant::Firmware::Identified(&[BUILD_25G83]), ..BASE }; @@ -315,6 +317,22 @@ const CHIP: v25g83::Chip = v25g83::Chip { cs_perf_table: false, }; +/// [`CHIP`] for 25G83: its hardware data has 0 at `+0x2610`. +/// +/// 25F84 runs with 1 there. On 25G83 the 40-core J614C then accepts work and marks it done, +/// but the GPU never runs it: no completion, no fault, every job times out. With 0, which is +/// also what the J616C's 25G83 contents have, compute and render work run. +const CHIP_25G83: v25g83::Chip = v25g83::Chip { + hw_data_words: HW_DATA_WORDS_25G83, + ..CHIP +}; + +/// [`HW_DATA_WORDS`] without its last word, `+0x2610 = 1`. +const HW_DATA_WORDS_25G83: &[(usize, u32, usize)] = match HW_DATA_WORDS.split_last() { + Some((&(0x2610, 1, 1), rest)) => rest, + _ => panic!("the last T6041 hardware data word must be +0x2610"), +}; + const HW_DATA_WORDS: &[(usize, u32, usize)] = &[ (0xe0, 0x2008, 1), (0xe8, 0x20080000, 1), diff --git a/tools/asahi/g17-t6041-initdata-tests.py b/tools/asahi/g17-t6041-initdata-tests.py index f243c34f4b294..f2459ce46bb7f 100644 --- a/tools/asahi/g17-t6041-initdata-tests.py +++ b/tools/asahi/g17-t6041-initdata-tests.py @@ -109,7 +109,9 @@ def item(source, start): "const RESERVED_SLOTS", "const MAX_POWER_MW", "const CHIP: ", - "const HW_DATA_WORDS", + "const CHIP_25G83: ", + "const HW_DATA_WORDS: ", + "const HW_DATA_WORDS_25G83: ", "const POWER_CONFIG_WORDS", ] @@ -220,16 +222,18 @@ def aux(name, rows): std::fs::write(format!("{}/t6041-hwdata.bin", out), &hw).unwrap(); std::fs::write(format!("{}/t6041-power-config.bin", out), &power).unwrap(); std::fs::write(format!("{}/t6041-region-c.bin", out), ®ion).unwrap(); - // 25G83: the same configuration with its own register map. + // 25G83: the same configuration with its own register map, and 0 at +0x2610. let (hw_g83, power_g83, region_g83) = build(t6041::CHIP_ID, &t6041::REGISTER_WINDOWS_25G83, - &[], &t6041::PERF, &T6041_OPPS, &T6041_AUX, &t6041::CHIP, &t6041::REGION_C, 40); + &[], &t6041::PERF, &T6041_OPPS, &T6041_AUX, &t6041::CHIP_25G83, &t6041::REGION_C, 40); println!("T6041 25G83 initialization objects built"); assert_eq!(power_g83, power, "the register map changes only the hardware data"); assert_eq!(region_g83, region, "the register map changes only the hardware data"); let map = 0x640..0x640 + REGISTER_MAP_SLOTS * core::mem::size_of::(); let outside = |a: &[u8], b: &[u8]| a.iter().zip(b).enumerate() - .filter(|(i, (x, y))| x != y && !map.contains(i)).count(); - assert_eq!(outside(&hw_g83, &hw), 0, "the 25G83 hardware data differs only in its register map"); + .filter(|(i, (x, y))| x != y && !map.contains(i)).map(|(i, _)| i).collect::>(); + assert_eq!(outside(&hw_g83, &hw), [0x2610], + "the 25G83 hardware data differs only in its register map and +0x2610"); + assert_eq!((hw[0x2610], hw_g83[0x2610]), (1, 0), "+0x2610: 1 on 25F84, 0 on 25G83"); std::fs::write(format!("{}/t6041-25g83-hwdata.bin", out), &hw_g83).unwrap(); // The 32-core J616C on 25G83, from its operating points. What it ran with since October // 2026, hashed without the runtime words (FNV-1a 64), from a dump of 25 Oct 2026.