Currently, loading the firmware and booting it is split into two separate steps. Load is always called in combination with boot. Rewrite the process to basically look like:
falcon.boot(<the firmware you want>, ...) Additionally, add a segment source for firmware already in the framebuffer (this is for HS binaries). This simplifies running HS binaries in the r000 load+exec boot process [1], because they can be treated as falcon firmware binaries directly, without having to call into the guts of the boot process code + make fns like `dma_wr` public. This is not a pure refactor, with this `dma_load` uses two `Coherent`s (one for imem, one for dmem) instead of one. The extra `Coherent` is a consequence of splitting the storage vs transfer method more orthogonally. I don't think it's consequential but jfyi. It also fixes one (harmless) issue with gsp boot. Tested boot on TU104, GA104, AD106 and GB205. This is based on drm-rust-next. [1]: https://lore.kernel.org/[email protected] Signed-off-by: Eliot Courtney <[email protected]> --- Eliot Courtney (7): gpu: nova-core: falcon: make pfalcon private gpu: nova-core: gsp: remove unnecessary start of `gsp_falcon` gpu: nova-core: falcon: program BROM and BOOTVEC in `boot` gpu: nova-core: falcon: separate staging data for DMA from its location gpu: nova-core: falcon: add `FalconImage` for `FalconFirmware` trait gpu: nova-core: falcon: rename FalconDmaLoadTarget to FalconLoadTarget gpu: nova-core: falcon: load the firmware image in Falcon::boot drivers/gpu/nova-core/falcon.rs | 442 +++++++++------------ drivers/gpu/nova-core/firmware.rs | 32 +- drivers/gpu/nova-core/firmware/booter.rs | 59 +-- drivers/gpu/nova-core/firmware/fwsec.rs | 47 +-- drivers/gpu/nova-core/firmware/fwsec/bootloader.rs | 9 +- drivers/gpu/nova-core/firmware/gen_bootloader.rs | 69 ++-- drivers/gpu/nova-core/gsp/hal/tu102.rs | 14 +- 7 files changed, 303 insertions(+), 369 deletions(-) --- base-commit: 4325f4aad9727a6e8e7f10c5d2ebf490470cf938 change-id: 20261125-boot-rework2-3b6e58af67ae Best regards, -- Eliot Courtney <[email protected]>
