[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251110-gsp_boot-v9-0-8ae4058e3c0e@nvidia.com>
Date: Mon, 10 Nov 2025 22:34:08 +0900
From: Alexandre Courbot <acourbot@...dia.com>
To: Danilo Krummrich <dakr@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Benno Lossin <lossin@...nel.org>, Miguel Ojeda <ojeda@...nel.org>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Andreas Hindborg <a.hindborg@...nel.org>, Trevor Gross <tmgross@...ch.edu>
Cc: John Hubbard <jhubbard@...dia.com>,
Alistair Popple <apopple@...dia.com>,
Joel Fernandes <joelagnelf@...dia.com>, Timur Tabi <ttabi@...dia.com>,
Edwin Peer <epeer@...dia.com>, nouveau@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
rust-for-linux@...r.kernel.org, Alexandre Courbot <acourbot@...dia.com>,
Lyude Paul <lyude@...hat.com>
Subject: [PATCH v9 00/15] gpu: nova-core: Boot GSP to RISC-V active
This revision features a more adequate method for receiving messages,
and some general cleanup. It looks solid to me, and although there are
further minor improvements I want to eventually see I think it makes an
adequate first milestone.
I am considering merging this before -rc6, so it can make it into 6.19.
If there are reasons not to, please scream. :)
A branch including this series and its dependencies is available at [1].
[1] https://github.com/Gnurou/linux/tree/b4/gsp_boot
Changes in v9:
- More doccomments.
- Use the `MessageFromGsp` trait instead of an arbitrary closure to extract
incoming messages from the message queue.
- Split the message receiving method into a non-generic transport layer
receive, and the generic part validating and constructing the message.
- Use well-defined types for sending and receiving messages instead of
error-prone tuples.
- Link to v8: https://lore.kernel.org/r/20251108-gsp_boot-v8-0-70b762eedd50@nvidia.com
Changes in v8:
- Add lots of doccomments.
- Refactor and simplify GSP command sending - now uses a single trait
and a single method.
- Leverage the new `from_bytes_prefix` family of methods to simplify GSP
command queue code a bit.
- Simplify RM arguments.
- Split the `GspSetSystemInfo` and `SetRegistry` commands into their own
patch.
- Add a `is_empty` method to `SBufferIter` and use it to detect when a
command's variable length payload has not been entirely written.
- Harmonize imports according to new format rules.
- Link to v7: https://lore.kernel.org/r/20251029-gsp_boot-v7-0-34227afad347@nvidia.com
Changes in v7:
- Remove `as` conversions by using the features of the `num` module.
- Add build-time conversion of constant integer values to smaller types.
- Thanks to the two items above, make more functions infallible.
- Remove unneeded `nr_ptes` member of the `Cmdq`.
- Use `repr(u32)` for `MsgFunction` to simplify it.
- Use `from_ref` instead of casting references into pointers with `as`.
- Add message header version type to remove use of magic number.
- Switch some parameters to `usize` to limit type conversions.
- Add comments for undocumented functions.
- Remove `function_number` method of `GspMsgElement` and return invalid
function numbers as the error value of `function` instead.
- Work around the renaming of `slice::flatten` to
`slice::as_flattened` in Rust 1.80 (thanks Miguel!).
- Fix clippy warning with Rust 1.78.
- Link to v6: https://lore.kernel.org/r/20251017054736.2984332-1-apopple@nvidia.com/
Signed-off-by: Alexandre Courbot <acourbot@...dia.com>
---
Alexandre Courbot (3):
gpu: nova-core: compute layout of more framebuffer regions required for GSP
gpu: nova-core: num: add functions to safely convert a const value to a smaller type
rust: enable slice_flatten feature and provide it through an extension trait
Alistair Popple (9):
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 SetSystemInfo command
gpu: nova-core: gsp: Add SetRegistry command
gpu: nova-core: gsp: Boot GSP
Joel Fernandes (3):
gpu: nova-core: Add a slice-buffer (sbuffer) datastructure
gpu: nova-core: falcon: Add support to check if RISC-V is active
gpu: 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 | 72 ++-
drivers/gpu/nova-core/firmware/gsp.rs | 7 +-
drivers/gpu/nova-core/firmware/riscv.rs | 11 +-
drivers/gpu/nova-core/gpu.rs | 2 +-
drivers/gpu/nova-core/gsp.rs | 156 ++++-
drivers/gpu/nova-core/gsp/boot.rs | 85 ++-
drivers/gpu/nova-core/gsp/cmdq.rs | 680 +++++++++++++++++++++
drivers/gpu/nova-core/gsp/commands.rs | 129 ++++
drivers/gpu/nova-core/gsp/fw.rs | 608 ++++++++++++++++++-
drivers/gpu/nova-core/gsp/fw/commands.rs | 106 ++++
drivers/gpu/nova-core/gsp/fw/r570_144.rs | 6 +-
drivers/gpu/nova-core/gsp/fw/r570_144/bindings.rs | 703 ++++++++++++++++++++++
drivers/gpu/nova-core/nova_core.rs | 1 +
drivers/gpu/nova-core/num.rs | 51 ++
drivers/gpu/nova-core/regs.rs | 17 +-
drivers/gpu/nova-core/sbuffer.rs | 228 +++++++
init/Kconfig | 3 +
rust/kernel/lib.rs | 4 +
rust/kernel/prelude.rs | 3 +
rust/kernel/slice.rs | 49 ++
22 files changed, 2918 insertions(+), 34 deletions(-)
---
base-commit: 80b3dc0a5a2e51fb2b8f3406f5ee20ad4a652316
change-id: 20251027-gsp_boot-c6bb048a304e
Best regards,
--
Alexandre Courbot <acourbot@...dia.com>
Powered by blists - more mailing lists