[PATCH v6 09/34] gpu: nova-core: Hopper/Blackwell: skip GFW boot waiting

John Hubbard posted 34 patches 1 month ago
There is a newer version of this series
[PATCH v6 09/34] gpu: nova-core: Hopper/Blackwell: skip GFW boot waiting
Posted by John Hubbard 1 month ago
Hopper and Blackwell GPUs use FSP-based secure boot and do not require
waiting for GFW_BOOT completion. Skip this step for these architectures,
and in fact for all future architectures, because we have moved on:
there will not be any future GPUs using the older GFW_BOOT system.

Cc: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
---
 drivers/gpu/nova-core/gpu.rs | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs
index efd1765b4f86..21a8c6c2d96b 100644
--- a/drivers/gpu/nova-core/gpu.rs
+++ b/drivers/gpu/nova-core/gpu.rs
@@ -177,6 +177,15 @@ pub(crate) const fn dma_mask(&self) -> DmaMask {
             Self::Hopper | Self::Blackwell => DmaMask::new::<52>(),
         }
     }
+
+    /// Returns whether the GPU uses GFW_BOOT for firmware loading.
+    ///
+    /// Pre-Hopper architectures (Turing, Ampere, Ada) require waiting for GFW_BOOT completion
+    /// before any significant GPU setup. Hopper and later use the FSP Chain of Trust boot path
+    /// instead.
+    pub(crate) const fn needs_gfw_boot(&self) -> bool {
+        matches!(self, Self::Turing | Self::Ampere | Self::Ada)
+    }
 }
 
 impl TryFrom<u8> for Architecture {
@@ -322,11 +331,11 @@ pub(crate) fn new<'a>(
             let chipset = spec.chipset();
 
             Ok(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"))?;
+                    if chipset.arch().needs_gfw_boot() {
+                        gfw::wait_gfw_boot_completion(bar)
+                            .inspect_err(|_| dev_err!(pdev, "GFW boot did not complete\n"))?;
+                    }
                 },
 
                 sysmem_flush: SysmemFlush::register(pdev.as_ref(), bar, chipset)?,
-- 
2.53.0
Re: [PATCH v6 09/34] gpu: nova-core: Hopper/Blackwell: skip GFW boot waiting
Posted by Alexandre Courbot 4 weeks, 1 day ago
On Tue Mar 10, 2026 at 11:10 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,
> and in fact for all future architectures, because we have moved on:
> there will not be any future GPUs using the older GFW_BOOT system.
>
> Cc: Danilo Krummrich <dakr@kernel.org>
> Signed-off-by: John Hubbard <jhubbard@nvidia.com>
> ---
>  drivers/gpu/nova-core/gpu.rs | 17 +++++++++++++----
>  1 file changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs
> index efd1765b4f86..21a8c6c2d96b 100644
> --- a/drivers/gpu/nova-core/gpu.rs
> +++ b/drivers/gpu/nova-core/gpu.rs
> @@ -177,6 +177,15 @@ pub(crate) const fn dma_mask(&self) -> DmaMask {
>              Self::Hopper | Self::Blackwell => DmaMask::new::<52>(),
>          }
>      }
> +
> +    /// Returns whether the GPU uses GFW_BOOT for firmware loading.
> +    ///
> +    /// Pre-Hopper architectures (Turing, Ampere, Ada) require waiting for GFW_BOOT completion
> +    /// before any significant GPU setup. Hopper and later use the FSP Chain of Trust boot path
> +    /// instead.
> +    pub(crate) const fn needs_gfw_boot(&self) -> bool {
> +        matches!(self, Self::Turing | Self::Ampere | Self::Ada)
> +    }
>  }
>  
>  impl TryFrom<u8> for Architecture {
> @@ -322,11 +331,11 @@ pub(crate) fn new<'a>(
>              let chipset = spec.chipset();
>  
>              Ok(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"))?;
> +                    if chipset.arch().needs_gfw_boot() {
> +                        gfw::wait_gfw_boot_completion(bar)
> +                            .inspect_err(|_| dev_err!(pdev, "GFW boot did not complete\n"))?;
> +                    }

This looks like this should be a HAL method, wdyt?