gpu: nova-core: run falcon binaries for the r000 GSP-RM
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest9 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | rust: pci: add domain_nr() accessorrust/ rust/ | +21 | 0 replies | |
| 2/9 | gpu: nova-core: falcon: factor out the wait for the GSP suspenddrivers/ drivers/ | +16 | 0 replies | |
| 3/9 | gpu: nova-core: falcon: factor out the BROM and BOOTVEC programmingdrivers/ | +10 | 0 replies | |
| 4/9 | gpu: nova-core: gsp: factor out the core reset and the core resumedrivers/ drivers/ drivers/ | +88 | 0 replies | |
| 5/9 | gpu: nova-core: gsp: fix resume_gsp_rm()'s error messagesdrivers/ | +6 | 0 replies | |
| 6/9 | gpu: nova-core: falcon: select the BAR2 engine ID for framebuffer DMAdrivers/ drivers/ | +24 | 0 replies | |
| 7/9 | gpu: nova-core: gsp: add the r000 load-and-execute HS binary handlerdrivers/ drivers/ drivers/ | +199 | 0 replies | |
| 8/9 | gpu: nova-core: gsp: add the r000 load-and-execute bootloader handlerdrivers/ drivers/ | +170 | 0 replies | |
| 9/9 | gpu: nova-core: gsp: add the load-and-execute event dispatcherdrivers/ | +61 | 0 replies |
Reviews trailers per patch
1 of 9 patches has a Reviewed-by or Acked-by.
| Patch | Alexandre Courbot | Gary Guo |
|---|---|---|
| 1/9 | R-b | R-b |
| 2/9 | ||
| 3/9 | ||
| 4/9 | ||
| 5/9 | ||
| 6/9 | ||
| 7/9 | ||
| 8/9 | ||
| 9/9 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/9] gpu: nova-core: run falcon binaries for the r000 GSP-RM
This series adds the code that runs a falcon binary on behalf of the r000 GSP-RM during boot. It is the next part of the r000 GSP firmware series [1], which moves nova-core onto the GSP firmware of the r615 and later releases. The patches do not depend on the switch to r000, so they are posted on their own, in order to make the rest of that series smaller. With these applied, the driver still boots the r570 firmware.
Some background (perhaps a refresher for some readers): the GSP falcon has two cores, a falcon core and a RISC-V core, and only one of the two is active at a time. GSP-RM runs on the RISC-V core.
During boot, the r000 GSP-RM requires a binary to run on the falcon core. GSP-RM raises a load-and-execute event and suspends the RISC-V core. The driver then resets the GSP falcon, loads and runs the binary, and resumes GSP-RM. There are two such events:
* On GA102 and later, the binary is a Heavy-Secured (HS) binary that GSP-RM has placed in the framebuffer.
* On Turing and GA100, the binary is an image that the generic falcon bootloader loads. The event carries a descriptor of the image.
The series adds a handler for each of the two events, and a dispatcher that selects the handler from the command ID of an event. The handlers share steps with code that the driver already has, so the series first factors those steps out:
* the wait for the GSP suspend, out of the shutdown path
* the BROM and BOOTVEC programming, out of the PIO and DMA load paths
* the core reset and the core resume, out of the CPU sequencer
The only change in what the driver does with the r570 firmware is a slight change in the appearance of two error messages (mentioned below).
The series also has one patch that the handlers do not use, and that the rest of the r000 series requires: the PCI domain accessor. The patch is its v2 posting [2] with the Reviewed-by tags from Alex and Gary.
The series applies on drm-rust-next at 0dbf41fd03ab, on top of one build fix that is in v7.4-rc2 and not yet in drm-rust-next:
commit 57d916a3eb76 ("rust: bindings: derive Zeroable for bindgen's opaque array wrappers"). A branch with everything applied:
https://github.com/johnhubbard/linux/tree/nova-core-run-falcon-binaries-v0/
Changes since v3 of the r000 series. The two handlers and the dispatcher come from v3 patches 15, 17 and 18:
* The handlers now use the core reset and the core resume of the CPU sequencer.
* Typesafe handler code: a handler receives its decoded parameters, and the dispatcher decodes the payload of the event, instead of using two raw byte slices to describe the payload.
* The selection of the BAR2 engine ID is now introduced in a separate, small patch.
* Fixed two error messages in GSP-RM resume.
An LLM coding assistant (Claude Code) helped write every patch, and drafted the commit messages and this letter, all of which I've edited by hand afterwards.
[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/
John Hubbard (9):
rust: pci: add domain_nr() accessor
gpu: nova-core: falcon: factor out the wait for the GSP suspend
gpu: nova-core: falcon: factor out the BROM and BOOTVEC programming
gpu: nova-core: gsp: factor out the core reset and the core resume
gpu: nova-core: gsp: fix resume_gsp_rm()'s error messages
gpu: nova-core: falcon: select the BAR2 engine ID for framebuffer DMA
gpu: nova-core: gsp: add the r000 load-and-execute HS binary handler
gpu: nova-core: gsp: add the r000 load-and-execute bootloader handler
gpu: nova-core: gsp: add the load-and-execute event dispatcher
drivers/gpu/nova-core/falcon.rs | 46 +- drivers/gpu/nova-core/falcon/gsp.rs | 15 + .../gpu/nova-core/firmware/gen_bootloader.rs | 8 +- drivers/gpu/nova-core/gsp.rs | 1 + drivers/gpu/nova-core/gsp/boot.rs | 8 +- drivers/gpu/nova-core/gsp/load_exec.rs | 493 ++++++++++++++++++ drivers/gpu/nova-core/gsp/sequencer.rs | 48 +- drivers/gpu/nova-core/regs.rs | 2 + drivers/gpu/nova-core/sbuffer.rs | 1 - rust/helpers/pci.c | 5 + rust/kernel/pci.rs | 16 + 11 files changed, 582 insertions(+), 61 deletions(-) create mode 100644 drivers/gpu/nova-core/gsp/load_exec.rs
base-commit: 0dbf41fd03abee01a37a83336ed84cd5812af633
prerequisite-patch-id: dba3141a4ed9123a37958daa1a27e82669d64941
Signature · 1 line
2.56.1