Re: [PATCH v9 24/31] gpu: nova-core: Hopper/Blackwell: add FSP Chain of Trust boot
From: Alexandre Courbot
Date: Mon Mar 30 2026 - 11:16:10 EST
On Thu Mar 26, 2026 at 10:38 AM JST, John Hubbard wrote:
> Add boot_fmc() which builds and sends the Chain of Trust message to FSP,
> and FmcBootArgs which bundles the DMA-coherent boot parameters that FSP
> reads at boot time. The FspFirmware struct fields become pub(crate) and
> fmc_full changes from DmaObject to KVec<u8> for CPU-side signature
> extraction.
>
> Co-developed-by: Alexandre Courbot <acourbot@xxxxxxxxxx>
> Signed-off-by: Alexandre Courbot <acourbot@xxxxxxxxxx>
> Signed-off-by: John Hubbard <jhubbard@xxxxxxxxxx>
> ---
> drivers/gpu/nova-core/firmware/fsp.rs | 8 +-
> drivers/gpu/nova-core/fsp.rs | 170 +++++++++++++++++++++++++-
> drivers/gpu/nova-core/gpu.rs | 1 -
> drivers/gpu/nova-core/mctp.rs | 7 --
> 4 files changed, 172 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/gpu/nova-core/firmware/fsp.rs b/drivers/gpu/nova-core/firmware/fsp.rs
> index 028f651553e0..5bd15b644825 100644
> --- a/drivers/gpu/nova-core/firmware/fsp.rs
> +++ b/drivers/gpu/nova-core/firmware/fsp.rs
> @@ -14,16 +14,16 @@
> gpu::Chipset, //
> };
>
> -#[expect(unused)]
> +#[expect(dead_code)]
Why?
> pub(crate) struct FspFirmware {
> /// FMC firmware image data (only the "image" ELF section).
> - fmc_image: DmaObject,
> - /// Full FMC ELF (for signature extraction.
> + pub(crate) fmc_image: DmaObject,
> + /// Full FMC ELF for signature extraction.
> pub(crate) fmc_elf: Firmware,
Let's make the comment for `fmc_elf` correct since its introduction
instead of fixing it here?
> }
>
> impl FspFirmware {
> - #[expect(unused)]
> + #[expect(dead_code)]
Same here, I don't see the point. If it's not unused anymore, let's
remove the `expect` entirely. If it is, let's keep the more accurate
`unused`.
Btw, this is the kind of stuff you'd normally catch by looking at the
diff before sending it. I shouldn't have to do this.