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 00/14] gpu: nova-core: merge `load` and `boot` for falcons, add load+exec handlers
Date: Mon, 30 Nov 2026 18:28:24 +0900 [thread overview]
Message-ID: <20261130-falcon-v1-0-cb94f87b5674@nvidia.com> (raw)
This combines my falcon `load`/`boot` rework (patches 1-6) with John's
r000 load+exec handlers [1] (patches 8-14). Patch 7 is a small prep
patch for John's patches.
Currently, loading the firmware and booting it is split into two
separate steps. Load is always called in combination with boot. Rewrite
the process to basically look like:
falcon.boot(<the firmware you want>, ...)
Additionally, add a segment source for firmware already in the
framebuffer (this is for HS binaries).
This simplifies running HS binaries in the r000 load+exec boot process
[1], because they can be treated as falcon firmware binaries directly,
without having to call into the guts of the boot process code + make fns
like `dma_wr` public.
This is not a pure refactor, with this `dma_load` uses two `Coherent`s
(one for imem, one for dmem) instead of one. The extra `Coherent` is a
consequence of splitting the storage vs transfer method more
orthogonally. I don't think it's consequential but jfyi.
Tested boot on TU104, GA104, AD106 and GB205.
This is based on drm-rust-next.
[1]: https://lore.kernel.org/20261120044704.165223-1-jhubbard@nvidia.com
John's cover letter for patches 8-14, 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
---
Eliot Courtney (7):
gpu: nova-core: falcon: program BROM and BOOTVEC in `boot`
gpu: nova-core: use correct offset for imem in `BooterFirmware`
gpu: nova-core: remove some dependencies on FalconDmaLoadTarget
gpu: nova-core: falcon: separate staging data for DMA from its location
gpu: nova-core: falcon: add `FalconImage` for `FalconFirmware` trait
gpu: nova-core: falcon: load the firmware image in Falcon::boot
gpu: nova-core: firmware: use `zerocopy` for `BootloaderDmemDescV2`
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 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 | 451 ++++++++----------
drivers/gpu/nova-core/falcon/gsp.rs | 15 +
drivers/gpu/nova-core/firmware.rs | 74 +--
drivers/gpu/nova-core/firmware/booter.rs | 120 ++---
drivers/gpu/nova-core/firmware/fwsec.rs | 57 ++-
drivers/gpu/nova-core/firmware/fwsec/bootloader.rs | 50 +-
drivers/gpu/nova-core/firmware/gen_bootloader.rs | 112 ++---
drivers/gpu/nova-core/gsp.rs | 1 +
drivers/gpu/nova-core/gsp/boot.rs | 8 +-
drivers/gpu/nova-core/gsp/hal/tu102.rs | 9 +-
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 -
14 files changed, 906 insertions(+), 547 deletions(-)
---
base-commit: abfb640b2374e26de8ff81d488c39d8254db538e
change-id: 20261130-falcon-adc42c387291
Best regards,
--
Eliot Courtney <ecourtney@nvidia.com>
next reply other threads:[~2026-11-30 9:28 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 9:28 Eliot Courtney [this message]
2026-11-30 9:28 ` [PATCH 01/14] gpu: nova-core: falcon: program BROM and BOOTVEC in `boot` Eliot Courtney
2026-11-30 9:28 ` [PATCH 02/14] gpu: nova-core: use correct offset for imem in `BooterFirmware` Eliot Courtney
2026-11-30 9:28 ` [PATCH 03/14] gpu: nova-core: remove some dependencies on FalconDmaLoadTarget Eliot Courtney
2026-11-30 9:28 ` [PATCH 04/14] gpu: nova-core: falcon: separate staging data for DMA from its location Eliot Courtney
2026-11-30 9:28 ` [PATCH 05/14] gpu: nova-core: falcon: add `FalconImage` for `FalconFirmware` trait Eliot Courtney
2026-11-30 9:28 ` [PATCH 06/14] gpu: nova-core: falcon: load the firmware image in Falcon::boot Eliot Courtney
2026-11-30 9:28 ` [PATCH 07/14] gpu: nova-core: firmware: use `zerocopy` for `BootloaderDmemDescV2` Eliot Courtney
2026-11-30 9:28 ` [PATCH 08/14] gpu: nova-core: falcon: factor out the wait for the GSP suspend Eliot Courtney
2026-11-30 9:28 ` [PATCH 09/14] gpu: nova-core: gsp: factor out the core resume Eliot Courtney
2026-11-30 9:28 ` [PATCH 10/14] gpu: nova-core: gsp: fix resume_gsp_rm()'s error messages Eliot Courtney
2026-11-30 9:28 ` [PATCH 11/14] gpu: nova-core: falcon: select the BAR2 engine ID for framebuffer DMA Eliot Courtney
2026-11-30 9:28 ` [PATCH 12/14] gpu: nova-core: gsp: add the r000 load-and-execute HS binary handler Eliot Courtney
2026-11-30 9:28 ` [PATCH 13/14] gpu: nova-core: gsp: add the r000 load-and-execute bootloader handler Eliot Courtney
2026-11-30 9:28 ` [PATCH 14/14] 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=20261130-falcon-v1-0-cb94f87b5674@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
all inboxes | Powered by JetHome®