]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gpu: nova-core: firmware: fix and explain v2 header offsets computations
authorAlexandre Courbot <acourbot@nvidia.com>
Fri, 6 Mar 2026 04:52:46 +0000 (13:52 +0900)
committerAlexandre Courbot <acourbot@nvidia.com>
Mon, 9 Mar 2026 05:29:21 +0000 (14:29 +0900)
commit17d7c97f73c7a0bd90bd22cd7441269a6f8a1d72
tree685b92c34b0c1f581489676f67c7b657d915c3d3
parent6ef5141114a95746731a65bc384ff4b1c071a3f2
gpu: nova-core: firmware: fix and explain v2 header offsets computations

There are no offsets in `FalconUCodeDescV2` to give the non-secure and
secure IMEM sections start offsets relative to the beginning of the
firmware object.

The start offsets for both sections were set to `0`, but that is
obviously incorrect since two different sections cannot start at the
same offset. Since these offsets were not used by the bootloader, this
doesn't prevent proper function but is incorrect nonetheless.

Fix this by computing the start of the secure IMEM section relatively to
the start of the firmware object and setting it properly. Also add and
improve comments to explain how the values are obtained.

Fixes: dbfb5aa41f16 ("gpu: nova-core: add FalconUCodeDescV2 support")
Reviewed-by: Eliot Courtney <ecourtney@nvidia.com>
Link: https://patch.msgid.link/20260306-turing_prep-v11-9-8f0042c5d026@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
drivers/gpu/nova-core/firmware.rs