Repository navigation
drm/asahi: M5: InitData for the macOS 27.2 and 27.3 firmware (G17S bring-up on J716s) - #1173
Conversation
b1615e3 to
0dd0833
Compare
RyanTheTide
left a comment
There was a problem hiding this comment.
- Rebase onto the current head of
funkzy/t6050-gpu-on-integration(0dd0833). That drops the 13 older base commits, which the branch now carries in rewritten form. Your 13 commits (27cd9cd..34f2f5b) replay onto it without conflicts. drivers/gpu/drm/asahi/g17/fw/m5/initdata.rshas comments that cite kernel-extension and firmware code: virtual addresses in the0xfffffe00...range,__TEXT,__constlocations and quoted instruction sequences. They sit atM5_26B123_STATUS_CONFIG_BANDS,M5_26B123_STATUS_CONFIG_INSERTED,M5_26B123_INITDATA_VERSION_WORD,ABI_ALLOCATION_SIZES_26B123_M5,M5_GPU_TIMEOUT_SECONDS,m5_forced_idle_timeout_ms,M5_26B123_POLICY_CONTROLLER_WORDSandM5_26B123_POLICY_CONTROLLER_WORDS_G17D. This tree can't carry them. Please remove every code-address and instruction reference. Derive each layout and value from what the running system shows (for example, InitData captured from the machine under macOS 27.2/27.3), and describe each field by its meaning and that observation.- The policy controller words are values read out of the kernel extension's code (for example, the 900/1600 pair and the 2500 entry), not observed InitData contents. Please replace them with values taken from captured InitData for the board, and name the fields.
34f2f5b to
d8ca53c
Compare
|
Updated (head d8ca53c, ten commits).
What the running system has shown so far is only that the firmware takes the graph as a whole: an earlier revision of this series, with the J716s tables, ran the 27.3 beta 1 firmware on the J716s (both InitData acknowledged, opening records retired, a 25-minute desktop session without a GPU error). This revision has not run on hardware, and the 27.2 firmware has not run at all. Build: all ten commits, |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Codex (GPT-6.1 Sol), reviewing on @DjDeveloperr’s behalf.
The current description and maintainer discussion still leave firmware provenance open: the 27.2/27.3 InitData has not been captured, multiple policy/controller constants remain explicitly inferred or 'not yet confirmed', and the author says merge should wait for those captures. A working J716s session does not establish that the full admitted firmware/table variants match observed data. Please keep this unmerged until the observed capture/provenance gate is met (or narrow to a separately proven profile), with exact current-source build/boot validation. I will not treat a website Working/Partial label as a substitute for this evidence.
|
Converted to draft. I still have no InitData captured from macOS 27.2 or 27.3, so the provenance point stands as it was. The branch also conflicts with the per-build layout ( |
…14/K116 Applies on top of aurora-silicon/linux PR aurora-silicon#1173. The 16-inch M5 Pro OLED (K116s, Mac17,12) restores from UniversalMac_27.2_26B8125_Restore.ipsw, not from the 26B123 image of the Mac17,8 that aurora-silicon#1173 pins. Its Firmware/agx/armfw_g17x.im4p and armfw1_g17x.im4p carry a010 (G17S) images whose LC_UUIDs are the uuid of the K116s ADT's iop-gfx-nub and iop-gfx1-nub (8A2891FC-D479-37E8-895D- 71B4D88ECB51, 58FF964E-F74B-31C2-8179-3837D6ADA9C2), so this is what iBoot loads. TEXT 0x50000 + 0x54000, DATA 0x184000, the GKTS/ECAP records and the _rtk_tunables/_rtk_patchbay sections at 26B123's offsets, but the fwid digest differs: 26B8125 G17S af68d034a3f006b43dab661b825f12598cb86e4d2a0e3844f14fa5059f38f6cb 26B123 G17S 2b4613c62a8a007f22a94101702c9ac6c4e90f2e123f3b36fbe6ffea913f0fd9 (check_fwid.py's algorithm.) Without this entry the driver refuses the K116s firmware before any GPU write. It names V26B123_M5: the AGX kext of the 26B8125 kernelcache builds root version word 0x0c8e_4339_8728_04c0 and its u64[24] allocation size table is ABI_ALLOCATION_SIZES_26B123_M5 entry for entry (HW data 0x2850, policy 0x12728, status config 0x790), and both firmware roles build the same version word. The interior offsets of the policy and the status config were not compared against 26B123's and no 27.2 firmware has run this graph on hardware. Signed-off-by: Jens Axboe <[email protected]>
…14/K116 Applies on top of aurora-silicon/linux PR aurora-silicon#1173 (patches-1173/0001..0010). The 16-inch M5 Pro OLED (K116s, Mac17,12) restores from UniversalMac_27.2_26B8125_Restore.ipsw, not from the 26B123 image of the Mac17,8 that aurora-silicon#1173 pins. Its Firmware/agx/armfw_g17x.im4p and armfw1_g17x.im4p carry a010 (G17S) images whose LC_UUIDs are the uuid of the K116s ADT's iop-gfx-nub and iop-gfx1-nub (8A2891FC-D479-37E8-895D- 71B4D88ECB51, 58FF964E-F74B-31C2-8179-3837D6ADA9C2), so this is what iBoot loads. TEXT 0x50000 + 0x54000, DATA 0x184000, the GKTS/ECAP records and the _rtk_tunables/_rtk_patchbay sections at 26B123's offsets, but the fwid digest differs: 26B8125 G17S af68d034a3f006b43dab661b825f12598cb86e4d2a0e3844f14fa5059f38f6cb 26B123 G17S 2b4613c62a8a007f22a94101702c9ac6c4e90f2e123f3b36fbe6ffea913f0fd9 (~/new-mac/gpu/tools/fwid.py, check_fwid.py's algorithm.) Without this entry the driver refuses the K116s firmware before any GPU write. It names V26B123_M5: the AGX kext of the 26B8125 kernelcache builds root version word 0x0c8e_4339_8728_04c0 and its u64[24] allocation size table is ABI_ALLOCATION_SIZES_26B123_M5 entry for entry (HW data 0x2850, policy 0x12728, status config 0x790), and both firmware roles build the same version word (~/new-mac/gpu/tools/verword.py, verword2.py). The interior offsets of the policy and the status config were not compared against 26B123's and no 27.2 firmware has run this graph on hardware. Signed-off-by: Jens Axboe <[email protected]>
DjDeveloperr
left a comment
There was a problem hiding this comment.
Codex (GPT-6.1 Sol), reviewing on @DjDeveloperr’s behalf, following the website lane's review/merge request.
This remains unready for merge at d8ca53c: it is still draft and conflicts with integration/aurora. The source still explicitly marks the 27.2/27.3 layouts and controller values as not confirmed from observed InitData. The author's6766779545/6812013120 replies say those observations are missing and the current Graph port will be done together with them, not before. The branch has not moved since that hold, and there are no reported checks on this exact head.
The older J716s initialization/desktop evidence does not qualify this revised source or every newly admitted firmware profile. Current main's T6050 profile still identifies only27.0; the missing support has not simply landed by another route. A website Working row cannot replace the outstanding provenance/ABI and integration gates.
Path to landing: provide the provenance-compliant observed-field evidence requested by the maintainer, replace/confirm the unverified values, port onto the current per-build Graph, and supply exact revised-head build/tests and hardware work for its admitted scope. Narrowing to a separately evidenced profile is an option; do not guess values or broaden identities to make CI green. Please keep raw private inputs out of public artifacts. I am not mechanically rebasing or building this stale ABI in advance of that evidence.
Existing Changes Requested/author draft hold remains. No site edit, revisit of merged dependencies, firmware download, hardware access, branch push or merge was performed. I will watch for the author's source/evidence update.
|
@rolotrealanis98, a G17D data point for the 27.2 slice, and an offer. Nothing here changes your branch, and how to take it is your call. The G17D digest you listed. The 27.2 G17D (a020) digest and record offsets in this PR's description admit the M5 Ultra's 27.2 firmware. #2866 adds that build to The G17D controller words. Your A G17D status config built from the policy. For the G17D on 26B123, #2866's second commit doesn't use the 26A428 status config moved through What it may mean for G17S and G17C. I only have the G17D. If a G17S 27.2 status config validated on your J716s comes out the same way, built from the policy, the table could become the 26B123 status-config map for every core type in your series, with this commit dropped. On the host, the table applied to the J714 and J716C policies differs from their current 26B123 status config in 86 words, 85 of them words where the J775D's band-moved config differed from the table too; I can share the harness and the word-by-word diff. If the band map is what validates on the G17S, the per-core-type table stays as it is. Either shape works for us: we can rebase onto yours, or send the table as a delta on this PR. Merging the two per-core-type tables ( J775D 27.2 row, extra evidence for this PR, not its own row: kit |
|
Data point from a second J716s: its fused GPU perf states (macOS 27.2.1 ADT |
From macOS 27.2 on, the M5 GPU firmware takes a different InitData graph than the 26A428 (27.0) one the M5 path builds: - the root version word gains bit 46 (0x0c8e_0339_8728_04c0 -> 0x0c8e_4339_8728_04c0); - the power policy grows from 0x126b0 to 0x12728 bytes and the status config from 0x780 to 0x790. The words above each insert move with it: the policy's state and AON PTD pointers (0x8254 -> 0x8284, 0x11a1c -> 0x11a4c), its controller words, and the status config's link word and pointer (0x774/0x778 -> 0x784/0x788) and submission history; - the HW data is the 26A428 one. Name the InitData layouts a firmware build needs (Variant::m5_layouts: M5Layouts::V26A428 or V26B123) and build the graph in the layouts the identified build names, from a per-build table (M5Layout, M5PolicyMap, M5StatusConfigMap) instead of the board's. The 26A428 encoders write their words at the 26A428 offsets; the power policy and the status config of another build are laid out from those with LayoutBands. The common26 boards keep their own graph. Gpu::new() refuses an M5 build that names no layouts right after identifying it, before anything is written to the GPU. Every M5 build in the tree today is 26A428 and names V26A428, so nothing changes for the M5 Pro, Max and Ultra. No 27.2 build is identified yet; the next commit does that. Observed in InitData captured from macOS 27.2 (26B123, the public Mac17,8 restore image) running as a guest under the m1n1 hypervisor on a J716s (M5 Pro, G17S): the version word on both roots; the spacing of eight objects that depends on the two sizes, matching these and not the 26A428 ones; the moved policy pointers; the status config's link pointer at 0x788 and its inserted words (0x5dc = 0, 0x60c = 5000, 0x640 = 0, 0x670 = 0); the policy controller words 0x492c = 5000 and 0x4a14 = 1600; and a HW data that sits where 26A428's does. The capture does not separate a status-config controller block of 0x64 bytes from one of 0x5c, so the block stride and the history offsets that follow from it are not confirmed, and the G17D controller words are not covered (the part was a G17S). Signed-off-by: rolotrealanis98 <[email protected]> Signed-off-by: Rolando Trevino <[email protected]>
…uild The M5 Pro admits only the 27.0 (26A428) G17S build. Admit the 27.2 (26B123) G17S build of both roles as well, identified the way fwid defines a build, as the 27.0 entry already is. 27.2 needs an entry of its own, because its primary's entropy record is not where 26A428's is. 27.0 keeps the 26A428 graph. 27.2 names a new variant, V26B123_M5: the 26A428 M5 protocol with the 26B123 InitData layouts the previous commit builds. The layouts follow from the firmware build the GPU identifies, and that is the only thing that can select them: the firmware's version word is identical for the builds involved, no ADT or DT property or hardware register distinguishes their InitData layouts, and the layout belongs to the firmware, not to a board or a chip. No board or compatible check is involved. The fwid KUnit test checks that every M5 Pro build names the layouts of its OS release and that no two builds share a digest. Signed-off-by: rolotrealanis98 <[email protected]> Signed-off-by: Rolando Trevino <[email protected]>
d8ca53c to
6bc1534
Compare
|
Ryan, #1173 is rebased and split as you asked; I have not pushed it yet.
|
|
@funkzy thanks for the J775D row and the offer. Please keep #2866 open and separate; I would not move it here.
|
|
@ja-818 thanks for the second J716s. Two points.
Could you post the per-state values of your ADT (frequency, both core voltages, SRAM) and how you apply "the higher of the two" today? I will check them against my unit, and I would like you to test the DT version. |
Resolve drivers/gpu/drm/asahi/g17/initdata/m5.rs: keep set_m5_policy_layouts() from this branch and drop InitData::m5_policy_telemetry_word(), which main removed as unused in f4db4c4 ("drm/asahi: remove the items rustc reports as never used"); nothing on this branch calls it. Signed-off-by: Diljit Singh <[email protected]>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
…14/K116 Applies on top of aurora-silicon/linux PR aurora-silicon#1173. The 16-inch M5 Pro OLED (K116s, Mac17,12) restores from the 27.2 (26B8125) image, not from the 26B123 image of the Mac17,8 that aurora-silicon#1173 pins. Its a010 (G17S) firmware images carry LC_UUIDs that are the uuid of the K116s ADT's iop-gfx-nub and iop-gfx1-nub (8A2891FC-D479-37E8- 895D-71B4D88ECB51, 58FF964E-F74B-31C2-8179-3837D6ADA9C2), so this is what iBoot loads. TEXT 0x50000 + 0x54000, DATA 0x184000, the GKTS/ECAP records and the _rtk_tunables/_rtk_patchbay sections sit at 26B123's offsets, but the firmware identity digest differs: 26B8125 G17S af68d034a3f006b43dab661b825f12598cb86e4d2a0e3844f14fa5059f38f6cb 26B123 G17S 2b4613c62a8a007f22a94101702c9ac6c4e90f2e123f3b36fbe6ffea913f0fd9 Without this entry the driver refuses the K116s firmware before any GPU write. It names V26B123_M5, the InitData of the 26B123 firmware, whose layout this build shares. On the K116s both firmware roles accept that InitData and run it: the machine has run this graph daily since mid-November. The kernel logs "GPU firmware: 27.2 (26B8125), G17S", KWin, Plasma and Xwayland render on the GPU ("Apple M5 Pro (G17S B1)") with no Mesa environment variable set, and the GPU comes back after each deep sleep. Signed-off-by: Jens Axboe <[email protected]>
The 26B123 G17C build has the same interface (V26B123_M5) and the same GKTS/ECAP records and boot-filled ranges as the 26B123 G17S build, with its own digest. Without an entry the driver refuses the M5 Max's 27.2 firmware before any GPU write. Add the build, with the digest of its TEXT with those ranges zeroed. The same computation gives the existing 26A428 G17C pin and the 26B123 G17S one. Extend the fwid layout test in fwid.rs (renamed to m5_builds_name_their_layouts) to check CONFIG_MAX alongside CONFIG so the new G17C entry's layout variant and digest uniqueness are verified too. Signed-off-by: Erik Bourget <[email protected]> [Diljit: applied on #1173 as merged, which carries no 27.3 (26C5035r) layouts: the layout test checks 27.2 and 27.0 builds only] Signed-off-by: Diljit Singh <[email protected]>
|
Merged One conflict, in
|
DjDeveloperr
left a comment
There was a problem hiding this comment.
Checked the 27.2 InitData graph and T6050 firmware identification diff, clean human sign-offs, green host-tests/pr-text CI, and the J716s hardware verification rows. No blocking findings.
drm/asahi: t6050: identify the K114/K116 27.2 (26B8125) G17S firmware (on #1173)
What: build the InitData graph for the M5 GPU firmware of macOS 27.2 (26B123), selected by the identified firmware build, and identify the M5 Pro's 27.2 G17S build.
Tested: no hardware row exists yet: not run on a Mac at head 6bc1534. Builds clean (W=1 CLIPPY=1, drivers/gpu/drm/asahi/, 0 errors, warning count equal to main). The J716s (M5 Pro) row at this head is still to be recorded; a J775D run on a stub build (571 pass, 57 not supported, 0 fail) is funkzy's, on a different head.
Risk: two-way door (a plain revert undoes it) | M5 Pro, Max and Ultra. Every build in the tree today names the 26A428 layouts, so there are no byte changes on 27.0.
Not yet: the J716s run on 27.2 at the exact head; the status-config controller block stride (0x64 vs 0x5c) is not separated by the capture.
Details
What this changes
The M5 GPU firmware of macOS 27.2 (26B123) takes a different InitData graph than the 26A428 (27.0) one. This PR builds it, selected by the identified firmware build, and identifies the M5 Pro's 27.2 G17S build.
drm/asahi: g17: m5: build the 27.2 (26B123) InitData graph:Variant::m5_layoutsnames the layouts a build needs; the M5 graph builds them from a per-build table (version word with bit 46, power policy 0x126b0 -> 0x12728, status config 0x780 -> 0x790, the words above the inserts moved, the G17D controller words by HW-data core type). A build that names none is refused inGpu::new()before anything is written to the GPU. Every build in the tree today names the 26A428 layouts: no byte changes for the M5 Pro, Max and Ultra on 27.0.drm/asahi: t6050: identify the M5 Pro's 27.2 (26B123) G17S firmware build: admits the 27.2 G17S build and namesV26B123_M5. The selection is by the identified firmware build, because the firmware's version word is identical for 27.0 and 27.2, no ADT/DT or hardware property distinguishes the InitData layouts, and the layout belongs to the firmware, not to a board or chip. No board or compatible check.The 27.3 beta 1 (26C5035r) identity and its HW data word are not part of this PR.
Captured InitData (macOS 27.2, J716s, G17S)
Observed under the m1n1 hypervisor, both roles; no raw dumps are published. Confirmed: version word, allocation sizes, policy anchors and controller words, status-config link pointer and inserted words, HW data as 27.0. Not separated: the status-config controller block stride (0x64 vs 0x5c). Not covered: the G17D controller words (the part was a G17S); funkzy's J775D run exercises them on 27.2.
Run
Not run on hardware at this head yet. The hardware row (J716s, 27.2 / 26B123, exact head) is still to be recorded.