mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexandre Courbot <acourbot@nvidia.com>
To: Danilo Krummrich <dakr@kernel.org>,
	Alice Ryhl <aliceryhl@google.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>,
	 Eliot Courtney <ecourtney@nvidia.com>,
	Zhi Wang <zhiw@nvidia.com>,
	 nova-gpu@lists.linux.dev, rust-for-linux@vger.kernel.org,
	 linux-kernel@vger.kernel.org,
	Alexandre Courbot <acourbot@nvidia.com>,
	 Daniel Almeida <daniel.almeida@collabora.com>,
	Gary Guo <gary@garyguo.net>
Subject: [PATCH v3 00/13] gpu: nova-core: generic bootloader and falcon DMA changes for r000
Date: Tue, 10 Nov 2026 19:20:49 +0900	[thread overview]
Message-ID: <20261110-r000-fw-v3-0-20d79ebb646f@nvidia.com> (raw)

This series contains patches 13, 14, 16 and 17 from John's r000 series
v3 [1], that prepare the generic falcon bootloader and the falcon DMA
code for the r000 boot protocol. They are submitted separately as they
do not depend on the command queue work, and are valuable on their own.
A few preparatory patches are also introduced to smoothen the
transition.

Patches 1 to 7 make the generic bootloader its own type, usable with any
DMEM descriptor and not just FWSEC's, and place it at the top of IMEM as
reported by the HWCFG register instead of assuming a 64 KiB IMEM. Patch
6 is a bit of an outlier as it allows register array locations to be
copied, in order to simplify patch 7 which makes sure the generic
bootloader can be used with the r000 boot protocol.

Patches 9 to 12 let falcon DMA transfers read from a framebuffer address
and tag DMEM blocks, check the per-block offsets for overflow, and
simplify the DMA setup flow.

The new DMA capabilities remain unused until the r000 load-and-execute
handlers land.

Based on `drm-rust-next`, tested with TU106 and GA107 using both the
570.144 and 615.71.09 firmware images.

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

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
Changes in v3:
- Perform `imem_dst_start` computation in `GenericBootloader::run` to
  avoid requiring a `Falcon` parameter in the constructor. (Eliot)
- Remove unneeded `ctx_dma` accessor. (Eliot)
- Inline `RegisterArrayLoc::clone`. (Sashiko)
- Avoid double-read of register in `with_fbif_transcfg`. (Eliot)
- Rename `dma_end` to more consistent `end_offset`. (Eliot)
- Simplify `dma_wr`. (Eliot)
- Link to v2: https://patch.msgid.link/20261107-r000-fw-v2-0-fb37cc5b20cd@nvidia.com

Changes in v2:
- Remove `Assisted-by: LLM` tags.
- Widen the `IMEMC::offs` field to 24 bits to be able to load the
  bootloader even if IMEM is larger than 64KB. (Eliot)
- Accept unbound `Device` to create the generic bootloader. (Eliot)
- Fix documentation for GenericBootloader::new and FwsecFirmwareWithBl::new. (Eliot)
- Program `FBIF_TRANSCFG` from `GenericBootloader::run`. (Eliot)
- Bring `with_fbif_transcfg()` from the later r000 patches.
- Use the source offset as tag for tagged DMEM transfers. (Eliot,
  Sashiko)
- Set the `DMTAG` attribute from `with_falcon_mem`. (Eliot)
- Program the FBIF_TRANSCFG register in dma_wr. (Eliot)
- Link to v1: https://patch.msgid.link/20261103-r000-fw-v1-0-e3d38fc130e3@nvidia.com

Changes since John's v3:
- Split the IMEM placement change out of the bootloader extraction.
- Keep the DMEM descriptor fields private behind a constructor.
- Replace the exported bootloader pairing type with a `run()` method.
- Make `dma_wr()` able to work with different sources instead of adding
  a second DMA method.
- Split the DMEM tagging and overflow checks into their own patches.

---
Alexandre Courbot (7):
      gpu: nova-core: falcon: widen the IMEM PIO offset to 24 bits
      rust: io: register: implement Copy and Clone for RegisterArrayLoc
      gpu: nova-core: falcon: rename the local variables of dma_wr()
      gpu: nova-core: falcon: allow DMEM DMA transfers to request tagging
      gpu: nova-core: falcon: allow DMA transfers to read from a framebuffer address
      gpu: nova-core: falcon: use src_start as FB offset for all DMA transfers
      gpu: nova-core: falcon: program the FBIF_TRANSCFG register in dma_wr

John Hubbard (6):
      gpu: nova-core: separate the generic falcon bootloader from FWSEC
      gpu: nova-core: move the bootloader DMEM descriptor out of FWSEC
      gpu: nova-core: run the generic bootloader from its own type
      gpu: nova-core: place the generic bootloader at the top of IMEM
      gpu: nova-core: falcon: introduce and use with_fbif_transcfg
      gpu: nova-core: falcon: check the per-block DMA offsets for overflow

 drivers/gpu/nova-core/falcon.rs                    | 134 +++++++---
 drivers/gpu/nova-core/firmware.rs                  |   1 +
 drivers/gpu/nova-core/firmware/fwsec/bootloader.rs | 215 ++--------------
 drivers/gpu/nova-core/firmware/gen_bootloader.rs   | 280 +++++++++++++++++++++
 drivers/gpu/nova-core/regs.rs                      |  13 +-
 rust/kernel/io/register.rs                         |   9 +
 6 files changed, 422 insertions(+), 230 deletions(-)
---
base-commit: a7cdb17ca0d7ce67e9f3a52d39edd60f03223729
change-id: 20261103-r000-fw-088d39a643b7

Best regards,
--  
Alexandre Courbot <acourbot@nvidia.com>


             reply	other threads:[~2026-11-10 10:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10 10:20 Alexandre Courbot [this message]
2026-11-10 10:20 ` [PATCH v3 01/13] gpu: nova-core: separate the generic falcon bootloader from FWSEC Alexandre Courbot
2026-11-10 10:20 ` [PATCH v3 02/13] gpu: nova-core: falcon: widen the IMEM PIO offset to 24 bits Alexandre Courbot
2026-11-10 10:20 ` [PATCH v3 03/13] gpu: nova-core: move the bootloader DMEM descriptor out of FWSEC Alexandre Courbot
2026-11-10 10:20 ` [PATCH v3 04/13] gpu: nova-core: run the generic bootloader from its own type Alexandre Courbot
2026-11-10 10:20 ` [PATCH v3 05/13] gpu: nova-core: place the generic bootloader at the top of IMEM Alexandre Courbot
2026-11-10 10:20 ` [PATCH v3 06/13] rust: io: register: implement Copy and Clone for RegisterArrayLoc Alexandre Courbot
2026-11-10 10:20 ` [PATCH v3 07/13] gpu: nova-core: falcon: introduce and use with_fbif_transcfg Alexandre Courbot
2026-11-10 10:20 ` [PATCH v3 08/13] gpu: nova-core: falcon: rename the local variables of dma_wr() Alexandre Courbot
2026-11-10 10:20 ` [PATCH v3 09/13] gpu: nova-core: falcon: allow DMEM DMA transfers to request tagging Alexandre Courbot
2026-11-10 10:20 ` [PATCH v3 10/13] gpu: nova-core: falcon: allow DMA transfers to read from a framebuffer address Alexandre Courbot
2026-11-10 10:21 ` [PATCH v3 11/13] gpu: nova-core: falcon: use src_start as FB offset for all DMA transfers Alexandre Courbot
2026-11-10 10:21 ` [PATCH v3 12/13] gpu: nova-core: falcon: check the per-block DMA offsets for overflow Alexandre Courbot
2026-11-10 10:21 ` [PATCH v3 13/13] gpu: nova-core: falcon: program the FBIF_TRANSCFG register in dma_wr Alexandre Courbot

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=20261110-r000-fw-v3-0-20d79ebb646f@nvidia.com \
    --to=acourbot@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=apopple@nvidia.com \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=ecourtney@nvidia.com \
    --cc=gary@garyguo.net \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nova-gpu@lists.linux.dev \
    --cc=rust-for-linux@vger.kernel.org \
    --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®