Re: [PATCH 1/7] gpu: nova-core: separate the generic falcon bootloader from FWSEC
From: Eliot Courtney
Date: Thu Nov 05 2026 - 07:33:02 EST
On Tue Nov 3, 2026 at 7:22 PM JST, Alexandre Courbot wrote:
> From: John Hubbard <jhubbard@xxxxxxxxxx>
>
> The generic falcon bootloader is a small program that loads a larger
> image into a falcon. The r000 boot protocol needs it to run an image
> that GSP-RM names in a load-and-execute event during boot.
>
> Nova-core used the bootloader only to load FWSEC, so the bootloader code
> was part of the FWSEC code, and there was no way to run it on another
> image.
>
> Move the bootloader into its own type, which FWSEC then uses.
>
> No functional changes.
>
> Assisted-by: LLM
> Signed-off-by: John Hubbard <jhubbard@xxxxxxxxxx>
> Reviewed-by: Timur Tabi <ttabi@xxxxxxxxxx>
> Reviewed-by: Zhi Wang <zhiw@xxxxxxxxxx>
> [acourbot: document boot_addr(); split the change of IMEM placement into
> its own patch]
> Signed-off-by: Alexandre Courbot <acourbot@xxxxxxxxxx>
> ---
[...]
> +impl GenericBootloader {
> + /// Loads the generic bootloader image for `chipset`, placed right below the first 64 KiB of
> + /// IMEM.
> + ///
> + /// # Errors
> + ///
> + /// - `EINVAL` if a required TLV field is absent.
> + /// - `EOVERFLOW` if the image does not fit below 64 KiB.
> + /// - `ENOMEM` if the padded copy of the code cannot be allocated.
> + pub(crate) fn new(dev: &device::Device<device::Bound>, chipset: Chipset) -> Result<Self> {
nit: this takes a bound device, but it's only for logging so it could
make do with a plain &device::Device.
Reviewed-by: Eliot Courtney <ecourtney@xxxxxxxxxx>