Re: [PATCH 09/13] gpu: nova-core: wait for FSP boot earlier

From: Eliot Courtney

Date: Tue Jun 23 2026 - 21:21:55 EST


On Wed Jun 17, 2026 at 11:27 PM JST, Alexandre Courbot wrote:
> On Mon Jun 15, 2026 at 11:40 PM JST, Eliot Courtney wrote:
>> For GPU architectures that use FSP CoT boot, ensure that FSP itself is
>> booted before trying to use it. In particular, accessing registers like
>> `NV_USABLE_FB_SIZE_IN_MB` for `FbHal::vidmem_size` should happen after
>> FSP is booted. Currently, we wait for FSP boot too late. So, move this
>> wait to a new preboot phase.
>
> Can you give a source for why `NV_USABLE_FB_SIZE_IN_MB` depends on the
> FSP?
>
> <...>
>> diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs
>> index b3c91731db45..ca37892c3b38 100644
>> --- a/drivers/gpu/nova-core/gpu.rs
>> +++ b/drivers/gpu/nova-core/gpu.rs
>> @@ -295,7 +295,8 @@ pub(crate) fn new(
>> dev_info!(pdev,"NVIDIA ({})\n", spec);
>> })?,
>>
>> - // We must wait for GFW_BOOT completion before doing any significant setup on the GPU.
>> + // We must wait for some architecture specific setup to complete before doing any
>> + // significant setup on the GPU.
>> _: {
>> let hal = hal::gpu_hal(spec.chipset);
>> let dma_mask = hal.dma_mask();
>> @@ -304,8 +305,8 @@ pub(crate) fn new(
>> // still constructing it, so no concurrent DMA allocations can exist.
>> unsafe { pdev.dma_set_mask_and_coherent(dma_mask)? };
>>
>> - hal.wait_gfw_boot_completion(bar)
>> - .inspect_err(|_| dev_err!(pdev, "GFW boot did not complete\n"))?;
>> + hal.wait_preboot_completion(bar, spec.chipset)
>> + .inspect_err(|_| dev_err!(pdev, "preboot firmware did not complete\n"))?;
>
> It seems like there is going to be a need to make the `Fsp` available at
> the `Gpu` level to support the vGPU needs [1].
>
> So I guess the solution here will be to just instanciate the `Fsp` as we
> do for e.g. the falcons if we are on Hopper+. Hopefully that will also
> achieve what this patch intends to do.
>
> [1] https://lore.kernel.org/all/DJAZRULU1QHZ.2NSTR1ZPOQUSN@xxxxxxxxxx/

Yes I prefer that, cos we will get to keep Fsp creation requiring the
wait. We should document that it's required to create Fsp (wait for Fsp
boot) before accessing various registers etc though. So we can drop this
patch.

thanks!