rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 00/11] gpu: nova-core: Boot GSP to RISC-V active
@ 2025-10-17  5:47 Alistair Popple
  2025-10-17  5:47 ` [PATCH v6 01/11] gpu: nova-core: Set correct DMA mask Alistair Popple
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Alistair Popple @ 2025-10-17  5:47 UTC (permalink / raw)
  To: rust-for-linux, dri-devel, dakr, acourbot; +Cc: Alistair Popple

Changes since v5:

Most of the changes incorporated here are minor documentation and comment fixes
based on feedback from Alex. There are still a couple of outstanding comments
to address, in particular dealing with the Rust compatiblity changes for
slice_flatten as suggested by Miguel.

However I am going to be unable to look at these for a few weeks so Alex has
kindly offered to help finish addressing the outstanding comments and will
likely post a more refined version of this series shortly. Thanks!

Changes since v4:

The main change for this revision is to derive the Zeroable trait for most
of our bindings. The rest of the changes just address relatively minor review
comments made for v4 of the series.

This series is still based on a merge of drm-rust-next
and drivers-core-testing made by Alex. A complete copy of
the tree with these patches applied will be available at
https://github.com/apopple-nvidia/linux/tree/nova-core-for-upstream-v5

Changes since v3:

The main change for v4 is to switch to using the `init!` macros to ensure all
fields on in-place initialised structs get initialised. This will require our
bindings to derive the `Zeroable` trait, however for now I have left this as a
TODO with manual implementations for each trait. That is because rebasing the
binding changes is a bit of a pain, so I want to give reviewers a change to see
if deriving `Zeroable` for all bindings makes sense or not.

Other changes include addressing most of the outstanding TODOs left in v3 and
addressing review comments from v2 and v3. In particular some of the comments by
Timur that had not been picked up.

Changes since v2:

The main change since v2 has been to make all firmware bindings
completely opaque. It has been made clear this is a pre-requisite for
this series to progress upstream as it should make supporting
different firmware versions easier in future.

Overall the extra constructors and accessors add a couple of hundred
lines of code and a few extra unsafe statements.

Other changes include addressing a bunch of other comments - see the
individual patches for further details. There are also still some
outstanding comments and TODO's to address which I have not gotten to
yet - these will be done in the next version of this series.

Changes since v1:

 - Based on feed back from Alex the GSP command queue logic was reworked
   extensively. This involved creating a new data struct (DmaGspMem) to
   manage the shared memory areas between CPU and GSP.

 - This data structure helps ensure the safety constraints are meet when
   the CPU is reading/writing the shared memory queues.

 - Several other minor comments were addressed, as noted in the individual
   patches.

This series builds on top of Alex's series[1], most of which has been
merged into drm-rust-next, to continue initialising the GSP into a state
where it becomes active and it starts communicating with the host. A tree
including these patches with the prerequisite patches is available at [2].

It includes patches to initialise several important data structures
required to boot the GSP. The biggest change is the implementation of the
command/message circular queue used to establish communication between GSP
and host in patch 6. Admittedly this patch is rather large - if necessary
it could be split into send and receive patches if people prefer.

This is required to configure and boot the GSP. However this series does
not get the GSP to a fully active state. Instead it gets it to a state
where the GSP sends a message to the host with a sequence of instructions
which need running to get to the active state. A subsequent series will
implement processing of this message and allow the GSP to get to the fully
active state.

A full tree including the prerequisites for this patch series is available
at https://github.com/apopple-nvidia/linux/tree/nova-core-for-upstream.

[1] - https://lore.kernel.org/rust-for-linux/20250911-nova_firmware-v5-0-5a8a33bddca1@nvidia.com/
[2] - https://github.com/apopple-nvidia/linux/tree/nova-core-for-upstream-v2

Alistair Popple (8):
  gpu: nova-core: Set correct DMA mask
  gpu: nova-core: Create initial Gsp
  gpu: nova-core: gsp: Create wpr metadata
  gpu: nova-core: Add zeroable trait to bindings
  gpu: nova-core: gsp: Add GSP command queue bindings and handling
  gpu: nova-core: gsp: Create rmargs
  gpu: nova-core: gsp: Add RM registry and sysinfo bindings and commands
  nova-core: gsp: Boot GSP

Joel Fernandes (3):
  gpu: nova-core: Add a slice-buffer (sbuffer) datastructure
  nova-core: falcon: Add support to check if RISC-V is active
  nova-core: falcon: Add support to write firmware version

 drivers/gpu/nova-core/driver.rs               |  16 +
 drivers/gpu/nova-core/falcon.rs               |  15 +
 drivers/gpu/nova-core/fb.rs                   |   1 -
 drivers/gpu/nova-core/firmware/gsp.rs         |   3 +-
 drivers/gpu/nova-core/firmware/riscv.rs       |   9 +-
 drivers/gpu/nova-core/gpu.rs                  |   2 +-
 drivers/gpu/nova-core/gsp.rs                  | 135 +++-
 drivers/gpu/nova-core/gsp/boot.rs             |  76 ++-
 drivers/gpu/nova-core/gsp/cmdq.rs             | 533 ++++++++++++++++
 drivers/gpu/nova-core/gsp/commands.rs         | 117 ++++
 drivers/gpu/nova-core/gsp/fw.rs               | 449 ++++++++++++-
 drivers/gpu/nova-core/gsp/fw/commands.rs      | 100 +++
 drivers/gpu/nova-core/gsp/fw/r570_144.rs      |   1 +
 .../gpu/nova-core/gsp/fw/r570_144/bindings.rs | 592 +++++++++++++++++-
 drivers/gpu/nova-core/nova_core.rs            |   1 +
 drivers/gpu/nova-core/regs.rs                 |  17 +-
 drivers/gpu/nova-core/sbuffer.rs              | 222 +++++++
 scripts/Makefile.build                        |   2 +-
 18 files changed, 2259 insertions(+), 32 deletions(-)
 create mode 100644 drivers/gpu/nova-core/gsp/cmdq.rs
 create mode 100644 drivers/gpu/nova-core/gsp/commands.rs
 create mode 100644 drivers/gpu/nova-core/gsp/fw/commands.rs
 create mode 100644 drivers/gpu/nova-core/sbuffer.rs

-- 
2.50.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-10-17  5:48 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-17  5:47 [PATCH v6 00/11] gpu: nova-core: Boot GSP to RISC-V active Alistair Popple
2025-10-17  5:47 ` [PATCH v6 01/11] gpu: nova-core: Set correct DMA mask Alistair Popple
2025-10-17  5:47 ` [PATCH v6 02/11] gpu: nova-core: Create initial Gsp Alistair Popple
2025-10-17  5:47 ` [PATCH v6 03/11] gpu: nova-core: gsp: Create wpr metadata Alistair Popple
2025-10-17  5:47 ` [PATCH v6 04/11] gpu: nova-core: Add a slice-buffer (sbuffer) datastructure Alistair Popple
2025-10-17  5:47 ` [PATCH v6 05/11] gpu: nova-core: Add zeroable trait to bindings Alistair Popple
2025-10-17  5:47 ` [PATCH v6 06/11] gpu: nova-core: gsp: Add GSP command queue bindings and handling Alistair Popple
2025-10-17  5:47 ` [PATCH v6 07/11] gpu: nova-core: gsp: Create rmargs Alistair Popple
2025-10-17  5:47 ` [PATCH v6 08/11] gpu: nova-core: gsp: Add RM registry and sysinfo bindings and commands Alistair Popple
2025-10-17  5:47 ` [PATCH v6 09/11] nova-core: falcon: Add support to check if RISC-V is active Alistair Popple
2025-10-17  5:47 ` [PATCH v6 10/11] nova-core: falcon: Add support to write firmware version Alistair Popple
2025-10-17  5:47 ` [PATCH v6 11/11] nova-core: gsp: Boot GSP Alistair Popple

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).