Skip to content

gpu: nova-core: merge `load` and `boot` for falcons

Eliot Courtney dri-devel lkml nova-gpu 2 versions – In review

Get series with b4
b4 am [email protected] change-id 20261125-boot-rework2-3b6e58af67ae

Versions newest first

  1. v2 Latest6 patches 3 repliesIn review
  2. v17 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- Drop the patches that were applied to drm-rust-next
- Rebase on drm-rust-next
- Remove FalconDmaLoadTarget instead of renaming it to FalconLoadTarget
- Fix the framebuffer base doc and link MEM_BLOCK_ALIGNMENT in
patch #4 (Alex)
- Link to v1: https://patch.msgid.link/[email protected]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6gpu: nova-core: falcon: program BROM and BOOTVEC in `boot`drivers/gpu/nova-core/falcon.rs drivers/gpu/nova-core/firmware/booter.rs drivers/gpu/nova-core/firmware/fwsec.rs +2 more+25 -280 replies
2/6gpu: nova-core: use correct offset for imem in `BooterFirmware`drivers/gpu/nova-core/firmware/booter.rs+1 -10 replies
3/6gpu: nova-core: remove some dependencies on FalconDmaLoadTargetdrivers/gpu/nova-core/firmware/fwsec/bootloader.rs drivers/gpu/nova-core/firmware/gen_bootloader.rs+38 -532 replies
4/6gpu: nova-core: falcon: separate staging data for DMA from its locationdrivers/gpu/nova-core/falcon.rs+77 -510 replies
5/6gpu: nova-core: falcon: add `FalconImage` for `FalconFirmware` traitdrivers/gpu/nova-core/falcon.rs drivers/gpu/nova-core/firmware.rs drivers/gpu/nova-core/firmware/booter.rs +2 more+233 -3850 replies
6/6gpu: nova-core: falcon: load the firmware image in Falcon::bootdrivers/gpu/nova-core/falcon.rs drivers/gpu/nova-core/firmware/booter.rs drivers/gpu/nova-core/firmware/fwsec.rs +2 more+5 -100 replies

Reviews trailers per patch

None of the 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAlexandre Courbot
SeriesR-b
1/6
2/6
3/6
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/6] gpu: nova-core: merge `load` and `boot` for falcons

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 Coherents (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.

Tested boot on TU104, GA104, AD106 and GB205.

This is based on drm-rust-next.

[1]: https://lore.kernel.org/[email protected]

---
Changes in v2:
- Drop the patches that were applied to drm-rust-next
- Rebase on drm-rust-next
- Remove FalconDmaLoadTarget instead of renaming it to FalconLoadTarget
- Fix the framebuffer base doc and link MEM_BLOCK_ALIGNMENT in
patch #4 (Alex)
- Link to v1: https://patch.msgid.link/[email protected]

---
Eliot Courtney (6):
gpu: nova-core: falcon: program BROM and BOOTVEC in boot
gpu: nova-core: use correct offset for imem in BooterFirmware
gpu: nova-core: remove some dependencies on FalconDmaLoadTarget
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: load the firmware image in Falcon::boot

 drivers/gpu/nova-core/falcon.rs                    | 425 ++++++++-------------
 drivers/gpu/nova-core/firmware.rs                  |  74 +---
 drivers/gpu/nova-core/firmware/booter.rs           | 120 +++---
 drivers/gpu/nova-core/firmware/fwsec.rs            |  57 +--
 drivers/gpu/nova-core/firmware/fwsec/bootloader.rs |  49 +--
 drivers/gpu/nova-core/firmware/gen_bootloader.rs   | 103 +++--
 drivers/gpu/nova-core/gsp/hal/tu102.rs             |   9 +-
 7 files changed, 344 insertions(+), 493 deletions(-)

---
base-commit: abfb640b2374e26de8ff81d488c39d8254db538e
change-id: 20261125-boot-rework2-3b6e58af67ae

Best regards,

Signature · 1 line
Eliot Courtney <[email protected]>