From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "Alistair Popple" <apopple@nvidia.com>,
<rust-for-linux@vger.kernel.org>,
<dri-devel@lists.freedesktop.org>, <dakr@kernel.org>,
<acourbot@nvidia.com>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"John Hubbard" <jhubbard@nvidia.com>,
"Joel Fernandes" <joelagnelf@nvidia.com>,
"Timur Tabi" <ttabi@nvidia.com>,
linux-kernel@vger.kernel.org, nouveau@lists.freedesktop.org
Subject: Re: [PATCH v5 03/14] gpu: nova-core: gsp: Create wpr metadata
Date: Thu, 16 Oct 2025 15:23:14 +0900 [thread overview]
Message-ID: <DDJJ4ECCSE2I.1EUAJRU9JBGNI@nvidia.com> (raw)
In-Reply-To: <20251013062041.1639529-4-apopple@nvidia.com>
On Mon Oct 13, 2025 at 3:20 PM JST, Alistair Popple wrote:
> The GSP requires some pieces of metadata to boot. These are passed in a
> struct which the GSP transfers via DMA. Create this struct and get a
> handle to it for future use when booting the GSP.
>
> Signed-off-by: Alistair Popple <apopple@nvidia.com>
>
> ---
>
> Changes for v5:
> - Make member visibility match the struct visibility (thanks Danilo)
>
> Changes for v3:
> - Don't re-export WPR constants (thanks Alex)
>
> Changes for v2:
> - Rebased on Alex's latest version
> ---
> drivers/gpu/nova-core/fb.rs | 1 -
> drivers/gpu/nova-core/firmware/gsp.rs | 3 +-
> drivers/gpu/nova-core/firmware/riscv.rs | 6 +-
> drivers/gpu/nova-core/gsp.rs | 2 +
> drivers/gpu/nova-core/gsp/boot.rs | 7 +++
> drivers/gpu/nova-core/gsp/fw.rs | 55 ++++++++++++++++++-
> .../gpu/nova-core/gsp/fw/r570_144/bindings.rs | 2 +
> 7 files changed, 69 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/nova-core/fb.rs b/drivers/gpu/nova-core/fb.rs
> index 4d6a1f452183..5580498ba2fb 100644
> --- a/drivers/gpu/nova-core/fb.rs
> +++ b/drivers/gpu/nova-core/fb.rs
> @@ -87,7 +87,6 @@ pub(crate) fn unregister(&self, bar: &Bar0) {
> ///
> /// Contains ranges of GPU memory reserved for a given purpose during the GSP boot process.
> #[derive(Debug)]
> -#[expect(dead_code)]
> pub(crate) struct FbLayout {
> /// Range of the framebuffer. Starts at `0`.
> pub(crate) fb: Range<u64>,
> diff --git a/drivers/gpu/nova-core/firmware/gsp.rs b/drivers/gpu/nova-core/firmware/gsp.rs
> index 3a1cf0607de7..c9ad912a3150 100644
> --- a/drivers/gpu/nova-core/firmware/gsp.rs
> +++ b/drivers/gpu/nova-core/firmware/gsp.rs
> @@ -131,7 +131,7 @@ pub(crate) struct GspFirmware {
> /// Size in bytes of the firmware contained in [`Self::fw`].
> pub size: usize,
> /// Device-mapped GSP signatures matching the GPU's [`Chipset`].
> - signatures: DmaObject,
> + pub signatures: DmaObject,
This needs to be `pub(crate)` or rustc 1.78 emits a warning (I'll also
have to fix the surrounding ones in my own patch).
<snip>
> +impl GspFwWprMeta {
> + pub(crate) fn new(gsp_firmware: &GspFirmware, fb_layout: &FbLayout) -> Self {
> + Self(bindings::GspFwWprMeta {
> + magic: r570_144::GSP_FW_WPR_META_MAGIC as u64,
> + revision: u64::from(r570_144::GSP_FW_WPR_META_REVISION),
> + sysmemAddrOfRadix3Elf: gsp_firmware.radix3_dma_handle(),
> + sizeOfRadix3Elf: gsp_firmware.size as u64,
Very unfortunately I'm afraid we will need to replace the `as` in this
method with `u64::try_from` and make it return a `Result` for now.
next prev parent reply other threads:[~2025-10-16 6:23 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-13 6:20 [PATCH v5 00/14] gpu: nova-core: Boot GSP to RISC-V active Alistair Popple
2025-10-13 6:20 ` [PATCH v5 01/14] gpu: nova-core: Set correct DMA mask Alistair Popple
2025-10-13 6:20 ` [PATCH v5 02/14] gpu: nova-core: Create initial Gsp Alistair Popple
2025-10-16 6:22 ` Alexandre Courbot
2025-10-17 5:14 ` Alistair Popple
2025-10-13 6:20 ` [PATCH v5 03/14] gpu: nova-core: gsp: Create wpr metadata Alistair Popple
2025-10-16 6:23 ` Alexandre Courbot [this message]
2025-10-16 23:03 ` Alistair Popple
2025-10-16 23:11 ` Danilo Krummrich
2025-10-16 23:25 ` Miguel Ojeda
2025-10-17 0:43 ` Alexandre Courbot
2025-10-17 1:15 ` Alistair Popple
2025-10-17 1:38 ` Alexandre Courbot
2025-10-17 10:39 ` Danilo Krummrich
2025-10-20 5:40 ` Alexandre Courbot
2025-10-20 10:13 ` Danilo Krummrich
2025-10-20 10:50 ` Alexandre Courbot
2025-10-20 10:55 ` Danilo Krummrich
2025-10-13 6:20 ` [PATCH v5 04/14] gpu: nova-core: Add a slice-buffer (sbuffer) datastructure Alistair Popple
2025-10-16 6:23 ` Alexandre Courbot
2025-10-16 19:18 ` Miguel Ojeda
2025-10-17 4:45 ` Alistair Popple
2025-10-17 7:38 ` Alexandre Courbot
2025-10-13 6:20 ` [PATCH v5 05/14] gpu: nova-core: Add zeroable trait to bindings Alistair Popple
2025-10-13 6:20 ` [PATCH v5 06/14] gpu: nova-core: Add GSP command queue bindings Alistair Popple
2025-10-16 6:23 ` Alexandre Courbot
2025-10-16 19:22 ` Miguel Ojeda
2025-10-17 4:03 ` Alistair Popple
2025-10-13 6:20 ` [PATCH v5 07/14] gpu: nova-core: gsp: Add GSP command queue handling Alistair Popple
2025-10-16 6:24 ` Alexandre Courbot
2025-10-17 0:36 ` Alistair Popple
2025-10-16 18:44 ` Miguel Ojeda
2025-10-17 0:39 ` Alistair Popple
2025-10-13 6:20 ` [PATCH v5 08/14] gpu: nova-core: gsp: Create rmargs Alistair Popple
2025-10-16 6:24 ` Alexandre Courbot
2025-10-17 0:49 ` Alistair Popple
2025-10-13 6:20 ` [PATCH v5 09/14] gpu: nova-core: Add bindings and accessors for GspSystemInfo Alistair Popple
2025-10-16 6:24 ` Alexandre Courbot
2025-10-17 0:56 ` Alistair Popple
2025-10-17 1:41 ` Alexandre Courbot
2025-10-17 4:05 ` Alistair Popple
2025-10-13 6:20 ` [PATCH v5 10/14] gpu: nova-core: Add bindings for the GSP RM registry tables Alistair Popple
2025-10-13 6:20 ` [PATCH v5 11/14] gpu: nova-core: gsp: Create RM registry and sysinfo commands Alistair Popple
2025-10-13 6:20 ` [PATCH v5 12/14] nova-core: falcon: Add support to check if RISC-V is active Alistair Popple
2025-10-13 6:20 ` [PATCH v5 13/14] nova-core: falcon: Add support to write firmware version Alistair Popple
2025-10-13 6:20 ` [PATCH v5 14/14] nova-core: gsp: Boot GSP Alistair Popple
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=DDJJ4ECCSE2I.1EUAJRU9JBGNI@nvidia.com \
--to=acourbot@nvidia.com \
--cc=a.hindborg@kernel.org \
--cc=airlied@gmail.com \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=joelagnelf@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=tmgross@umich.edu \
--cc=ttabi@nvidia.com \
--cc=tzimmermann@suse.de \
/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®