Repository navigation
kboot_gpu: T8142: reserve the GPU firmware's data as fw-data - #143
Merged
RyanTheTide merged 2 commits intoNov 10, 2026
Merged
Conversation
The fixture stopped linking: kboot_gpu.c now calls pmgr_adt_power_enable_traced_saved(), pmgr_restore_modes() and dt_set_gpu_t8152(), which it has no stand-ins for. Add inert ones (the saved variant enables like pmgr_adt_power_enable(); no fixture is a T8152). The fixture builds only on an arm64 host (kboot_gpu.c's T6040 rounding uses AArch64 inline asm). Of its 75 scenarios, 65 pass; the ten t8122-j613-standin-* scenarios fail with and without this change. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
macOS 27.0's M5 GPU firmware gives each role a __DATA_SHARED_RO segment, where it keeps its crash log, and iBoot places it right after that role's __DATA (sgx gfx-data-shared-ro and gfx1-data-shared-ro). The Linux J813 GPU series maps those crash logs through a /reserved-memory/fw-data node that covers both roles' __DATA and __DATA_SHARED_RO. The DT has to give that node a fixed address until the boot loader fills it. Fill it with the span iBoot used, when the four segments are contiguous in that order. Firmware without __DATA_SHARED_RO, or segments placed apart, leave the node as the DT has it; a DT without the node is filled as before. On the J813 under macOS 27.0 (26A428), the ADT gives gfx-data 0x10002444000+0xc0000, gfx-data-shared-ro 0x10002504000+0x8000, gfx1-data 0x1000250c000+0xb4000 and gfx1-data-shared-ro 0x100025c0000+0x8000, so fw-data is 0x10002444000+0x184000: the region the Linux DT reserves today. Host tests (tests/kboot_gpu_g15_host.c): t8142-fw-data, t8142-fw-data-no-shared-ro, t8142-fw-data-apart, t8142-no-fw-data-node. Without this change the first and third fail. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
This was referenced Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Base: main (56bc59c). Branch: thomas/t8142-gpu-fw-data (two commits: 0b8cc5a, 665cb5c).
macOS 27.0's M5 GPU firmware gives each role a
__DATA_SHARED_ROsegment, where it keeps itscrash log. iBoot places it right after that role's
__DATA; the ADT names it sgxgfx-data-shared-ro/gfx1-data-shared-ro. The Linux J813 GPU series (aurora-silicon/linux#1413)maps those crash logs through
/reserved-memory/fw-data, which covers bothroles'
__DATAand__DATA_SHARED_RO. Today that node carries a fixed address in the DT.This fills it with the span iBoot used, when the four segments are contiguous in that order.
__DATA_SHARED_RO(before 27.0), or segments placed apart, leave the nodeas the DT has it (the latter with a log line).
uat-*,gfx-data,gfx1-data) are unchanged.On the J813 under macOS 27.0 (26A428) the ADT gives:
So fw-data becomes 0x10002444000 + 0x184000: the region the Linux DT reserves today.
The first commit makes the GPU host fixture link again.
kboot_gpu.cnow callspmgr_adt_power_enable_traced_saved(),pmgr_restore_modes()anddt_set_gpu_t8152(),which the fixture had no stand-ins for.
Testing
tests/run-kboot-gpu-g15.shon an arm64 host (Debian, gcc 16;kboot_gpu.c's T6040rounding is AArch64 inline asm, so the fixture does not build on x86). Four new T8142
scenarios:
t8142-fw-data: contiguous segments become fw-data;t8142-fw-data-no-shared-ro: firmware without the segment leaves the node as it is;t8142-fw-data-apart: segments placed apart leave it too, with the log line;t8142-no-fw-data-node: a DT without the node is filled as before.All four pass. With main's
kboot_gpu.cthe first and third fail, as they should.The other 75 scenarios: 65 pass, both with and without this change. The ten
t8122-j613-standin-*scenarios fail on main as well; that is not from this branch.The full build with clang 22 has no new warnings.
dt_set_gpu's stack-usage warning(2128 bytes) is the same on main.
On the J813 (macOS 27.0 stub), chainloaded in place from the DebugUSB proxy. The J813 boots
an enrolled aura (thomas/j813-27-smp2), not main, so the test image is that branch plus this
change's
kboot_gpu.cpart (local test branch thomas/j813-27-smp2-fwdata-test). It bootedLinux with a DTB whose
fw-datawas<0 0 0 0>; aura loggedFDT: Adding reserved-memory node fw-data (10002444000..100025c8000) to RAM map. Linux saw fw-data = 0x10002444000 +0x184000, status okay, and the GPU ran as with the DT's fixed address. I have not booted aura
main itself on the J813.
Reviewers: @Acelogic @DjDeveloperr @RyanTheTide @LiamRay10