Several fixes and clean-ups for blackwell related functionality. In particular:
- FSP communication hardening - Fix for Coherent allocation lifetime issues during FMC boot - Convert some raw DMA handle stores into &Coherent stores to help prevent future issues with the allocation not staying alive long enough - Make FbLayout code more obvious and correct Currently, the frts vidmem offset is calculated based on the non-wpr heap size and pmu reservation size, but AFAICT this is not right. The fb layout actually looks like: | non-wpr heap | WPR2 .. FRTS | PMU reserved | ... | VGA workspace | It's just by coincidence + generous alignment that the values happened to match with something more like pmu reserved size + vga workspace. Originally, I thought it would make sense to use the offset of FbLayout::frts to compute frts vidmem offset, but actually the offsets in FbLayout AFAICT don't make sense on post-FSP. `FbLayout` is used for both pre and post FSP architectures. FbLayout contains ranges for each region of framebuffer, but on post FSP architectures, only the size is actually used by GSP. The offsets are not decided by the driver. So, for post FSP architectures FbLayout contains essentially guesses for the offsets. Instead, make separate types so that we only store the information that's actually needed. This includes the actual reserved size after the pmu reservation so we can properly compute the frts offset. Signed-off-by: Eliot Courtney <[email protected]> --- Changes in v2: - Rebased on top of [email protected] - Dropped applied patches ("falcon: gsp: move PRIV target mask constants" and "fsp: move FMC firmware loading into wait_secure_boot") - Dropped "gsp: keep FMC boot params DMA region alive during error" - will finish discussion/fix on the bootcontext series from Alex - Drop "fsp: try to enforce exclusive access to FSP channel" as not necessary. - Added some extra fixes around the falcon "halted" state - Drop "wait for FSP boot earlier" since FSP is now at Gpu level in the bootcontext series from Alex - Don't reset FSP queue pointers on error - Add r-b from Alistair - Return EMSGSIZE not EIO for FSP queue return message too big - Link to v1: https://patch.msgid.link/[email protected] --- Eliot Courtney (10): gpu: nova-core: fsp: limit FSP receive message allocation size gpu: nova-core: fsp: catch bogus queue pointer issues gpu: nova-core: gsp: ensure lifetime for FMC boot DMA allocations gpu: nova-core: gsp: ensure LibOS DMA allocation lives long enough gpu: nova-core: split FbLayout into FSP and non-FSP versions gpu: nova-core: correct FRTS vidmem offset calculation gpu: nova-core: rename heap size field gpu: nova-core: return non-WPR heap size as u64 from HALs gpu: nova-core: correct RISC-V HALTED field gpu: nova-core: wait for RISC-V HALTED on FSP unload drivers/gpu/nova-core/falcon.rs | 11 ++++ drivers/gpu/nova-core/falcon/fsp.rs | 23 ++++++-- drivers/gpu/nova-core/falcon/hal.rs | 5 ++ drivers/gpu/nova-core/falcon/hal/ga102.rs | 7 +++ drivers/gpu/nova-core/falcon/hal/tu102.rs | 4 ++ drivers/gpu/nova-core/fb.rs | 84 +++++++++++++++++++++++---- drivers/gpu/nova-core/fb/hal.rs | 5 +- drivers/gpu/nova-core/fb/hal/ga100.rs | 6 +- drivers/gpu/nova-core/fb/hal/ga102.rs | 6 +- drivers/gpu/nova-core/fb/hal/gb100.rs | 9 ++- drivers/gpu/nova-core/fb/hal/gb202.rs | 9 ++- drivers/gpu/nova-core/fb/hal/gh100.rs | 8 ++- drivers/gpu/nova-core/fb/hal/tu102.rs | 14 ++++- drivers/gpu/nova-core/fsp.rs | 70 ++++++++++++++--------- drivers/gpu/nova-core/gsp.rs | 6 +- drivers/gpu/nova-core/gsp/boot.rs | 26 ++++----- drivers/gpu/nova-core/gsp/fw.rs | 95 ++++++++++++++++++++++++------- drivers/gpu/nova-core/gsp/hal.rs | 4 +- drivers/gpu/nova-core/gsp/hal/gh100.rs | 40 +++++++------ drivers/gpu/nova-core/gsp/hal/tu102.rs | 31 +++++----- drivers/gpu/nova-core/gsp/sequencer.rs | 18 +++--- drivers/gpu/nova-core/regs.rs | 2 +- 22 files changed, 344 insertions(+), 139 deletions(-) --- base-commit: a73a398a68ca9b9e5116a617562471f16b8310c4 change-id: 20260608-blackwell-fixes-30c9358c90a0 prerequisite-change-id: 20260619-nova-bootcontext-401d6107e8fb:v4 prerequisite-patch-id: f0a0ce0462acc6881b0255d041605544baf85636 prerequisite-patch-id: 1d7f7da1c7c40eef0b3e522c2a0a4fa00b286bb1 prerequisite-patch-id: 43c5946acdef0a11227b405f6acd3480c7bbb79d prerequisite-patch-id: 5ebfed11498a63a7e5652a0a4ee50ff4d1a188e0 prerequisite-patch-id: 04f4e5dfde6f418544eae9d44737521bb1ca571b prerequisite-patch-id: 1ac856805341457a1f54c26a4b0a29ac40f635be prerequisite-patch-id: 8c16161b095920e6b0c8f6ce40cd209a93437857 prerequisite-patch-id: eedb6aac0de88ef016ccbe5431e7ac723a0b8f23 prerequisite-patch-id: fdfc2db6deecbd77d098bbc8e0f74ad09efa5a3e prerequisite-patch-id: 923137f8d2664b73dbf55df106816f8edf912f76 prerequisite-patch-id: bf5cf0653180963ccac35495dae05d1f2c8b1d70 prerequisite-patch-id: dfd10bc2d272d344b6746ce3a05c73773b743696 prerequisite-patch-id: 4980eb81d7fd2438bae1b535746795e4eb43725e Best regards, -- Eliot Courtney <[email protected]>
