From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "John Hubbard" <jhubbard@nvidia.com>
Cc: "Danilo Krummrich" <dakr@kernel.org>,
"Joel Fernandes" <joelagnelf@nvidia.com>,
"Timur Tabi" <ttabi@nvidia.com>,
"Alistair Popple" <apopple@nvidia.com>,
"Eliot Courtney" <ecourtney@nvidia.com>,
"Shashank Sharma" <shashanks@nvidia.com>,
"Zhi Wang" <zhiw@nvidia.com>, "David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"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>,
rust-for-linux@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v7 06/31] gpu: nova-core: Hopper/Blackwell: skip GFW boot waiting
Date: Mon, 23 Mar 2026 22:13:54 +0900 [thread overview]
Message-ID: <DHA6SWNZI9PT.5YBQUG4BB31@nvidia.com> (raw)
In-Reply-To: <20260317225355.549853-7-jhubbard@nvidia.com>
On Wed Mar 18, 2026 at 7:53 AM JST, John Hubbard wrote:
> Hopper and Blackwell GPUs use FSP-based secure boot and do not require
> waiting for GFW_BOOT completion. Skip this step for these architectures.
>
> Move the GFW_BOOT policy into a dedicated GPU HAL in gpu/hal.rs. This
> keeps the decision out of gpu.rs while avoiding unrelated subsystems
> such as fb. Pre-Hopper families still wait for GFW_BOOT completion,
> while Hopper and later use the FSP Chain of Trust boot path instead.
>
> Cc: Danilo Krummrich <dakr@kernel.org>
> Signed-off-by: John Hubbard <jhubbard@nvidia.com>
> ---
> drivers/gpu/nova-core/gpu.rs | 14 ++++++---
> drivers/gpu/nova-core/gpu/hal.rs | 54 ++++++++++++++++++++++++++++++++
> 2 files changed, 64 insertions(+), 4 deletions(-)
> create mode 100644 drivers/gpu/nova-core/gpu/hal.rs
>
> diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs
> index 9e140463603b..93f861ba20f3 100644
> --- a/drivers/gpu/nova-core/gpu.rs
> +++ b/drivers/gpu/nova-core/gpu.rs
> @@ -23,6 +23,8 @@
> regs,
> };
>
> +mod hal;
> +
> macro_rules! define_chipset {
> ({ $($variant:ident = $value:expr),* $(,)* }) =>
> {
> @@ -309,13 +311,17 @@ pub(crate) fn new<'a>(
> spec: Spec,
> ) -> impl PinInit<Self, Error> + 'a {
> let chipset = spec.chipset();
> + let hal = hal::gpu_hal(chipset);
>
> try_pin_init!(Self {
> - // We must wait for GFW_BOOT completion before doing any significant setup
> - // on the GPU.
> _: {
> - gfw::wait_gfw_boot_completion(bar)
> - .inspect_err(|_| dev_err!(pdev, "GFW boot did not complete\n"))?;
> + // GFW_BOOT is the "GPU firmware boot complete" signal for the
> + // legacy devinit/FWSEC path. Pre-Hopper GPUs must wait for it
> + // before most GPU initialization. Hopper and later boot via FSP.
> + if hal.needs_gfw_boot() {
> + gfw::wait_gfw_boot_completion(bar)
> + .inspect_err(|_| dev_err!(pdev, "GFW boot did not complete\n"))?;
> + }
Good that this is moved to a HAL method, but we can go one step further
and perform the actual wait in the HAL. I.e., this should become
`hal.wait_gfw_boot_completion` and the wait would happen in the HAL
itself (where such low-level stuff belongs), not here.
We could even move the contents of the `gfw` module into the correct HAL
since it won't be used anywhere, and simplify our top-level directory.
> },
>
> sysmem_flush: SysmemFlush::register(pdev.as_ref(), bar, chipset)?,
> diff --git a/drivers/gpu/nova-core/gpu/hal.rs b/drivers/gpu/nova-core/gpu/hal.rs
> new file mode 100644
> index 000000000000..859c5e5fa21f
> --- /dev/null
> +++ b/drivers/gpu/nova-core/gpu/hal.rs
> @@ -0,0 +1,54 @@
> +// SPDX-License-Identifier: GPL-2.0
> +
> +use crate::gpu::{
> + Architecture,
> + Chipset, //
> +};
> +
> +pub(crate) trait GpuHal {
> + /// Returns whether this hardware family still requires waiting for GFW_BOOT.
> + fn needs_gfw_boot(&self) -> bool;
> +}
> +
> +struct Tu102;
> +struct Ga100;
> +struct Ga102;
> +struct Fsp;
> +
> +impl GpuHal for Tu102 {
> + fn needs_gfw_boot(&self) -> bool {
> + true
> + }
> +}
> +
> +impl GpuHal for Ga100 {
> + fn needs_gfw_boot(&self) -> bool {
> + true
> + }
> +}
> +
> +impl GpuHal for Ga102 {
> + fn needs_gfw_boot(&self) -> bool {
> + true
> + }
> +}
> +
> +impl GpuHal for Fsp {
> + fn needs_gfw_boot(&self) -> bool {
> + false
> + }
> +}
3 of the HALs do exactly the same thing. You only need two: `Tu102` and
`Gh100`. `Fsp` is also not a valid name for a HAL, so far they have been
named after the first chip that makes use of them.
> +
> +const TU102: Tu102 = Tu102;
> +const GA100: Ga100 = Ga100;
> +const GA102: Ga102 = Ga102;
> +const FSP: Fsp = Fsp;
> +
> +pub(super) fn gpu_hal(chipset: Chipset) -> &'static dyn GpuHal {
> + match chipset.arch() {
> + Architecture::Turing => &TU102,
> + Architecture::Ampere if chipset == Chipset::GA100 => &GA100,
> + Architecture::Ampere | Architecture::Ada => &GA102,
This must be a copy/paste from somewhere because GA100 does not warrant
any exception here.
next prev parent reply other threads:[~2026-03-23 13:14 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 22:53 [PATCH v7 00/31] gpu: nova-core: firmware: Hopper/Blackwell support John Hubbard
2026-03-17 22:53 ` [PATCH v7 01/31] gpu: nova-core: Hopper/Blackwell: basic GPU identification John Hubbard
2026-03-17 22:53 ` [PATCH v7 02/31] gpu: nova-core: factor .fwsignature* selection into a new find_gsp_sigs_section() John Hubbard
2026-03-17 22:53 ` [PATCH v7 03/31] gpu: nova-core: use GPU Architecture to simplify HAL selections John Hubbard
2026-03-17 22:53 ` [PATCH v7 04/31] gpu: nova-core: move GPU init into Gpu::new() John Hubbard
2026-03-23 12:45 ` Alexandre Courbot
2026-03-25 3:23 ` John Hubbard
2026-03-17 22:53 ` [PATCH v7 05/31] gpu: nova-core: set DMA mask width based on GPU architecture John Hubbard
2026-03-23 13:02 ` Alexandre Courbot
2026-03-25 3:26 ` John Hubbard
2026-03-17 22:53 ` [PATCH v7 06/31] gpu: nova-core: Hopper/Blackwell: skip GFW boot waiting John Hubbard
2026-03-23 13:13 ` Alexandre Courbot [this message]
2026-03-25 3:26 ` John Hubbard
2026-03-17 22:53 ` [PATCH v7 07/31] gpu: nova-core: move firmware image parsing code to firmware.rs John Hubbard
2026-03-23 13:19 ` Alexandre Courbot
2026-03-25 3:30 ` John Hubbard
2026-03-25 11:06 ` Alexandre Courbot
2026-03-25 11:18 ` Miguel Ojeda
2026-03-25 11:16 ` Miguel Ojeda
2026-03-17 22:53 ` [PATCH v7 08/31] gpu: nova-core: factor out an elf_str() function John Hubbard
2026-03-17 22:53 ` [PATCH v7 09/31] gpu: nova-core: don't assume 64-bit firmware images John Hubbard
2026-03-17 22:53 ` [PATCH v7 10/31] gpu: nova-core: add support for 32-bit " John Hubbard
2026-03-17 22:53 ` [PATCH v7 11/31] gpu: nova-core: add auto-detection of 32-bit, 64-bit " John Hubbard
2026-03-17 22:53 ` [PATCH v7 12/31] gpu: nova-core: Hopper/Blackwell: add FMC firmware image, in support of FSP John Hubbard
2026-03-17 22:53 ` [PATCH v7 13/31] gpu: nova-core: Hopper/Blackwell: add FSP falcon engine stub John Hubbard
2026-03-17 22:53 ` [PATCH v7 14/31] gpu: nova-core: Hopper/Blackwell: add FSP falcon EMEM operations John Hubbard
2026-03-17 22:53 ` [PATCH v7 15/31] gpu: nova-core: Hopper/Blackwell: add FSP message infrastructure John Hubbard
2026-03-17 22:53 ` [PATCH v7 16/31] rust: ptr: add const_align_up() John Hubbard
2026-03-20 8:37 ` David Rheinsberg
2026-03-20 8:44 ` Alice Ryhl
2026-03-20 8:58 ` David Rheinsberg
2026-03-20 9:03 ` Alice Ryhl
2026-03-20 9:26 ` David Rheinsberg
2026-03-20 9:47 ` Alice Ryhl
2026-03-20 10:27 ` David Rheinsberg
2026-03-20 11:12 ` Alice Ryhl
2026-03-20 13:14 ` David Rheinsberg
2026-03-20 13:16 ` Miguel Ojeda
2026-03-20 13:26 ` Alice Ryhl
2026-03-20 9:48 ` Alice Ryhl
2026-03-20 13:36 ` Gary Guo
2026-03-17 22:53 ` [PATCH v7 17/31] gpu: nova-core: Hopper/Blackwell: calculate reserved FB heap size John Hubbard
2026-03-17 22:53 ` [PATCH v7 18/31] gpu: nova-core: add MCTP/NVDM protocol types for firmware communication John Hubbard
2026-03-18 0:01 ` John Hubbard
2026-03-18 0:21 ` Danilo Krummrich
2026-03-18 0:56 ` Alexandre Courbot
2026-03-18 12:36 ` Gary Guo
2026-03-18 19:14 ` John Hubbard
2026-03-17 22:53 ` [PATCH v7 19/31] gpu: nova-core: Hopper/Blackwell: add FSP secure boot completion waiting John Hubbard
2026-03-17 22:53 ` [PATCH v7 20/31] gpu: nova-core: Hopper/Blackwell: add FMC signature extraction John Hubbard
2026-03-17 22:53 ` [PATCH v7 21/31] gpu: nova-core: Hopper/Blackwell: add FSP send/receive messaging John Hubbard
2026-03-17 22:53 ` [PATCH v7 22/31] gpu: nova-core: Hopper/Blackwell: add FspCotVersion type John Hubbard
2026-03-17 22:53 ` [PATCH v7 23/31] gpu: nova-core: Hopper/Blackwell: larger non-WPR heap John Hubbard
2026-03-17 22:53 ` [PATCH v7 24/31] gpu: nova-core: Hopper/Blackwell: add FSP Chain of Trust boot John Hubbard
2026-03-17 22:53 ` [PATCH v7 25/31] gpu: nova-core: Blackwell: use correct sysmem flush registers John Hubbard
2026-03-17 22:53 ` [PATCH v7 26/31] gpu: nova-core: make WPR heap sizing fallible John Hubbard
2026-03-17 22:53 ` [PATCH v7 27/31] gpu: nova-core: Hopper/Blackwell: larger WPR2 (GSP) heap John Hubbard
2026-03-18 16:12 ` kernel test robot
2026-03-18 17:59 ` John Hubbard
2026-03-17 22:53 ` [PATCH v7 28/31] gpu: nova-core: refactor SEC2 booter loading into BooterFirmware::run() John Hubbard
2026-03-17 22:53 ` [PATCH v7 29/31] gpu: nova-core: Hopper/Blackwell: add GSP lockdown release polling John Hubbard
2026-03-17 22:53 ` [PATCH v7 30/31] gpu: nova-core: Hopper/Blackwell: new location for PCI config mirror John Hubbard
2026-03-17 22:53 ` [PATCH v7 31/31] gpu: nova-core: Hopper/Blackwell: integrate FSP boot path into boot() John Hubbard
2026-03-18 17:02 ` kernel test robot
2026-03-18 17:59 ` John Hubbard
2026-03-18 20:25 ` [PATCH v7 00/31] gpu: nova-core: firmware: Hopper/Blackwell support John Hubbard
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=DHA6SWNZI9PT.5YBQUG4BB31@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=bhelgaas@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=ecourtney@nvidia.com \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=joelagnelf@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=shashanks@nvidia.com \
--cc=simona@ffwll.ch \
--cc=tmgross@umich.edu \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.