On 9/11/25 1:04 PM, Alexandre Courbot wrote:
> + /// Attempt to start the GSP.
> + ///
> + /// This is a GPU-dependent and complex procedure that involves loading
> firmware files from
> + /// user-space, patching them with signatures, and building
> firmware-specific intricate data
> + /// structures that the GSP will use at runtime.
> + ///
> + /// Upon return, the GSP is up and running, and its runtime object given
> as return value.
> + pub(crate) fn start_gsp(
> + pdev: &pci::Device<device::Bound>,
> + bar: &Bar0,
> + chipset: Chipset,
> + gsp_falcon: &Falcon<Gsp>,
> + _sec2_falcon: &Falcon<Sec2>,
> + ) -> Result<()> {> + let dev = pdev.as_ref();
> +
> + let bios = Vbios::new(dev, bar)?;
> +
> + let fb_layout = FbLayout::new(chipset, bar)?;
> + dev_dbg!(dev, "{:#x?}\n", fb_layout);
> +
> + Self::run_fwsec_frts(dev, gsp_falcon, bar, &bios, &fb_layout)?;
> +
> + // Return an empty placeholder for now, to be replaced with the GSP
> runtime data.
> + Ok(())
> + }
I'd rather create the Gsp structure already, move the code to Gsp::new() and
return an impl PinInit<Self, Error>. If you don't want to store any of the
object instances you create above yet, you can just stuff all the code into an
initializer code block, as you do in the next patch with
gfw::wait_gfw_boot_completion().