Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

gpu: nova-core: add gen_bootloader firmware to ModInfoBuilder

Turing GPUs need an additional firmware file (the FWSEC generic
bootloader) in order to initialize. Add it to `ModInfoBuilder`.

Reviewed-by: Eliot Courtney <ecourtney@nvidia.com>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patch.msgid.link/20260306-turing_prep-v11-11-8f0042c5d026@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>

+22 -6
+15 -6
drivers/gpu/nova-core/firmware.rs
··· 417 417 ) 418 418 } 419 419 420 - const fn make_entry_chipset(self, chipset: &str) -> Self { 421 - self.make_entry_file(chipset, "booter_load") 422 - .make_entry_file(chipset, "booter_unload") 423 - .make_entry_file(chipset, "bootloader") 424 - .make_entry_file(chipset, "gsp") 420 + const fn make_entry_chipset(self, chipset: gpu::Chipset) -> Self { 421 + let name = chipset.name(); 422 + 423 + let this = self 424 + .make_entry_file(name, "booter_load") 425 + .make_entry_file(name, "booter_unload") 426 + .make_entry_file(name, "bootloader") 427 + .make_entry_file(name, "gsp"); 428 + 429 + if chipset.needs_fwsec_bootloader() { 430 + this.make_entry_file(name, "gen_bootloader") 431 + } else { 432 + this 433 + } 425 434 } 426 435 427 436 pub(crate) const fn create( ··· 440 431 let mut i = 0; 441 432 442 433 while i < gpu::Chipset::ALL.len() { 443 - this = this.make_entry_chipset(gpu::Chipset::ALL[i].name()); 434 + this = this.make_entry_chipset(gpu::Chipset::ALL[i]); 444 435 i += 1; 445 436 } 446 437
+7
drivers/gpu/nova-core/gpu.rs
··· 105 105 } 106 106 } 107 107 } 108 + 109 + /// Returns `true` if this chipset requires the PIO-loaded bootloader in order to boot FWSEC. 110 + /// 111 + /// This includes all chipsets < GA102. 112 + pub(crate) const fn needs_fwsec_bootloader(self) -> bool { 113 + matches!(self.arch(), Architecture::Turing) || matches!(self, Self::GA100) 114 + } 108 115 } 109 116 110 117 // TODO