Re: [PATCH v2 3/8] gpu: nova-core: firmware: process Booter and patch its signature

From: Timur Tabi
Date: Thu Aug 28 2025 - 16:59:13 EST


On Tue, 2025-08-26 at 13:07 +0900, Alexandre Courbot wrote:
> +struct HsHeaderV2 {
> +    /// Offset to the start of the signatures.
> +    sig_prod_offset: u32,
> +    /// Size in bytes of the signatures.
> +    sig_prod_size: u32,
> +    /// Offset to a `u32` containing the location at which to patch the signature in the
> microcode
> +    /// image.
> +    patch_loc: u32,
> +    /// Offset to a `u32` containing the index of the signature to patch.
> +    patch_sig: u32,
> +    /// Start offset to the signature metadata.
> +    meta_data_offset: u32,
> +    /// Size in bytes of the signature metadata.
> +    meta_data_size: u32,
> +    /// Offset to a `u32` containing the number of signatures in the signatures section.
> +    num_sig: u32,
> +    /// Offset of the application-specific header.
> +    header_offset: u32,
> +    /// Size in bytes of the application-specific header.
> +    header_size: u32,
> +}

You are inconsistent with the names of offset fields in this struct.

patch_loc should be patch_loc_offset
patch_sig should be patch_sig_offset
num_sig should be num_sig_offset