NVIDIA GPU driver infrastructure
 help / color / mirror / Atom feed
From: Eliot Courtney <ecourtney@nvidia.com>
To: Danilo Krummrich <dakr@kernel.org>,
	Alice Ryhl <aliceryhl@google.com>,
	 Alexandre Courbot <acourbot@nvidia.com>,
	David Airlie <airlied@gmail.com>,
	 Simona Vetter <simona@ffwll.ch>
Cc: John Hubbard <jhubbard@nvidia.com>,
	 Alistair Popple <apopple@nvidia.com>,
	Timur Tabi <ttabi@nvidia.com>,  Zhi Wang <zhiw@nvidia.com>,
	nova-gpu@lists.linux.dev,  dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org,
	 Eliot Courtney <ecourtney@nvidia.com>
Subject: [PATCH v2 0/7] gpu: nova-core: gsp: add r000 load+exec handlers
Date: Wed, 02 Dec 2026 21:06:32 +0900	[thread overview]
Message-ID: <20261202-falcon-v2-0-33ed73a20796@nvidia.com> (raw)

Patches 1-7 from v1 (the falcon `load`/`boot` rework and `zerocopy`
prep) were applied to drm-rust-next, so v2 only has the remaining r000
load+exec handler patches based on John's series [1]. 

This is based on drm-rust-next.

[1]: https://lore.kernel.org/20261120044704.165223-1-jhubbard@nvidia.com

John's cover letter, trimmed to what still applies:
> 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 [2], 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 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).
>
> Changes since v3 of the r000 series. The two handlers and the dispatcher
> come from v3 patches 15, 17 and 18:
>
> * GSP-RM is now resumed with 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.
>
> [2] https://lore.kernel.org/all/20260918010719.1176945-1-jhubbard@nvidia.com/

Signed-off-by: Eliot Courtney <ecourtney@nvidia.com>
---
Changes since boot-rework2 v2 and John's v1 [1]:
- Merge the two series into one (Alex)
- Add a comment on V2-only bootloader-loaded FWSEC in patch #3 (Alex)
- Add patch #7, which derives the `zerocopy` traits for
  `BootloaderDmemDescV2`
- Drop John's 1/9 (in drm-rust-next as 002b9422b314) and 3/9 (patch #1
  programs BROM and BOOTVEC in `boot`)
- Rework John's patches on top of patches #1-#6
- Link to boot-rework2 v2: https://patch.msgid.link/20261129-boot-rework2-v2-0-622f3560e18a@nvidia.com

---
Changes in v2:
- Drop patches #1-#7, applied to drm-rust-next
- Rebase on drm-rust-next
- Leave out the module doc until patch #5 adds it (Alex)
- Always write `Bar2Fn0` on dma cfg reg (Alex)
- Load the generic bootloader in place instead of passing it in (Alex)
- Return `EIO` without resuming GSP-RM when `MAILBOX0` is non-zero (Alex)
- Link to v1: https://patch.msgid.link/20261130-falcon-v1-0-cb94f87b5674@nvidia.com

---
John Hubbard (7):
      gpu: nova-core: falcon: factor out the wait for the GSP suspend
      gpu: nova-core: gsp: factor out the core resume
      gpu: nova-core: gsp: fix resume_gsp_rm()'s error messages
      gpu: nova-core: falcon: select the BAR2 engine ID for DMA transfers
      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                  |  15 +-
 drivers/gpu/nova-core/falcon/gsp.rs              |  15 +
 drivers/gpu/nova-core/firmware/gen_bootloader.rs |   2 +-
 drivers/gpu/nova-core/gsp.rs                     |   1 +
 drivers/gpu/nova-core/gsp/boot.rs                |   8 +-
 drivers/gpu/nova-core/gsp/load_exec.rs           | 511 +++++++++++++++++++++++
 drivers/gpu/nova-core/gsp/sequencer.rs           |  42 +-
 drivers/gpu/nova-core/regs.rs                    |   2 +
 drivers/gpu/nova-core/sbuffer.rs                 |   1 -
 9 files changed, 553 insertions(+), 44 deletions(-)
---
base-commit: 73a8f8366b2389c2506959ab3e408c3c5161ac1a
change-id: 20261130-falcon-adc42c387291

Best regards,
--  
Eliot Courtney <ecourtney@nvidia.com>


             reply	other threads:[~2026-12-02 12:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 12:06 Eliot Courtney [this message]
2026-12-02 12:06 ` [PATCH v2 1/7] gpu: nova-core: falcon: factor out the wait for the GSP suspend Eliot Courtney
2026-12-02 12:06 ` [PATCH v2 2/7] gpu: nova-core: gsp: factor out the core resume Eliot Courtney
2026-12-02 12:06 ` [PATCH v2 3/7] gpu: nova-core: gsp: fix resume_gsp_rm()'s error messages Eliot Courtney
2026-12-02 12:06 ` [PATCH v2 4/7] gpu: nova-core: falcon: select the BAR2 engine ID for DMA transfers Eliot Courtney
2026-12-02 12:06 ` [PATCH v2 5/7] gpu: nova-core: gsp: add the r000 load-and-execute HS binary handler Eliot Courtney
2026-12-02 12:06 ` [PATCH v2 6/7] gpu: nova-core: gsp: add the r000 load-and-execute bootloader handler Eliot Courtney
2026-12-02 12:06 ` [PATCH v2 7/7] gpu: nova-core: gsp: add the load-and-execute event dispatcher Eliot Courtney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261202-falcon-v2-0-33ed73a20796@nvidia.com \
    --to=ecourtney@nvidia.com \
    --cc=acourbot@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=apopple@nvidia.com \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nova-gpu@lists.linux.dev \
    --cc=simona@ffwll.ch \
    --cc=ttabi@nvidia.com \
    --cc=zhiw@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox