NVIDIA GPU driver infrastructure
 help / color / mirror / Atom feed
From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "Eliot Courtney" <ecourtney@nvidia.com>
Cc: "Danilo Krummrich" <dakr@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"John Hubbard" <jhubbard@nvidia.com>,
	"Alistair Popple" <apopple@nvidia.com>,
	"Timur Tabi" <ttabi@nvidia.com>, <nova-gpu@lists.linux.dev>,
	<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 4/7] gpu: nova-core: falcon: separate staging data for DMA from its location
Date: Fri, 27 Nov 2026 15:48:39 +0900	[thread overview]
Message-ID: <DN5SJKX0FEWG.2JDWL46J9ESV4@nvidia.com> (raw)
In-Reply-To: <20261126-boot-rework2-v1-4-99a1dc6c7cc4@nvidia.com>

On Thu Nov 26, 2026 at 5:20 PM JST, Eliot Courtney wrote:
<...>
> @@ -208,6 +198,16 @@ pub(crate) struct FalconDmaLoadTarget {
>      pub(crate) len: u32,
>  }
>  
> +impl FalconDmaLoadTarget {
> +    /// Returns the data that should be copied to the falcon from `blob`.
> +    fn data<'a>(&self, blob: &'a [u8]) -> Result<&'a [u8]> {
> +        let start = usize::from_safe_cast(self.src_start);
> +        let end = start + usize::from_safe_cast(self.len);
> +
> +        blob.get(start..end).ok_or(EINVAL)
> +    }
> +}
> +
>  /// Parameters for the falcon boot ROM.
>  #[derive(Debug, Clone)]
>  pub(crate) struct FalconBromParams {
> @@ -219,6 +219,21 @@ pub(crate) struct FalconBromParams {
>      pub(crate) ucode_id: u8,
>  }
>  
> +/// Denotes where the bytes of a firmware segment are.
> +#[derive(Clone, Copy)]
> +pub(crate) enum FalconSegmentSource<'a> {
> +    /// Bytes in system memory.
> +    Sysmem(&'a [u8]),
> +    /// Bytes in the framebuffer.
> +    #[expect(dead_code)]
> +    Framebuffer {
> +        /// DMA base address of the segment in the framebuffer.
> +        base: u64,

That's not technically the base of the segment, there can be zeroed
bytes before the segment starts because of tagging as the falcon will
add `va` to `base`.


  reply	other threads:[~2026-11-27  6:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26  8:20 [PATCH 0/7] gpu: nova-core: merge `load` and `boot` for falcons Eliot Courtney
2026-11-26  8:20 ` [PATCH 1/7] gpu: nova-core: falcon: make pfalcon private Eliot Courtney
2026-11-26  8:20 ` [PATCH 2/7] gpu: nova-core: gsp: remove unnecessary start of `gsp_falcon` Eliot Courtney
2026-11-27  4:00   ` Alexandre Courbot
2026-11-26  8:20 ` [PATCH 3/7] gpu: nova-core: falcon: program BROM and BOOTVEC in `boot` Eliot Courtney
2026-11-26  8:20 ` [PATCH 4/7] gpu: nova-core: falcon: separate staging data for DMA from its location Eliot Courtney
2026-11-27  6:48   ` Alexandre Courbot [this message]
2026-11-27  6:49   ` Alexandre Courbot
2026-11-26  8:20 ` [PATCH 5/7] gpu: nova-core: falcon: add `FalconImage` for `FalconFirmware` trait Eliot Courtney
2026-11-26  8:20 ` [PATCH 6/7] gpu: nova-core: falcon: rename FalconDmaLoadTarget to FalconLoadTarget Eliot Courtney
2026-11-26  8:20 ` [PATCH 7/7] gpu: nova-core: falcon: load the firmware image in Falcon::boot Eliot Courtney
2026-11-27  6:53 ` [PATCH 0/7] gpu: nova-core: merge `load` and `boot` for falcons 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=DN5SJKX0FEWG.2JDWL46J9ESV4@nvidia.com \
    --to=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=ecourtney@nvidia.com \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nova-gpu@lists.linux.dev \
    --cc=simona@ffwll.ch \
    --cc=ttabi@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