Repository navigation
kboot_gpu: publish the T6041 (M4 Max) GPU resources - #68
Conversation
|
Merge-train review (aura, M4-series): the change reads well and CI is green, but the commit(s) have no 🤖 Generated with Claude Code |
The T6041 GPU driver runs a static profile per loaded firmware build, so the loader only provides what differs between units and boots: the operating points with one voltage per cluster (four on T6041), the CS and AFR tables, the UAT and firmware regions, and the OS firmware version. The regions come from the same ADT properties as on T6040 and reuse its device tree paths. Nothing is powered or read on the GPU. The fill runs only when the device tree enables an apple,agx-t6041 node, validates everything before writing, and disables the GPU (and any region it published) on anything unexpected. The host test runs the fill on the tables and regions of a 32-core J616C. Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
6af01d7 to
53b035b
Compare
|
Signed off and force-pushed. No code change. |
|
Merge train (MTR, 06/11): reviewed. |
…bisection, census Bisecting the trap delay that holds off the guest's stall (AURA_TRAP_DELAY_NS) by trap class: GEXIT only gives aurora-silicon#9 xbt samples, guarded ERET aurora-silicon#6, IMPDEF ops aurora-silicon#5, everything but GEXIT aurora-silicon#68, sysreg traps alone aurora-silicon#68 (t106-t110, baseline aurora-silicon#5-6). A census of the guarded world's sysreg traps (AURA_SYSREG_CENSUS, t112) shows SPTM's entry read of s3_6_c15_c11_1 at ~1.2 million traps a second and a set of EL2 controls written a few thousand times in 20 s, around each cL4 call; delaying only those rare ones gives aurora-silicon#7 (t115). AURA_TRAP_DELAY_MASK selects the classes; the entry read is its own class. Among those EL2 controls is CPTR_EL2: SPTM writes 0x3300000 (FP and SME on) before cL4 runs and 0x0 on the way back, so that XNU's next FP access traps and gets XNU's own registers back -- lazy FP switching. aura kept the write in the shadow, so XNU ran on with cL4's SIMD registers. Under E2H XNU's CPTR_EL2 is the physical CPACR_EL1, so SPTM's write now lands there (ZEN, FPEN, SMEN, TTA; the EL2-only bits stay in the shadow) and its reads see it (AURA_CPTR_LIVE=0 restores the shadow). t114 boots as before with it; it did not move the stall. MDCR_EL2 and HACR_EL2 writes are logged once per distinct value. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
Adds the GPU handoff for T6041 (M4 Max).
dt_set_gpu()handles T6040, but on T6041 it stops at "unsupported chip".The T6041 GPU driver (linux#525) runs a static profile per loaded firmware build. So this only publishes what differs between units and boots:
/arm-io/sgxperf-states)/reserved-memorypaths as T6040apple,firmware-versionIt never powers or reads the GPU. It runs only when the device tree has an enabled
apple,agx-t6041node, and leaves a tree that keeps the GPU off alone. It validates everything before writing, and on anything unexpected it disables the GPU and any region it already published.Testing
New host test
tests/python/test_t6041_gpu_fill.py(24 cases): runs the fill on the tables and regions of a 32-core J616C ADT.test_t6040_gpu_fill.pystill passes.Ran the fill on two real J616C DTBs, with that ADT's values:
t6041-j616c.dts, with&gpuset to okay (#525 keeps it disabled)Both get the same regions, which match what the GPU driver uses on this machine today, the 16×4 operating points and the 8-entry CS/AFR tables.
Builds with
ESP_STAGE2=1 CHAINLOADING=1; clang-format clean.Booted once on a 32-core J616C, on top of aura#67, with #914's tree, #917 and a 7.3 T6041 25G83 driver. The GPU firmware started from this handoff. On the same stack, Hyprland ran on the G17 driver with Mesa
aurora-wip,vkmarkon Wayland kept the fragment engine busy (checked infdinfo), and Sober (x86, through FEX) reached Roblox's home screen, with no recoveries in about 2.5 minutes. No game has been played on it yet. For daily use, this machine still runs an older out-of-tree loader that hands over the same ADT regions.