Re: [PATCH v3 16/33] gpu: nova-core: move the bootloader DMEM descriptor out of FWSEC
From: Alexandre Courbot
Date: Mon Sep 28 2026 - 09:44:55 EST
On Fri Sep 18, 2026 at 10:07 AM JST, John Hubbard wrote:
> The generic falcon bootloader reads its load parameters from a
> descriptor that the driver places in DMEM. The r000 load-and-execute
> bootloader event carries such a descriptor, so its handler in the
> following patch needs the descriptor type.
>
> The descriptor was defined in the FWSEC code, which was its only user.
>
> Move the definition, unchanged, into the generic bootloader module. Its
> fields become pub(crate) so that the FWSEC code can still fill them in.
>
> No functional changes.
>
> Assisted-by: LLM
> Signed-off-by: John Hubbard <jhubbard@xxxxxxxxxx>
Just one ask for this one: since the descriptor has moved, all its
fields are now `pub(crate)`, which is not representative of how we
actually use them as this visibility is only needed for
`fwsec/bootloader.rs` to build its own instance.
Instead, can we keep the fields private, add accessors for the few that
we actually need to read after construction (that's `ctx_dma` only
IIUC), and add a constructor for fwsec to use? The constructor would
just need to take `imem_ns`, `imem_sec`, `dmem`, and the code and data
DMA bases (the `ctx_dma` being a constant).
This will turn the move into an actual move, while keeping more of the
logic (construction) inside `gen_bootloader.rs`.