Repository navigation
Conversation
8f54b79 to
4592ae5
Compare
|
Rebased onto cae47c0 right after opening, because #1174 had just merged. The J813's own 27.2 method table is gone in favour of #1174's per-build tables. They agree entry for entry with what the J813's 27.2 kernelcache gives, so T8142 now only admits 27.2.0. The one entry #1174 leaves out, dfb_ready_query at A385, is a separate commit on top. The new head was booted on the J813 under 27.2 (DCP, panel, sway, GPU) and ran GLES2 at 16955/0. |
|
Reviewed the build identification, the band relayout and the T8142 firmware-compat change. The J700 and other profiles keep their old values in every edited match, and the CTS runs on the 27.2 stub cover it. @sithglan one change before this goes in: the dcp_methods_27_2 comment says the A385 tag comes from the J813's 27.2 kernelcache. Please describe it from your own 27.3 call trace only and drop the kernelcache reference. |
The J813 GPU driver is about to identify the firmware build iBoot loaded before it starts it, as the M5 Pro and Max do: it measures both roles' __TEXT, which iBoot loads back to back (ADT gfx-asc and gfx1-asc segment-ranges, 0x50000 + 0x4c000 bytes). Add the region as fw-text. Like fw-data, it is fixed at the address iBoot uses under macOS 27.0 (26A428), 0x100_00e4_4000, until the boot loader fills it in. Under 27.2 (26B123) iBoot loads the TEXT 64 KiB higher, at 0x100_00e5_4000, and the DATA at 0x100_0245_8000, so a 27.2 boot needs a loader that fills both. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
The J813 runs the common 26A428 InitData graph, the J873's interface. macOS 27.2 (26B123) ships a new G17G build (RTKit 3514.41.1), which never acknowledges that graph: the secondary's InitData times out. The 26B123 interface differs from 26A428 in three places, the same three as the J873's G18G build of this release: - both roles expect the InitData root version word with bit 45 set, 0x0c8b_6339_83a0_04c0; - the policy grows by 0x60 and the status config by 8; the other 22 allocations keep their sizes. Everything after the policy in the shared cluster moves by 0x80; the page total and the private cluster (0x6d8 still packs to 0x700) stay as they are; - policy fields +0x2f0c..+0x2f17 move by 0x10 and +0x2fb4..+0x6d9f by 0x18, with a new word at +0x2f28; status-config fields +0x59c..+0x5b3 move by 4 and +0x5b4 to the end by 8, with a new word at +0x5b8 and +0x59c left zero. The new words carry a new accelerator power-controller field, which the generic power and performance setup sets to 5000 and the G17G one leaves alone. The HW data, the roots, the main configs, status B and region C keep their field offsets. Add the 26B123 profile and graph. The 26A428 encoders run unchanged and their policy and status config are moved in place by bands; a nonzero byte no band carries is refused. Compile-time checks keep the bands ascending and inside the new sizes. The board for it is J813_26B123; no configuration selects it yet, and the 26A428 encoding is unchanged. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
The J813 ran a fixed variant: it started whatever firmware iBoot had loaded on the 26A428 graph. Under the macOS 27.2 stub that is the 26B123 build, which needs its own graph. Identify the loaded build as the M5 Pro and Max do, from the fw-text region: both roles' TEXT (G17G c000, then c010), with the entropy records and the ranges iBoot fills zeroed (the image header's load fields, the boot arguments before each role's GKTS record and the records from it). The 26A428 build keeps the J813 configuration; the 26B123 build runs the board on the 26B123 graph. Both digests reproduce from the stock images in the IPSWs with the same ranges zeroed and were measured on 27.0 (two boots) and 27.2 boots. An unknown build is refused before anything is written to the GPU. Tested on a J813 under the macOS 27.2 stub, with fw-text and fw-data at the 27.2 addresses: both roles acknowledge the 26B123 InitData, the render node registers, and Mesa runs GLES2 16955/0, GLES3 44379/1 (an order-dependent texture-units case that passes alone) and GLES31 37339/0, matching the 27.0 results. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
On a macOS 27.2 (26B123) stub, the J813 refuses its DCP's
apple,firmware-compat of 27.2.0. It then drives the DCP with the H17P
interface, and the 27.2 DCP firmware crashes on the first call
("ap_link: rpc_callee_gated: link_rpc_lookup callback not found:
'A427'").
The firmware 27.2 method table (iomfb_v27_methods("27.2.0")) drives the
J813's 27.2 DCP: with it the DCP boots, the panel comes up at 2560x1600
and sway presents on it.
Admit 27.2.0 on T8142 as firmware 27, so that probe picks that table.
Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
The firmware 27.2 table has no ID for dfb_ready_query, so boot_5() skips the query on 27.2. The 27.3 trace sends it at A385, one above its 27.0 ID, as 27.2 moved set_create_DFB and vi_set_temperature_hint up by one. Give the 27.2 table A385, so 27.2 boots with the same sequence as 27.0. The J813 ran with this table on 27.2: boot_done() acknowledges the DCP's boot callback only after the query's reply, and the DCP booted and the panel came up. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
4592ae5 to
17229b9
Compare
|
@RyanTheTide done, force-pushed as 17229b9 (was 4592ae5; the diff between them is comments and commit messages only).
The |
Base: integration/aurora (cae47c0), which has #1174 (the firmware 27 method table per build). Branch thomas/j813-272, five commits.
This brings up the J813 (M5 MacBook Air, T8142, G17G) under a macOS 27.2 (26B123) stub: the GPU on the 26B123 G17G firmware and the panel on the 27.2 DCP firmware. 27.0 (26A428) keeps working as before; the J813 picks the interface from the firmware it finds.
It needs aurora-silicon/aura#192, which fills the GPU
fw-textregion and publishes 27.2 as the OS firmware version. Without it, the DT keeps the 27.0fw-textaddress. The GPU then sees an unknown image and refuses to start it, and the DCP gets compat<0 0 0>: the same crash as today.What 27.2 changes
All of it was read from the J813's own 27.2 restore image (kernelcache.release.mac17g, armfw_g17g, armfw1_g17g, t8142dcp) and compared with 27.0.
GPU (RTKit 3514.41.1, the same firmware family as the J873's 26B123 G18G in #1652, and the same deltas):
DCP: 27.2 renumbers the AP -> DCP methods. #1174 has the 27.2 table from the T6050. The J813's own IOMobileGraphicsFamily-DCP and AppleMobileDispH17G-DCP, compared with 27.0's by method name, agree with it entry for entry. UnifiedPipeline2 gained
getDisplayCapsat A380, so A380-A399 move up by one. Every IOMobileFramebufferAP and DCPPowerManager method moves up by 50: A427get_color_remap_modeis A477, A408swap_submit_dcp_mainis A458, A484setPowerStateis A534. Everything else matches 27.0: the in/out sizes (swap_submit_dcpstays 0x1d30), the DCP -> AP callbacks, and the methods below A380. The one entry #1174 leaves out isdfb_ready_query(UnifiedPipeline2::headless), which is A385 (27.0: A384). #1174's own 27.3 trace sends it there as well.The commits
arm64: dts: apple: t8142-j813: Describe the GPU firmware TEXT: afw-textreserved-memory node, which aura fills from the ADT. Its static value is the 27.0 placement, likefw-data.drm/asahi: g17: M5: InitData for the macOS 27.2 (26B123) common firmware: a 26B123 profile of the common 26A428 graph. The 26A428 encoding is moved by the bands above, and a byte that no band carries is refused rather than dropped. The 26A428 encoding is unchanged.drm/asahi: t8142: Identify the J813 GPU firmware and admit macOS 27.2: the J813 identifies the loaded build by the TEXT digest, as the T6041/T6050 do (Firmware::Identified), and gets the 26A428 or 26B123 config. An unknown build is refused. There is a new KUnit case,t8142_identifies_each_build.drm/apple: dcp: T8142: Drive the macOS 27.2 firmware: T8142 admitsapple,firmware-compat27.2.0 as firmware 27, so probe picks drm/apple: traced firmware 27.3 IOMFB method IDs #1174's 27.2 table.drm/apple: dcp: Give firmware 27.2 its dfb_ready_query: A385 in the 27.2 table, so 27.2 boots with the same sequence as 27.0. Without it,boot_5()skips the query. This also applies to the T6050 on 27.2; it is a separate commit so it can be dropped on its own.Testing
All of this is on the J813 under the 27.2 stub, with aura
aura-j813-272a(the J813's enrolled branch plus aurora-silicon/aura#143'sfw-dataand aurora-silicon/aura#192's two commits), chainloaded in place from the DebugUSB proxy. This head (4592ae5, built as 7.3.0-aurora-j813-272+) and the same series on integration 3d6f0f5 (where the J813 still carried its own 27.2 table with A385) were both booted through aura-try with the kernel's own DTB, so aura filledfw-textandfw-data:<27 2 0>and boots with no crash; its boot callback chain completes, so it answereddfb_ready_queryat A385. eDP-1 runs at 2560x1600,appledrmfbbinds, and sway runs on the panel: the plane alternates between sway's framebuffers as the bar redraws, and no swap fails. The sound card is present.image_load_store.3d.qualifiers.coherent_r32f).asahi_fwid: 9 passed, 1 skipped (the j713 case, which skipped before this series too). The newt8142_identifies_each_buildpasses.texture.units.8_units.mixed.8, which passes alone 3 of 3) and 37339/0. With all four commits under 27av, the DCP gets compat<0 0 0>, falls back to H17P and crashes on A427, as it does today.Known on 27.2, and as far as I can tell on firmware 27 generally:
powerlog-serviceis announced with onlyep-has-desc-mgrandinterface-id. The AFK name fallback covers only the H17G profile, and T8142 on firmware 27 runs the default profile, so the service is not bound ("AFK[ep:20]: failed to extract init props: -2") and no loader brightness arrives. The backlight starts from the fallback level.cc @Acelogic @DjDeveloperr @RyanTheTide @LiamRay10